From 0abf3937ce651d26b18a3ab93ed916f3e7bd04dd Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Thu, 23 Feb 2006 12:55:56 +0000 Subject: Initial revision --- src/mesa/drivers/dri/nouveau/Makefile | 30 + src/mesa/drivers/dri/nouveau/nouveau_context.c | 209 +++++++ src/mesa/drivers/dri/nouveau/nouveau_context.h | 129 +++++ src/mesa/drivers/dri/nouveau/nouveau_driver.c | 145 +++++ src/mesa/drivers/dri/nouveau/nouveau_driver.h | 39 ++ src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 96 ++++ src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 96 ++++ src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 53 ++ src/mesa/drivers/dri/nouveau/nouveau_ioctl.h | 33 ++ src/mesa/drivers/dri/nouveau/nouveau_lock.c | 64 +++ src/mesa/drivers/dri/nouveau/nouveau_lock.h | 69 +++ src/mesa/drivers/dri/nouveau/nouveau_msg.h | 69 +++ src/mesa/drivers/dri/nouveau/nouveau_reg.h | 60 ++ src/mesa/drivers/dri/nouveau/nouveau_screen.h | 55 ++ src/mesa/drivers/dri/nouveau/nouveau_span.c | 121 ++++ src/mesa/drivers/dri/nouveau/nouveau_span.h | 38 ++ src/mesa/drivers/dri/nouveau/nouveau_tex.c | 49 ++ src/mesa/drivers/dri/nouveau/nouveau_tex.h | 33 ++ src/mesa/drivers/dri/nouveau/nouveau_tris.c | 126 +++++ src/mesa/drivers/dri/nouveau/nouveau_tris.h | 52 ++ src/mesa/drivers/dri/nouveau/nv40_tris.c | 738 +++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv40_tris.h | 39 ++ 22 files changed, 2343 insertions(+) create mode 100644 src/mesa/drivers/dri/nouveau/Makefile create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_context.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_context.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_driver.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_driver.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_fifo.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_fifo.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_ioctl.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_ioctl.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_lock.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_lock.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_msg.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_reg.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_screen.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_span.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_span.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_tex.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_tex.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_tris.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_tris.h create mode 100644 src/mesa/drivers/dri/nouveau/nv40_tris.c create mode 100644 src/mesa/drivers/dri/nouveau/nv40_tris.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile new file mode 100644 index 0000000000..02632c49cf --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -0,0 +1,30 @@ +# src/mesa/drivers/dri/nouveau/Makefile + +TOP = ../../../../.. +include $(TOP)/configs/current + +LIBNAME = nouveau_dri.so + +MINIGLX_SOURCES = + +DRIVER_SOURCES = \ + nouveau_context.c \ + nouveau_driver.c \ + nouveau_fifo.c \ + nouveau_ioctl.c \ + nouveau_lock.c \ + nouveau_span.c \ + nouveau_tex.c \ + nouveau_tris.c \ + nv40_tris.c + +C_SOURCES = \ + $(COMMON_SOURCES) \ + $(DRIVER_SOURCES) + +ASM_SOURCES = + + +include ../Makefile.template + +symlinks: diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c new file mode 100644 index 0000000000..1a8dc6a6c4 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -0,0 +1,209 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "glheader.h" +#include "context.h" +#include "simple_list.h" +#include "imports.h" +#include "matrix.h" +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" + +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + +#include "drivers/common/driverfuncs.h" + +#include "nouveau_context.h" +#include "nouveau_ioctl.h" +#include "nouveau_driver.h" +//#include "nouveau_state.h" +#include "nouveau_span.h" +#include "nouveau_tex.h" +#include "nv40_tris.h" + +#include "vblank.h" +#include "utils.h" +#include "texmem.h" +#include "xmlpool.h" /* for symbolic values of enum-type options */ + +#ifndef NOUVEAU_DEBUG +int NOUVEAU_DEBUG = 0; +#endif + +static const struct dri_debug_control debug_control[] = +{ + { NULL, 0 } +}; + +/* Create the device specific context. + */ +GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ) +{ + GLcontext *ctx, *shareCtx; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + struct dd_function_table functions; + nouveauContextPtr nmesa; + nouveauScreenPtr screen; + int i; + + /* Allocate the context */ + nmesa = (nouveauContextPtr) CALLOC( sizeof(*nmesa) ); + if ( !nmesa ) + return GL_FALSE; + + /* Init default driver functions then plug in our Radeon-specific functions + * (the texture functions are especially important) + */ + _mesa_init_driver_functions( &functions ); + nouveauDriverInitFunctions( &functions ); + nouveauIoctlInitFunctions( &functions ); + nouveauTexInitFunctions( &functions ); + + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((nouveauContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + nmesa->glCtx = _mesa_create_context(glVisual, shareCtx, + &functions, (void *) nmesa); + if (!nmesa->glCtx) { + FREE(nmesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = nmesa; + ctx = nmesa->glCtx; + + nmesa->driContext = driContextPriv; + nmesa->driScreen = sPriv; + nmesa->driDrawable = NULL; + nmesa->hHWContext = driContextPriv->hHWContext; + nmesa->driHwLock = &sPriv->pSAREA->lock; + nmesa->driFd = sPriv->fd; + + nmesa->screen = (nouveauScreenPtr)(sPriv->private); + screen=nmesa->screen; + + /* Parse configuration files */ + driParseConfigFiles (&nmesa->optionCache, &screen->optionCache, + screen->driScreen->myNum, "nouveau"); + + nmesa->sarea = (drm_nouveau_sarea_t *)((char *)sPriv->pSAREA + + screen->sarea_priv_offset); + + + nmesa->current_primitive = -1; + + /* Initialize the swrast */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); + + switch(nmesa->screen->card_type) + { + case NV_03: + case NV_04: + case NV_05: + case NV_10: + case NV_20: + case NV_30: + default: + break; + case NV_40: + case G_70: + nv40TriInitFunctions( ctx ); + break; + } + nouveauDDInitStateFuncs( ctx ); + nouveauSpanInitFunctions( ctx ); + nouveauDDInitState( nmesa ); + + driContextPriv->driverPrivate = (void *)nmesa; + + NOUVEAU_DEBUG = driParseDebugString( getenv( "NOUVEAU_DEBUG" ), + debug_control ); + + if (driQueryOptionb(&nmesa->optionCache, "no_rast")) { + fprintf(stderr, "disabling 3D acceleration\n"); + FALLBACK(nmesa, NOUVEAU_FALLBACK_DISABLE, 1); + } + + return GL_TRUE; +} + +/* Destroy the device specific context. */ +void nouveauDestroyContext( __DRIcontextPrivate *driContextPriv ) +{ + nouveauContextPtr nmesa = (nouveauContextPtr) driContextPriv->driverPrivate; + + assert(nmesa); + if ( nmesa ) { + /* free the option cache */ + driDestroyOptionCache (&nmesa->optionCache); + + FREE( nmesa ); + } + +} + + +/* Force the context `c' to be the current context and associate with it + * buffer `b'. + */ +GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) +{ + if ( driContextPriv ) { + GET_CURRENT_CONTEXT(ctx); + nouveauContextPtr oldNOUVEAUCtx = ctx ? NOUVEAU_CONTEXT(ctx) : NULL; + nouveauContextPtr newNOUVEAUCtx = (nouveauContextPtr) driContextPriv->driverPrivate; + + driDrawableInitVBlank( driDrawPriv, newNOUVEAUCtx->vblank_flags ); + newNOUVEAUCtx->driDrawable = driDrawPriv; + + _mesa_make_current( newNOUVEAUCtx->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + + } else { + _mesa_make_current( NULL, NULL, NULL ); + } + + return GL_TRUE; +} + + +/* Force the context `c' to be unbound from its buffer. + */ +GLboolean nouveauUnbindContext( __DRIcontextPrivate *driContextPriv ) +{ + return GL_TRUE; +} diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h new file mode 100644 index 0000000000..d287439fcf --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -0,0 +1,129 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NOUVEAU_CONTEXT_H__ +#define __NOUVEAU_CONTEXT_H__ + +#include "dri_util.h" +#include "drm.h" +#include "nouveau_drm.h" + +#include "mtypes.h" +#include "tnl/t_vertex.h" + +#include "nouveau_reg.h" +#include "nouveau_screen.h" + +#include "xmlconfig.h" + +typedef struct nouveau_fifo_t{ + u_int32_t* buffer; + u_int32_t current; + u_int32_t put; + u_int32_t free; + u_int32_t max; +} +nouveau_fifo; + +#define TAG(x) nouveau##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + + +typedef void (*nouveau_tri_func)( struct nouveau_context*, + nouveauVertex *, + nouveauVertex *, + nouveauVertex * ); + +typedef void (*nouveau_line_func)( struct nouveau_context*, + nouveauVertex *, + nouveauVertex * ); + +typedef void (*nouveau_point_func)( struct nouveau_context*, + nouveauVertex * ); + + +typedef struct nouveau_context { + /* Mesa context */ + GLcontext *glCtx; + + /* The per-context fifo */ + nouveau_fifo fifo; + + /* The fifo control regs */ + volatile unsigned char* fifo_mmio; + + /* The read-only regs */ + volatile unsigned char* mmio; + + /* The drawing fallbacks */ + nouveau_tri_func* draw_tri; + nouveau_line_func* draw_line; + nouveau_point_func* draw_point; + + /* Cliprects information */ + GLuint numClipRects; + drm_clip_rect_t *pClipRects; + + /* The rendering context information */ + GLenum current_primitive; /* the current primitive enum */ + GLuint render_inputs; /* the current render inputs */ + + nouveauScreenRec *screen; + drm_nouveau_sarea_t *sarea; + + __DRIcontextPrivate *driContext; /* DRI context */ + __DRIscreenPrivate *driScreen; /* DRI screen */ + __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + + drm_context_t hHWContext; + drm_hw_lock_t *driHwLock; + int driFd; + + /* Configuration cache */ + driOptionCache optionCache; +}nouveauContextRec, *nouveauContextPtr; + +#define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) + + +extern GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ); + +extern void nouveauDestroyContext( __DRIcontextPrivate * ); + +extern GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ); + +extern GLboolean nouveauUnbindContext( __DRIcontextPrivate *driContextPriv ); + + +#endif /* __NOUVEAU_CONTEXT_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c new file mode 100644 index 0000000000..165fc4929f --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -0,0 +1,145 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" +#include "nouveau_ioctl.h" +//#include "nouveau_state.h" +#include "nouveau_driver.h" +#include "swrast/swrast.h" + +#include "context.h" +#include "framebuffer.h" + +#include "utils.h" + + +/* Return the width and height of the current color buffer */ +static void nouveauGetBufferSize( GLframebuffer *buffer, + GLuint *width, GLuint *height ) +{ + GET_CURRENT_CONTEXT(ctx); + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + LOCK_HARDWARE( nmesa ); + *width = nmesa->driDrawable->w; + *height = nmesa->driDrawable->h; + UNLOCK_HARDWARE( nmesa ); +} + +/* glGetString */ +static const GLubyte *nouveauGetString( GLcontext *ctx, GLenum name ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + static char buffer[128]; + const char * card_name = "Unknown"; + GLuint agp_mode = 0; + + switch ( name ) { + case GL_VENDOR: + return (GLubyte *)DRIVER_AUTHOR; + + case GL_RENDERER: + switch(nmesa->screen->card_type) + { + case NV_03: + card_name="Riva 128"; + break; + case NV_04: + card_name="TNT"; + break; + case NV_05: + card_name="TNT2"; + break; + case NV_10: + card_name="GeForce 1/2/4Mx"; + break; + case NV_20: + card_name="GeForce 3/4Ti"; + break; + case NV_30: + card_name="GeForce FX 5x00"; + break; + case NV_40: + card_name="GeForce FX 6x00"; + break; + case G_70: + card_name="GeForce FX 7x00"; + break; + default: + break; + } + + switch(nmesa->screen->bus_type) + { + case NV_PCI: + case NV_PCIE: + default: + agp_mode=0; + break; + case NV_AGP: + nmesa->screen->agp_mode; + break; + } + driGetRendererString( buffer, card_name, DRIVER_DATE, + agp_mode ); + return (GLubyte *)buffer; + default: + return NULL; + } +} + +/* glFlush */ +static void nouveauFlush( GLcontext *ctx ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + FIRE_RING( nmesa ); +} + +/* glFinish */ +static void nouveauFinish( GLcontext *ctx ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveauFlush( ctx ); + nouveauWaitForIdle( nmesa ); +} + +/* glClear */ +static void nouveauClear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) +{ + // XXX we really should do something here... +} + +void nouveauDriverInitFunctions( struct dd_function_table *functions ) +{ + functions->GetBufferSize = nouveauGetBufferSize; + functions->ResizeBuffers = _mesa_resize_framebuffer; + functions->GetString = nouveauGetString; + functions->Flush = nouveauFlush; + functions->Finish = nouveauFinish; + functions->Clear = nouveauClear; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h new file mode 100644 index 0000000000..e1541aa3c5 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h @@ -0,0 +1,39 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NOUVEAU_DRIVER_H__ +#define __NOUVEAU_DRIVER_H__ + +#define DRIVER_DATE "20060219" +#define DRIVER_AUTHOR "Stephane Marchesin" + +extern void nouveauDriverInitFunctions( struct dd_function_table *functions ); + + +#endif /* __NOUVEAU_DRIVER_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c new file mode 100644 index 0000000000..a330d5268b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -0,0 +1,96 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#include "nouveau_fifo.h" +#include "vblank.h" + +#define RING_SKIPS 8 + +void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) +{ + u_int32_t fifo_get; + while(nmesa->fifo.free < size+1) { + fifo_get = NV_FIFO_READ(NV03_FIFO_REGS_DMAGET); + + if(nmesa->fifo.put >= fifo_get) { + nmesa->fifo.free = nmesa->fifo.max - nmesa->fifo.current; + if(nmesa->fifo.free < size+1) { + OUT_RING(NV03_FIFO_CMD_REWIND); \ + if(fifo_get <= RING_SKIPS) { + if(nmesa->fifo.put <= RING_SKIPS) /* corner case - will be idle */ + NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, RING_SKIPS + 1); + do { fifo_get = NV_FIFO_READ(NV03_FIFO_REGS_DMAGET); } + while(fifo_get <= RING_SKIPS); + } + NV03_FIFO_REGS_DMAPUT(NV03_FIFO_REGS_DMAPUT, RING_SKIPS); + nmesa->fifo.current = nmesa->fifo.put = RING_SKIPS; + nmesa->fifo.free = fifo_get - (RING_SKIPS + 1); + } + } else + nmesa->fifo.free = fifo_get - nmesa->fifo.current - 1; + } +} + +/* + * Wait for the card to be idle + * XXX we should also wait for an empty fifo + */ +void nouveauWaitForIdleLocked(nouveauContextPtr *nmesa) +{ + int i,status; + + for(i=0;i<1000000;i++) /* 1 second */ + { + switch(nmesa->screen->card_type) + { + case NV_03: + status=NV_READ(NV03_STATUS); + break; + case NV_04: + case NV_05: + case NV_10: + case NV_20: + case NV_30: + case NV_40: + case G_70: + default: + status=NV_READ(NV04_STATUS); + break; + } + if (status) + return 0; + DO_USLEEP(1); + } +} + +void nouveauWaitForIdle(nouveauContextPtr *nmesa) +{ + LOCK_HARDWARE(nmesa); + nouveauWaitForIdleLocked(nmesa); + UNLOCK_HARDWARE(nmesa); +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h new file mode 100644 index 0000000000..6a21687551 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -0,0 +1,96 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NOUVEAU_FIFO_H__ +#define __NOUVEAU_FIFO_H__ + +#include "nouveau_context.h" + +#define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) + +#define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo_mmio + (reg)) +#define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo_mmio + (reg)) = value; + +/* + * Ring/fifo interface + * + * - Begin a ring section with BEGIN_RING_SIZE (if you know the full size in advance) + * - Begin a ring section with BEGIN_RING_PRIM otherwise (and then finish with FINISH_RING_PRIM) + * - Output stuff to the ring with either OUT_RINGp (outputs a raw mem chunk), OUT_RING (1 uint32_t) or OUT_RINGf (1 float) + * - RING_AVAILABLE returns the available fifo (in uint32_ts) + * - RING_AHEAD returns how much ahead of the last submission point we are + * - FIRE_RING fire whatever we have that wasn't fired before + * - WAIT_RING waits for size (in uint32_ts) to be available in the fifo + */ + +#define OUT_RINGp(ptr,sz) do{ \ + memcpy(nmesa->fifo.buffer+nmesa->fifo.current,ptr,sz); \ + nmesa->fifo.current+=sz; \ +}while(0) + +#define OUT_RING(n) do { \ +nmesa->fifo.buffer[nmesa->fifo.current++]=n; \ +}while(0) + +#define OUT_RINGf(n) do { \ +*((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=n; \ +}while(0) + +extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); + +#define BEGIN_RING_PRIM(subchannel,tag,size) do { \ + if (nmesa->fifo.freefifo.buffer[nmesa->fifo.put]|=((nmesa->fifo.current-nmesa->fifo.put) << 18); \ +}while(0) + +#define BEGIN_RING_SIZE(subchannel,tag,size) do { \ + if (nmesa->fifo.freefifo.free-1) + +#define RING_AHEAD() ((nmesa->fifo.put<=nmesa->fifo.current)?(nmesa->fifo.current-nmesa->fifo.put):nmesa->fifo.max-nmesa->fifo.put+nmesa->fifo.current) + +#define FIRE_RING() do { \ + if (nmesa->fifo.current!=nmesa->fifo.put) {\ + nmesa->fifo.put=nmesa->fifo.current;\ + NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT,nmesa->fifo.put);\ + }\ +}while(0) + + +#endif /* __NOUVEAU_FIFO_H__ */ + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c new file mode 100644 index 0000000000..959c5f465b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c @@ -0,0 +1,53 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#include "nouveau_ioctl.h" +#include "nouveau_context.h" +#include "nouveau_msg.h" + +// here we call the fifo initialization ioctl and fill in stuff accordingly +void nouveauIoctlInitFifo() +{ + int ret; + int fifo_num; + __DRIscreenPrivate *sPriv; + drm_nouveau_fifo_init_t fifo_init; + + fifo_init.fifo_num=&fifo_num; + ret = drmCommandWriteRead(sPriv->fd, DRM_NOUVEAU_FIFO_INIT, &fifo_init, sizeof(fifo_init)); + if (ret) + FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); + MESSAGE("Fifo init ok. Got number %d\n",fifo_num); + // XXX needs more stuff +} + +void nouveauIoctlInitFunctions( struct dd_function_table *functions ) +{ + // nothing for now +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h new file mode 100644 index 0000000000..e6a9a7e249 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h @@ -0,0 +1,33 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#ifndef __NOUVEAU_IOCTL_H__ +#define __NOUVEAU_IOCTL_H__ + +extern void nouveauIoctlInitFunctions( struct dd_function_table *functions ); + +#endif /* __NOUVEAU_IOCTL_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_lock.c b/src/mesa/drivers/dri/nouveau/nouveau_lock.c new file mode 100644 index 0000000000..1bd2ee4ca9 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_lock.c @@ -0,0 +1,64 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#include "nouveau_context.h" +#include "nouveau_lock.h" + +#include "drirenderbuffer.h" + + +/* Update the hardware state. This is called if another context has + * grabbed the hardware lock, which includes the X server. This + * function also updates the driver's window state after the X server + * moves, resizes or restacks a window -- the change will be reflected + * in the drawable position and clip rects. Since the X server grabs + * the hardware lock when it changes the window state, this routine will + * automatically be called after such a change. + */ +void nouveauGetLock( nouveauContextPtr nmesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = nmesa->driDrawable; + __DRIscreenPrivate *sPriv = nmesa->driScreen; + drm_nouveau_sarea_t *sarea = nmesa->sarea; + int i; + + drmGetLock( nmesa->driFd, nmesa->hHWContext, flags ); + + /* The window might have moved, so we might need to get new clip + * rects. + * + * NOTE: This releases and regrabs the hw lock to allow the X server + * to respond to the DRI protocol request for new drawable info. + * Since the hardware state depends on having the latest drawable + * clip rects, all state checking must be done _after_ this call. + */ + DRI_VALIDATE_DRAWABLE_INFO( sPriv, dPriv ); + + nmesa->numClipRects = dPriv->numClipRects; + nmesa->pClipRects = dPriv->pClipRects; + +} diff --git a/src/mesa/drivers/dri/nouveau/nouveau_lock.h b/src/mesa/drivers/dri/nouveau/nouveau_lock.h new file mode 100644 index 0000000000..38bb001425 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_lock.h @@ -0,0 +1,69 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#ifndef __NOUVEAU_LOCK_H__ +#define __NOUVEAU_LOCK_H__ + +#include "nouveau_context.h" + +extern void nouveauGetLock( nouveauContextPtr nmesa, GLuint flags ); + +/* + * !!! We may want to separate locks from locks with validation. This + * could be used to improve performance for those things commands that + * do not do any drawing !!! + */ + +/* Lock the hardware and validate our state. + */ +#define LOCK_HARDWARE( nmesa ) \ + do { \ + char __ret = 0; \ + DEBUG_CHECK_LOCK(); \ + DRM_CAS( nmesa->driHwLock, nmesa->hHWContext, \ + (DRM_LOCK_HELD | nmesa->hHWContext), __ret ); \ + if ( __ret ) \ + nouveauGetLock( nmesa, 0 ); \ + DEBUG_LOCK(); \ + } while (0) + +/* Unlock the hardware. + */ +#define UNLOCK_HARDWARE( nmesa ) \ + do { \ + DRM_UNLOCK( nmesa->driFd, \ + nmesa->driHwLock, \ + nmesa->hHWContext ); \ + DEBUG_RESET(); \ + } while (0) + +#define DEBUG_LOCK() +#define DEBUG_RESET() +#define DEBUG_CHECK_LOCK() + + +#endif /* __NOUVEAU_LOCK_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_msg.h b/src/mesa/drivers/dri/nouveau/nouveau_msg.h new file mode 100644 index 0000000000..7b8f89e774 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_msg.h @@ -0,0 +1,69 @@ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. +Copyright 2006 Stephane Marchesin. All Rights Reserved + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Keith Whitwell + * Nicolai Haehnle + */ + + +#ifndef __NOUVEAU_MSG_H__ +#define __NOUVEAU_MSG_H__ + +#define WARN_ONCE(a, ...) do {\ + static int warn##__LINE__=1;\ + if(warn##__LINE__){\ + fprintf(stderr, "*********************************WARN_ONCE*********************************\n");\ + fprintf(stderr, "File %s function %s line %d\n", __FILE__, __FUNCTION__, __LINE__);\ + fprintf(stderr, a, ## __VA_ARGS__);\ + fprintf(stderr, "***************************************************************************\n");\ + warn##__LINE__=0;\ + } \ + }while(0) + +#define MESSAGE(a, ...) do{\ + fprintf(stderr, "************************************INFO***********************************\n");\ + fprintf(stderr, "File %s function %s line %d\n", __FILE__, __FUNCTION__, __LINE__); \ + fprintf(stderr, a, ## __VA_ARGS__);\ + fprintf(stderr, "***************************************************************************\n");\ + exit(0);\ + }while(0) + +#define FATAL(a, ...) do{\ + fprintf(stderr, "***********************************FATAL***********************************\n");\ + fprintf(stderr, "File %s function %s line %d\n", __FILE__, __FUNCTION__, __LINE__); \ + fprintf(stderr, a, ## __VA_ARGS__);\ + fprintf(stderr, "***************************************************************************\n");\ + exit(0);\ + }while(0) + +#endif /* __NOUVEAU_MSG_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h new file mode 100644 index 0000000000..8b936a5cec --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -0,0 +1,60 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP 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. + +**************************************************************************/ + + + + +#define NV03_BOOT_0 0x00100000 +# define NV03_BOOT_0_RAM_AMOUNT 0x00000003 +# define NV03_BOOT_0_RAM_AMOUNT_8MB 0x00000000 +# define NV03_BOOT_0_RAM_AMOUNT_2MB 0x00000001 +# define NV03_BOOT_0_RAM_AMOUNT_4MB 0x00000002 +# define NV03_BOOT_0_RAM_AMOUNT_8MB_SDRAM 0x00000003 +# define NV04_BOOT_0_RAM_AMOUNT_32MB 0x00000000 +# define NV04_BOOT_0_RAM_AMOUNT_4MB 0x00000001 +# define NV04_BOOT_0_RAM_AMOUNT_8MB 0x00000002 +# define NV04_BOOT_0_RAM_AMOUNT_16MB 0x00000003 + +#define NV04_FIFO_DATA 0x0010020c +# define NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK 0xfff00000 +# define NV10_FIFO_DATA_RAM_AMOUNT_MB_SHIFT 20 + +#define NV03_STATUS 0x004006b0 +#define NV04_STATUS 0x00400700 + +#define NV03_FIFO_SIZE 0x8000 +// NV10 maybe has 12 fifos +// NV40 probably has 16 fifos +#define NV03_FIFO_NUMBER 8 +#define NV03_FIFO_REGS_SIZE 0x10000 +# define NV03_FIFO_REGS_DMAPUT 0x00000040 +# define NV03_FIFO_REGS_DMAGET 0x00000044 + +/* Fifo commands. These are not regs, neither masks */ +#define NV03_FIFO_CMD_JUMP 0x20000000 +#define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc +#define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK)) + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.h b/src/mesa/drivers/dri/nouveau/nouveau_screen.h new file mode 100644 index 0000000000..b8e8bfc22a --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.h @@ -0,0 +1,55 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#ifndef __NOUVEAU_SCREEN_H__ +#define __NOUVEAU_SCREEN_H__ + +#include "xmlconfig.h" + +typedef struct { + u_int32_t card_type; + u_int32_t bus_type; + u_int32_t agp_mode; + + GLuint frontOffset; + GLuint frontPitch; + GLuint backOffset; + GLuint backPitch; + + GLuint depthOffset; + GLuint depthPitch; + GLuint spanOffset; + + __DRIscreenPrivate *driScreen; + + /* Configuration cache with default values for all contexts */ + driOptionCache optionCache; + +} nouveauScreenRec, *nouveauScreenPtr; + + +#endif /* __NOUVEAU_SCREEN_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.c b/src/mesa/drivers/dri/nouveau/nouveau_span.c new file mode 100644 index 0000000000..f990a8907e --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_span.c @@ -0,0 +1,121 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#include "nouveau_context.h" +#include "nouveau_span.h" +#include "nouveau_fifo.h" + +#include "swrast/swrast.h" + +#define HAVE_HW_DEPTH_SPANS 0 +#define HAVE_HW_DEPTH_PIXELS 0 +#define HAVE_HW_STENCIL_SPANS 0 +#define HAVE_HW_STENCIL_PIXELS 0 + +#define LOCAL_VARS \ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \ + __DRIscreenPrivate *sPriv = nmesa->driScreen; \ + __DRIdrawablePrivate *dPriv = nmesa->driDrawable; \ + driRenderbuffer *drb = (driRenderbuffer *) rb; \ + GLuint height = dPriv->h; \ + GLuint p; \ + (void) p; + +#define Y_FLIP( _y ) (height - _y - 1) + +#define HW_LOCK() + +#define HW_UNLOCK() + + + +/* ================================================================ + * Color buffers + */ + +/* RGB565 */ +#define SPANTMP_PIXEL_FMT GL_RGB +#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5 + +#define TAG(x) nouveau##x##_RGB565 +#define TAG2(x,y) nouveau##x##_RGB565##y +#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \ + + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp) +#include "spantmp2.h" + + +/* ARGB8888 */ +#define SPANTMP_PIXEL_FMT GL_BGRA +#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV + +#define TAG(x) nouveau##x##_ARGB8888 +#define TAG2(x,y) nouveau##x##_ARGB8888##y +#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \ + + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp) +#include "spantmp2.h" + +static void +nouveauSpanRenderStart( GLcontext *ctx ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + FIRE_RING(); + LOCK_HARDWARE(nmesa); + nouveauWaitForIdleLocked( nmesa ); +} + +static void +nouveauSpanRenderFinish( GLcontext *ctx ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + _swrast_flush( ctx ); + nouveauWaitForIdleLocked( nmesa ); + UNLOCK_HARDWARE( nmesa ); +} + +void nouveauSpanInitFunctions( GLcontext *ctx ) +{ + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + swdd->SpanRenderStart = nouveauSpanRenderStart; + swdd->SpanRenderFinish = nouveauSpanRenderFinish; +} + + +/** + * Plug in the Get/Put routines for the given driRenderbuffer. + */ +void +nouveauSpanSetFunctions(driRenderbuffer *drb, const GLvisual *vis) +{ + if (drb->Base.InternalFormat == GL_RGBA) { + if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { + nouveauInitPointers_RGB565(&drb->Base); + } + else { + nouveauInitPointers_ARGB8888(&drb->Base); + } + } +} diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.h b/src/mesa/drivers/dri/nouveau/nouveau_span.h new file mode 100644 index 0000000000..f5e5733ba8 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_span.h @@ -0,0 +1,38 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NOUVEAU_SPAN_H__ +#define __NOUVEAU_SPAN_H__ + +#include "drirenderbuffer.h" + +extern void nouveauSpanInitFunctions( GLcontext *ctx ); +extern void nouveauSpanSetFunctions(driRenderbuffer *rb, const GLvisual *vis); + +#endif /* __NOUVEAU_SPAN_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tex.c b/src/mesa/drivers/dri/nouveau/nouveau_tex.c new file mode 100644 index 0000000000..e3160b2d3d --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_tex.c @@ -0,0 +1,49 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#include "nouveau_tex.h" + +// XXX needs some love +void nouveauInitTextureFuncs( struct dd_function_table *functions ) +{ +/* + functions->TexEnv = nouveauTexEnv; + functions->ChooseTextureFormat = nouveauChooseTextureFormat; + functions->TexImage1D = nouveauTexImage1D; + functions->TexSubImage1D = nouveauTexSubImage1D; + functions->TexImage2D = nouveauTexImage2D; + functions->TexSubImage2D = nouveauTexSubImage2D; + functions->TexParameter = nouveauTexParameter; + functions->BindTexture = nouveauBindTexture; + functions->NewTextureObject = nouveauNewTextureObject; + functions->DeleteTexture = nouveauDeleteTexture; + functions->IsTextureResident = driIsTextureResident; + + driInitTextureFormats(); +*/ +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tex.h b/src/mesa/drivers/dri/nouveau/nouveau_tex.h new file mode 100644 index 0000000000..c415dc2a6b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_tex.h @@ -0,0 +1,33 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + +#ifndef __NOUVEAU_TEX_H__ +#define __NOUVEAU_TEX_H__ + +extern void nouveauTexInitFunctions( struct dd_function_table *functions ); + +#endif /* __NOUVEAU_TEX_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c new file mode 100644 index 0000000000..770776390b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -0,0 +1,126 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" + +/* Common tri functions */ + +/* The fallbacks */ +void nouveau_fallback_tri(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1, + nouveauVertex *v2) +{ + GLcontext *ctx = nmesa->glCtx; + SWvertex v[3]; + _swsetup_Translate(ctx, v0, &v[0]); + _swsetup_Translate(ctx, v1, &v[1]); + _swsetup_Translate(ctx, v2, &v[2]); + nouveauSpanRenderStart( ctx ); + _swrast_Triangle(ctx, &v[0], &v[1], &v[2]); + nouveauSpanRenderFinish( ctx ); +} + + +void nouveau_fallback_line(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1) +{ + GLcontext *ctx = nmesa->glCtx; + SWvertex v[2]; + _swsetup_Translate(ctx, v0, &v[0]); + _swsetup_Translate(ctx, v1, &v[1]); + nouveauSpanRenderStart( ctx ); + _swrast_Line(ctx, &v[0], &v[1]); + nouveauSpanRenderFinish( ctx ); +} + + +void nouveau_fallback_point(struct nouveau_context *nmesa, + nouveauVertex *v0) +{ + GLcontext *ctx = nmesa->glCtx; + SWvertex v[1]; + _swsetup_Translate(ctx, v0, &v[0]); + nouveauSpanRenderStart( ctx ); + _swrast_Point(ctx, &v[0]); + nouveauSpanRenderFinish( ctx ); +} + + +void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) +{ + GLcontext *ctx = nmesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = nmesa->Fallback; + + if (mode) { + nmesa->Fallback |= bit; + if (oldfallback == 0) { + nv40FinishPrimitive(nmesa); + + _swsetup_Wakeup(ctx); + nmesa->renderIndex = ~0; + } + } + else { + nmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + + tnl->Driver.Render.Start = nouveauRenderStart; + tnl->Driver.Render.PrimitiveNotify = nouveauRenderPrimitive; + tnl->Driver.Render.Finish = nouveauRenderFinish; + + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + + _tnl_invalidate_vertex_state( ctx, ~0 ); + _tnl_invalidate_vertices( ctx, ~0 ); + _tnl_install_attrs( ctx, + nmesa->vertex_attrs, + nmesa->vertex_attr_count, + nmesa->ViewportMatrix.m, 0 ); + } + } +} + + +void nouveauRunPipeline( GLcontext *ctx ) +{ + struct nouveau_context *vmesa = NOUVEAU_CONTEXT(ctx); + + if (vmesa->newState) { + vmesa->newRenderState |= vmesa->newState; + nouveauValidateState( ctx ); + } + + _tnl_run_pipeline( ctx ); +} + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.h b/src/mesa/drivers/dri/nouveau/nouveau_tris.h new file mode 100644 index 0000000000..4d9de538d7 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.h @@ -0,0 +1,52 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NOUVEAU_TRIS_H__ +#define __NOUVEAU_TRIS_H__ + +#include "nouveau_context.h" + +extern void nouveau_fallback_tri(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1, + nouveauVertex *v2); + +extern void nouveau_fallback_line(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1); + +extern void nouveau_fallback_point(struct nouveau_context *nmesa, + nouveauVertex *v0); + +extern void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode); + +extern void nouveauRunPipeline( GLcontext *ctx ); + +#endif /* __NOUVEAU_TRIS_H__ */ + + diff --git a/src/mesa/drivers/dri/nouveau/nv40_tris.c b/src/mesa/drivers/dri/nouveau/nv40_tris.c new file mode 100644 index 0000000000..6550928c2f --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv40_tris.c @@ -0,0 +1,738 @@ +/* + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. + * Copyright 2006 Stephane Marchesin. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +#include + +#include "glheader.h" +#include "context.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" +#include "enums.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "nouveau_tris.h" +#include "nv40_tris.h" +#include "nouveau_context.h" +#include "nouveau_state.h" +#include "nouveau_span.h" +#include "nouveau_ioctl.h" +#include "nouveau_3d_reg.h" +#include "nouveau_tex.h" + +/* hack for now */ +#define channel 1 + + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ +#define LINE_FALLBACK (0) +#define POINT_FALLBACK (0) +#define TRI_FALLBACK (0) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + + +#define COPY_DWORDS(vb, vertsize, v) \ + do { \ + int j; \ + for (j = 0; j < vertsize; j++) \ + vb[j] = ((GLuint *)v)[j]; \ + vb += vertsize; \ + } while (0) +#endif + +/* the free room we want before we start a vertex batch */ +#define NV40_MIN_PRIM_SIZE (32/4) + +static inline void nv40StartPrimitive(struct nouveau_context* nmesa) +{ + BEGIN_RING_SIZE(channel,0x1808,1); + OUT_RING(nmesa->current_primitive); + BEGIN_RING_PRIM(channel,0x1818,NV40_MIN_PRIM_SIZE); +} + +static inline void nv40FinishPrimitive(struct nouveau_context *nmesa) +{ + FINISH_RING_PRIM(); + BEGIN_RING_SIZE(channel,0x1808,1); + OUT_RING(0x0); + FIRE_RING(); +} + + +static inline void nv40ExtendPrimitive(struct nouveau_context* nmesa, int size) +{ + /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ + if ((RING_AHEAD()>=2048/4)||(RING_AVAILABLE()vertexSize; + GLuint *vb = nv40ExtendPrimitive(nmesa, 4 * 4 * vertsize); + + COPY_DWORDS(vb, vertsize, v0); + COPY_DWORDS(vb, vertsize, v1); + COPY_DWORDS(vb, vertsize, v2); + COPY_DWORDS(vb, vertsize, v3); +} + +static inline void nv40_draw_triangle(struct nouveau_context *nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1, + nouveauVertexPtr v2) +{ + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nv40ExtendPrimitive(nmesa, 3 * 4 * vertsize); + + COPY_DWORDS(vb, vertsize, v0); + COPY_DWORDS(vb, vertsize, v1); + COPY_DWORDS(vb, vertsize, v2); +} + +static inline void nouveau_draw_line(struct nouveau_context *nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1) +{ + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nv40ExtendPrimitive(nmesa, 2 * 4 * vertsize); + COPY_DWORDS(vb, vertsize, v0); + COPY_DWORDS(vb, vertsize, v1); +} + +static inline void nouveau_draw_point(struct nouveau_context *nmesa, + nouveauVertexPtr v0) +{ + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nv40ExtendPrimitive(nmesa, 4 * vertsize); + COPY_DWORDS(vb, vertsize, v0); +} + + +/*********************************************************************** + * Macros for nouveau_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI(a, b, c) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_tri(nmesa, a, b, c); \ + else \ + nouveau_draw_triangle(nmesa, a, b, c); \ + } while (0) + +#define QUAD(a, b, c, d) \ + do { \ + if (DO_FALLBACK) { \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ + } \ + else \ + nouveau_draw_quad(nmesa, a, b, c, d); \ + } while (0) + +#define LINE(v0, v1) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_line(nmesa, v0, v1); \ + else \ + nouveau_draw_line(nmesa, v0, v1); \ + } while (0) + +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nouveau_draw_point(nmesa, v0); \ + } while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define NOUVEAU_OFFSET_BIT 0x01 +#define NOUVEAU_TWOSIDE_BIT 0x02 +#define NOUVEAU_UNFILLED_BIT 0x04 +#define NOUVEAU_FALLBACK_BIT 0x08 +#define NOUVEAU_MAX_TRIFUNC 0x10 + + +static struct { + tnl_points_func points; + tnl_line_func line; + tnl_triangle_func triangle; + tnl_quad_func quad; +} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; + + +#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) +#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) +#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) +#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX nouveauVertex +#define TAB rast_tab + +/* Only used to pull back colors into vertices (ie, we know color is + * floating point). + */ +#define NOUVEAU_COLOR(dst, src) \ + do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + dst[3] = src[3]; \ + } while (0) + +#define NOUVEAU_SPEC(dst, src) \ + do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + } while (0) + + +#define DEPTH_SCALE nmesa->polygon_offset_scale +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW(a) (a > 0) +#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertexSize * sizeof(int))) + +#define VERT_SET_RGBA( v, c ) \ + do { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[coloroffset]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->alpha, (c)[3]); \ + } while (0) + +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] + +#define VERT_SET_SPEC( v, c ) \ + do { \ + if (specoffset) { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[specoffset]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ + } \ + } while (0) +#define VERT_COPY_SPEC( v0, v1 ) \ + do { \ + if (specoffset) { \ + v0->ub4[specoffset][0] = v1->ub4[specoffset][0]; \ + v0->ub4[specoffset][1] = v1->ub4[specoffset][1]; \ + v0->ub4[specoffset][2] = v1->ub4[specoffset][2]; \ + } \ + } while (0) + + +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] +#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->ui[specoffset] +#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->ui[specoffset] = spec[idx] + + +#define LOCAL_VARS(n) \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLuint color[n], spec[n]; \ +GLuint coloroffset = nmesa->coloroffset; \ +GLuint specoffset = nmesa->specoffset; \ +(void)color; (void)spec; (void)coloroffset; (void)specoffset; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) nv40RasterPrimitive( ctx, x, x ) +#define RENDER_PRIMITIVE nmesa->renderPrimitive +#define TAG(x) x +#define IND NOUVEAU_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND +#undef RASTERIZE + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ +#define RASTERIZE(x) + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ + NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +/* Catchall case for flat, separate specular triangles */ +#undef DO_FALLBACK +#undef DO_OFFSET +#undef DO_UNFILLED +#undef DO_TWOSIDE +#undef DO_FLAT +#define DO_FALLBACK (0) +#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) +#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) +#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) +#define DO_FLAT 1 +#define TAG(x) x##_flat_specular +#define IND NOUVEAU_MAX_TRIFUNC +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab(void) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); + + init_flat_specular(); /* special! */ +} + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ +#define IND 0 +#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) +#define RENDER_POINTS(start, count) \ + for (; start < count; start++) POINT(V(ELT(start))); +#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) +#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) +#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) +#define INIT(x) nv40RasterPrimitive(ctx, x, x) +#undef LOCAL_VARS +#define LOCAL_VARS \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLubyte *vertptr = (GLubyte *)nmesa->verts; \ +const GLuint vertsize = nmesa->vertexSize; \ +const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ +const GLboolean stipple = ctx->Line.StippleFlag; \ +(void) elt; (void) stipple; +#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) nouveau_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) nouveau_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#undef NEED_EDGEFLAG_SETUP +#undef EDGEFLAG_GET +#undef EDGEFLAG_SET +#undef RESET_OCCLUSION + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + + +static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, + PRIM_BEGIN|PRIM_END); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON && + prim != GL_POLYGON + 1) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line(ctx, ii, jj); +} + +static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nouveauExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); + GLubyte *vertptr = (GLubyte *)nmesa->verts; + const GLuint *start = (const GLuint *)V(elts[0]); + int i; + + for (i = 2; i < n; i++) { + COPY_DWORDS(vb, vertsize, V(elts[i - 1])); + COPY_DWORDS(vb, vertsize, V(elts[i])); + COPY_DWORDS(vb, vertsize, start); + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + + +#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) + +#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + + +static void nv40ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + nmesa->draw_point = nouveau_draw_point; + nmesa->draw_line = nouveau_draw_line; + nmesa->draw_tri = nouveau_draw_triangle; + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; + if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & POINT_FALLBACK) + nmesa->draw_point = nouveau_fallback_point; + + if (flags & LINE_FALLBACK) + nmesa->draw_line = nouveau_fallback_line; + + if (flags & TRI_FALLBACK) + nmesa->draw_tri = nouveau_fallback_tri; + } + + + if ((flags & DD_SEPARATE_SPECULAR) && + ctx->Light.ShadeModel == GL_FLAT) { + index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ + } + + if (nmesa->renderIndex != index) { + nmesa->renderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; + tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; + } + else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; + } + } +} + + + +static inline void nv40OutputVertexFormat(struct nouveau_context* mesa, GLuint index) +{ + /* + * Determine how many inputs we need in the vertex format. + * We need to find & setup the right input "slots" + * + * The hw attribute order matches nv_vertex_program, and _TNL_BIT_* + * also matches this order, so we can take shortcuts... + */ + int i; + int slots=0; + for(i=0;i<16;i++) + if (index&(1<render_inputs; + + if (index!=nmesa->render_inputs) + { + nmesa->render_inputs=index; + nv40OutputVertexFormat(nmesa,index); + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void nv40RenderStart(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->newState) { + nmesa->newRenderState |= nmesa->newState; + nouveauValidateState( ctx ); + } + + if (nmesa->Fallback) { + tnl->Driver.Render.Start(ctx); + return; + } + + if (nmesa->newRenderState) { + nv40ChooseVertexState(ctx); + nv40ChooseRenderState(ctx); + nmesa->newRenderState = 0; + } +} + +static void nv40RenderFinish(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + nv40FinishPrimitive(nmesa); +} + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void nv40RasterPrimitive(GLcontext *ctx, + GLenum glprim, + GLenum hwprim) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + assert (!nmesa->newState); + + if (hwprim != nmesa->current_primitive) + { + nmesa->current_primitive=hwprim; + + } +} + +/* Callback for mesa: + */ +static void nv40RenderPrimitive( GLcontext *ctx, GLuint prim ) +{ + nv40RasterPrimitive( ctx, prim, prim ); +} + + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void nouveauInitTriFuncs(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = nouveauRunPipeline; + tnl->Driver.Render.Start = nv40RenderStart; + tnl->Driver.Render.Finish = nv40RenderFinish; + tnl->Driver.Render.PrimitiveNotify = nv40RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, + (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); + + nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; + +} + diff --git a/src/mesa/drivers/dri/nouveau/nv40_tris.h b/src/mesa/drivers/dri/nouveau/nv40_tris.h new file mode 100644 index 0000000000..92f1896539 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv40_tris.h @@ -0,0 +1,39 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NV40_TRIS_H__ +#define __NV40_TRIS_H__ + +#include "mtypes.h" + +extern void nv40TriInitFunctions( GLcontext *ctx ); +extern void nv40Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) + +#endif /* __NV40_TRIS_H__ */ + -- cgit v1.2.3 From 0e7e80ae106689bbd30148835b24e811f40198e9 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Thu, 2 Mar 2006 00:42:37 +0000 Subject: Some small improvements. --- src/mesa/drivers/dri/nouveau/nv40_tris.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv40_tris.c b/src/mesa/drivers/dri/nouveau/nv40_tris.c index 6550928c2f..65180ccdfe 100644 --- a/src/mesa/drivers/dri/nouveau/nv40_tris.c +++ b/src/mesa/drivers/dri/nouveau/nv40_tris.c @@ -70,7 +70,7 @@ } while (0) #endif -/* the free room we want before we start a vertex batch */ +/* the free room we want before we start a vertex batch. this is a performance-tunable */ #define NV40_MIN_PRIM_SIZE (32/4) static inline void nv40StartPrimitive(struct nouveau_context* nmesa) @@ -304,7 +304,20 @@ GLuint specoffset = nmesa->specoffset; \ * Helpers for rendering unfilled primitives * ***********************************************************************/ -#define RASTERIZE(x) nv40RasterPrimitive( ctx, x, x ) +static const GLenum hwPrim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + +#define RASTERIZE(x) nv40RasterPrimitive( ctx, x, hwPrim[x] ) #define RENDER_PRIMITIVE nmesa->renderPrimitive #define TAG(x) x #define IND NOUVEAU_FALLBACK_BIT @@ -432,7 +445,7 @@ static void init_rast_tab(void) #define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) #define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) #define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) -#define INIT(x) nv40RasterPrimitive(ctx, x, x) +#define INIT(x) nv40RasterPrimitive(ctx, x, hwPrim[x]) #undef LOCAL_VARS #define LOCAL_VARS \ struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ @@ -613,7 +626,8 @@ static inline void nv40OutputVertexFormat(struct nouveau_context* mesa, GLuint i for(i=0;i Date: Fri, 3 Mar 2006 16:08:59 +0000 Subject: rename nv40_tris to nv30_tris. --- src/mesa/drivers/dri/nouveau/Makefile | 2 +- src/mesa/drivers/dri/nouveau/nouveau_context.c | 6 +- src/mesa/drivers/dri/nouveau/nv30_tris.c | 754 +++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv30_tris.h | 39 ++ src/mesa/drivers/dri/nouveau/nv40_tris.c | 752 ------------------------ src/mesa/drivers/dri/nouveau/nv40_tris.h | 39 -- 6 files changed, 797 insertions(+), 795 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nv30_tris.c create mode 100644 src/mesa/drivers/dri/nouveau/nv30_tris.h delete mode 100644 src/mesa/drivers/dri/nouveau/nv40_tris.c delete mode 100644 src/mesa/drivers/dri/nouveau/nv40_tris.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 02632c49cf..3fd237e080 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -16,7 +16,7 @@ DRIVER_SOURCES = \ nouveau_span.c \ nouveau_tex.c \ nouveau_tris.c \ - nv40_tris.c + nv30_tris.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 1a8dc6a6c4..e42aecefe8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -44,7 +44,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. //#include "nouveau_state.h" #include "nouveau_span.h" #include "nouveau_tex.h" -#include "nv40_tris.h" +#include "nv30_tris.h" #include "vblank.h" #include "utils.h" @@ -133,12 +133,12 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, case NV_05: case NV_10: case NV_20: - case NV_30: default: break; + case NV_30: case NV_40: case G_70: - nv40TriInitFunctions( ctx ); + nv30TriInitFunctions( ctx ); break; } nouveauDDInitStateFuncs( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.c b/src/mesa/drivers/dri/nouveau/nv30_tris.c new file mode 100644 index 0000000000..c9749a741f --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv30_tris.c @@ -0,0 +1,754 @@ +/* + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. + * Copyright 2006 Stephane Marchesin. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/* Triangles for NV30, NV40, G70 */ + +#include +#include + +#include "glheader.h" +#include "context.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" +#include "enums.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "nouveau_tris.h" +#include "nv30_tris.h" +#include "nouveau_context.h" +#include "nouveau_state.h" +#include "nouveau_span.h" +#include "nouveau_ioctl.h" +#include "nouveau_3d_reg.h" +#include "nouveau_tex.h" + +/* hack for now */ +#define channel 1 + + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ +#define LINE_FALLBACK (0) +#define POINT_FALLBACK (0) +#define TRI_FALLBACK (0) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + + +#define COPY_DWORDS(vb, vertsize, v) \ + do { \ + int j; \ + for (j = 0; j < vertsize; j++) \ + vb[j] = ((GLuint *)v)[j]; \ + vb += vertsize; \ + } while (0) +#endif + +/* the free room we want before we start a vertex batch. this is a performance-tunable */ +#define NV30_MIN_PRIM_SIZE (32/4) + +static inline void nv30StartPrimitive(struct nouveau_context* nmesa) +{ + BEGIN_RING_SIZE(channel,0x1808,1); + OUT_RING(nmesa->current_primitive); + BEGIN_RING_PRIM(channel,0x1818,NV30_MIN_PRIM_SIZE); +} + +static inline void nv30FinishPrimitive(struct nouveau_context *nmesa) +{ + FINISH_RING_PRIM(); + BEGIN_RING_SIZE(channel,0x1808,1); + OUT_RING(0x0); + FIRE_RING(); +} + + +static inline void nv30ExtendPrimitive(struct nouveau_context* nmesa, int size) +{ + /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ + if ((RING_AHEAD()>=2048/4)||(RING_AVAILABLE()vertexSize; + GLuint *vb = nv30ExtendPrimitive(nmesa, 4 * 4 * vertsize); + + COPY_DWORDS(vb, vertsize, v0); + COPY_DWORDS(vb, vertsize, v1); + COPY_DWORDS(vb, vertsize, v2); + COPY_DWORDS(vb, vertsize, v3); +} + +static inline void nv30_draw_triangle(struct nouveau_context *nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1, + nouveauVertexPtr v2) +{ + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nv30ExtendPrimitive(nmesa, 3 * 4 * vertsize); + + COPY_DWORDS(vb, vertsize, v0); + COPY_DWORDS(vb, vertsize, v1); + COPY_DWORDS(vb, vertsize, v2); +} + +static inline void nouveau_draw_line(struct nouveau_context *nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1) +{ + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nv30ExtendPrimitive(nmesa, 2 * 4 * vertsize); + COPY_DWORDS(vb, vertsize, v0); + COPY_DWORDS(vb, vertsize, v1); +} + +static inline void nouveau_draw_point(struct nouveau_context *nmesa, + nouveauVertexPtr v0) +{ + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nv30ExtendPrimitive(nmesa, 4 * vertsize); + COPY_DWORDS(vb, vertsize, v0); +} + + +/*********************************************************************** + * Macros for nouveau_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI(a, b, c) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_tri(nmesa, a, b, c); \ + else \ + nouveau_draw_triangle(nmesa, a, b, c); \ + } while (0) + +#define QUAD(a, b, c, d) \ + do { \ + if (DO_FALLBACK) { \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ + } \ + else \ + nouveau_draw_quad(nmesa, a, b, c, d); \ + } while (0) + +#define LINE(v0, v1) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_line(nmesa, v0, v1); \ + else \ + nouveau_draw_line(nmesa, v0, v1); \ + } while (0) + +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nouveau_draw_point(nmesa, v0); \ + } while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define NOUVEAU_OFFSET_BIT 0x01 +#define NOUVEAU_TWOSIDE_BIT 0x02 +#define NOUVEAU_UNFILLED_BIT 0x04 +#define NOUVEAU_FALLBACK_BIT 0x08 +#define NOUVEAU_MAX_TRIFUNC 0x10 + + +static struct { + tnl_points_func points; + tnl_line_func line; + tnl_triangle_func triangle; + tnl_quad_func quad; +} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; + + +#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) +#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) +#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) +#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX nouveauVertex +#define TAB rast_tab + +/* Only used to pull back colors into vertices (ie, we know color is + * floating point). + */ +#define NOUVEAU_COLOR(dst, src) \ + do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + dst[3] = src[3]; \ + } while (0) + +#define NOUVEAU_SPEC(dst, src) \ + do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + } while (0) + + +#define DEPTH_SCALE nmesa->polygon_offset_scale +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW(a) (a > 0) +#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertexSize * sizeof(int))) + +#define VERT_SET_RGBA( v, c ) \ + do { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[coloroffset]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->alpha, (c)[3]); \ + } while (0) + +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] + +#define VERT_SET_SPEC( v, c ) \ + do { \ + if (specoffset) { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[specoffset]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ + } \ + } while (0) +#define VERT_COPY_SPEC( v0, v1 ) \ + do { \ + if (specoffset) { \ + v0->ub4[specoffset][0] = v1->ub4[specoffset][0]; \ + v0->ub4[specoffset][1] = v1->ub4[specoffset][1]; \ + v0->ub4[specoffset][2] = v1->ub4[specoffset][2]; \ + } \ + } while (0) + + +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] +#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->ui[specoffset] +#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->ui[specoffset] = spec[idx] + + +#define LOCAL_VARS(n) \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLuint color[n], spec[n]; \ +GLuint coloroffset = nmesa->coloroffset; \ +GLuint specoffset = nmesa->specoffset; \ +(void)color; (void)spec; (void)coloroffset; (void)specoffset; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +static const GLenum hwPrim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + +#define RASTERIZE(x) nv30RasterPrimitive( ctx, x, hwPrim[x] ) +#define RENDER_PRIMITIVE nmesa->renderPrimitive +#define TAG(x) x +#define IND NOUVEAU_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND +#undef RASTERIZE + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ +#define RASTERIZE(x) + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ + NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +/* Catchall case for flat, separate specular triangles */ +#undef DO_FALLBACK +#undef DO_OFFSET +#undef DO_UNFILLED +#undef DO_TWOSIDE +#undef DO_FLAT +#define DO_FALLBACK (0) +#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) +#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) +#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) +#define DO_FLAT 1 +#define TAG(x) x##_flat_specular +#define IND NOUVEAU_MAX_TRIFUNC +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab(void) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); + + init_flat_specular(); /* special! */ +} + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ +#define IND 0 +#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) +#define RENDER_POINTS(start, count) \ + for (; start < count; start++) POINT(V(ELT(start))); +#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) +#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) +#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) +#define INIT(x) nv30RasterPrimitive(ctx, x, hwPrim[x]) +#undef LOCAL_VARS +#define LOCAL_VARS \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLubyte *vertptr = (GLubyte *)nmesa->verts; \ +const GLuint vertsize = nmesa->vertexSize; \ +const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ +const GLboolean stipple = ctx->Line.StippleFlag; \ +(void) elt; (void) stipple; +#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) nouveau_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) nouveau_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#undef NEED_EDGEFLAG_SETUP +#undef EDGEFLAG_GET +#undef EDGEFLAG_SET +#undef RESET_OCCLUSION + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + + +static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, + PRIM_BEGIN|PRIM_END); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON && + prim != GL_POLYGON + 1) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line(ctx, ii, jj); +} + +static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint vertsize = nmesa->vertexSize; + GLuint *vb = nouveauExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); + GLubyte *vertptr = (GLubyte *)nmesa->verts; + const GLuint *start = (const GLuint *)V(elts[0]); + int i; + + for (i = 2; i < n; i++) { + COPY_DWORDS(vb, vertsize, V(elts[i - 1])); + COPY_DWORDS(vb, vertsize, V(elts[i])); + COPY_DWORDS(vb, vertsize, start); + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + + +#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) + +#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + + +static void nv30ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + nmesa->draw_point = nouveau_draw_point; + nmesa->draw_line = nouveau_draw_line; + nmesa->draw_tri = nouveau_draw_triangle; + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; + if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & POINT_FALLBACK) + nmesa->draw_point = nouveau_fallback_point; + + if (flags & LINE_FALLBACK) + nmesa->draw_line = nouveau_fallback_line; + + if (flags & TRI_FALLBACK) + nmesa->draw_tri = nouveau_fallback_tri; + } + + + if ((flags & DD_SEPARATE_SPECULAR) && + ctx->Light.ShadeModel == GL_FLAT) { + index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ + } + + if (nmesa->renderIndex != index) { + nmesa->renderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; + tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; + } + else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; + } + } +} + + + +static inline void nv30OutputVertexFormat(struct nouveau_context* mesa, GLuint index) +{ + /* + * Determine how many inputs we need in the vertex format. + * We need to find & setup the right input "slots" + * + * The hw attribute order matches nv_vertex_program, and _TNL_BIT_* + * also matches this order, so we can take shortcuts... + */ + int i; + int slots=0; + for(i=0;i<16;i++) + if (index&(1<render_inputs; + + if (index!=nmesa->render_inputs) + { + nmesa->render_inputs=index; + nv30OutputVertexFormat(nmesa,index); + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void nv30RenderStart(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->newState) { + nmesa->newRenderState |= nmesa->newState; + nouveauValidateState( ctx ); + } + + if (nmesa->Fallback) { + tnl->Driver.Render.Start(ctx); + return; + } + + if (nmesa->newRenderState) { + nv30ChooseVertexState(ctx); + nv30ChooseRenderState(ctx); + nmesa->newRenderState = 0; + } +} + +static void nv30RenderFinish(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + nv30FinishPrimitive(nmesa); +} + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void nv30RasterPrimitive(GLcontext *ctx, + GLenum glprim, + GLenum hwprim) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + assert (!nmesa->newState); + + if (hwprim != nmesa->current_primitive) + { + nmesa->current_primitive=hwprim; + + } +} + +/* Callback for mesa: + */ +static void nv30RenderPrimitive( GLcontext *ctx, GLuint prim ) +{ + nv30RasterPrimitive( ctx, prim, hwPrim[prim] ); +} + + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void nouveauInitTriFuncs(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = nouveauRunPipeline; + tnl->Driver.Render.Start = nv30RenderStart; + tnl->Driver.Render.Finish = nv30RenderFinish; + tnl->Driver.Render.PrimitiveNotify = nv30RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, + (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); + + nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; + +} + diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.h b/src/mesa/drivers/dri/nouveau/nv30_tris.h new file mode 100644 index 0000000000..92f1896539 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv30_tris.h @@ -0,0 +1,39 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NV40_TRIS_H__ +#define __NV40_TRIS_H__ + +#include "mtypes.h" + +extern void nv40TriInitFunctions( GLcontext *ctx ); +extern void nv40Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) + +#endif /* __NV40_TRIS_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nv40_tris.c b/src/mesa/drivers/dri/nouveau/nv40_tris.c deleted file mode 100644 index 65180ccdfe..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv40_tris.c +++ /dev/null @@ -1,752 +0,0 @@ -/* - * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. - * Copyright 2006 Stephane Marchesin. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include - -#include "glheader.h" -#include "context.h" -#include "mtypes.h" -#include "macros.h" -#include "colormac.h" -#include "enums.h" - -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" - -#include "nouveau_tris.h" -#include "nv40_tris.h" -#include "nouveau_context.h" -#include "nouveau_state.h" -#include "nouveau_span.h" -#include "nouveau_ioctl.h" -#include "nouveau_3d_reg.h" -#include "nouveau_tex.h" - -/* hack for now */ -#define channel 1 - - -/*********************************************************************** - * Emit primitives as inline vertices * - ***********************************************************************/ -#define LINE_FALLBACK (0) -#define POINT_FALLBACK (0) -#define TRI_FALLBACK (0) -#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) -#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) - - -#define COPY_DWORDS(vb, vertsize, v) \ - do { \ - int j; \ - for (j = 0; j < vertsize; j++) \ - vb[j] = ((GLuint *)v)[j]; \ - vb += vertsize; \ - } while (0) -#endif - -/* the free room we want before we start a vertex batch. this is a performance-tunable */ -#define NV40_MIN_PRIM_SIZE (32/4) - -static inline void nv40StartPrimitive(struct nouveau_context* nmesa) -{ - BEGIN_RING_SIZE(channel,0x1808,1); - OUT_RING(nmesa->current_primitive); - BEGIN_RING_PRIM(channel,0x1818,NV40_MIN_PRIM_SIZE); -} - -static inline void nv40FinishPrimitive(struct nouveau_context *nmesa) -{ - FINISH_RING_PRIM(); - BEGIN_RING_SIZE(channel,0x1808,1); - OUT_RING(0x0); - FIRE_RING(); -} - - -static inline void nv40ExtendPrimitive(struct nouveau_context* nmesa, int size) -{ - /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ - if ((RING_AHEAD()>=2048/4)||(RING_AVAILABLE()vertexSize; - GLuint *vb = nv40ExtendPrimitive(nmesa, 4 * 4 * vertsize); - - COPY_DWORDS(vb, vertsize, v0); - COPY_DWORDS(vb, vertsize, v1); - COPY_DWORDS(vb, vertsize, v2); - COPY_DWORDS(vb, vertsize, v3); -} - -static inline void nv40_draw_triangle(struct nouveau_context *nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1, - nouveauVertexPtr v2) -{ - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv40ExtendPrimitive(nmesa, 3 * 4 * vertsize); - - COPY_DWORDS(vb, vertsize, v0); - COPY_DWORDS(vb, vertsize, v1); - COPY_DWORDS(vb, vertsize, v2); -} - -static inline void nouveau_draw_line(struct nouveau_context *nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1) -{ - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv40ExtendPrimitive(nmesa, 2 * 4 * vertsize); - COPY_DWORDS(vb, vertsize, v0); - COPY_DWORDS(vb, vertsize, v1); -} - -static inline void nouveau_draw_point(struct nouveau_context *nmesa, - nouveauVertexPtr v0) -{ - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv40ExtendPrimitive(nmesa, 4 * vertsize); - COPY_DWORDS(vb, vertsize, v0); -} - - -/*********************************************************************** - * Macros for nouveau_dd_tritmp.h to draw basic primitives * - ***********************************************************************/ - -#define TRI(a, b, c) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_tri(nmesa, a, b, c); \ - else \ - nouveau_draw_triangle(nmesa, a, b, c); \ - } while (0) - -#define QUAD(a, b, c, d) \ - do { \ - if (DO_FALLBACK) { \ - nmesa->draw_tri(nmesa, a, b, d); \ - nmesa->draw_tri(nmesa, b, c, d); \ - } \ - else \ - nouveau_draw_quad(nmesa, a, b, c, d); \ - } while (0) - -#define LINE(v0, v1) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_line(nmesa, v0, v1); \ - else \ - nouveau_draw_line(nmesa, v0, v1); \ - } while (0) - -#define POINT(v0) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_point(nmesa, v0); \ - else \ - nouveau_draw_point(nmesa, v0); \ - } while (0) - - -/*********************************************************************** - * Build render functions from dd templates * - ***********************************************************************/ - -#define NOUVEAU_OFFSET_BIT 0x01 -#define NOUVEAU_TWOSIDE_BIT 0x02 -#define NOUVEAU_UNFILLED_BIT 0x04 -#define NOUVEAU_FALLBACK_BIT 0x08 -#define NOUVEAU_MAX_TRIFUNC 0x10 - - -static struct { - tnl_points_func points; - tnl_line_func line; - tnl_triangle_func triangle; - tnl_quad_func quad; -} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; - - -#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) -#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) -#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) -#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) -#define DO_FLAT 0 -#define DO_TRI 1 -#define DO_QUAD 1 -#define DO_LINE 1 -#define DO_POINTS 1 -#define DO_FULL_QUAD 1 - -#define HAVE_RGBA 1 -#define HAVE_SPEC 1 -#define HAVE_BACK_COLORS 0 -#define HAVE_HW_FLATSHADE 1 -#define VERTEX nouveauVertex -#define TAB rast_tab - -/* Only used to pull back colors into vertices (ie, we know color is - * floating point). - */ -#define NOUVEAU_COLOR(dst, src) \ - do { \ - dst[0] = src[2]; \ - dst[1] = src[1]; \ - dst[2] = src[0]; \ - dst[3] = src[3]; \ - } while (0) - -#define NOUVEAU_SPEC(dst, src) \ - do { \ - dst[0] = src[2]; \ - dst[1] = src[1]; \ - dst[2] = src[0]; \ - } while (0) - - -#define DEPTH_SCALE nmesa->polygon_offset_scale -#define UNFILLED_TRI unfilled_tri -#define UNFILLED_QUAD unfilled_quad -#define VERT_X(_v) _v->v.x -#define VERT_Y(_v) _v->v.y -#define VERT_Z(_v) _v->v.z -#define AREA_IS_CCW(a) (a > 0) -#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertexSize * sizeof(int))) - -#define VERT_SET_RGBA( v, c ) \ - do { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[coloroffset]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->alpha, (c)[3]); \ - } while (0) - -#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] - -#define VERT_SET_SPEC( v, c ) \ - do { \ - if (specoffset) { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[specoffset]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ - } \ - } while (0) -#define VERT_COPY_SPEC( v0, v1 ) \ - do { \ - if (specoffset) { \ - v0->ub4[specoffset][0] = v1->ub4[specoffset][0]; \ - v0->ub4[specoffset][1] = v1->ub4[specoffset][1]; \ - v0->ub4[specoffset][2] = v1->ub4[specoffset][2]; \ - } \ - } while (0) - - -#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] -#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] -#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->ui[specoffset] -#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->ui[specoffset] = spec[idx] - - -#define LOCAL_VARS(n) \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLuint color[n], spec[n]; \ -GLuint coloroffset = nmesa->coloroffset; \ -GLuint specoffset = nmesa->specoffset; \ -(void)color; (void)spec; (void)coloroffset; (void)specoffset; - - -/*********************************************************************** - * Helpers for rendering unfilled primitives * - ***********************************************************************/ - -static const GLenum hwPrim[GL_POLYGON+1] = { - GL_POINTS, - GL_LINES, - GL_LINES, - GL_LINES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES -}; - -#define RASTERIZE(x) nv40RasterPrimitive( ctx, x, hwPrim[x] ) -#define RENDER_PRIMITIVE nmesa->renderPrimitive -#define TAG(x) x -#define IND NOUVEAU_FALLBACK_BIT -#include "tnl_dd/t_dd_unfilled.h" -#undef IND -#undef RASTERIZE - -/*********************************************************************** - * Generate GL render functions * - ***********************************************************************/ -#define RASTERIZE(x) - -#define IND (0) -#define TAG(x) x -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_twoside_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ - NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - - -/* Catchall case for flat, separate specular triangles */ -#undef DO_FALLBACK -#undef DO_OFFSET -#undef DO_UNFILLED -#undef DO_TWOSIDE -#undef DO_FLAT -#define DO_FALLBACK (0) -#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) -#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) -#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) -#define DO_FLAT 1 -#define TAG(x) x##_flat_specular -#define IND NOUVEAU_MAX_TRIFUNC -#include "tnl_dd/t_dd_tritmp.h" - - -static void init_rast_tab(void) -{ - init(); - init_offset(); - init_twoside(); - init_twoside_offset(); - init_unfilled(); - init_offset_unfilled(); - init_twoside_unfilled(); - init_twoside_offset_unfilled(); - init_fallback(); - init_offset_fallback(); - init_twoside_fallback(); - init_twoside_offset_fallback(); - init_unfilled_fallback(); - init_offset_unfilled_fallback(); - init_twoside_unfilled_fallback(); - init_twoside_offset_unfilled_fallback(); - - init_flat_specular(); /* special! */ -} - - -/**********************************************************************/ -/* Render unclipped begin/end objects */ -/**********************************************************************/ -#define IND 0 -#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) -#define RENDER_POINTS(start, count) \ - for (; start < count; start++) POINT(V(ELT(start))); -#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) -#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) -#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) -#define INIT(x) nv40RasterPrimitive(ctx, x, hwPrim[x]) -#undef LOCAL_VARS -#define LOCAL_VARS \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLubyte *vertptr = (GLubyte *)nmesa->verts; \ -const GLuint vertsize = nmesa->vertexSize; \ -const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ -const GLboolean stipple = ctx->Line.StippleFlag; \ -(void) elt; (void) stipple; -#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); -#define RESET_OCCLUSION -#define PRESERVE_VB_DEFS -#define ELT(x) x -#define TAG(x) nouveau_##x##_verts -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#define TAG(x) nouveau_##x##_elts -#define ELT(x) elt[x] -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#undef NEED_EDGEFLAG_SETUP -#undef EDGEFLAG_GET -#undef EDGEFLAG_SET -#undef RESET_OCCLUSION - - -/**********************************************************************/ -/* Render clipped primitives */ -/**********************************************************************/ - - - -static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; - - /* Render the new vertices as an unclipped polygon. - */ - { - GLuint *tmp = VB->Elts; - VB->Elts = (GLuint *)elts; - tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, - PRIM_BEGIN|PRIM_END); - VB->Elts = tmp; - } - - /* Restore the render primitive - */ - if (prim != GL_POLYGON && - prim != GL_POLYGON + 1) - tnl->Driver.Render.PrimitiveNotify( ctx, prim ); -} - -static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - tnl->Driver.Render.Line(ctx, ii, jj); -} - -static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nouveauExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); - GLubyte *vertptr = (GLubyte *)nmesa->verts; - const GLuint *start = (const GLuint *)V(elts[0]); - int i; - - for (i = 2; i < n; i++) { - COPY_DWORDS(vb, vertsize, V(elts[i - 1])); - COPY_DWORDS(vb, vertsize, V(elts[i])); - COPY_DWORDS(vb, vertsize, start); - } -} - -/**********************************************************************/ -/* Choose render functions */ -/**********************************************************************/ - - - - -#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ - _DD_NEW_SEPARATE_SPECULAR | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _NEW_FOG) - -#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _DD_NEW_TRI_OFFSET | \ - _DD_NEW_TRI_STIPPLE | \ - _NEW_POLYGONSTIPPLE) - - -static void nv40ChooseRenderState(GLcontext *ctx) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint flags = ctx->_TriangleCaps; - GLuint index = 0; - - nmesa->draw_point = nouveau_draw_point; - nmesa->draw_line = nouveau_draw_line; - nmesa->draw_tri = nouveau_draw_triangle; - - if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; - if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; - if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; - - /* Hook in fallbacks for specific primitives. - */ - if (flags & POINT_FALLBACK) - nmesa->draw_point = nouveau_fallback_point; - - if (flags & LINE_FALLBACK) - nmesa->draw_line = nouveau_fallback_line; - - if (flags & TRI_FALLBACK) - nmesa->draw_tri = nouveau_fallback_tri; - } - - - if ((flags & DD_SEPARATE_SPECULAR) && - ctx->Light.ShadeModel == GL_FLAT) { - index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ - } - - if (nmesa->renderIndex != index) { - nmesa->renderIndex = index; - - tnl->Driver.Render.Points = rast_tab[index].points; - tnl->Driver.Render.Line = rast_tab[index].line; - tnl->Driver.Render.Triangle = rast_tab[index].triangle; - tnl->Driver.Render.Quad = rast_tab[index].quad; - - if (index == 0) { - tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; - tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; - tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ - tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; - } - else { - tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; - tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; - tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; - tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; - } - } -} - - - -static inline void nv40OutputVertexFormat(struct nouveau_context* mesa, GLuint index) -{ - /* - * Determine how many inputs we need in the vertex format. - * We need to find & setup the right input "slots" - * - * The hw attribute order matches nv_vertex_program, and _TNL_BIT_* - * also matches this order, so we can take shortcuts... - */ - int i; - int slots=0; - for(i=0;i<16;i++) - if (index&(1<render_inputs; - - if (index!=nmesa->render_inputs) - { - nmesa->render_inputs=index; - nv40OutputVertexFormat(nmesa,index); - } -} - - -/**********************************************************************/ -/* High level hooks for t_vb_render.c */ -/**********************************************************************/ - - -static void nv40RenderStart(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - if (nmesa->newState) { - nmesa->newRenderState |= nmesa->newState; - nouveauValidateState( ctx ); - } - - if (nmesa->Fallback) { - tnl->Driver.Render.Start(ctx); - return; - } - - if (nmesa->newRenderState) { - nv40ChooseVertexState(ctx); - nv40ChooseRenderState(ctx); - nmesa->newRenderState = 0; - } -} - -static void nv40RenderFinish(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - nv40FinishPrimitive(nmesa); -} - - -/* System to flush dma and emit state changes based on the rasterized - * primitive. - */ -void nv40RasterPrimitive(GLcontext *ctx, - GLenum glprim, - GLenum hwprim) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - assert (!nmesa->newState); - - if (hwprim != nmesa->current_primitive) - { - nmesa->current_primitive=hwprim; - - } -} - -/* Callback for mesa: - */ -static void nv40RenderPrimitive( GLcontext *ctx, GLuint prim ) -{ - nv40RasterPrimitive( ctx, prim, hwPrim[prim] ); -} - - - -/**********************************************************************/ -/* Initialization. */ -/**********************************************************************/ - - -void nouveauInitTriFuncs(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - TNLcontext *tnl = TNL_CONTEXT(ctx); - static int firsttime = 1; - - if (firsttime) { - init_rast_tab(); - firsttime = 0; - } - - tnl->Driver.RunPipeline = nouveauRunPipeline; - tnl->Driver.Render.Start = nv40RenderStart; - tnl->Driver.Render.Finish = nv40RenderFinish; - tnl->Driver.Render.PrimitiveNotify = nv40RenderPrimitive; - tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; - tnl->Driver.Render.BuildVertices = _tnl_build_vertices; - tnl->Driver.Render.CopyPV = _tnl_copy_pv; - tnl->Driver.Render.Interp = _tnl_interp; - - _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, - (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); - - nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; - -} - diff --git a/src/mesa/drivers/dri/nouveau/nv40_tris.h b/src/mesa/drivers/dri/nouveau/nv40_tris.h deleted file mode 100644 index 92f1896539..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv40_tris.h +++ /dev/null @@ -1,39 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - - - -#ifndef __NV40_TRIS_H__ -#define __NV40_TRIS_H__ - -#include "mtypes.h" - -extern void nv40TriInitFunctions( GLcontext *ctx ); -extern void nv40Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); -#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) - -#endif /* __NV40_TRIS_H__ */ - -- cgit v1.2.3 From 4af665a843f8f3181b306711a14470a3cfe817fc Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 3 Mar 2006 16:10:28 +0000 Subject: Rename nouveau_3d_reg.h to nouveau_reg.h --- src/mesa/drivers/dri/nouveau/nv30_tris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.c b/src/mesa/drivers/dri/nouveau/nv30_tris.c index c9749a741f..9853b6bce9 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_tris.c +++ b/src/mesa/drivers/dri/nouveau/nv30_tris.c @@ -46,7 +46,7 @@ #include "nouveau_state.h" #include "nouveau_span.h" #include "nouveau_ioctl.h" -#include "nouveau_3d_reg.h" +#include "nouveau_reg.h" #include "nouveau_tex.h" /* hack for now */ -- cgit v1.2.3 From b9c4b7fc896f7ff3188065526b27707ff6e43c77 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Mon, 6 Mar 2006 01:46:24 +0000 Subject: More work on the nv30 software tcl code --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 6 + src/mesa/drivers/dri/nouveau/nv30_tris.c | 318 ++++++++++++++----------- src/mesa/drivers/dri/nouveau/nv30_tris.h | 10 +- 3 files changed, 191 insertions(+), 143 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index d287439fcf..49e22f8074 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -54,6 +54,7 @@ nouveau_fifo; #include "tnl_dd/t_dd_vertex.h" #undef TAG +struct nouveau_context; typedef void (*nouveau_tri_func)( struct nouveau_context*, nouveauVertex *, @@ -81,6 +82,11 @@ typedef struct nouveau_context { /* The read-only regs */ volatile unsigned char* mmio; + /* State for tris */ + GLuint vertex_size; + GLuint color_offset; + GLuint specular_offset; + /* The drawing fallbacks */ nouveau_tri_func* draw_tri; nouveau_line_func* draw_line; diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.c b/src/mesa/drivers/dri/nouveau/nv30_tris.c index 9853b6bce9..275536c8e4 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_tris.c +++ b/src/mesa/drivers/dri/nouveau/nv30_tris.c @@ -23,7 +23,7 @@ * DEALINGS IN THE SOFTWARE. */ -/* Triangles for NV30, NV40, G70 */ +/* Software TCL for NV30, NV40, G70 */ #include #include @@ -43,15 +43,18 @@ #include "nouveau_tris.h" #include "nv30_tris.h" #include "nouveau_context.h" -#include "nouveau_state.h" #include "nouveau_span.h" #include "nouveau_ioctl.h" #include "nouveau_reg.h" #include "nouveau_tex.h" +#include "nouveau_fifo.h" -/* hack for now */ +/* XXX hack for now */ #define channel 1 +static void nv30RenderPrimitive( GLcontext *ctx, GLenum prim ); +static void nv30RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); + /*********************************************************************** * Emit primitives as inline vertices * @@ -63,15 +66,6 @@ #define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) -#define COPY_DWORDS(vb, vertsize, v) \ - do { \ - int j; \ - for (j = 0; j < vertsize; j++) \ - vb[j] = ((GLuint *)v)[j]; \ - vb += vertsize; \ - } while (0) -#endif - /* the free room we want before we start a vertex batch. this is a performance-tunable */ #define NV30_MIN_PRIM_SIZE (32/4) @@ -107,89 +101,90 @@ static inline void nv30ExtendPrimitive(struct nouveau_context* nmesa, int size) } } -static inline void nv30_draw_quad(struct nouveau_context *nmesa, +static inline void nv30_draw_quad(nouveauContextPtr nmesa, nouveauVertexPtr v0, nouveauVertexPtr v1, nouveauVertexPtr v2, nouveauVertexPtr v3) { - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv30ExtendPrimitive(nmesa, 4 * 4 * vertsize); + GLuint vertsize = nmesa->vertex_size; + nv30ExtendPrimitive(nmesa, 4 * 4 * vertsize); - COPY_DWORDS(vb, vertsize, v0); - COPY_DWORDS(vb, vertsize, v1); - COPY_DWORDS(vb, vertsize, v2); - COPY_DWORDS(vb, vertsize, v3); + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); + OUT_RINGp(v2,vertsize); + OUT_RINGp(v3,vertsize); } -static inline void nv30_draw_triangle(struct nouveau_context *nmesa, +static inline void nv30_draw_triangle(nouveauContextPtr nmesa, nouveauVertexPtr v0, nouveauVertexPtr v1, nouveauVertexPtr v2) { - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv30ExtendPrimitive(nmesa, 3 * 4 * vertsize); + GLuint vertsize = nmesa->vertex_size; + nv30ExtendPrimitive(nmesa, 3 * 4 * vertsize); - COPY_DWORDS(vb, vertsize, v0); - COPY_DWORDS(vb, vertsize, v1); - COPY_DWORDS(vb, vertsize, v2); + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); + OUT_RINGp(v2,vertsize); } -static inline void nouveau_draw_line(struct nouveau_context *nmesa, +static inline void nv30_draw_line(nouveauContextPtr nmesa, nouveauVertexPtr v0, nouveauVertexPtr v1) { - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv30ExtendPrimitive(nmesa, 2 * 4 * vertsize); - COPY_DWORDS(vb, vertsize, v0); - COPY_DWORDS(vb, vertsize, v1); + GLuint vertsize = nmesa->vertex_size; + nv30ExtendPrimitive(nmesa, 2 * 4 * vertsize); + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); } -static inline void nouveau_draw_point(struct nouveau_context *nmesa, +static inline void nv30_draw_point(nouveauContextPtr nmesa, nouveauVertexPtr v0) { - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nv30ExtendPrimitive(nmesa, 4 * vertsize); - COPY_DWORDS(vb, vertsize, v0); + GLuint vertsize = nmesa->vertex_size; + nv30ExtendPrimitive(nmesa, 1 * 4 * vertsize); + OUT_RINGp(v0,vertsize); } + /*********************************************************************** * Macros for nouveau_dd_tritmp.h to draw basic primitives * ***********************************************************************/ -#define TRI(a, b, c) \ - do { \ +#define TRI(a, b, c) \ + do { \ if (DO_FALLBACK) \ - nmesa->draw_tri(nmesa, a, b, c); \ + nmesa->draw_tri(nmesa, a, b, c); \ else \ - nouveau_draw_triangle(nmesa, a, b, c); \ + nv30_draw_triangle(nmesa, a, b, c); \ } while (0) -#define QUAD(a, b, c, d) \ - do { \ +#define QUAD(a, b, c, d) \ + do { \ if (DO_FALLBACK) { \ - nmesa->draw_tri(nmesa, a, b, d); \ - nmesa->draw_tri(nmesa, b, c, d); \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ } \ else \ - nouveau_draw_quad(nmesa, a, b, c, d); \ + nv30_draw_quad(nmesa, a, b, c, d); \ } while (0) -#define LINE(v0, v1) \ - do { \ +#define LINE(v0, v1) \ + do { \ if (DO_FALLBACK) \ - nmesa->draw_line(nmesa, v0, v1); \ + nmesa->draw_line(nmesa, v0, v1); \ else \ - nouveau_draw_line(nmesa, v0, v1); \ + nv30_draw_line(nmesa, v0, v1); \ } while (0) -#define POINT(v0) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_point(nmesa, v0); \ - else \ - nouveau_draw_point(nmesa, v0); \ +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nv30_draw_point(nmesa, v0); \ } while (0) @@ -230,49 +225,39 @@ static struct { #define VERTEX nouveauVertex #define TAB rast_tab -/* Only used to pull back colors into vertices (ie, we know color is - * floating point). - */ -#define NOUVEAU_COLOR(dst, src) \ - do { \ - dst[0] = src[2]; \ - dst[1] = src[1]; \ - dst[2] = src[0]; \ - dst[3] = src[3]; \ - } while (0) - -#define NOUVEAU_SPEC(dst, src) \ - do { \ - dst[0] = src[2]; \ - dst[1] = src[1]; \ - dst[2] = src[0]; \ - } while (0) - -#define DEPTH_SCALE nmesa->polygon_offset_scale +#define DEPTH_SCALE 1.0 #define UNFILLED_TRI unfilled_tri #define UNFILLED_QUAD unfilled_quad #define VERT_X(_v) _v->v.x #define VERT_Y(_v) _v->v.y #define VERT_Z(_v) _v->v.z #define AREA_IS_CCW(a) (a > 0) -#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertexSize * sizeof(int))) +#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertex_size * sizeof(int))) #define VERT_SET_RGBA( v, c ) \ do { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[coloroffset]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->alpha, (c)[3]); \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->f[coloroffset]); \ + color->red=(c)[0]; \ + color->green=(c)[1]; \ + color->blue=(c)[2]; \ + color->alpha=(c)[3]; \ } while (0) -#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] - -#define VERT_SET_SPEC( v, c ) \ +#define VERT_COPY_RGBA( v0, v1 ) \ do { \ + if (coloroffset) { \ + v0->f[coloroffset][0] = v1->f[coloroffset][0]; \ + v0->f[coloroffset][1] = v1->f[coloroffset][1]; \ + v0->f[coloroffset][2] = v1->f[coloroffset][2]; \ + v0->f[coloroffset][3] = v1->f[coloroffset][3]; \ + } \ + } while (0) + +#define VERT_SET_SPEC( v, c ) \ + do { \ if (specoffset) { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->ui[specoffset]); \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->f[specoffset]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ @@ -281,24 +266,24 @@ static struct { #define VERT_COPY_SPEC( v0, v1 ) \ do { \ if (specoffset) { \ - v0->ub4[specoffset][0] = v1->ub4[specoffset][0]; \ - v0->ub4[specoffset][1] = v1->ub4[specoffset][1]; \ - v0->ub4[specoffset][2] = v1->ub4[specoffset][2]; \ + v0->f[specoffset][0] = v1->f[specoffset][0]; \ + v0->f[specoffset][1] = v1->f[specoffset][1]; \ + v0->f[specoffset][2] = v1->f[specoffset][2]; \ } \ } while (0) -#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] -#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] -#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->ui[specoffset] -#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->ui[specoffset] = spec[idx] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->f[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->f[coloroffset] = color[idx] +#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->f[specoffset] +#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] -#define LOCAL_VARS(n) \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLuint color[n], spec[n]; \ -GLuint coloroffset = nmesa->coloroffset; \ -GLuint specoffset = nmesa->specoffset; \ +#define LOCAL_VARS(n) \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLuint color[n], spec[n]; \ +GLuint coloroffset = nmesa->color_offset; \ +GLuint specoffset = nmesa->specular_offset; \ (void)color; (void)spec; (void)coloroffset; (void)specoffset; @@ -306,20 +291,20 @@ GLuint specoffset = nmesa->specoffset; \ * Helpers for rendering unfilled primitives * ***********************************************************************/ -static const GLenum hwPrim[GL_POLYGON+1] = { - GL_POINTS, - GL_LINES, - GL_LINES, - GL_LINES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES +static const GLuint hw_prim[GL_POLYGON+1] = { + GL_POINTS+1, + GL_LINES+1, + GL_LINES+1, + GL_LINES+1, + GL_TRIANGLES+1, + GL_TRIANGLES+1, + GL_TRIANGLES+1, + GL_QUADS+1, + GL_QUADS+1, + GL_TRIANGLES+1 }; -#define RASTERIZE(x) nv30RasterPrimitive( ctx, x, hwPrim[x] ) +#define RASTERIZE(x) nv30RasterPrimitive( ctx, x, hw_prim[x] ) #define RENDER_PRIMITIVE nmesa->renderPrimitive #define TAG(x) x #define IND NOUVEAU_FALLBACK_BIT @@ -447,12 +432,12 @@ static void init_rast_tab(void) #define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) #define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) #define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) -#define INIT(x) nv30RasterPrimitive(ctx, x, hwPrim[x]) +#define INIT(x) nv30RasterPrimitive(ctx, x, hw_prim[x]) #undef LOCAL_VARS #define LOCAL_VARS \ struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ GLubyte *vertptr = (GLubyte *)nmesa->verts; \ -const GLuint vertsize = nmesa->vertexSize; \ +const GLuint vertsize = nmesa->vertex_size; \ const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ const GLboolean stipple = ctx->Line.StippleFlag; \ (void) elt; (void) stipple; @@ -515,16 +500,16 @@ static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, GLuint n) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint vertsize = nmesa->vertexSize; - GLuint *vb = nouveauExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); + GLuint vertsize = nmesa->vertex_size; + nv30ExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); GLubyte *vertptr = (GLubyte *)nmesa->verts; const GLuint *start = (const GLuint *)V(elts[0]); int i; for (i = 2; i < n; i++) { - COPY_DWORDS(vb, vertsize, V(elts[i - 1])); - COPY_DWORDS(vb, vertsize, V(elts[i])); - COPY_DWORDS(vb, vertsize, start); + OUT_RINGp(V(elts[i-1]),vertsize); + OUT_RINGp(V(elts[i]),vertsize); + OUT_RINGp(start,vertsize); } } @@ -548,6 +533,13 @@ static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, _DD_NEW_TRI_STIPPLE | \ _NEW_POLYGONSTIPPLE) +#define EMIT_ATTR( ATTR, STYLE ) \ +do { \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].format = (STYLE); \ + nmesa->vertex_attr_count++; \ +} while (0) + static void nv30ChooseRenderState(GLcontext *ctx) { @@ -556,9 +548,9 @@ static void nv30ChooseRenderState(GLcontext *ctx) GLuint flags = ctx->_TriangleCaps; GLuint index = 0; - nmesa->draw_point = nouveau_draw_point; - nmesa->draw_line = nouveau_draw_line; - nmesa->draw_tri = nouveau_draw_triangle; + nmesa->draw_point = nv30_draw_point; + nmesa->draw_line = nv30_draw_line; + nmesa->draw_tri = nv30_draw_triangle; if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; @@ -609,34 +601,84 @@ static void nv30ChooseRenderState(GLcontext *ctx) -static inline void nv30OutputVertexFormat(struct nouveau_context* mesa, GLuint index) +static inline void nv30OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) { - /* - * Determine how many inputs we need in the vertex format. - * We need to find & setup the right input "slots" - * - * The hw attribute order matches nv_vertex_program, and _TNL_BIT_* - * also matches this order, so we can take shortcuts... - */ + GLcontext* ctx=nmesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + int attr_size[16]; + int default_attr_size[8]={3,3,3,4,3,1,4,4}; int i; int slots=0; + int total_size=0; + + /* + * Determine attribute sizes + */ + for(i=0;i<8;i++) + { + if (index&(1<TexCoordPtr[i]; + else + attr_size[i]=0; + } + + /* + * Tell t_vertex about the vertex format + */ for(i=0;i<16;i++) + { if (index&(1<color_offset=total_size; + if (i==_TNL_ATTRIB_COLOR1) + nmesa->specular_offset=total_size; + total_size+=attr_size[i]; + } + } + nmesa->vertex_size=total_size; + /* + * Tell the hardware about the vertex format + */ BEGIN_RING_SIZE(channel,0x1740,slots); for(i=0;inewState); - + if (hwprim != nmesa->current_primitive) { nmesa->current_primitive=hwprim; @@ -715,7 +757,7 @@ void nv30RasterPrimitive(GLcontext *ctx, */ static void nv30RenderPrimitive( GLcontext *ctx, GLuint prim ) { - nv30RasterPrimitive( ctx, prim, hwPrim[prim] ); + nv30RasterPrimitive( ctx, prim, hw_prim[prim] ); } diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.h b/src/mesa/drivers/dri/nouveau/nv30_tris.h index 92f1896539..680b578787 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_tris.h +++ b/src/mesa/drivers/dri/nouveau/nv30_tris.h @@ -26,14 +26,14 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. -#ifndef __NV40_TRIS_H__ -#define __NV40_TRIS_H__ +#ifndef __NV30_TRIS_H__ +#define __NV30_TRIS_H__ #include "mtypes.h" -extern void nv40TriInitFunctions( GLcontext *ctx ); -extern void nv40Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +extern void nv30TriInitFunctions( GLcontext *ctx ); +extern void nv30Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); #define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) -#endif /* __NV40_TRIS_H__ */ +#endif /* __NV30_TRIS_H__ */ -- cgit v1.2.3 From 98e1b13802fb83b504353c14df1d90646eabe111 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Mon, 6 Mar 2006 12:23:24 +0000 Subject: Added some NV20 support - nv_30_tris.c should probably be renamed again. --- src/mesa/drivers/dri/nouveau/nv30_tris.c | 40 ++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.c b/src/mesa/drivers/dri/nouveau/nv30_tris.c index 275536c8e4..6b949bd3b7 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_tris.c +++ b/src/mesa/drivers/dri/nouveau/nv30_tris.c @@ -673,18 +673,38 @@ static inline void nv30OutputVertexFormat(struct nouveau_context* nmesa, GLuint /* * Tell the hardware about the vertex format */ - BEGIN_RING_SIZE(channel,0x1740,slots); - for(i=0;iscreen->card_type) { - int size=attr_size[i]; - OUT_RING(0x00000002|(size*0x10)); + case NV_20: + { + for(i=0;i<16;i++) + { + int size=attr_size[i]; + BEGIN_RING_SIZE(channel,0x1760+i*4,1); + OUT_RING(0x00000002|(size*0x10)); + } + } + break; + case NV_30: + case NV_40: + case G_70: + { + BEGIN_RING_SIZE(channel,0x1740,slots); + for(i=0;i Date: Mon, 6 Mar 2006 15:32:31 +0000 Subject: Cleaned up the software TCL code a bit. Renamed nv30_tris.[c,h] to nv20_swtcl.[c,h]. --- src/mesa/drivers/dri/nouveau/Makefile | 2 +- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 13 +- src/mesa/drivers/dri/nouveau/nv20_swtcl.c | 813 ++++++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv20_swtcl.h | 39 ++ src/mesa/drivers/dri/nouveau/nv30_tris.c | 816 ----------------------------- src/mesa/drivers/dri/nouveau/nv30_tris.h | 39 -- 6 files changed, 865 insertions(+), 857 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nv20_swtcl.c create mode 100644 src/mesa/drivers/dri/nouveau/nv20_swtcl.h delete mode 100644 src/mesa/drivers/dri/nouveau/nv30_tris.c delete mode 100644 src/mesa/drivers/dri/nouveau/nv30_tris.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 3fd237e080..3e40240e76 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -16,7 +16,7 @@ DRIVER_SOURCES = \ nouveau_span.c \ nouveau_tex.c \ nouveau_tris.c \ - nv30_tris.c + nv20_swtcl.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 8b936a5cec..4f35283040 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -1,6 +1,6 @@ /************************************************************************** -Copyright 2006 Stephane Marchesin +Copyright 2006 Stephane Marchesin, Sylvain Munaut All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a @@ -58,3 +58,14 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc #define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK)) +/* Rendering commands */ +#define NV20_PRIMITIVE 0x000017fc +#define NV30_PRIMITIVE 0x00001808 +#define NV20_BEGIN_VERTICES 0x00001818 + +/* Vertex attributes */ +#define NV20_VERTEX_ATTRIBUTE(i) (0x00001760+i*4) +#define NV30_VERTEX_ATTRIBUTES 0x00001740 +#define NV30_UNKNOWN_0 0x00001718 + + diff --git a/src/mesa/drivers/dri/nouveau/nv20_swtcl.c b/src/mesa/drivers/dri/nouveau/nv20_swtcl.c new file mode 100644 index 0000000000..9f1327ba83 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv20_swtcl.c @@ -0,0 +1,813 @@ +/* + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. + * Copyright 2006 Stephane Marchesin. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/* Software TCL for NV20, NV30, NV40, G70 */ + +#include +#include + +#include "glheader.h" +#include "context.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" +#include "enums.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "nouveau_tris.h" +#include "nv20_swtcl.h" +#include "nouveau_context.h" +#include "nouveau_span.h" +#include "nouveau_ioctl.h" +#include "nouveau_reg.h" +#include "nouveau_tex.h" +#include "nouveau_fifo.h" + +/* XXX hack for now */ +#define channel 1 + +static void nv20RenderPrimitive( GLcontext *ctx, GLenum prim ); +static void nv20RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); + + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ +#define LINE_FALLBACK (0) +#define POINT_FALLBACK (0) +#define TRI_FALLBACK (0) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + + +/* the free room we want before we start a vertex batch. this is a performance-tunable */ +#define NV20_MIN_PRIM_SIZE (32/4) +/* the size above which we fire the ring. this is a performance-tunable */ +#define NV20_FIRE_SIZE (2048/4) + +static inline void nv20StartPrimitive(struct nouveau_context* nmesa) +{ + if (nmesa->screen->card_type==NV20) + BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); + else + BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); + OUT_RING(nmesa->current_primitive); + BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NV20_MIN_PRIM_SIZE); +} + +static inline void nv20FinishPrimitive(struct nouveau_context *nmesa) +{ + FINISH_RING_PRIM(); + if (nmesa->screen->card_type==NV20) + BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); + else + BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); + OUT_RING(0x0); + FIRE_RING(); +} + + +static inline void nv20ExtendPrimitive(struct nouveau_context* nmesa, int size) +{ + /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ + if ((RING_AHEAD()>=NV20_FIRE_SIZE)||(RING_AVAILABLE()vertex_size; + nv20ExtendPrimitive(nmesa, 4 * 4 * vertsize); + + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); + OUT_RINGp(v2,vertsize); + OUT_RINGp(v3,vertsize); +} + +static inline void nv20_draw_triangle(nouveauContextPtr nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1, + nouveauVertexPtr v2) +{ + GLuint vertsize = nmesa->vertex_size; + nv20ExtendPrimitive(nmesa, 3 * 4 * vertsize); + + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); + OUT_RINGp(v2,vertsize); +} + +static inline void nv20_draw_line(nouveauContextPtr nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1) +{ + GLuint vertsize = nmesa->vertex_size; + nv20ExtendPrimitive(nmesa, 2 * 4 * vertsize); + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); +} + +static inline void nv20_draw_point(nouveauContextPtr nmesa, + nouveauVertexPtr v0) +{ + GLuint vertsize = nmesa->vertex_size; + nv20ExtendPrimitive(nmesa, 1 * 4 * vertsize); + OUT_RINGp(v0,vertsize); +} + + + +/*********************************************************************** + * Macros for nouveau_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI(a, b, c) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_tri(nmesa, a, b, c); \ + else \ + nv20_draw_triangle(nmesa, a, b, c); \ + } while (0) + +#define QUAD(a, b, c, d) \ + do { \ + if (DO_FALLBACK) { \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ + } \ + else \ + nv20_draw_quad(nmesa, a, b, c, d); \ + } while (0) + +#define LINE(v0, v1) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_line(nmesa, v0, v1); \ + else \ + nv20_draw_line(nmesa, v0, v1); \ + } while (0) + +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nv20_draw_point(nmesa, v0); \ + } while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define NOUVEAU_OFFSET_BIT 0x01 +#define NOUVEAU_TWOSIDE_BIT 0x02 +#define NOUVEAU_UNFILLED_BIT 0x04 +#define NOUVEAU_FALLBACK_BIT 0x08 +#define NOUVEAU_MAX_TRIFUNC 0x10 + + +static struct { + tnl_points_func points; + tnl_line_func line; + tnl_triangle_func triangle; + tnl_quad_func quad; +} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; + + +#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) +#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) +#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) +#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX nouveauVertex +#define TAB rast_tab + + +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW(a) (a > 0) +#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertex_size * sizeof(int))) + +#define VERT_SET_RGBA( v, c ) \ + do { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->f[coloroffset]); \ + color->red=(c)[0]; \ + color->green=(c)[1]; \ + color->blue=(c)[2]; \ + color->alpha=(c)[3]; \ + } while (0) + +#define VERT_COPY_RGBA( v0, v1 ) \ + do { \ + if (coloroffset) { \ + v0->f[coloroffset][0] = v1->f[coloroffset][0]; \ + v0->f[coloroffset][1] = v1->f[coloroffset][1]; \ + v0->f[coloroffset][2] = v1->f[coloroffset][2]; \ + v0->f[coloroffset][3] = v1->f[coloroffset][3]; \ + } \ + } while (0) + +#define VERT_SET_SPEC( v, c ) \ + do { \ + if (specoffset) { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->f[specoffset]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ + } \ + } while (0) +#define VERT_COPY_SPEC( v0, v1 ) \ + do { \ + if (specoffset) { \ + v0->f[specoffset][0] = v1->f[specoffset][0]; \ + v0->f[specoffset][1] = v1->f[specoffset][1]; \ + v0->f[specoffset][2] = v1->f[specoffset][2]; \ + } \ + } while (0) + + +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->f[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->f[coloroffset] = color[idx] +#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->f[specoffset] +#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] + + +#define LOCAL_VARS(n) \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLuint color[n], spec[n]; \ +GLuint coloroffset = nmesa->color_offset; \ +GLuint specoffset = nmesa->specular_offset; \ +(void)color; (void)spec; (void)coloroffset; (void)specoffset; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +static const GLuint hw_prim[GL_POLYGON+1] = { + GL_POINTS+1, + GL_LINES+1, + GL_LINES+1, + GL_LINES+1, + GL_TRIANGLES+1, + GL_TRIANGLES+1, + GL_TRIANGLES+1, + GL_QUADS+1, + GL_QUADS+1, + GL_TRIANGLES+1 +}; + +#define RASTERIZE(x) nv20RasterPrimitive( ctx, x, hw_prim[x] ) +#define RENDER_PRIMITIVE nmesa->renderPrimitive +#define TAG(x) x +#define IND NOUVEAU_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND +#undef RASTERIZE + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ +#define RASTERIZE(x) + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ + NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +/* Catchall case for flat, separate specular triangles */ +#undef DO_FALLBACK +#undef DO_OFFSET +#undef DO_UNFILLED +#undef DO_TWOSIDE +#undef DO_FLAT +#define DO_FALLBACK (0) +#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) +#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) +#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) +#define DO_FLAT 1 +#define TAG(x) x##_flat_specular +#define IND NOUVEAU_MAX_TRIFUNC +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab(void) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); + + init_flat_specular(); /* special! */ +} + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ +#define IND 0 +#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) +#define RENDER_POINTS(start, count) \ + for (; start < count; start++) POINT(V(ELT(start))); +#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) +#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) +#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) +#define INIT(x) nv20RasterPrimitive(ctx, x, hw_prim[x]) +#undef LOCAL_VARS +#define LOCAL_VARS \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLubyte *vertptr = (GLubyte *)nmesa->verts; \ +const GLuint vertsize = nmesa->vertex_size; \ +const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ +const GLboolean stipple = ctx->Line.StippleFlag; \ +(void) elt; (void) stipple; +#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) nouveau_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) nouveau_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#undef NEED_EDGEFLAG_SETUP +#undef EDGEFLAG_GET +#undef EDGEFLAG_SET +#undef RESET_OCCLUSION + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + + +static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, + PRIM_BEGIN|PRIM_END); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON && + prim != GL_POLYGON + 1) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line(ctx, ii, jj); +} + +static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint vertsize = nmesa->vertex_size; + nv20ExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); + GLubyte *vertptr = (GLubyte *)nmesa->verts; + const GLuint *start = (const GLuint *)V(elts[0]); + int i; + + for (i = 2; i < n; i++) { + OUT_RINGp(V(elts[i-1]),vertsize); + OUT_RINGp(V(elts[i]),vertsize); + OUT_RINGp(start,vertsize); + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + + +#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) + +#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + +#define EMIT_ATTR( ATTR, STYLE ) \ +do { \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].format = (STYLE); \ + nmesa->vertex_attr_count++; \ +} while (0) + + +static void nv20ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + nmesa->draw_point = nv20_draw_point; + nmesa->draw_line = nv20_draw_line; + nmesa->draw_tri = nv20_draw_triangle; + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; + if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & POINT_FALLBACK) + nmesa->draw_point = nouveau_fallback_point; + + if (flags & LINE_FALLBACK) + nmesa->draw_line = nouveau_fallback_line; + + if (flags & TRI_FALLBACK) + nmesa->draw_tri = nouveau_fallback_tri; + } + + + if ((flags & DD_SEPARATE_SPECULAR) && + ctx->Light.ShadeModel == GL_FLAT) { + index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ + } + + if (nmesa->renderIndex != index) { + nmesa->renderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; + tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; + } + else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; + } + } +} + + + +static inline void nv20OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) +{ + GLcontext* ctx=nmesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + int attr_size[16]; + int default_attr_size[8]={3,3,3,4,3,1,4,4}; + int i; + int slots=0; + int total_size=0; + + /* + * Determine attribute sizes + */ + for(i=0;i<8;i++) + { + if (index&(1<TexCoordPtr[i]; + else + attr_size[i]=0; + } + + /* + * Tell t_vertex about the vertex format + */ + for(i=0;i<16;i++) + { + if (index&(1<color_offset=total_size; + if (i==_TNL_ATTRIB_COLOR1) + nmesa->specular_offset=total_size; + total_size+=attr_size[i]; + } + } + nmesa->vertex_size=total_size; + + /* + * Tell the hardware about the vertex format + */ + if (nmesa->screen->card_type==NV_20) { + for(i=0;i<16;i++) + { + int size=attr_size[i]; + BEGIN_RING_SIZE(channel,NV20_VERTEX_ATTRIBUTE(i),1); + OUT_RING(0x00000002|(size*0x10)); + } + } else { + BEGIN_RING_SIZE(channel,NV30_VERTEX_ATTRIBUTES,slots); + for(i=0;irender_inputs; + + if (index!=nmesa->render_inputs) + { + nmesa->render_inputs=index; + nv20OutputVertexFormat(nmesa,index); + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void nv20RenderStart(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->newState) { + nmesa->newRenderState |= nmesa->newState; + nouveauValidateState( ctx ); + } + + if (nmesa->Fallback) { + tnl->Driver.Render.Start(ctx); + return; + } + + if (nmesa->newRenderState) { + nv20ChooseVertexState(ctx); + nv20ChooseRenderState(ctx); + nmesa->newRenderState = 0; + } +} + +static void nv20RenderFinish(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + nv20FinishPrimitive(nmesa); +} + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void nv20RasterPrimitive(GLcontext *ctx, + GLenum glprim, + GLuint hwprim) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + assert (!nmesa->newState); + + if (hwprim != nmesa->current_primitive) + { + nmesa->current_primitive=hwprim; + + } +} + +/* Callback for mesa: + */ +static void nv20RenderPrimitive( GLcontext *ctx, GLuint prim ) +{ + nv20RasterPrimitive( ctx, prim, hw_prim[prim] ); +} + + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void nouveauInitTriFuncs(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = nouveauRunPipeline; + tnl->Driver.Render.Start = nv20RenderStart; + tnl->Driver.Render.Finish = nv20RenderFinish; + tnl->Driver.Render.PrimitiveNotify = nv20RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, + (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); + + nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; + +} + diff --git a/src/mesa/drivers/dri/nouveau/nv20_swtcl.h b/src/mesa/drivers/dri/nouveau/nv20_swtcl.h new file mode 100644 index 0000000000..ed589d8bcf --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv20_swtcl.h @@ -0,0 +1,39 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NV20_SWTCL_H__ +#define __NV20_SWTCL_H__ + +#include "mtypes.h" + +extern void nv20TriInitFunctions( GLcontext *ctx ); +extern void nv20Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) + +#endif /* __NV20_SWTCL_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.c b/src/mesa/drivers/dri/nouveau/nv30_tris.c deleted file mode 100644 index 6b949bd3b7..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv30_tris.c +++ /dev/null @@ -1,816 +0,0 @@ -/* - * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. - * Copyright 2006 Stephane Marchesin. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* Software TCL for NV30, NV40, G70 */ - -#include -#include - -#include "glheader.h" -#include "context.h" -#include "mtypes.h" -#include "macros.h" -#include "colormac.h" -#include "enums.h" - -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" - -#include "nouveau_tris.h" -#include "nv30_tris.h" -#include "nouveau_context.h" -#include "nouveau_span.h" -#include "nouveau_ioctl.h" -#include "nouveau_reg.h" -#include "nouveau_tex.h" -#include "nouveau_fifo.h" - -/* XXX hack for now */ -#define channel 1 - -static void nv30RenderPrimitive( GLcontext *ctx, GLenum prim ); -static void nv30RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); - - -/*********************************************************************** - * Emit primitives as inline vertices * - ***********************************************************************/ -#define LINE_FALLBACK (0) -#define POINT_FALLBACK (0) -#define TRI_FALLBACK (0) -#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) -#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) - - -/* the free room we want before we start a vertex batch. this is a performance-tunable */ -#define NV30_MIN_PRIM_SIZE (32/4) - -static inline void nv30StartPrimitive(struct nouveau_context* nmesa) -{ - BEGIN_RING_SIZE(channel,0x1808,1); - OUT_RING(nmesa->current_primitive); - BEGIN_RING_PRIM(channel,0x1818,NV30_MIN_PRIM_SIZE); -} - -static inline void nv30FinishPrimitive(struct nouveau_context *nmesa) -{ - FINISH_RING_PRIM(); - BEGIN_RING_SIZE(channel,0x1808,1); - OUT_RING(0x0); - FIRE_RING(); -} - - -static inline void nv30ExtendPrimitive(struct nouveau_context* nmesa, int size) -{ - /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ - if ((RING_AHEAD()>=2048/4)||(RING_AVAILABLE()vertex_size; - nv30ExtendPrimitive(nmesa, 4 * 4 * vertsize); - - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); - OUT_RINGp(v2,vertsize); - OUT_RINGp(v3,vertsize); -} - -static inline void nv30_draw_triangle(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1, - nouveauVertexPtr v2) -{ - GLuint vertsize = nmesa->vertex_size; - nv30ExtendPrimitive(nmesa, 3 * 4 * vertsize); - - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); - OUT_RINGp(v2,vertsize); -} - -static inline void nv30_draw_line(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1) -{ - GLuint vertsize = nmesa->vertex_size; - nv30ExtendPrimitive(nmesa, 2 * 4 * vertsize); - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); -} - -static inline void nv30_draw_point(nouveauContextPtr nmesa, - nouveauVertexPtr v0) -{ - GLuint vertsize = nmesa->vertex_size; - nv30ExtendPrimitive(nmesa, 1 * 4 * vertsize); - OUT_RINGp(v0,vertsize); -} - - - -/*********************************************************************** - * Macros for nouveau_dd_tritmp.h to draw basic primitives * - ***********************************************************************/ - -#define TRI(a, b, c) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_tri(nmesa, a, b, c); \ - else \ - nv30_draw_triangle(nmesa, a, b, c); \ - } while (0) - -#define QUAD(a, b, c, d) \ - do { \ - if (DO_FALLBACK) { \ - nmesa->draw_tri(nmesa, a, b, d); \ - nmesa->draw_tri(nmesa, b, c, d); \ - } \ - else \ - nv30_draw_quad(nmesa, a, b, c, d); \ - } while (0) - -#define LINE(v0, v1) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_line(nmesa, v0, v1); \ - else \ - nv30_draw_line(nmesa, v0, v1); \ - } while (0) - -#define POINT(v0) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_point(nmesa, v0); \ - else \ - nv30_draw_point(nmesa, v0); \ - } while (0) - - -/*********************************************************************** - * Build render functions from dd templates * - ***********************************************************************/ - -#define NOUVEAU_OFFSET_BIT 0x01 -#define NOUVEAU_TWOSIDE_BIT 0x02 -#define NOUVEAU_UNFILLED_BIT 0x04 -#define NOUVEAU_FALLBACK_BIT 0x08 -#define NOUVEAU_MAX_TRIFUNC 0x10 - - -static struct { - tnl_points_func points; - tnl_line_func line; - tnl_triangle_func triangle; - tnl_quad_func quad; -} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; - - -#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) -#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) -#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) -#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) -#define DO_FLAT 0 -#define DO_TRI 1 -#define DO_QUAD 1 -#define DO_LINE 1 -#define DO_POINTS 1 -#define DO_FULL_QUAD 1 - -#define HAVE_RGBA 1 -#define HAVE_SPEC 1 -#define HAVE_BACK_COLORS 0 -#define HAVE_HW_FLATSHADE 1 -#define VERTEX nouveauVertex -#define TAB rast_tab - - -#define DEPTH_SCALE 1.0 -#define UNFILLED_TRI unfilled_tri -#define UNFILLED_QUAD unfilled_quad -#define VERT_X(_v) _v->v.x -#define VERT_Y(_v) _v->v.y -#define VERT_Z(_v) _v->v.z -#define AREA_IS_CCW(a) (a > 0) -#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertex_size * sizeof(int))) - -#define VERT_SET_RGBA( v, c ) \ - do { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->f[coloroffset]); \ - color->red=(c)[0]; \ - color->green=(c)[1]; \ - color->blue=(c)[2]; \ - color->alpha=(c)[3]; \ - } while (0) - -#define VERT_COPY_RGBA( v0, v1 ) \ - do { \ - if (coloroffset) { \ - v0->f[coloroffset][0] = v1->f[coloroffset][0]; \ - v0->f[coloroffset][1] = v1->f[coloroffset][1]; \ - v0->f[coloroffset][2] = v1->f[coloroffset][2]; \ - v0->f[coloroffset][3] = v1->f[coloroffset][3]; \ - } \ - } while (0) - -#define VERT_SET_SPEC( v, c ) \ - do { \ - if (specoffset) { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->f[specoffset]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ - } \ - } while (0) -#define VERT_COPY_SPEC( v0, v1 ) \ - do { \ - if (specoffset) { \ - v0->f[specoffset][0] = v1->f[specoffset][0]; \ - v0->f[specoffset][1] = v1->f[specoffset][1]; \ - v0->f[specoffset][2] = v1->f[specoffset][2]; \ - } \ - } while (0) - - -#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->f[coloroffset] -#define VERT_RESTORE_RGBA( idx ) v[idx]->f[coloroffset] = color[idx] -#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->f[specoffset] -#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] - - -#define LOCAL_VARS(n) \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLuint color[n], spec[n]; \ -GLuint coloroffset = nmesa->color_offset; \ -GLuint specoffset = nmesa->specular_offset; \ -(void)color; (void)spec; (void)coloroffset; (void)specoffset; - - -/*********************************************************************** - * Helpers for rendering unfilled primitives * - ***********************************************************************/ - -static const GLuint hw_prim[GL_POLYGON+1] = { - GL_POINTS+1, - GL_LINES+1, - GL_LINES+1, - GL_LINES+1, - GL_TRIANGLES+1, - GL_TRIANGLES+1, - GL_TRIANGLES+1, - GL_QUADS+1, - GL_QUADS+1, - GL_TRIANGLES+1 -}; - -#define RASTERIZE(x) nv30RasterPrimitive( ctx, x, hw_prim[x] ) -#define RENDER_PRIMITIVE nmesa->renderPrimitive -#define TAG(x) x -#define IND NOUVEAU_FALLBACK_BIT -#include "tnl_dd/t_dd_unfilled.h" -#undef IND -#undef RASTERIZE - -/*********************************************************************** - * Generate GL render functions * - ***********************************************************************/ -#define RASTERIZE(x) - -#define IND (0) -#define TAG(x) x -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_twoside_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ - NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - - -/* Catchall case for flat, separate specular triangles */ -#undef DO_FALLBACK -#undef DO_OFFSET -#undef DO_UNFILLED -#undef DO_TWOSIDE -#undef DO_FLAT -#define DO_FALLBACK (0) -#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) -#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) -#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) -#define DO_FLAT 1 -#define TAG(x) x##_flat_specular -#define IND NOUVEAU_MAX_TRIFUNC -#include "tnl_dd/t_dd_tritmp.h" - - -static void init_rast_tab(void) -{ - init(); - init_offset(); - init_twoside(); - init_twoside_offset(); - init_unfilled(); - init_offset_unfilled(); - init_twoside_unfilled(); - init_twoside_offset_unfilled(); - init_fallback(); - init_offset_fallback(); - init_twoside_fallback(); - init_twoside_offset_fallback(); - init_unfilled_fallback(); - init_offset_unfilled_fallback(); - init_twoside_unfilled_fallback(); - init_twoside_offset_unfilled_fallback(); - - init_flat_specular(); /* special! */ -} - - -/**********************************************************************/ -/* Render unclipped begin/end objects */ -/**********************************************************************/ -#define IND 0 -#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) -#define RENDER_POINTS(start, count) \ - for (; start < count; start++) POINT(V(ELT(start))); -#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) -#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) -#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) -#define INIT(x) nv30RasterPrimitive(ctx, x, hw_prim[x]) -#undef LOCAL_VARS -#define LOCAL_VARS \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLubyte *vertptr = (GLubyte *)nmesa->verts; \ -const GLuint vertsize = nmesa->vertex_size; \ -const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ -const GLboolean stipple = ctx->Line.StippleFlag; \ -(void) elt; (void) stipple; -#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); -#define RESET_OCCLUSION -#define PRESERVE_VB_DEFS -#define ELT(x) x -#define TAG(x) nouveau_##x##_verts -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#define TAG(x) nouveau_##x##_elts -#define ELT(x) elt[x] -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#undef NEED_EDGEFLAG_SETUP -#undef EDGEFLAG_GET -#undef EDGEFLAG_SET -#undef RESET_OCCLUSION - - -/**********************************************************************/ -/* Render clipped primitives */ -/**********************************************************************/ - - - -static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; - - /* Render the new vertices as an unclipped polygon. - */ - { - GLuint *tmp = VB->Elts; - VB->Elts = (GLuint *)elts; - tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, - PRIM_BEGIN|PRIM_END); - VB->Elts = tmp; - } - - /* Restore the render primitive - */ - if (prim != GL_POLYGON && - prim != GL_POLYGON + 1) - tnl->Driver.Render.PrimitiveNotify( ctx, prim ); -} - -static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - tnl->Driver.Render.Line(ctx, ii, jj); -} - -static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint vertsize = nmesa->vertex_size; - nv30ExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); - GLubyte *vertptr = (GLubyte *)nmesa->verts; - const GLuint *start = (const GLuint *)V(elts[0]); - int i; - - for (i = 2; i < n; i++) { - OUT_RINGp(V(elts[i-1]),vertsize); - OUT_RINGp(V(elts[i]),vertsize); - OUT_RINGp(start,vertsize); - } -} - -/**********************************************************************/ -/* Choose render functions */ -/**********************************************************************/ - - - - -#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ - _DD_NEW_SEPARATE_SPECULAR | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _NEW_FOG) - -#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _DD_NEW_TRI_OFFSET | \ - _DD_NEW_TRI_STIPPLE | \ - _NEW_POLYGONSTIPPLE) - -#define EMIT_ATTR( ATTR, STYLE ) \ -do { \ - nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ - nmesa->vertex_attrs[nmesa->vertex_attr_count].format = (STYLE); \ - nmesa->vertex_attr_count++; \ -} while (0) - - -static void nv30ChooseRenderState(GLcontext *ctx) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint flags = ctx->_TriangleCaps; - GLuint index = 0; - - nmesa->draw_point = nv30_draw_point; - nmesa->draw_line = nv30_draw_line; - nmesa->draw_tri = nv30_draw_triangle; - - if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; - if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; - if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; - - /* Hook in fallbacks for specific primitives. - */ - if (flags & POINT_FALLBACK) - nmesa->draw_point = nouveau_fallback_point; - - if (flags & LINE_FALLBACK) - nmesa->draw_line = nouveau_fallback_line; - - if (flags & TRI_FALLBACK) - nmesa->draw_tri = nouveau_fallback_tri; - } - - - if ((flags & DD_SEPARATE_SPECULAR) && - ctx->Light.ShadeModel == GL_FLAT) { - index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ - } - - if (nmesa->renderIndex != index) { - nmesa->renderIndex = index; - - tnl->Driver.Render.Points = rast_tab[index].points; - tnl->Driver.Render.Line = rast_tab[index].line; - tnl->Driver.Render.Triangle = rast_tab[index].triangle; - tnl->Driver.Render.Quad = rast_tab[index].quad; - - if (index == 0) { - tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; - tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; - tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ - tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; - } - else { - tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; - tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; - tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; - tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; - } - } -} - - - -static inline void nv30OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) -{ - GLcontext* ctx=nmesa->glCtx; - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *VB = &tnl->vb; - int attr_size[16]; - int default_attr_size[8]={3,3,3,4,3,1,4,4}; - int i; - int slots=0; - int total_size=0; - - /* - * Determine attribute sizes - */ - for(i=0;i<8;i++) - { - if (index&(1<TexCoordPtr[i]; - else - attr_size[i]=0; - } - - /* - * Tell t_vertex about the vertex format - */ - for(i=0;i<16;i++) - { - if (index&(1<color_offset=total_size; - if (i==_TNL_ATTRIB_COLOR1) - nmesa->specular_offset=total_size; - total_size+=attr_size[i]; - } - } - nmesa->vertex_size=total_size; - - /* - * Tell the hardware about the vertex format - */ - switch(nmesa->screen->card_type) - { - case NV_20: - { - for(i=0;i<16;i++) - { - int size=attr_size[i]; - BEGIN_RING_SIZE(channel,0x1760+i*4,1); - OUT_RING(0x00000002|(size*0x10)); - } - } - break; - case NV_30: - case NV_40: - case G_70: - { - BEGIN_RING_SIZE(channel,0x1740,slots); - for(i=0;irender_inputs; - - if (index!=nmesa->render_inputs) - { - nmesa->render_inputs=index; - nv30OutputVertexFormat(nmesa,index); - } -} - - -/**********************************************************************/ -/* High level hooks for t_vb_render.c */ -/**********************************************************************/ - - -static void nv30RenderStart(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - if (nmesa->newState) { - nmesa->newRenderState |= nmesa->newState; - nouveauValidateState( ctx ); - } - - if (nmesa->Fallback) { - tnl->Driver.Render.Start(ctx); - return; - } - - if (nmesa->newRenderState) { - nv30ChooseVertexState(ctx); - nv30ChooseRenderState(ctx); - nmesa->newRenderState = 0; - } -} - -static void nv30RenderFinish(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - nv30FinishPrimitive(nmesa); -} - - -/* System to flush dma and emit state changes based on the rasterized - * primitive. - */ -void nv30RasterPrimitive(GLcontext *ctx, - GLenum glprim, - GLuint hwprim) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - assert (!nmesa->newState); - - if (hwprim != nmesa->current_primitive) - { - nmesa->current_primitive=hwprim; - - } -} - -/* Callback for mesa: - */ -static void nv30RenderPrimitive( GLcontext *ctx, GLuint prim ) -{ - nv30RasterPrimitive( ctx, prim, hw_prim[prim] ); -} - - - -/**********************************************************************/ -/* Initialization. */ -/**********************************************************************/ - - -void nouveauInitTriFuncs(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - TNLcontext *tnl = TNL_CONTEXT(ctx); - static int firsttime = 1; - - if (firsttime) { - init_rast_tab(); - firsttime = 0; - } - - tnl->Driver.RunPipeline = nouveauRunPipeline; - tnl->Driver.Render.Start = nv30RenderStart; - tnl->Driver.Render.Finish = nv30RenderFinish; - tnl->Driver.Render.PrimitiveNotify = nv30RenderPrimitive; - tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; - tnl->Driver.Render.BuildVertices = _tnl_build_vertices; - tnl->Driver.Render.CopyPV = _tnl_copy_pv; - tnl->Driver.Render.Interp = _tnl_interp; - - _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, - (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); - - nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; - -} - diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.h b/src/mesa/drivers/dri/nouveau/nv30_tris.h deleted file mode 100644 index 680b578787..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv30_tris.h +++ /dev/null @@ -1,39 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - - - -#ifndef __NV30_TRIS_H__ -#define __NV30_TRIS_H__ - -#include "mtypes.h" - -extern void nv30TriInitFunctions( GLcontext *ctx ); -extern void nv30Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); -#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) - -#endif /* __NV30_TRIS_H__ */ - -- cgit v1.2.3 From 2560e65a9aa0479ebb564a2ac5161a1c47507ce0 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Tue, 7 Mar 2006 00:56:30 +0000 Subject: Added a missing field --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 6 +++--- src/mesa/drivers/dri/nouveau/nouveau_screen.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index e42aecefe8..3558b25857 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -44,7 +44,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. //#include "nouveau_state.h" #include "nouveau_span.h" #include "nouveau_tex.h" -#include "nv30_tris.h" +#include "nv20_swtcl.h" #include "vblank.h" #include "utils.h" @@ -132,13 +132,13 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, case NV_04: case NV_05: case NV_10: - case NV_20: default: break; + case NV_20: case NV_30: case NV_40: case G_70: - nv30TriInitFunctions( ctx ); + nv20TriInitFunctions( ctx ); break; } nouveauDDInitStateFuncs( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.h b/src/mesa/drivers/dri/nouveau/nouveau_screen.h index b8e8bfc22a..997b05fecd 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.h @@ -45,6 +45,7 @@ typedef struct { GLuint spanOffset; __DRIscreenPrivate *driScreen; + unsigned int sarea_priv_offset; /* Configuration cache with default values for all contexts */ driOptionCache optionCache; -- cgit v1.2.3 From 9ebde216cc3e7a9dbe8090abe976db38f63d4717 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 10 Mar 2006 01:43:39 +0000 Subject: A little work here and there --- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 9 +++++---- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 14 ++++++++++---- src/mesa/drivers/dri/nouveau/nv20_swtcl.c | 30 +++++++++++++++++++---------- 3 files changed, 35 insertions(+), 18 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index a330d5268b..cc77b577ca 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -26,6 +26,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_fifo.h" +#include "nouveau_lock.h" #include "vblank.h" #define RING_SKIPS 8 @@ -46,7 +47,7 @@ void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) do { fifo_get = NV_FIFO_READ(NV03_FIFO_REGS_DMAGET); } while(fifo_get <= RING_SKIPS); } - NV03_FIFO_REGS_DMAPUT(NV03_FIFO_REGS_DMAPUT, RING_SKIPS); + NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, RING_SKIPS); nmesa->fifo.current = nmesa->fifo.put = RING_SKIPS; nmesa->fifo.free = fifo_get - (RING_SKIPS + 1); } @@ -59,7 +60,7 @@ void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) * Wait for the card to be idle * XXX we should also wait for an empty fifo */ -void nouveauWaitForIdleLocked(nouveauContextPtr *nmesa) +void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) { int i,status; @@ -82,12 +83,12 @@ void nouveauWaitForIdleLocked(nouveauContextPtr *nmesa) break; } if (status) - return 0; + return; DO_USLEEP(1); } } -void nouveauWaitForIdle(nouveauContextPtr *nmesa) +void nouveauWaitForIdle(nouveauContextPtr nmesa) { LOCK_HARDWARE(nmesa); nouveauWaitForIdleLocked(nmesa); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 4f35283040..5f4b0624ad 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -58,14 +58,20 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc #define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK)) +/* Vertex attributes */ +#define NV30_UNKNOWN_0 0x00001718 +#define NV30_VERTEX_ATTRIBUTES 0x00001740 +#define NV20_VERTEX_ATTRIBUTE(i) (0x00001760+i*4) +#define NV20_VERTEX_ATTRIBUTE_TYPE_MASK 0x0000000f +#define NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT 0x00000002 +#define NV20_VERTEX_ATTRIBUTE_SIZE_MASK 0x000000f0 + /* Rendering commands */ +#define NV10_PRIMITIVE 0x00000dfc #define NV20_PRIMITIVE 0x000017fc #define NV30_PRIMITIVE 0x00001808 +#define NV10_BEGIN_VERTICES 0x00001800 #define NV20_BEGIN_VERTICES 0x00001818 -/* Vertex attributes */ -#define NV20_VERTEX_ATTRIBUTE(i) (0x00001760+i*4) -#define NV30_VERTEX_ATTRIBUTES 0x00001740 -#define NV30_UNKNOWN_0 0x00001718 diff --git a/src/mesa/drivers/dri/nouveau/nv20_swtcl.c b/src/mesa/drivers/dri/nouveau/nv20_swtcl.c index 9f1327ba83..c493516e2a 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv20_swtcl.c @@ -23,7 +23,7 @@ * DEALINGS IN THE SOFTWARE. */ -/* Software TCL for NV20, NV30, NV40, G70 */ +/* Software TCL for NV10, NV20, NV30, NV40, G70 */ #include #include @@ -67,24 +67,32 @@ static void nv20RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); /* the free room we want before we start a vertex batch. this is a performance-tunable */ -#define NV20_MIN_PRIM_SIZE (32/4) +#define NOUVEAU_MIN_PRIM_SIZE (32/4) /* the size above which we fire the ring. this is a performance-tunable */ -#define NV20_FIRE_SIZE (2048/4) +#define NOUVEAU_FIRE_SIZE (2048/4) static inline void nv20StartPrimitive(struct nouveau_context* nmesa) { - if (nmesa->screen->card_type==NV20) + if (nmesa->screen->card_type==NV_10) + BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); + else if (nmesa->screen->card_type==NV_20) BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); else BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); OUT_RING(nmesa->current_primitive); - BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NV20_MIN_PRIM_SIZE); + + if (nmesa->screen->card_type==NV_10) + BEGIN_RING_PRIM(channel,NV10_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); + else + BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); } static inline void nv20FinishPrimitive(struct nouveau_context *nmesa) { FINISH_RING_PRIM(); - if (nmesa->screen->card_type==NV20) + if (nmesa->screen->card_type==NV_10) + BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); + else if (nmesa->screen->card_type==NV_20) BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); else BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); @@ -96,7 +104,7 @@ static inline void nv20FinishPrimitive(struct nouveau_context *nmesa) static inline void nv20ExtendPrimitive(struct nouveau_context* nmesa, int size) { /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ - if ((RING_AHEAD()>=NV20_FIRE_SIZE)||(RING_AVAILABLE()=NOUVEAU_FIRE_SIZE)||(RING_AVAILABLE()screen->card_type==NV_20) { + if (nmesa->screen->card_type==NV_10) { + // XXX needs some love + } else if (nmesa->screen->card_type==NV_20) { for(i=0;i<16;i++) { int size=attr_size[i]; BEGIN_RING_SIZE(channel,NV20_VERTEX_ATTRIBUTE(i),1); - OUT_RING(0x00000002|(size*0x10)); + OUT_RING(NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); } } else { BEGIN_RING_SIZE(channel,NV30_VERTEX_ATTRIBUTES,slots); for(i=0;i Date: Mon, 13 Mar 2006 11:30:41 +0000 Subject: Cleaned up some code, made more files compile. Renamed nv20_swtcl.* to nv10_swtcl.*, hopefully this is the last rename (this should be, as NV05 really behaves differently). --- src/mesa/drivers/dri/nouveau/Makefile | 2 +- src/mesa/drivers/dri/nouveau/nouveau_context.c | 6 +- src/mesa/drivers/dri/nouveau/nouveau_driver.c | 6 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 1 + src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 7 +- src/mesa/drivers/dri/nouveau/nouveau_ioctl.h | 3 +- src/mesa/drivers/dri/nouveau/nouveau_tris.c | 1 - src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 822 ++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv10_swtcl.h | 39 ++ src/mesa/drivers/dri/nouveau/nv20_swtcl.c | 823 ------------------------- src/mesa/drivers/dri/nouveau/nv20_swtcl.h | 39 -- 11 files changed, 878 insertions(+), 871 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nv10_swtcl.c create mode 100644 src/mesa/drivers/dri/nouveau/nv10_swtcl.h delete mode 100644 src/mesa/drivers/dri/nouveau/nv20_swtcl.c delete mode 100644 src/mesa/drivers/dri/nouveau/nv20_swtcl.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 3e40240e76..25c298132c 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -16,7 +16,7 @@ DRIVER_SOURCES = \ nouveau_span.c \ nouveau_tex.c \ nouveau_tris.c \ - nv20_swtcl.c + nv10_swtcl.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 3558b25857..b55e52f487 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -44,7 +44,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. //#include "nouveau_state.h" #include "nouveau_span.h" #include "nouveau_tex.h" -#include "nv20_swtcl.h" +#include "nv10_swtcl.h" #include "vblank.h" #include "utils.h" @@ -131,14 +131,14 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, case NV_03: case NV_04: case NV_05: - case NV_10: default: break; + case NV_10: case NV_20: case NV_30: case NV_40: case G_70: - nv20TriInitFunctions( ctx ); + nv10TriInitFunctions( ctx ); break; } nouveauDDInitStateFuncs( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index 165fc4929f..cb996acd89 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -27,6 +27,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_ioctl.h" //#include "nouveau_state.h" +#include "nouveau_lock.h" +#include "nouveau_fifo.h" #include "nouveau_driver.h" #include "swrast/swrast.h" @@ -100,7 +102,7 @@ static const GLubyte *nouveauGetString( GLcontext *ctx, GLenum name ) agp_mode=0; break; case NV_AGP: - nmesa->screen->agp_mode; + agp_mode=nmesa->screen->agp_mode; break; } driGetRendererString( buffer, card_name, DRIVER_DATE, @@ -115,7 +117,7 @@ static const GLubyte *nouveauGetString( GLcontext *ctx, GLenum name ) static void nouveauFlush( GLcontext *ctx ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - FIRE_RING( nmesa ); + FIRE_RING(); } /* glFinish */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 6a21687551..bf528a24ca 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -90,6 +90,7 @@ extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); }\ }while(0) +extern void nouveauWaitForIdle(nouveauContextPtr nmesa); #endif /* __NOUVEAU_FIFO_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c index 959c5f465b..32bdcef06b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c @@ -24,6 +24,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +#include +#include "mtypes.h" +#include "macros.h" +#include "dd.h" +#include "swrast/swrast.h" #include "nouveau_ioctl.h" @@ -46,7 +51,7 @@ void nouveauIoctlInitFifo() // XXX needs more stuff } -void nouveauIoctlInitFunctions( struct dd_function_table *functions ) +void nouveauIoctlInitFunctions(struct dd_function_table *functions) { // nothing for now } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h index e6a9a7e249..3147265e90 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h @@ -28,6 +28,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __NOUVEAU_IOCTL_H__ #define __NOUVEAU_IOCTL_H__ -extern void nouveauIoctlInitFunctions( struct dd_function_table *functions ); +extern void nouveauIoctlInitFifo(); +extern void nouveauIoctlInitFunctions(struct dd_function_table *functions); #endif /* __NOUVEAU_IOCTL_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c index 770776390b..607c811910 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -117,7 +117,6 @@ void nouveauRunPipeline( GLcontext *ctx ) if (vmesa->newState) { vmesa->newRenderState |= vmesa->newState; - nouveauValidateState( ctx ); } _tnl_run_pipeline( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c new file mode 100644 index 0000000000..0b061876cb --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -0,0 +1,822 @@ +/* + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. + * Copyright 2006 Stephane Marchesin. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/* Software TCL for NV10, NV20, NV30, NV40, G70 */ + +#include +#include + +#include "glheader.h" +#include "context.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" +#include "enums.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "nouveau_tris.h" +#include "nv10_swtcl.h" +#include "nouveau_context.h" +#include "nouveau_span.h" +#include "nouveau_ioctl.h" +#include "nouveau_reg.h" +#include "nouveau_tex.h" +#include "nouveau_fifo.h" + +/* XXX hack for now */ +#define channel 1 + +static void nv10RenderPrimitive( GLcontext *ctx, GLenum prim ); +static void nv10RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); + + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ +#define LINE_FALLBACK (0) +#define POINT_FALLBACK (0) +#define TRI_FALLBACK (0) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + + +/* the free room we want before we start a vertex batch. this is a performance-tunable */ +#define NOUVEAU_MIN_PRIM_SIZE (32/4) +/* the size above which we fire the ring. this is a performance-tunable */ +#define NOUVEAU_FIRE_SIZE (2048/4) + +static inline void nv10StartPrimitive(struct nouveau_context* nmesa) +{ + if (nmesa->screen->card_type==NV_10) + BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); + else if (nmesa->screen->card_type==NV_20) + BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); + else + BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); + OUT_RING(nmesa->current_primitive); + + if (nmesa->screen->card_type==NV_10) + BEGIN_RING_PRIM(channel,NV10_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); + else + BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); +} + +static inline void nv10FinishPrimitive(struct nouveau_context *nmesa) +{ + FINISH_RING_PRIM(); + if (nmesa->screen->card_type==NV_10) + BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); + else if (nmesa->screen->card_type==NV_20) + BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); + else + BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); + OUT_RING(0x0); + FIRE_RING(); +} + + +static inline void nv10ExtendPrimitive(struct nouveau_context* nmesa, int size) +{ + /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ + if ((RING_AHEAD()>=NOUVEAU_FIRE_SIZE)||(RING_AVAILABLE()vertex_size; + nv10ExtendPrimitive(nmesa, 4 * 4 * vertsize); + + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); + OUT_RINGp(v2,vertsize); + OUT_RINGp(v3,vertsize); +} + +static inline void nv10_draw_triangle(nouveauContextPtr nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1, + nouveauVertexPtr v2) +{ + GLuint vertsize = nmesa->vertex_size; + nv10ExtendPrimitive(nmesa, 3 * 4 * vertsize); + + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); + OUT_RINGp(v2,vertsize); +} + +static inline void nv10_draw_line(nouveauContextPtr nmesa, + nouveauVertexPtr v0, + nouveauVertexPtr v1) +{ + GLuint vertsize = nmesa->vertex_size; + nv10ExtendPrimitive(nmesa, 2 * 4 * vertsize); + OUT_RINGp(v0,vertsize); + OUT_RINGp(v1,vertsize); +} + +static inline void nv10_draw_point(nouveauContextPtr nmesa, + nouveauVertexPtr v0) +{ + GLuint vertsize = nmesa->vertex_size; + nv10ExtendPrimitive(nmesa, 1 * 4 * vertsize); + OUT_RINGp(v0,vertsize); +} + + + +/*********************************************************************** + * Macros for nouveau_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI(a, b, c) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_tri(nmesa, a, b, c); \ + else \ + nv10_draw_triangle(nmesa, a, b, c); \ + } while (0) + +#define QUAD(a, b, c, d) \ + do { \ + if (DO_FALLBACK) { \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ + } \ + else \ + nv10_draw_quad(nmesa, a, b, c, d); \ + } while (0) + +#define LINE(v0, v1) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_line(nmesa, v0, v1); \ + else \ + nv10_draw_line(nmesa, v0, v1); \ + } while (0) + +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nv10_draw_point(nmesa, v0); \ + } while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define NOUVEAU_OFFSET_BIT 0x01 +#define NOUVEAU_TWOSIDE_BIT 0x02 +#define NOUVEAU_UNFILLED_BIT 0x04 +#define NOUVEAU_FALLBACK_BIT 0x08 +#define NOUVEAU_MAX_TRIFUNC 0x10 + + +static struct { + tnl_points_func points; + tnl_line_func line; + tnl_triangle_func triangle; + tnl_quad_func quad; +} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; + + +#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) +#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) +#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) +#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX nouveauVertex +#define TAB rast_tab + + +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW(a) (a > 0) +#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertex_size * sizeof(int))) + +#define VERT_SET_RGBA( v, c ) \ + do { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->f[coloroffset]); \ + color->red=(c)[0]; \ + color->green=(c)[1]; \ + color->blue=(c)[2]; \ + color->alpha=(c)[3]; \ + } while (0) + +#define VERT_COPY_RGBA( v0, v1 ) \ + do { \ + if (coloroffset) { \ + v0->f[coloroffset][0] = v1->f[coloroffset][0]; \ + v0->f[coloroffset][1] = v1->f[coloroffset][1]; \ + v0->f[coloroffset][2] = v1->f[coloroffset][2]; \ + v0->f[coloroffset][3] = v1->f[coloroffset][3]; \ + } \ + } while (0) + +#define VERT_SET_SPEC( v, c ) \ + do { \ + if (specoffset) { \ + nouveau_color_t *color = (nouveau_color_t *)&((v)->f[specoffset]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ + } \ + } while (0) +#define VERT_COPY_SPEC( v0, v1 ) \ + do { \ + if (specoffset) { \ + v0->f[specoffset][0] = v1->f[specoffset][0]; \ + v0->f[specoffset][1] = v1->f[specoffset][1]; \ + v0->f[specoffset][2] = v1->f[specoffset][2]; \ + } \ + } while (0) + + +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->f[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->f[coloroffset] = color[idx] +#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->f[specoffset] +#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] + + +#define LOCAL_VARS(n) \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLuint color[n], spec[n]; \ +GLuint coloroffset = nmesa->color_offset; \ +GLuint specoffset = nmesa->specular_offset; \ +(void)color; (void)spec; (void)coloroffset; (void)specoffset; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +static const GLuint hw_prim[GL_POLYGON+1] = { + GL_POINTS+1, + GL_LINES+1, + GL_LINES+1, + GL_LINES+1, + GL_TRIANGLES+1, + GL_TRIANGLES+1, + GL_TRIANGLES+1, + GL_QUADS+1, + GL_QUADS+1, + GL_TRIANGLES+1 +}; + +#define RASTERIZE(x) nv10RasterPrimitive( ctx, x, hw_prim[x] ) +#define RENDER_PRIMITIVE nmesa->renderPrimitive +#define TAG(x) x +#define IND NOUVEAU_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND +#undef RASTERIZE + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ +#define RASTERIZE(x) + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ + NOUVEAU_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +/* Catchall case for flat, separate specular triangles */ +#undef DO_FALLBACK +#undef DO_OFFSET +#undef DO_UNFILLED +#undef DO_TWOSIDE +#undef DO_FLAT +#define DO_FALLBACK (0) +#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) +#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) +#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) +#define DO_FLAT 1 +#define TAG(x) x##_flat_specular +#define IND NOUVEAU_MAX_TRIFUNC +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab(void) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); + + init_flat_specular(); /* special! */ +} + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ +#define IND 0 +#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) +#define RENDER_POINTS(start, count) \ + for (; start < count; start++) POINT(V(ELT(start))); +#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) +#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) +#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) +#define INIT(x) nv10RasterPrimitive(ctx, x, hw_prim[x]) +#undef LOCAL_VARS +#define LOCAL_VARS \ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ +GLubyte *vertptr = (GLubyte *)nmesa->verts; \ +const GLuint vertsize = nmesa->vertex_size; \ +const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ +const GLboolean stipple = ctx->Line.StippleFlag; \ +(void) elt; (void) stipple; +#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) nouveau_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) nouveau_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#undef NEED_EDGEFLAG_SETUP +#undef EDGEFLAG_GET +#undef EDGEFLAG_SET +#undef RESET_OCCLUSION + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + + +static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, + PRIM_BEGIN|PRIM_END); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON && + prim != GL_POLYGON + 1) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line(ctx, ii, jj); +} + +static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, + GLuint n) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint vertsize = nmesa->vertex_size; + nv10ExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); + GLubyte *vertptr = (GLubyte *)nmesa->verts; + const GLuint *start = (const GLuint *)V(elts[0]); + int i; + + for (i = 2; i < n; i++) { + OUT_RINGp(V(elts[i-1]),vertsize); + OUT_RINGp(V(elts[i]),vertsize); + OUT_RINGp(start,vertsize); + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + + +#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) + +#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + +#define EMIT_ATTR( ATTR, STYLE ) \ +do { \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].format = (STYLE); \ + nmesa->vertex_attr_count++; \ +} while (0) + + +static void nv10ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + nmesa->draw_point = nv10_draw_point; + nmesa->draw_line = nv10_draw_line; + nmesa->draw_tri = nv10_draw_triangle; + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; + if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & POINT_FALLBACK) + nmesa->draw_point = nouveau_fallback_point; + + if (flags & LINE_FALLBACK) + nmesa->draw_line = nouveau_fallback_line; + + if (flags & TRI_FALLBACK) + nmesa->draw_tri = nouveau_fallback_tri; + } + + + if ((flags & DD_SEPARATE_SPECULAR) && + ctx->Light.ShadeModel == GL_FLAT) { + index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ + } + + if (nmesa->renderIndex != index) { + nmesa->renderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; + tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; + } + else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; + } + } +} + + + +static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) +{ + GLcontext* ctx=nmesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + int attr_size[16]; + int default_attr_size[8]={3,3,3,4,3,1,4,4}; + int i; + int slots=0; + int total_size=0; + + /* + * Determine attribute sizes + */ + for(i=0;i<8;i++) + { + if (index&(1<TexCoordPtr[i]; + else + attr_size[i]=0; + } + + /* + * Tell t_vertex about the vertex format + */ + for(i=0;i<16;i++) + { + if (index&(1<color_offset=total_size; + if (i==_TNL_ATTRIB_COLOR1) + nmesa->specular_offset=total_size; + total_size+=attr_size[i]; + } + } + nmesa->vertex_size=total_size; + + /* + * Tell the hardware about the vertex format + */ + if (nmesa->screen->card_type==NV_10) { + // XXX needs some love + } else if (nmesa->screen->card_type==NV_20) { + for(i=0;i<16;i++) + { + int size=attr_size[i]; + BEGIN_RING_SIZE(channel,NV20_VERTEX_ATTRIBUTE(i),1); + OUT_RING(NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); + } + } else { + BEGIN_RING_SIZE(channel,NV30_VERTEX_ATTRIBUTES,slots); + for(i=0;irender_inputs; + + if (index!=nmesa->render_inputs) + { + nmesa->render_inputs=index; + nv10OutputVertexFormat(nmesa,index); + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void nv10RenderStart(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->newState) { + nmesa->newRenderState |= nmesa->newState; + } + + if (nmesa->Fallback) { + tnl->Driver.Render.Start(ctx); + return; + } + + if (nmesa->newRenderState) { + nv10ChooseVertexState(ctx); + nv10ChooseRenderState(ctx); + nmesa->newRenderState = 0; + } +} + +static void nv10RenderFinish(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + nv10FinishPrimitive(nmesa); +} + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void nv10RasterPrimitive(GLcontext *ctx, + GLenum glprim, + GLuint hwprim) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + assert (!nmesa->newState); + + if (hwprim != nmesa->current_primitive) + { + nmesa->current_primitive=hwprim; + + } +} + +/* Callback for mesa: + */ +static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim ) +{ + nv10RasterPrimitive( ctx, prim, hw_prim[prim] ); +} + + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void nouveauInitTriFuncs(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = nouveauRunPipeline; + tnl->Driver.Render.Start = nv10RenderStart; + tnl->Driver.Render.Finish = nv10RenderFinish; + tnl->Driver.Render.PrimitiveNotify = nv10RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, + (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); + + nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; + +} + diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h new file mode 100644 index 0000000000..7b42967dd8 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h @@ -0,0 +1,39 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NV10_SWTCL_H__ +#define __NV10_SWTCL_H__ + +#include "mtypes.h" + +extern void nv10TriInitFunctions( GLcontext *ctx ); +extern void nv10Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) + +#endif /* __NV10_SWTCL_H__ */ + diff --git a/src/mesa/drivers/dri/nouveau/nv20_swtcl.c b/src/mesa/drivers/dri/nouveau/nv20_swtcl.c deleted file mode 100644 index c493516e2a..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv20_swtcl.c +++ /dev/null @@ -1,823 +0,0 @@ -/* - * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. - * Copyright 2006 Stephane Marchesin. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* Software TCL for NV10, NV20, NV30, NV40, G70 */ - -#include -#include - -#include "glheader.h" -#include "context.h" -#include "mtypes.h" -#include "macros.h" -#include "colormac.h" -#include "enums.h" - -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" - -#include "nouveau_tris.h" -#include "nv20_swtcl.h" -#include "nouveau_context.h" -#include "nouveau_span.h" -#include "nouveau_ioctl.h" -#include "nouveau_reg.h" -#include "nouveau_tex.h" -#include "nouveau_fifo.h" - -/* XXX hack for now */ -#define channel 1 - -static void nv20RenderPrimitive( GLcontext *ctx, GLenum prim ); -static void nv20RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); - - -/*********************************************************************** - * Emit primitives as inline vertices * - ***********************************************************************/ -#define LINE_FALLBACK (0) -#define POINT_FALLBACK (0) -#define TRI_FALLBACK (0) -#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) -#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) - - -/* the free room we want before we start a vertex batch. this is a performance-tunable */ -#define NOUVEAU_MIN_PRIM_SIZE (32/4) -/* the size above which we fire the ring. this is a performance-tunable */ -#define NOUVEAU_FIRE_SIZE (2048/4) - -static inline void nv20StartPrimitive(struct nouveau_context* nmesa) -{ - if (nmesa->screen->card_type==NV_10) - BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); - else if (nmesa->screen->card_type==NV_20) - BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); - else - BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); - OUT_RING(nmesa->current_primitive); - - if (nmesa->screen->card_type==NV_10) - BEGIN_RING_PRIM(channel,NV10_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); - else - BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); -} - -static inline void nv20FinishPrimitive(struct nouveau_context *nmesa) -{ - FINISH_RING_PRIM(); - if (nmesa->screen->card_type==NV_10) - BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); - else if (nmesa->screen->card_type==NV_20) - BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); - else - BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); - OUT_RING(0x0); - FIRE_RING(); -} - - -static inline void nv20ExtendPrimitive(struct nouveau_context* nmesa, int size) -{ - /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ - if ((RING_AHEAD()>=NOUVEAU_FIRE_SIZE)||(RING_AVAILABLE()vertex_size; - nv20ExtendPrimitive(nmesa, 4 * 4 * vertsize); - - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); - OUT_RINGp(v2,vertsize); - OUT_RINGp(v3,vertsize); -} - -static inline void nv20_draw_triangle(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1, - nouveauVertexPtr v2) -{ - GLuint vertsize = nmesa->vertex_size; - nv20ExtendPrimitive(nmesa, 3 * 4 * vertsize); - - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); - OUT_RINGp(v2,vertsize); -} - -static inline void nv20_draw_line(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1) -{ - GLuint vertsize = nmesa->vertex_size; - nv20ExtendPrimitive(nmesa, 2 * 4 * vertsize); - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); -} - -static inline void nv20_draw_point(nouveauContextPtr nmesa, - nouveauVertexPtr v0) -{ - GLuint vertsize = nmesa->vertex_size; - nv20ExtendPrimitive(nmesa, 1 * 4 * vertsize); - OUT_RINGp(v0,vertsize); -} - - - -/*********************************************************************** - * Macros for nouveau_dd_tritmp.h to draw basic primitives * - ***********************************************************************/ - -#define TRI(a, b, c) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_tri(nmesa, a, b, c); \ - else \ - nv20_draw_triangle(nmesa, a, b, c); \ - } while (0) - -#define QUAD(a, b, c, d) \ - do { \ - if (DO_FALLBACK) { \ - nmesa->draw_tri(nmesa, a, b, d); \ - nmesa->draw_tri(nmesa, b, c, d); \ - } \ - else \ - nv20_draw_quad(nmesa, a, b, c, d); \ - } while (0) - -#define LINE(v0, v1) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_line(nmesa, v0, v1); \ - else \ - nv20_draw_line(nmesa, v0, v1); \ - } while (0) - -#define POINT(v0) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_point(nmesa, v0); \ - else \ - nv20_draw_point(nmesa, v0); \ - } while (0) - - -/*********************************************************************** - * Build render functions from dd templates * - ***********************************************************************/ - -#define NOUVEAU_OFFSET_BIT 0x01 -#define NOUVEAU_TWOSIDE_BIT 0x02 -#define NOUVEAU_UNFILLED_BIT 0x04 -#define NOUVEAU_FALLBACK_BIT 0x08 -#define NOUVEAU_MAX_TRIFUNC 0x10 - - -static struct { - tnl_points_func points; - tnl_line_func line; - tnl_triangle_func triangle; - tnl_quad_func quad; -} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; - - -#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) -#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) -#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) -#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) -#define DO_FLAT 0 -#define DO_TRI 1 -#define DO_QUAD 1 -#define DO_LINE 1 -#define DO_POINTS 1 -#define DO_FULL_QUAD 1 - -#define HAVE_RGBA 1 -#define HAVE_SPEC 1 -#define HAVE_BACK_COLORS 0 -#define HAVE_HW_FLATSHADE 1 -#define VERTEX nouveauVertex -#define TAB rast_tab - - -#define DEPTH_SCALE 1.0 -#define UNFILLED_TRI unfilled_tri -#define UNFILLED_QUAD unfilled_quad -#define VERT_X(_v) _v->v.x -#define VERT_Y(_v) _v->v.y -#define VERT_Z(_v) _v->v.z -#define AREA_IS_CCW(a) (a > 0) -#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertex_size * sizeof(int))) - -#define VERT_SET_RGBA( v, c ) \ - do { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->f[coloroffset]); \ - color->red=(c)[0]; \ - color->green=(c)[1]; \ - color->blue=(c)[2]; \ - color->alpha=(c)[3]; \ - } while (0) - -#define VERT_COPY_RGBA( v0, v1 ) \ - do { \ - if (coloroffset) { \ - v0->f[coloroffset][0] = v1->f[coloroffset][0]; \ - v0->f[coloroffset][1] = v1->f[coloroffset][1]; \ - v0->f[coloroffset][2] = v1->f[coloroffset][2]; \ - v0->f[coloroffset][3] = v1->f[coloroffset][3]; \ - } \ - } while (0) - -#define VERT_SET_SPEC( v, c ) \ - do { \ - if (specoffset) { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->f[specoffset]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ - } \ - } while (0) -#define VERT_COPY_SPEC( v0, v1 ) \ - do { \ - if (specoffset) { \ - v0->f[specoffset][0] = v1->f[specoffset][0]; \ - v0->f[specoffset][1] = v1->f[specoffset][1]; \ - v0->f[specoffset][2] = v1->f[specoffset][2]; \ - } \ - } while (0) - - -#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->f[coloroffset] -#define VERT_RESTORE_RGBA( idx ) v[idx]->f[coloroffset] = color[idx] -#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->f[specoffset] -#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] - - -#define LOCAL_VARS(n) \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLuint color[n], spec[n]; \ -GLuint coloroffset = nmesa->color_offset; \ -GLuint specoffset = nmesa->specular_offset; \ -(void)color; (void)spec; (void)coloroffset; (void)specoffset; - - -/*********************************************************************** - * Helpers for rendering unfilled primitives * - ***********************************************************************/ - -static const GLuint hw_prim[GL_POLYGON+1] = { - GL_POINTS+1, - GL_LINES+1, - GL_LINES+1, - GL_LINES+1, - GL_TRIANGLES+1, - GL_TRIANGLES+1, - GL_TRIANGLES+1, - GL_QUADS+1, - GL_QUADS+1, - GL_TRIANGLES+1 -}; - -#define RASTERIZE(x) nv20RasterPrimitive( ctx, x, hw_prim[x] ) -#define RENDER_PRIMITIVE nmesa->renderPrimitive -#define TAG(x) x -#define IND NOUVEAU_FALLBACK_BIT -#include "tnl_dd/t_dd_unfilled.h" -#undef IND -#undef RASTERIZE - -/*********************************************************************** - * Generate GL render functions * - ***********************************************************************/ -#define RASTERIZE(x) - -#define IND (0) -#define TAG(x) x -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_twoside_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ - NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - - -/* Catchall case for flat, separate specular triangles */ -#undef DO_FALLBACK -#undef DO_OFFSET -#undef DO_UNFILLED -#undef DO_TWOSIDE -#undef DO_FLAT -#define DO_FALLBACK (0) -#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) -#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) -#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) -#define DO_FLAT 1 -#define TAG(x) x##_flat_specular -#define IND NOUVEAU_MAX_TRIFUNC -#include "tnl_dd/t_dd_tritmp.h" - - -static void init_rast_tab(void) -{ - init(); - init_offset(); - init_twoside(); - init_twoside_offset(); - init_unfilled(); - init_offset_unfilled(); - init_twoside_unfilled(); - init_twoside_offset_unfilled(); - init_fallback(); - init_offset_fallback(); - init_twoside_fallback(); - init_twoside_offset_fallback(); - init_unfilled_fallback(); - init_offset_unfilled_fallback(); - init_twoside_unfilled_fallback(); - init_twoside_offset_unfilled_fallback(); - - init_flat_specular(); /* special! */ -} - - -/**********************************************************************/ -/* Render unclipped begin/end objects */ -/**********************************************************************/ -#define IND 0 -#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) -#define RENDER_POINTS(start, count) \ - for (; start < count; start++) POINT(V(ELT(start))); -#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) -#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) -#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) -#define INIT(x) nv20RasterPrimitive(ctx, x, hw_prim[x]) -#undef LOCAL_VARS -#define LOCAL_VARS \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLubyte *vertptr = (GLubyte *)nmesa->verts; \ -const GLuint vertsize = nmesa->vertex_size; \ -const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ -const GLboolean stipple = ctx->Line.StippleFlag; \ -(void) elt; (void) stipple; -#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); -#define RESET_OCCLUSION -#define PRESERVE_VB_DEFS -#define ELT(x) x -#define TAG(x) nouveau_##x##_verts -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#define TAG(x) nouveau_##x##_elts -#define ELT(x) elt[x] -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#undef NEED_EDGEFLAG_SETUP -#undef EDGEFLAG_GET -#undef EDGEFLAG_SET -#undef RESET_OCCLUSION - - -/**********************************************************************/ -/* Render clipped primitives */ -/**********************************************************************/ - - - -static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; - - /* Render the new vertices as an unclipped polygon. - */ - { - GLuint *tmp = VB->Elts; - VB->Elts = (GLuint *)elts; - tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, - PRIM_BEGIN|PRIM_END); - VB->Elts = tmp; - } - - /* Restore the render primitive - */ - if (prim != GL_POLYGON && - prim != GL_POLYGON + 1) - tnl->Driver.Render.PrimitiveNotify( ctx, prim ); -} - -static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - tnl->Driver.Render.Line(ctx, ii, jj); -} - -static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint vertsize = nmesa->vertex_size; - nv20ExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); - GLubyte *vertptr = (GLubyte *)nmesa->verts; - const GLuint *start = (const GLuint *)V(elts[0]); - int i; - - for (i = 2; i < n; i++) { - OUT_RINGp(V(elts[i-1]),vertsize); - OUT_RINGp(V(elts[i]),vertsize); - OUT_RINGp(start,vertsize); - } -} - -/**********************************************************************/ -/* Choose render functions */ -/**********************************************************************/ - - - - -#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ - _DD_NEW_SEPARATE_SPECULAR | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _NEW_FOG) - -#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _DD_NEW_TRI_OFFSET | \ - _DD_NEW_TRI_STIPPLE | \ - _NEW_POLYGONSTIPPLE) - -#define EMIT_ATTR( ATTR, STYLE ) \ -do { \ - nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ - nmesa->vertex_attrs[nmesa->vertex_attr_count].format = (STYLE); \ - nmesa->vertex_attr_count++; \ -} while (0) - - -static void nv20ChooseRenderState(GLcontext *ctx) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint flags = ctx->_TriangleCaps; - GLuint index = 0; - - nmesa->draw_point = nv20_draw_point; - nmesa->draw_line = nv20_draw_line; - nmesa->draw_tri = nv20_draw_triangle; - - if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; - if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; - if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; - - /* Hook in fallbacks for specific primitives. - */ - if (flags & POINT_FALLBACK) - nmesa->draw_point = nouveau_fallback_point; - - if (flags & LINE_FALLBACK) - nmesa->draw_line = nouveau_fallback_line; - - if (flags & TRI_FALLBACK) - nmesa->draw_tri = nouveau_fallback_tri; - } - - - if ((flags & DD_SEPARATE_SPECULAR) && - ctx->Light.ShadeModel == GL_FLAT) { - index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ - } - - if (nmesa->renderIndex != index) { - nmesa->renderIndex = index; - - tnl->Driver.Render.Points = rast_tab[index].points; - tnl->Driver.Render.Line = rast_tab[index].line; - tnl->Driver.Render.Triangle = rast_tab[index].triangle; - tnl->Driver.Render.Quad = rast_tab[index].quad; - - if (index == 0) { - tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; - tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; - tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ - tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; - } - else { - tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; - tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; - tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; - tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; - } - } -} - - - -static inline void nv20OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) -{ - GLcontext* ctx=nmesa->glCtx; - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *VB = &tnl->vb; - int attr_size[16]; - int default_attr_size[8]={3,3,3,4,3,1,4,4}; - int i; - int slots=0; - int total_size=0; - - /* - * Determine attribute sizes - */ - for(i=0;i<8;i++) - { - if (index&(1<TexCoordPtr[i]; - else - attr_size[i]=0; - } - - /* - * Tell t_vertex about the vertex format - */ - for(i=0;i<16;i++) - { - if (index&(1<color_offset=total_size; - if (i==_TNL_ATTRIB_COLOR1) - nmesa->specular_offset=total_size; - total_size+=attr_size[i]; - } - } - nmesa->vertex_size=total_size; - - /* - * Tell the hardware about the vertex format - */ - if (nmesa->screen->card_type==NV_10) { - // XXX needs some love - } else if (nmesa->screen->card_type==NV_20) { - for(i=0;i<16;i++) - { - int size=attr_size[i]; - BEGIN_RING_SIZE(channel,NV20_VERTEX_ATTRIBUTE(i),1); - OUT_RING(NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); - } - } else { - BEGIN_RING_SIZE(channel,NV30_VERTEX_ATTRIBUTES,slots); - for(i=0;irender_inputs; - - if (index!=nmesa->render_inputs) - { - nmesa->render_inputs=index; - nv20OutputVertexFormat(nmesa,index); - } -} - - -/**********************************************************************/ -/* High level hooks for t_vb_render.c */ -/**********************************************************************/ - - -static void nv20RenderStart(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - if (nmesa->newState) { - nmesa->newRenderState |= nmesa->newState; - nouveauValidateState( ctx ); - } - - if (nmesa->Fallback) { - tnl->Driver.Render.Start(ctx); - return; - } - - if (nmesa->newRenderState) { - nv20ChooseVertexState(ctx); - nv20ChooseRenderState(ctx); - nmesa->newRenderState = 0; - } -} - -static void nv20RenderFinish(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - nv20FinishPrimitive(nmesa); -} - - -/* System to flush dma and emit state changes based on the rasterized - * primitive. - */ -void nv20RasterPrimitive(GLcontext *ctx, - GLenum glprim, - GLuint hwprim) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - assert (!nmesa->newState); - - if (hwprim != nmesa->current_primitive) - { - nmesa->current_primitive=hwprim; - - } -} - -/* Callback for mesa: - */ -static void nv20RenderPrimitive( GLcontext *ctx, GLuint prim ) -{ - nv20RasterPrimitive( ctx, prim, hw_prim[prim] ); -} - - - -/**********************************************************************/ -/* Initialization. */ -/**********************************************************************/ - - -void nouveauInitTriFuncs(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - TNLcontext *tnl = TNL_CONTEXT(ctx); - static int firsttime = 1; - - if (firsttime) { - init_rast_tab(); - firsttime = 0; - } - - tnl->Driver.RunPipeline = nouveauRunPipeline; - tnl->Driver.Render.Start = nv20RenderStart; - tnl->Driver.Render.Finish = nv20RenderFinish; - tnl->Driver.Render.PrimitiveNotify = nv20RenderPrimitive; - tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; - tnl->Driver.Render.BuildVertices = _tnl_build_vertices; - tnl->Driver.Render.CopyPV = _tnl_copy_pv; - tnl->Driver.Render.Interp = _tnl_interp; - - _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, - (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); - - nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; - -} - diff --git a/src/mesa/drivers/dri/nouveau/nv20_swtcl.h b/src/mesa/drivers/dri/nouveau/nv20_swtcl.h deleted file mode 100644 index ed589d8bcf..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv20_swtcl.h +++ /dev/null @@ -1,39 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - - - -#ifndef __NV20_SWTCL_H__ -#define __NV20_SWTCL_H__ - -#include "mtypes.h" - -extern void nv20TriInitFunctions( GLcontext *ctx ); -extern void nv20Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); -#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) - -#endif /* __NV20_SWTCL_H__ */ - -- cgit v1.2.3 From f799745f50ff2e61f535816d623e643cc1eac944 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 13 Apr 2006 17:03:51 +0000 Subject: Some compile fixes. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 ++ src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 ++ src/mesa/drivers/dri/nouveau/nouveau_tris.c | 2 ++ src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 1 + 4 files changed, 7 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index b55e52f487..9e025a5231 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -55,6 +55,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. int NOUVEAU_DEBUG = 0; #endif +#define NOUVEAU_FALLBACK_DISABLE 1 + static const struct dri_debug_control debug_control[] = { { NULL, 0 } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 49e22f8074..83ac2fd455 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -113,6 +113,8 @@ typedef struct nouveau_context { /* Configuration cache */ driOptionCache optionCache; + + uint32_t vblank_flags; }nouveauContextRec, *nouveauContextPtr; #define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c index 607c811910..3a48393662 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -25,6 +25,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ #include "nouveau_context.h" +#include "nouveau_tris.h" +#include /* Common tri functions */ diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 0b061876cb..3eafde39a7 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -56,6 +56,7 @@ static void nv10RenderPrimitive( GLcontext *ctx, GLenum prim ); static void nv10RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); + /*********************************************************************** * Emit primitives as inline vertices * ***********************************************************************/ -- cgit v1.2.3 From 5fd11335f655e27515d9bf92fef5d9a8cd4f6bb5 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 14 Apr 2006 17:39:43 +0000 Subject: Added the beginnings of state (not much there yet). Fixed some includes. --- src/mesa/drivers/dri/nouveau/Makefile | 1 + src/mesa/drivers/dri/nouveau/nouveau_context.h | 3 + src/mesa/drivers/dri/nouveau/nouveau_state.c | 140 +++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_state.h | 42 ++++++++ src/mesa/drivers/dri/nouveau/nouveau_tris.c | 5 +- 5 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_state.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_state.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 25c298132c..fc51205019 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -14,6 +14,7 @@ DRIVER_SOURCES = \ nouveau_ioctl.c \ nouveau_lock.c \ nouveau_span.c \ + nouveau_state.c \ nouveau_tex.c \ nouveau_tris.c \ nv10_swtcl.c diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 83ac2fd455..c2929a16a8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -115,6 +115,9 @@ typedef struct nouveau_context { driOptionCache optionCache; uint32_t vblank_flags; + + GLfloat viewport[16]; + }nouveauContextRec, *nouveauContextPtr; #define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c new file mode 100644 index 0000000000..c88b33b884 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -0,0 +1,140 @@ +/************************************************************************** + +Copyright 2006 Jeremy Kolb +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" +#include "nouveau_state.h" +#include "nouveau_ioctl.h" +#include "nouveau_tris.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" + +#include "tnl/t_pipeline.h" + +static void nouveauCalcViewport(GLcontext *ctx) +{ + /* Calculate the Viewport Matrix */ + +/* Taken from the intel driver + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = nmesa->ViewportMatrix.m; + GLint h = 0; + + if (nmesa->driDrawable) + h = nmesa->driDrawable->h + SUBPIXEL_Y; + + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X; + m[MAT_SY] = - v[MAT_SY]; + m[MAT_TY] = - v[MAT_TY] + h; + m[MAT_SZ] = v[MAT_SZ] * nmesa->depth_scale; + m[MAT_TZ] = v[MAT_TZ] * nmesa->depth_scale; +*/ +} + +static nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ + /* + * Need to send (at least on an nv35 the following: + * cons = 4 (this may be bytes per pixel) + * + * The viewport: + * 445 0x0000bee0 {size: 0x0 channel: 0x1 cmd: 0x00009ee0} <-- VIEWPORT_SETUP/HEADER ? + * 446 0x00000000 {size: 0x0 channel: 0x0 cmd: 0x00000000} <-- x * cons + * 447 0x00000c80 {size: 0x0 channel: 0x0 cmd: 0x00000c80} <-- (height + x) * cons + * 448 0x00000000 {size: 0x0 channel: 0x0 cmd: 0x00000000} <-- y * cons + * 449 0x00000960 {size: 0x0 channel: 0x0 cmd: 0x00000960} <-- (width + y) * cons + * 44a 0x00082a00 {size: 0x2 channel: 0x1 cmd: 0x00000a00} <-- VIEWPORT_DIMS + * 44b 0x04000000 <-- (Width_from_glViewport << 16) | x + * 44c 0x03000000 <-- (Height_from_glViewport << 16) | (win_height - height - y) + * + */ + +} + +/* Initialize the context's hardware state. */ +void nouveauDDInitState(nouveauContextPtr nmesa) +{ + +} + +/* Initialize the driver's state functions */ +void nouveauDDInitStateFuncs(GLcontext *ctx) +{ + ctx->Driver.UpdateState = NULL; //nouveauDDInvalidateState; + + ctx->Driver.ClearIndex = NULL; + ctx->Driver.ClearColor = NULL; //nouveauDDClearColor; + ctx->Driver.ClearStencil = NULL; //nouveauDDClearStencil; + ctx->Driver.DrawBuffer = NULL; //nouveauDDDrawBuffer; + ctx->Driver.ReadBuffer = NULL; //nouveauDDReadBuffer; + + ctx->Driver.IndexMask = NULL; + ctx->Driver.ColorMask = NULL; //nouveauDDColorMask; + ctx->Driver.AlphaFunc = NULL; //nouveauDDAlphaFunc; + ctx->Driver.BlendEquationSeparate = NULL; //nouveauDDBlendEquationSeparate; + ctx->Driver.BlendFuncSeparate = NULL; //nouveauDDBlendFuncSeparate; + ctx->Driver.ClearDepth = NULL; //nouveauDDClearDepth; + ctx->Driver.CullFace = NULL; //nouveauDDCullFace; + ctx->Driver.FrontFace = NULL; //nouveauDDFrontFace; + ctx->Driver.DepthFunc = NULL; //nouveauDDDepthFunc; + ctx->Driver.DepthMask = NULL; //nouveauDDDepthMask; + ctx->Driver.Enable = NULL; //nouveauDDEnable; + ctx->Driver.Fogfv = NULL; //nouveauDDFogfv; + ctx->Driver.Hint = NULL; + ctx->Driver.Lightfv = NULL; + ctx->Driver.LightModelfv = NULL; //nouveauDDLightModelfv; + ctx->Driver.LogicOpcode = NULL; //nouveauDDLogicOpCode; + ctx->Driver.PolygonMode = NULL; + ctx->Driver.PolygonStipple = NULL; //nouveauDDPolygonStipple; + ctx->Driver.RenderMode = NULL; //nouveauDDRenderMode; + ctx->Driver.Scissor = NULL; //nouveauDDScissor; + ctx->Driver.ShadeModel = NULL; //nouveauDDShadeModel; + ctx->Driver.StencilFuncSeparate = NULL; //nouveauDDStencilFuncSeparate; + ctx->Driver.StencilMaskSeparate = NULL; //nouveauDDStencilMaskSeparate; + ctx->Driver.StencilOpSeparate = NULL; //nouveauDDStencilOpSeparate; + + ctx->Driver.DepthRange = NULL; //nouveauDepthRange; + ctx->Driver.Viewport = nouveauViewport; + + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; +} diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h new file mode 100644 index 0000000000..70c50588a8 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h @@ -0,0 +1,42 @@ +/************************************************************************** + +Copyright 2006 Jeremy Kolb +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#ifndef __NOUVEAU_STATE_H__ +#define __NOUVEAU_STATE_H__ + +#include "nouveau_context.h" + +extern void nouveauDDInitState(nouveauContextPtr nmesa); +extern void nouveauDDInitStateFuncs(GLcontext *ctx); + +/* +extern void nouveauDDUpdateState(GLcontext *ctx); +extern void nouveauDDUpdateHWState(GLcontext *ctx); + +extern void nouveauEmitHwStateLocked(nouveauContextPtr nmesa); +*/ +#endif + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c index 3a48393662..9749915b41 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -26,7 +26,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_tris.h" -#include +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" /* Common tri functions */ -- cgit v1.2.3 From 199512968be28aa5a4f41c4f30e0e311e31b252a Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 14 Apr 2006 22:41:16 +0000 Subject: Cleaned stuff in the tcl code --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 + src/mesa/drivers/dri/nouveau/nouveau_context.h | 13 +++++++++++ src/mesa/drivers/dri/nouveau/nouveau_tris.c | 30 ++++++++++---------------- src/mesa/drivers/dri/nouveau/nouveau_tris.h | 3 +++ src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 7 +++--- src/mesa/drivers/dri/nouveau/nv10_swtcl.h | 3 ++- 6 files changed, 33 insertions(+), 24 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 9e025a5231..683e6d6ea6 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -134,6 +134,7 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, case NV_04: case NV_05: default: + //nv03TriInitFunctions( ctx ); break; case NV_10: case NV_20: diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index c2929a16a8..93c6f1dfff 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -88,6 +88,7 @@ typedef struct nouveau_context { GLuint specular_offset; /* The drawing fallbacks */ + GLuint Fallback; nouveau_tri_func* draw_tri; nouveau_line_func* draw_line; nouveau_point_func* draw_point; @@ -122,6 +123,18 @@ typedef struct nouveau_context { #define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) +#define NOUVEAU_FALLBACK_TEXTURE 0x0001 +#define NOUVEAU_FALLBACK_DRAW_BUFFER 0x0002 +#define NOUVEAU_FALLBACK_READ_BUFFER 0x0004 +#define NOUVEAU_FALLBACK_STENCIL 0x0008 +#define NOUVEAU_FALLBACK_RENDER_MODE 0x0010 +#define NOUVEAU_FALLBACK_LOGICOP 0x0020 +#define NOUVEAU_FALLBACK_SEP_SPECULAR 0x0040 +#define NOUVEAU_FALLBACK_BLEND_EQ 0x0080 +#define NOUVEAU_FALLBACK_BLEND_FUNC 0x0100 +#define NOUVEAU_FALLBACK_PROJTEX 0x0200 +#define NOUVEAU_FALLBACK_DISABLE 0x0400 + extern GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, __DRIcontextPrivate *driContextPriv, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c index 9749915b41..53a18d2f73 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -26,6 +26,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_tris.h" +#include "nv10_swtcl.h" +#include "nouveau_span.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" #include "tnl/tnl.h" @@ -44,9 +46,7 @@ void nouveau_fallback_tri(struct nouveau_context *nmesa, _swsetup_Translate(ctx, v0, &v[0]); _swsetup_Translate(ctx, v1, &v[1]); _swsetup_Translate(ctx, v2, &v[2]); - nouveauSpanRenderStart( ctx ); _swrast_Triangle(ctx, &v[0], &v[1], &v[2]); - nouveauSpanRenderFinish( ctx ); } @@ -58,9 +58,7 @@ void nouveau_fallback_line(struct nouveau_context *nmesa, SWvertex v[2]; _swsetup_Translate(ctx, v0, &v[0]); _swsetup_Translate(ctx, v1, &v[1]); - nouveauSpanRenderStart( ctx ); _swrast_Line(ctx, &v[0], &v[1]); - nouveauSpanRenderFinish( ctx ); } @@ -70,12 +68,9 @@ void nouveau_fallback_point(struct nouveau_context *nmesa, GLcontext *ctx = nmesa->glCtx; SWvertex v[1]; _swsetup_Translate(ctx, v0, &v[0]); - nouveauSpanRenderStart( ctx ); _swrast_Point(ctx, &v[0]); - nouveauSpanRenderFinish( ctx ); } - void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) { GLcontext *ctx = nmesa->glCtx; @@ -85,7 +80,11 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) if (mode) { nmesa->Fallback |= bit; if (oldfallback == 0) { - nv40FinishPrimitive(nmesa); + if (nmesa->screen->card_typerenderIndex = ~0; @@ -96,14 +95,7 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) if (oldfallback == bit) { _swrast_flush( ctx ); - tnl->Driver.Render.Start = nouveauRenderStart; - tnl->Driver.Render.PrimitiveNotify = nouveauRenderPrimitive; - tnl->Driver.Render.Finish = nouveauRenderFinish; - - tnl->Driver.Render.BuildVertices = _tnl_build_vertices; - tnl->Driver.Render.CopyPV = _tnl_copy_pv; - tnl->Driver.Render.Interp = _tnl_interp; - tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + nouveauInitTriFunctions(ctx); _tnl_invalidate_vertex_state( ctx, ~0 ); _tnl_invalidate_vertices( ctx, ~0 ); @@ -118,10 +110,10 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) void nouveauRunPipeline( GLcontext *ctx ) { - struct nouveau_context *vmesa = NOUVEAU_CONTEXT(ctx); + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - if (vmesa->newState) { - vmesa->newRenderState |= vmesa->newState; + if (nmesa->newState) { + nmesa->newRenderState |= nmesa->newState; } _tnl_run_pipeline( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.h b/src/mesa/drivers/dri/nouveau/nouveau_tris.h index 4d9de538d7..950f662570 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.h @@ -47,6 +47,9 @@ extern void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean extern void nouveauRunPipeline( GLcontext *ctx ); +extern void nouveauTriInitFunctions( GLcontext *ctx ); + + #endif /* __NOUVEAU_TRIS_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 3eafde39a7..e04a4ece5e 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -88,7 +88,7 @@ static inline void nv10StartPrimitive(struct nouveau_context* nmesa) BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); } -static inline void nv10FinishPrimitive(struct nouveau_context *nmesa) +inline void nv10FinishPrimitive(struct nouveau_context *nmesa) { FINISH_RING_PRIM(); if (nmesa->screen->card_type==NV_10) @@ -788,13 +788,11 @@ static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim ) } - /**********************************************************************/ /* Initialization. */ /**********************************************************************/ - -void nouveauInitTriFuncs(GLcontext *ctx) +void nouveauTriInitFunctions(GLcontext *ctx) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); @@ -821,3 +819,4 @@ void nouveauInitTriFuncs(GLcontext *ctx) } + diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h index 7b42967dd8..fd57eeaa95 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h @@ -31,8 +31,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mtypes.h" -extern void nv10TriInitFunctions( GLcontext *ctx ); extern void nv10Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +extern void nv10FinishPrimitive(struct nouveau_context *nmesa); +extern void nv10RenderStart(GLcontext *ctx); #define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) #endif /* __NV10_SWTCL_H__ */ -- cgit v1.2.3 From b7d4314fe1619223caf2f59b1b28e05d7ff0e662 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 14 Apr 2006 22:43:44 +0000 Subject: Added vertex attributes to the context --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 93c6f1dfff..dcb1442033 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -83,10 +83,14 @@ typedef struct nouveau_context { volatile unsigned char* mmio; /* State for tris */ - GLuint vertex_size; GLuint color_offset; GLuint specular_offset; + /* Vertex state */ + GLuint vertex_size; + struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; + GLuint vertex_attr_count; + /* The drawing fallbacks */ GLuint Fallback; nouveau_tri_func* draw_tri; -- cgit v1.2.3 From 4b2d8b46c8c68b0d10d9d3fa4a3820fa44ef4738 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 14 Apr 2006 22:48:03 +0000 Subject: Silence the lock warning --- src/mesa/drivers/dri/nouveau/nouveau_span.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.c b/src/mesa/drivers/dri/nouveau/nouveau_span.c index f990a8907e..1763b37e53 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_span.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_span.c @@ -28,6 +28,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_span.h" #include "nouveau_fifo.h" +#include "nouveau_lock.h" #include "swrast/swrast.h" -- cgit v1.2.3 From 576b3433dacd1f36fe5bb33dcf6c1dbadfe152c9 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 14 Apr 2006 22:50:14 +0000 Subject: Cleaning --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 7 ++++++- src/mesa/drivers/dri/nouveau/nouveau_state.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index dcb1442033..442681cb7e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -54,6 +54,10 @@ nouveau_fifo; #include "tnl_dd/t_dd_vertex.h" #undef TAG +/* Subpixel offsets for window coordinates (triangles): */ +#define SUBPIXEL_X (0.0F) +#define SUBPIXEL_Y (0.125F) + struct nouveau_context; typedef void (*nouveau_tri_func)( struct nouveau_context*, @@ -121,7 +125,8 @@ typedef struct nouveau_context { uint32_t vblank_flags; - GLfloat viewport[16]; + GLmatrix viewport; + GLfloat depth_scale; }nouveauContextRec, *nouveauContextPtr; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index c88b33b884..5d12d1ca9f 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -40,10 +40,9 @@ static void nouveauCalcViewport(GLcontext *ctx) { /* Calculate the Viewport Matrix */ -/* Taken from the intel driver nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); const GLfloat *v = ctx->Viewport._WindowMap.m; - GLfloat *m = nmesa->ViewportMatrix.m; + GLfloat *m = nmesa->viewport.m; GLint h = 0; if (nmesa->driDrawable) @@ -55,7 +54,7 @@ static void nouveauCalcViewport(GLcontext *ctx) m[MAT_TY] = - v[MAT_TY] + h; m[MAT_SZ] = v[MAT_SZ] * nmesa->depth_scale; m[MAT_TZ] = v[MAT_TZ] * nmesa->depth_scale; -*/ + } static nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) @@ -75,7 +74,13 @@ static nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) * 44c 0x03000000 <-- (Height_from_glViewport << 16) | (win_height - height - y) * */ + + nouveauCalcViewport(ctx); +} +void nouveauDepthRange(GLcontext *ctx) +{ + nouveauCalcViewport(ctx); } /* Initialize the context's hardware state. */ @@ -120,7 +125,7 @@ void nouveauDDInitStateFuncs(GLcontext *ctx) ctx->Driver.StencilMaskSeparate = NULL; //nouveauDDStencilMaskSeparate; ctx->Driver.StencilOpSeparate = NULL; //nouveauDDStencilOpSeparate; - ctx->Driver.DepthRange = NULL; //nouveauDepthRange; + ctx->Driver.DepthRange = nouveauDepthRange; ctx->Driver.Viewport = nouveauViewport; /* Pixel path fallbacks. -- cgit v1.2.3 From 4c850f346bde46fef009e43ec46aaac709e8da5a Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 14 Apr 2006 22:58:30 +0000 Subject: Added render index field to the context --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 442681cb7e..e1b56e36f5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -127,7 +127,8 @@ typedef struct nouveau_context { GLmatrix viewport; GLfloat depth_scale; - + GLfloat depth_scale; + GLuint render_index; }nouveauContextRec, *nouveauContextPtr; #define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) -- cgit v1.2.3 From 911ec211a5bb801ef3d445f75c705259e53c7597 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 14 Apr 2006 22:59:33 +0000 Subject: ooops --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index e1b56e36f5..207e446739 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -127,7 +127,6 @@ typedef struct nouveau_context { GLmatrix viewport; GLfloat depth_scale; - GLfloat depth_scale; GLuint render_index; }nouveauContextRec, *nouveauContextPtr; -- cgit v1.2.3 From 97d11ecd6c5d23f682db5c6ef7dfec89185ae307 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 14 Apr 2006 23:02:39 +0000 Subject: Add more feilds to context. --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 207e446739..e09d804ccf 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -125,9 +125,12 @@ typedef struct nouveau_context { uint32_t vblank_flags; + GLuint new_state; + GLuint new_render_state; + GLuint render_index; GLmatrix viewport; GLfloat depth_scale; - GLuint render_index; + }nouveauContextRec, *nouveauContextPtr; #define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) -- cgit v1.2.3 From b0c4cfed608f21f255b8637ec5ff499fc36ee302 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 14 Apr 2006 23:47:45 +0000 Subject: More work on the tcl code... still have to make my mind on a number of things --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 1 + src/mesa/drivers/dri/nouveau/nouveau_tris.c | 14 +++++++++----- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 6 +++--- src/mesa/drivers/dri/nouveau/nv10_swtcl.h | 1 + 4 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index e09d804ccf..c23b633bb9 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -92,6 +92,7 @@ typedef struct nouveau_context { /* Vertex state */ GLuint vertex_size; + char *verts; struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; GLuint vertex_attr_count; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c index 53a18d2f73..8622b9349c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -87,7 +87,7 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) } _swsetup_Wakeup(ctx); - nmesa->renderIndex = ~0; + nmesa->render_index = ~0; } } else { @@ -95,14 +95,18 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) if (oldfallback == bit) { _swrast_flush( ctx ); - nouveauInitTriFunctions(ctx); + if (nmesa->screen->card_typevertex_attrs, nmesa->vertex_attr_count, - nmesa->ViewportMatrix.m, 0 ); + nmesa->viewport.m, 0 ); } } } @@ -112,8 +116,8 @@ void nouveauRunPipeline( GLcontext *ctx ) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - if (nmesa->newState) { - nmesa->newRenderState |= nmesa->newState; + if (nmesa->new_state) { + nmesa->new_render_state |= nmesa->new_state; } _tnl_run_pipeline( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index e04a4ece5e..9a1748f48a 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -593,8 +593,8 @@ static void nv10ChooseRenderState(GLcontext *ctx) index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ } - if (nmesa->renderIndex != index) { - nmesa->renderIndex = index; + if (nmesa->render_index != index) { + nmesa->render_index = index; tnl->Driver.Render.Points = rast_tab[index].points; tnl->Driver.Render.Line = rast_tab[index].line; @@ -792,7 +792,7 @@ static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim ) /* Initialization. */ /**********************************************************************/ -void nouveauTriInitFunctions(GLcontext *ctx) +void nv10TriInitFunctions(GLcontext *ctx) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h index fd57eeaa95..03338fbe13 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h @@ -34,6 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. extern void nv10Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); extern void nv10FinishPrimitive(struct nouveau_context *nmesa); extern void nv10RenderStart(GLcontext *ctx); +extern void nv10TriInitFunctions(GLcontext *ctx); #define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) #endif /* __NV10_SWTCL_H__ */ -- cgit v1.2.3 From a7d88857680d3d4d2a0788f18c49149dd2118b6f Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sat, 15 Apr 2006 00:21:44 +0000 Subject: State changes. --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 17 +++++ src/mesa/drivers/dri/nouveau/nouveau_screen.h | 2 + src/mesa/drivers/dri/nouveau/nouveau_state.c | 89 +++++++++++++++++++++++++- 3 files changed, 105 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index c23b633bb9..7405bb4145 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -96,6 +96,9 @@ typedef struct nouveau_context { struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; GLuint vertex_attr_count; + /* Color state */ + GLuint clear_color; + /* The drawing fallbacks */ GLuint Fallback; nouveau_tri_func* draw_tri; @@ -134,8 +137,22 @@ typedef struct nouveau_context { }nouveauContextRec, *nouveauContextPtr; + #define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx)) +/* Flags for what context state needs to be updated: */ +#define NOUVEAU_NEW_ALPHA 0x0001 +#define NOUVEAU_NEW_DEPTH 0x0002 +#define NOUVEAU_NEW_FOG 0x0004 +#define NOUVEAU_NEW_CLIP 0x0008 +#define NOUVEAU_NEW_CULL 0x0010 +#define NOUVEAU_NEW_MASKS 0x0020 +#define NOUVEAU_NEW_RENDER_NOT 0x0040 +#define NOUVEAU_NEW_WINDOW 0x0080 +#define NOUVEAU_NEW_CONTEXT 0x0100 +#define NOUVEAU_NEW_ALL 0x01ff + +/* Flags for software fallback cases: */ #define NOUVEAU_FALLBACK_TEXTURE 0x0001 #define NOUVEAU_FALLBACK_DRAW_BUFFER 0x0002 #define NOUVEAU_FALLBACK_READ_BUFFER 0x0004 diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.h b/src/mesa/drivers/dri/nouveau/nouveau_screen.h index 997b05fecd..f6959419c5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.h @@ -35,6 +35,8 @@ typedef struct { u_int32_t bus_type; u_int32_t agp_mode; + GLint fbFormat; + GLuint frontOffset; GLuint frontPitch; GLuint backOffset; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 5d12d1ca9f..b7f53ff957 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -28,6 +28,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_state.h" #include "nouveau_ioctl.h" #include "nouveau_tris.h" +#include "nouveau_fifo.h" #include "swrast/swrast.h" #include "array_cache/acache.h" @@ -36,6 +37,38 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "tnl/t_pipeline.h" +#include "mtypes.h" +#include "colormac.h" + +static __inline__ GLuint nouveauPackColor(GLuint format, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a) +{ + switch (format) { + case 2: + return PACK_COLOR_565( r, g, b ); + case 4: + return PACK_COLOR_8888( r, g, b, a); + default: + fprintf(stderr, "unknown format %d\n", (int)format); + return 0; + } +} + +static void nouveauDDClearColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte c[4]; + + CLAMPED_FLOAT_TO_UBYTE(c[0], color[0]); + CLAMPED_FLOAT_TO_UBYTE(c[1], color[1]); + CLAMPED_FLOAT_TO_UBYTE(c[2], color[2]); + CLAMPED_FLOAT_TO_UBYTE(c[3], color[3]); + + nmesa->clear_color = nouveauPackColor( nmesa->screen->fbFormat, + c[0], c[1], c[2], c[3] ); +} + static void nouveauCalcViewport(GLcontext *ctx) { /* Calculate the Viewport Matrix */ @@ -57,7 +90,7 @@ static void nouveauCalcViewport(GLcontext *ctx) } -static nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +static void nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { /* * Need to send (at least on an nv35 the following: @@ -78,11 +111,61 @@ static nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) nouveauCalcViewport(ctx); } -void nouveauDepthRange(GLcontext *ctx) +static void nouveauDepthRange(GLcontext *ctx) { nouveauCalcViewport(ctx); } +static void nouveauDDUpdateHWState(GLcontext *ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + int new_state = nmesa->new_state; + + if ( new_state || nmesa->new_render_state & _NEW_TEXTURE ) + { + FINISH_RING_PRIM(); + + nmesa->new_state = 0; + + /* Update the various parts of the context's state. + */ + /* + if ( new_state & NOUVEAU_NEW_ALPHA ) + nouveauUpdateAlphaMode( ctx ); + + if ( new_state & NOUVEAU_NEW_DEPTH ) + nouveauUpdateZMode( ctx ); + + if ( new_state & NOUVEAU_NEW_FOG ) + nouveauUpdateFogAttrib( ctx ); + + if ( new_state & NOUVEAU_NEW_CLIP ) + nouveauUpdateClipping( ctx ); + + if ( new_state & NOUVEAU_NEW_CULL ) + nouveauUpdateCull( ctx ); + + if ( new_state & NOUVEAU_NEW_MASKS ) + nouveauUpdateMasks( ctx ); + + if ( new_state & NOUVEAU_NEW_WINDOW ) + nouveauUpdateWindow( ctx ); + + if ( nmesa->new_render_state & _NEW_TEXTURE ) { + nouveauUpdateTextureState( ctx ); + }*/ + } +} + +static void nouveauDDInvalidateState(GLcontext *ctx, GLuint new_state) +{ + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + NOUVEAU_CONTEXT(ctx)->new_render_state |= new_state; +} + /* Initialize the context's hardware state. */ void nouveauDDInitState(nouveauContextPtr nmesa) { @@ -92,7 +175,7 @@ void nouveauDDInitState(nouveauContextPtr nmesa) /* Initialize the driver's state functions */ void nouveauDDInitStateFuncs(GLcontext *ctx) { - ctx->Driver.UpdateState = NULL; //nouveauDDInvalidateState; + ctx->Driver.UpdateState = nouveauDDInvalidateState; ctx->Driver.ClearIndex = NULL; ctx->Driver.ClearColor = NULL; //nouveauDDClearColor; -- cgit v1.2.3 From ddf936193a574ce7efd387b0e3bbec51998736f8 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 17 Apr 2006 00:08:03 +0000 Subject: Changed invalid context fields to valid ones. --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 9a1748f48a..d825de6559 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -739,8 +739,8 @@ static void nv10RenderStart(GLcontext *ctx) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - if (nmesa->newState) { - nmesa->newRenderState |= nmesa->newState; + if (nmesa->new_state) { + nmesa->new_render_state |= nmesa->new_state; } if (nmesa->Fallback) { @@ -748,10 +748,10 @@ static void nv10RenderStart(GLcontext *ctx) return; } - if (nmesa->newRenderState) { + if (nmesa->new_render_state) { nv10ChooseVertexState(ctx); nv10ChooseRenderState(ctx); - nmesa->newRenderState = 0; + nmesa->new_render_state = 0; } } @@ -771,7 +771,7 @@ void nv10RasterPrimitive(GLcontext *ctx, { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - assert (!nmesa->newState); + assert (!nmesa->new_state); if (hwprim != nmesa->current_primitive) { -- cgit v1.2.3 From 13a2d6698fce050732b421107a2a92b37a5e01f8 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 17 Apr 2006 15:20:29 +0000 Subject: More context. --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 7405bb4145..e1c5d4d54e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -96,8 +96,10 @@ typedef struct nouveau_context { struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; GLuint vertex_attr_count; - /* Color state */ + /* Clear state */ GLuint clear_color; + GLuint clear_depth; + GLuint clear_stencil; /* The drawing fallbacks */ GLuint Fallback; -- cgit v1.2.3 From 5411b96c5fc9b50ca4cd1ae61eb9d8b00fe5ff9a Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 3 Jun 2006 16:36:23 +0000 Subject: Add start of vertex shader backend, will most likely not work correctly yet --- src/mesa/drivers/dri/nouveau/nouveau_shader.c | 91 ++++ src/mesa/drivers/dri/nouveau/nouveau_shader.h | 74 +++ src/mesa/drivers/dri/nouveau/nv40_reg.h | 472 +++++++++++++++++ src/mesa/drivers/dri/nouveau/nv40_vtxprog.c | 736 ++++++++++++++++++++++++++ 4 files changed, 1373 insertions(+) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader.h create mode 100644 src/mesa/drivers/dri/nouveau/nv40_reg.h create mode 100644 src/mesa/drivers/dri/nouveau/nv40_vtxprog.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c new file mode 100644 index 0000000000..ef8f02e910 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -0,0 +1,91 @@ +#include "glheader.h" +#include "macros.h" +#include "enums.h" + +#include "program.h" +#include "nouveau_context.h" +#include "nouveau_shader.h" + +static struct program * +nv40NewProgram(GLcontext *ctx, GLenum target, GLuint id) +{ +} + +static void +nv40BindProgram(GLcontext *ctx, GLenum target, struct program *prog) +{ +} + +static void +nv40DeleteProgram(GLcontext *ctx, struct program *prog) +{ +} + +static void +nv40ProgramStringNotify(GLcontext *ctx, GLenum target, + struct program *prog) +{ +} + +static GLboolean +nv40IsProgramNative(GLcontext *ctx, GLenum target, struct program *prog) +{ +} + +void +nouveauInitShaderFuncs(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->screen->card_type == NV_40) { + ctx->Driver.NewProgram = nv40NewProgram; + ctx->Driver.BindProgram = nv40BindProgram; + ctx->Driver.DeleteProgram = nv40DeleteProgram; + ctx->Driver.ProgramStringNotify = nv40ProgramStringNotify; + ctx->Driver.IsProgramNative = nv40IsProgramNative; + } +} + +#define LONGBITS (sizeof(long) * 8) +void +nvsBitSet(long *rec, int bit) +{ + int ri = bit / LONGBITS; + int rb = bit % LONGBITS; + + rec[ri] |= (1 << rb); +} + +void +nvsBitClear(long *rec, int bit) +{ + int ri = bit / LONGBITS; + int rb = bit % LONGBITS; + + rec[ri] &= ~(1 << rb); +} + +void +nvsRecInit(long **rec, int max) +{ + int c = (max / LONGBITS) + ((max % LONGBITS) ? 1 : 0); + *rec = calloc(c, sizeof(long)); +} + +int +nvsAllocIndex(long *rec, int max) +{ + int c = (max / LONGBITS) + ((max % LONGBITS) ? 1 : 0); + int i, idx = 0; + + for (i=0;i (guess..) */ +#define NV40_VP_PROGRAM_START_ID 0x1EA0 /* Start executing program from instruction */ + +/* Vertex programs instruction set + * + * 128bit opcodes, split into 4 32-bit ones for ease of use. + * + * Non-native instructions + * ABS - MOV + NV40_VP_INST0_DEST_ABS + * POW - EX2 + MUL + LG2 + * SUB - ADD, second source negated + * SWZ - MOV + * XPD - + * + * Register access + * - Only one INPUT can be accessed per-instruction (move extras into TEMPs) + * - Only one CONST can be accessed per-instruction (move extras into TEMPs) + * + * Relative Addressing + * According to the value returned for MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB + * there are only two address registers available. The destination in the ARL + * instruction is set to TEMP (The temp isn't actually written). + * + * When using vanilla ARB_v_p, the proprietary driver will squish both the available + * ADDRESS regs into the first hardware reg in the X and Y components. + * + * To use an address reg as an index into consts, the CONST_SRC is set to + * (const_base + offset) and INDEX_CONST is set. + * + * It is similar for inputs, INPUT_SRC is set to the offset value and INDEX_INPUT + * is set. + * + * To access the second address reg use ADDR_REG_SELECT_1. A particular component + * of the address regs is selected with ADDR_SWZ. + * + * Only one address register can be accessed per instruction, but you may use + * the address reg as an index into both consts and inputs in the same instruction + * as long as the swizzles also match. + * + * Conditional execution (see NV_vertex_program{2,3} for details) + * All instructions appear to be able to modify one of two condition code registers. + * This is enabled by setting COND_UPDATE_ENABLE. The second condition registers is + * updated by setting COND_REG_SELECT_1. + * + * Conditional execution of an instruction is enabled by setting COND_TEST_ENABLE, and + * selecting the condition which will allow the test to pass with COND_{FL,LT,...}. + * It is possible to swizzle the values in the condition register, which allows for + * testing against an individual component. + * + * Branching + * The BRA/CAL instructions seem to follow a slightly different opcode layout. The + * destination instruction ID (IADDR) overlaps SRC2. Instruction ID's seem to be + * numbered based on the UPLOAD_FROM_ID FIFO command, and is incremented automatically + * on each UPLOAD_INST FIFO command. + * + * Conditional branching is achieved by using the condition tests described above. + * There doesn't appear to be dedicated looping instructions, but this can be done + * using a temp reg + conditional branching. + * + * Subroutines may be uploaded before the main program itself, but the first executed + * instruction is determined by the PROGRAM_START_ID FIFO command. + * + * Texture lookup + * TODO + */ + +/* ---- OPCODE BITS 127:96 / data DWORD 0 --- */ +#define NV40_VP_INST0_UNK0 (1 << 30) /* set when writing result regs */ +#define NV40_VP_INST_COND_UPDATE_ENABLE ((1 << 14)|1<<29) /* unsure about this */ +#define NV40_VP_INST_INDEX_INPUT (1 << 27) /* Use an address reg as in index into attribs */ +#define NV40_VP_INST_COND_REG_SELECT_1 (1 << 25) +#define NV40_VP_INST_ADDR_REG_SELECT_1 (1 << 24) +#define NV40_VP_INST_DEST_TEMP_ABS (1 << 21) +#define NV40_VP_INST_DEST_TEMP_SHIFT 15 +#define NV40_VP_INST_DEST_TEMP_MASK (0x3F << 15) +#define NV40_VP_INST_COND_TEST_ENABLE (1 << 13) /* write masking based on condition test */ +#define NV40_VP_INST_COND_SHIFT 10 +#define NV40_VP_INST_COND_MASK (0x7 << 10) +# define NV40_VP_INST_COND_FL 0 +# define NV40_VP_INST_COND_LT 1 +# define NV40_VP_INST_COND_EQ 2 +# define NV40_VP_INST_COND_LE 3 +# define NV40_VP_INST_COND_GT 4 +# define NV40_VP_INST_COND_NE 5 +# define NV40_VP_INST_COND_GE 6 +# define NV40_VP_INST_COND_TR 7 +#define NV40_VP_INST_COND_SWZ_X_SHIFT 8 +#define NV40_VP_INST_COND_SWZ_X_MASK (3 << 8) +#define NV40_VP_INST_COND_SWZ_Y_SHIFT 6 +#define NV40_VP_INST_COND_SWZ_Y_MASK (3 << 6) +#define NV40_VP_INST_COND_SWZ_Z_SHIFT 4 +#define NV40_VP_INST_COND_SWZ_Z_MASK (3 << 4) +#define NV40_VP_INST_COND_SWZ_W_SHIFT 2 +#define NV40_VP_INST_COND_SWZ_W_MASK (3 << 2) +#define NV40_VP_INST_COND_SWZ_ALL_SHIFT 2 +#define NV40_VP_INST_COND_SWZ_ALL_MASK (0xFF << 2) +#define NV40_VP_INST_ADDR_SWZ_SHIFT 0 +#define NV40_VP_INST_ADDR_SWZ_MASK (0x03 << 0) + +/* ---- OPCODE BITS 95:64 / data DWORD 1 --- */ +#define NV40_VP_INST_OPCODE_SHIFT 22 +#define NV40_VP_INST_OPCODE_MASK (0x3FF << 22) +/*TODO: confirm which source slots correspond to the GL sources, + * renouveau should be correct in most places though.. Also, + * document them here. + */ +# define NV40_VP_INST_OP_NOP 0x000 +# define NV40_VP_INST_OP_MOV 0x001 +# define NV40_VP_INST_OP_MUL 0x002 +# define NV40_VP_INST_OP_ADD 0x003 +# define NV40_VP_INST_OP_MAD 0x004 +# define NV40_VP_INST_OP_DP3 0x005 +# define NV40_VP_INST_OP_DP4 0x007 +# define NV40_VP_INST_OP_DPH 0x006 +# define NV40_VP_INST_OP_DST 0x008 +# define NV40_VP_INST_OP_MIN 0x009 +# define NV40_VP_INST_OP_MAX 0x00A +# define NV40_VP_INST_OP_SLT 0x00B +# define NV40_VP_INST_OP_SGE 0x00C +# define NV40_VP_INST_OP_ARL 0x00D +# define NV40_VP_INST_OP_FRC 0x00E +# define NV40_VP_INST_OP_FLR 0x00F +# define NV40_VP_INST_OP_SEQ 0x010 +# define NV40_VP_INST_OP_SFL 0x011 +# define NV40_VP_INST_OP_SGT 0x012 +# define NV40_VP_INST_OP_SLE 0x013 +# define NV40_VP_INST_OP_SNE 0x014 +# define NV40_VP_INST_OP_STR 0x015 +# define NV40_VP_INST_OP_SSG 0x016 +# define NV40_VP_INST_OP_ARR 0x017 +# define NV40_VP_INST_OP_ARA 0x018 +# define NV40_VP_INST_OP_RCP 0x040 +# define NV40_VP_INST_OP_RCC 0x060 +# define NV40_VP_INST_OP_RSQ 0x080 +# define NV40_VP_INST_OP_EXP 0x0A0 +# define NV40_VP_INST_OP_LOG 0x0C0 +# define NV40_VP_INST_OP_LIT 0x0E0 +# define NV40_VP_INST_OP_BRA 0x120 +# define NV40_VP_INST_OP_CAL 0x160 +# define NV40_VP_INST_OP_RET 0x180 +# define NV40_VP_INST_OP_LG2 0x1A0 +# define NV40_VP_INST_OP_EX2 0x1C0 +# define NV40_VP_INST_OP_COS 0x200 +# define NV40_VP_INST_OP_PUSHA 0x260 +# define NV40_VP_INST_OP_POPA 0x280 +#define NV40_VP_INST_CONST_SRC_SHIFT 12 +#define NV40_VP_INST_CONST_SRC_MASK (0xFF << 12) +#define NV40_VP_INST_INPUT_SRC_SHIFT 8 +#define NV40_VP_INST_INPUT_SRC_MASK (0x0F << 8) +# define NV40_VP_INST_IN_POS 0 /* These seem to match the bindings specified in */ +# define NV40_VP_INST_IN_WEIGHT 1 /* the ARB_v_p spec (2.14.3.1) */ +# define NV40_VP_INST_IN_NORMAL 2 +# define NV40_VP_INST_IN_COL0 3 /* Should probably confirm them all thougth */ +# define NV40_VP_INST_IN_COL1 4 +# define NV40_VP_INST_IN_FOGC 5 +# define NV40_VP_INST_IN_TC0 8 +# define NV40_VP_INST_IN_TC(n) (8+n) +#define NV40_VP_INST_SRC0H_SHIFT 0 +#define NV40_VP_INST_SRC0H_MASK (0xFF << 0) + +/* ---- OPCODE BITS 63:32 / data DWORD 2 --- */ +#define NV40_VP_INST_SRC0L_SHIFT 23 +#define NV40_VP_INST_SRC0L_MASK (0x1FF << 23) +#define NV40_VP_INST_SRC1_SHIFT 6 +#define NV40_VP_INST_SRC1_MASK (0x1FFFF << 6) +#define NV40_VP_INST_SRC2H_SHIFT 0 +#define NV40_VP_INST_SRC2H_MASK (0x3F << 0) +#define NV40_VP_INST_IADDRH_SHIFT 0 +#define NV40_VP_INST_IADDRH_MASK (0x1F << 0) /* guess, need to test this */ +# +/* ---- OPCODE BITS 31:0 / data DWORD 3 --- */ +#define NV40_VP_INST_IADDRL_SHIFT 29 +#define NV40_VP_INST_IADDRL_MASK (7 << 29) +#define NV40_VP_INST_SRC2L_SHIFT 21 +#define NV40_VP_INST_SRC2L_MASK (0x7FF << 21) +/* bits 7-12 seem to always be set to 1 */ +#define NV40_VP_INST_WRITEMASK_SHIFT 13 +#define NV40_VP_INST_WRITEMASK_MASK (0xF << 13) +# define NV40_VP_INST_WRITEMASK_X (1 << 16) +# define NV40_VP_INST_WRITEMASK_Y (1 << 15) +# define NV40_VP_INST_WRITEMASK_Z (1 << 14) +# define NV40_VP_INST_WRITEMASK_W (1 << 13) +#define NV40_VP_INST_DEST_SHIFT 2 +#define NV40_VP_INST_DEST_MASK (31 << 2) +# define NV40_VP_INST_DEST_POS 0 +# define NV40_VP_INST_DEST_COL0 1 +# define NV40_VP_INST_DEST_COL1 2 +# define NV40_VP_INST_DEST_BFC0 3 +# define NV40_VP_INST_DEST_BFC1 4 +# define NV40_VP_INST_DEST_FOGC 5 +# define NV40_VP_INST_DEST_PSZ 6 +# define NV40_VP_INST_DEST_TC0 7 +# define NV40_VP_INST_DEST_TC(n) (7+n) +# define NV40_VP_INST_DEST_TEMP 0x1F /* see NV40_VP_INST0_* for actual register */ +#define NV40_VP_INST_INDEX_CONST (1 << 1) +#define NV40_VP_INST_UNK_00 (1 << 0) /* appears to be set on the last inst only */ + +/* Useful to split the source selection regs into their pieces */ +#define NV40_VP_SRC0_HIGH_SHIFT 9 +#define NV40_VP_SRC0_HIGH_MASK 0x0001FE00 +#define NV40_VP_SRC0_LOW_MASK 0x000001FF +#define NV40_VP_SRC2_HIGH_SHIFT 11 +#define NV40_VP_SRC2_HIGH_MASK 0x0001F800 +#define NV40_VP_SRC2_LOW_MASK 0x000007FF + +/* Source selection - these are the bits you fill NV40_VP_INST_SRCn with */ +#define NV40_VP_SRC_NEGATE 16 +#define NV40_VP_SRC_SWZ_X_SHIFT 14 +#define NV40_VP_SRC_SWZ_X_MASK (3 << 14) +#define NV40_VP_SRC_SWZ_Y_SHIFT 12 +#define NV40_VP_SRC_SWZ_Y_MASK (3 << 12) +#define NV40_VP_SRC_SWZ_Z_SHIFT 10 +#define NV40_VP_SRC_SWZ_Z_MASK (3 << 10) +#define NV40_VP_SRC_SWZ_W_SHIFT 8 +#define NV40_VP_SRC_SWZ_W_MASK (3 << 8) +#define NV40_VP_SRC_SWZ_ALL_SHIFT 8 +#define NV40_VP_SRC_SWZ_ALL_MASK (0xFF << 8) +#define NV40_VP_SRC_TEMP_SRC_SHIFT 2 +#define NV40_VP_SRC_TEMP_SRC_MASK (0x3F << 2) +#define NV40_VP_SRC_REG_TYPE_SHIFT 0 +#define NV40_VP_SRC_REG_TYPE_MASK (3 << 0) +# define NV40_VP_SRC_REG_TYPE_UNK0 0 +# define NV40_VP_SRC_REG_TYPE_TEMP 1 +# define NV40_VP_SRC_REG_TYPE_INPUT 2 +# define NV40_VP_SRC_REG_TYPE_CONST 3 + +/* +-- GF6800GT - PCIID 10de:0045 (rev a1) -- + +== Fragment program instruction set + Not FIFO commands, uploaded into a memory buffer. The fragment program has + always appeared in the same map as the texture image data has. Usually it's + the first thing in the map, followed immediately by the textures. +*/ + + +/* + * Each fragment program opcode appears to be comprised of 4 32-bit values. + * + * 0 - Opcode, output reg/mask, ATTRIB source + * 1 - Source 0 + * 2 - Source 1 + * 3 - Source 2 + * + * Constants are inserted directly after the instruction that uses them. + * + * It appears that it's not possible to use two input registers in one + * instruction as the input sourcing is done in the instruction dword + * and not the source selection dwords. As such instructions such as: + * + * ADD result.color, fragment.color, fragment.texcoord[0]; + * + * must be split into two MOV's and then an ADD (nvidia does this) but + * I'm not sure why it's not just one MOV and then source the second input + * in the ADD instruction.. + * + * Negation of the full source is done with NV40_FP_REG_NEGATE, arbitrary + * negation requires multiplication with a const. + * + * Arbitrary swizzling is supported with the exception of SWIZZLE_ZERO/SWIZZLE_ONE + * The temp/result regs appear to be initialised to (0.0, 0.0, 0.0, 0.0) as SWIZZLE_ZERO + * is implemented simply by not writing to the relevant components of the destination. + * + * Non-native instructions: + * LIT + * LRP - MAD+MAD + * SUB - ADD, negate second source + * RSQ - LG2 + EX2 + * POW - LG2 + MUL + EX2 + * SCS - COS + SIN + * XPD + * DP2 - MUL + ADD + */ + +//== Opcode / Destination selection == +#define NV40_FP_OP_PROGRAM_END 0x00000001 +#define NV40_FP_OP_OUT_RESULT (1 << 0) /* uncertain? and what about depth? */ +#define NV40_FP_OP_OUT_REG_SHIFT 1 +#define NV40_FP_OP_OUT_REG_MASK (31 << 1) /* uncertain */ +#define NV40_FP_OP_OUTMASK_SHIFT 9 +#define NV40_FP_OP_OUTMASK_MASK (0xF << 9) +# define NV40_FP_OP_OUT_X (1 << 9) +# define NV40_FP_OP_OUT_Y (1 << 10) +# define NV40_FP_OP_OUT_Z (1 << 11) +# define NV40_FP_OP_OUT_W (1 << 12) +/* Uncertain about these, especially the input_src values.. it's possible that + * they can be dynamically changed. + */ +#define NV40_FP_OP_INPUT_SRC_SHIFT 13 +#define NV40_FP_OP_INPUT_SRC_MASK (15 << 13) +# define NV40_FP_OP_INPUT_SRC_POSITION 0x0 +# define NV40_FP_OP_INPUT_SRC_COL0 0x1 +# define NV40_FP_OP_INPUT_SRC_COL1 0x2 +# define NV40_FP_OP_INPUT_SRC_TC0 0x4 +# define NV40_FP_OP_INPUT_SRC_TC(n) (0x4 + n) +#define NV40_FP_OP_TEX_UNIT_SHIFT 17 +#define NV40_FP_OP_TEX_UNIT_MASK (0xF << 17) /* guess */ +#define NV40_FP_OP_PRECISION_SHIFT 22 +#define NV40_FP_OP_PRECISION_MASK (3 << 22) +# define NV40_FP_PRECISION_FP32 0 +# define NV40_FP_PRECISION_FP16 1 +# define NV40_FP_PRECISION_FX12 2 +#define NV40_FP_OP_OPCODE_SHIFT 24 +#define NV40_FP_OP_OPCODE_MASK (0x7F << 24) +# define NV40_FP_OP_OPCODE_MOV 0x01 +# define NV40_FP_OP_OPCODE_MUL 0x02 +# define NV40_FP_OP_OPCODE_ADD 0x03 +# define NV40_FP_OP_OPCODE_MAD 0x04 +# define NV40_FP_OP_OPCODE_DP3 0x05 +# define NV40_FP_OP_OPCODE_DP4 0x06 +# define NV40_FP_OP_OPCODE_DST 0x07 +# define NV40_FP_OP_OPCODE_MIN 0x08 +# define NV40_FP_OP_OPCODE_MAX 0x09 +# define NV40_FP_OP_OPCODE_SLT 0x0A +# define NV40_FP_OP_OPCODE_SGE 0x0B +# define NV40_FP_OP_OPCODE_SLE 0x0C +# define NV40_FP_OP_OPCODE_SGT 0x0D +# define NV40_FP_OP_OPCODE_SNE 0x0E +# define NV40_FP_OP_OPCODE_SEQ 0x0F +# define NV40_FP_OP_OPCODE_FRC 0x10 +# define NV40_FP_OP_OPCODE_FLR 0x11 +# define NV40_FP_OP_OPCODE_TEX 0x17 +# define NV40_FP_OP_OPCODE_TXP 0x18 +# define NV40_FP_OP_OPCODE_RCP 0x1A +# define NV40_FP_OP_OPCODE_EX2 0x1C +# define NV40_FP_OP_OPCODE_LG2 0x1D +# define NV40_FP_OP_OPCODE_COS 0x22 +# define NV40_FP_OP_OPCODE_SIN 0x23 +# define NV40_FP_OP_OPCODE_DP2A 0x2E +# define NV40_FP_OP_OPCODE_TXB 0x31 +# define NV40_FP_OP_OPCODE_DIV 0x3A +#define NV40_FP_OP_OUT_SAT (1 << 31) + +/* high order bits of SRC0 */ +#define NV40_FP_OP_OUT_ABS (1 << 29) +#define NV40_FP_OP_COND_SWZ_W_SHIFT 27 +#define NV40_FP_OP_COND_SWZ_W_MASK (3 << 27) +#define NV40_FP_OP_COND_SWZ_Z_SHIFT 25 +#define NV40_FP_OP_COND_SWZ_Z_MASK (3 << 25) +#define NV40_FP_OP_COND_SWZ_Y_SHIFT 23 +#define NV40_FP_OP_COND_SWZ_Y_MASK (3 << 23) +#define NV40_FP_OP_COND_SWZ_X_SHIFT 21 +#define NV40_FP_OP_COND_SWZ_X_MASK (3 << 21) +#define NV40_FP_OP_COND_SWZ_ALL_SHIFT 21 +#define NV40_FP_OP_COND_SWZ_ALL_MASK (0xFF << 21) +#define NV40_FP_OP_COND_SHIFT 18 +#define NV40_FP_OP_COND_MASK (0x07 << 18) +# define NV40_FP_OP_COND_FL 0 +# define NV40_FP_OP_COND_LT 1 +# define NV40_FP_OP_COND_EQ 2 +# define NV40_FP_OP_COND_LE 3 +# define NV40_FP_OP_COND_GT 4 +# define NV40_FP_OP_COND_NE 5 +# define NV40_FP_OP_COND_GE 6 +# define NV40_FP_OP_COND_TR 7 + +/* high order bits of SRC1 */ +#define NV40_FP_OP_SRC_SCALE_SHIFT 28 +#define NV40_FP_OP_SRC_SCALE_MASK (3 << 28) + +//== Register selection == +#define NV40_FP_REG_SRC_INPUT (1 << 0) /* uncertain */ +#define NV40_FP_REG_SRC_CONST (1 << 1) +#define NV40_FP_REG_SRC_SHIFT 2 /* uncertain */ +#define NV40_FP_REG_SRC_MASK (31 << 2) +#define NV40_FP_REG_UNK_0 (1 << 8) +#define NV40_FP_REG_SWZ_ALL_SHIFT 9 +#define NV40_FP_REG_SWZ_ALL_MASK (255 << 9) +#define NV40_FP_REG_SWZ_X_SHIFT 9 +#define NV40_FP_REG_SWZ_X_MASK (3 << 9) +#define NV40_FP_REG_SWZ_Y_SHIFT 11 +#define NV40_FP_REG_SWZ_Y_MASK (3 << 11) +#define NV40_FP_REG_SWZ_Z_SHIFT 13 +#define NV40_FP_REG_SWZ_Z_MASK (3 << 13) +#define NV40_FP_REG_SWZ_W_SHIFT 15 +#define NV40_FP_REG_SWZ_W_MASK (3 << 15) +# define NV40_FP_SWIZZLE_X 0 +# define NV40_FP_SWIZZLE_Y 1 +# define NV40_FP_SWIZZLE_Z 2 +# define NV40_FP_SWIZZLE_W 3 +#define NV40_FP_REG_NEGATE (1 << 17) + +#endif diff --git a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c new file mode 100644 index 0000000000..582bf65ea0 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c @@ -0,0 +1,736 @@ +#include "glheader.h" +#include "macros.h" +#include "enums.h" +#include "program.h" +#include "program_instruction.h" + +#include "nouveau_reg.h" +#include "nouveau_shader.h" +#include "nouveau_msg.h" + +#include "nv40_reg.h" + +/* TODO: + * - Implement support for constants + * - Handle SWZ with 0/1 components and partial negate masks + * - Handle ARB_position_invarient + * - Relative register addressing + * - Implement any missing instructions + */ + +static int t_dst_mask(int mask); + +static int +alloc_hw_temp(nouveau_vertex_program *vp) +{ + return nvsAllocIndex(vp->hwtemps_in_use, 64); +} + +static void +free_hw_temp(nouveau_vertex_program *vp, int id) +{ + nvsBitClear(vp->hwtemps_in_use, id); +} + +static int +alloc_temp(nouveau_vertex_program *vp) +{ + int idx; + + idx = nvsAllocIndex(vp->temps_in_use, 64); + if (!idx) + return -1; + + vp->temps[idx].file = HW_TEMP; + vp->temps[idx].hw_id = -1; + vp->temps[idx].ref = -1; + + return idx; +} + +static void +free_temp(nouveau_vertex_program *vp, nouveau_srcreg *temp) +{ + if (!temp) return; + + if (vp->temps[temp->idx].hw_id != -1) + free_hw_temp(vp, vp->temps[temp->idx].hw_id); + nvsBitClear(vp->temps_in_use, temp->idx); +} + +static void +make_srcreg(nouveau_vertex_program *vp, + nouveau_srcreg *src, + nouveau_regtype type, + int id) +{ + switch (type) { + case HW_INPUT: + src->hw = &vp->inputs[id]; + src->idx = id; + break; + case HW_TEMP: + src->hw = &vp->temps[id]; + src->idx = id; + break; + case HW_CONST: + //FIXME: TODO + break; + default: + assert(0); + break; + } + + src->negate = 0; + src->swizzle = 0x1B /* 00011011 - XYZW */; +} + +static void +make_dstreg(nouveau_vertex_program *vp, + nouveau_dstreg *dest, + nouveau_regtype type, + int id) +{ + if (type == HW_TEMP && id == -1) + dest->idx = alloc_temp(vp); + else + dest->idx = id; + switch (type) { + case HW_TEMP: + dest->idx = id; + if (dest->idx == -1) + dest->idx = alloc_temp(vp); + dest->hw = &vp->temps[dest->idx]; + break; + case HW_OUTPUT: + dest->hw = NULL; + dest->idx = id; + break; + default: + assert(0); + break; + } + + dest->mask = t_dst_mask(WRITEMASK_XYZW); + dest->condup = 0; + dest->condreg = 0; + dest->condtest = NV40_VP_INST_COND_TR; + dest->condswz = 0x1B /* 00011011 - XYZW */; +} + +static unsigned int +src_to_hw(nouveau_vertex_program *vp, nouveau_srcreg *src, + unsigned int *is, unsigned int *cs) +{ + unsigned int hs = 0; + + if (!src) { + /* unused sources seem to be INPUT swz XYZW, dont't know if this + * actually matters or not... + */ + hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); + hs |= (0x1B << NV40_VP_SRC_SWZ_ALL_SHIFT); + return hs; + } + + switch (src->hw->file) { + case HW_INPUT: + if (*is != -1) { + fprintf(stderr, "multiple inputs detected... not good\n"); + return; + } + *is = src->hw->hw_id; + hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); + break; + case HW_CONST: + if (*cs != -1) { + fprintf(stderr, "multiple consts detected... not good\n"); + return; + } + *cs = src->hw->hw_id; + hs |= (NV40_VP_SRC_REG_TYPE_CONST << NV40_VP_SRC_REG_TYPE_SHIFT); + break; + case HW_TEMP: + if (src->hw->hw_id == -1) { + fprintf(stderr, "read from unwritten temp!\n"); + return; + } + hs |= (NV40_VP_SRC_REG_TYPE_TEMP << NV40_VP_SRC_REG_TYPE_SHIFT) | + (src->hw->hw_id << NV40_VP_SRC_TEMP_SRC_SHIFT); + + if (--src->hw->ref == 0) + free_hw_temp(vp, src->hw->hw_id); + } + + hs |= (src->swizzle << NV40_VP_SRC_SWZ_ALL_SHIFT); + if (src->negate) + hs |= NV40_VP_SRC_NEGATE; + + return hs; +} + +static void +instruction_store(nouveau_vertex_program *vp, unsigned int inst[]) +{ + if ((vp->inst_count+1) > vp->insns_alloced) { + vp->insns = realloc(vp->insns, sizeof(unsigned int) * (vp->inst_count+1) * 4); + vp->insns_alloced = vp->inst_count+1; + } + vp->insns[(vp->inst_count*4) + 0] = inst[0]; + vp->insns[(vp->inst_count*4) + 1] = inst[1]; + vp->insns[(vp->inst_count*4) + 2] = inst[2]; + vp->insns[(vp->inst_count*4) + 3] = inst[3]; + vp->inst_count++; +} + +static void +emit_arith(nouveau_vertex_program *vp, int op, + nouveau_dstreg *dest, + nouveau_srcreg *src0, + nouveau_srcreg *src1, + nouveau_srcreg *src2, + int flags) +{ + nouveau_regrec *hwdest = dest->hw; + unsigned int hs0, hs1, hs2; + unsigned int hop[4] = { 0, 0, 0, 0 }; + int insrc = -1, constsrc = -1; + + /* Calculate source reg state */ + hs0 = src_to_hw(vp, src0, &insrc, &constsrc); + hs1 = src_to_hw(vp, src1, &insrc, &constsrc); + hs2 = src_to_hw(vp, src2, &insrc, &constsrc); + + /* Append it to the instruction */ + hop[1] |= (((hs0 & NV40_VP_SRC0_HIGH_MASK) >> NV40_VP_SRC0_HIGH_SHIFT) + << NV40_VP_INST_SRC0H_SHIFT); + hop[2] |= ((hs0 & NV40_VP_SRC0_LOW_MASK) << NV40_VP_INST_SRC0L_SHIFT) | + (hs1 << NV40_VP_INST_SRC1_SHIFT) | + (((hs2 & NV40_VP_SRC2_HIGH_MASK) >> NV40_VP_SRC2_HIGH_SHIFT) + << NV40_VP_INST_SRC2H_SHIFT); + hop[3] |= (hs2 & NV40_VP_SRC2_LOW_MASK) << NV40_VP_INST_SRC2L_SHIFT; + + /* bits 127:96 */ + hop[0] |= (dest->condtest << NV40_VP_INST_COND_SHIFT) | + (dest->condswz << NV40_VP_INST_COND_SWZ_ALL_SHIFT); + if (dest->condtest != NV40_VP_INST_COND_TR) + hop[0] |= NV40_VP_INST_COND_TEST_ENABLE; + if (dest->condreg) hop[0] |= NV40_VP_INST_COND_REG_SELECT_1; + if (dest->condup ) hop[0] |= NV40_VP_INST_COND_UPDATE_ENABLE; + + if (hwdest->file == HW_OUTPUT) + hop[0] |= NV40_VP_INST0_UNK0; + else { + if (hwdest->hw_id == -1) + hwdest->hw_id = alloc_hw_temp(vp); + + hop[0] = (hwdest->hw_id << NV40_VP_INST_DEST_TEMP_SHIFT); + if (flags & NOUVEAU_OUT_ABS) + hop[0] |= NV40_VP_INST_DEST_TEMP_ABS; + + nvsBitSet(vp->hwtemps_written, hwdest->hw_id); + if (--hwdest->ref == 0) + free_hw_temp(vp, hwdest->hw_id); + } + + /* bits 95:64 */ + if (constsrc == -1) constsrc = 0; + if (insrc == -1) insrc = 0; + + constsrc &= 0xFF; + insrc &= 0x0F; + hop[1] |= (op << NV40_VP_INST_OPCODE_SHIFT) | + (constsrc << NV40_VP_INST_CONST_SRC_SHIFT) | + (insrc << NV40_VP_INST_INPUT_SRC_SHIFT); + + /* bits 31:0 */ + if (hwdest->file == HW_OUTPUT) { + hop[3] |= (dest->mask | (hwdest->hw_id << NV40_VP_INST_DEST_SHIFT)); + } else { + hop[3] |= (dest->mask | (NV40_VP_INST_DEST_TEMP << NV40_VP_INST_DEST_SHIFT)); + } + hop[3] |= (0x3F << 7); /*FIXME: what is this?*/ + + printf("0x%08x\n", hop[0]); + printf("0x%08x\n", hop[1]); + printf("0x%08x\n", hop[2]); + printf("0x%08x\n", hop[3]); + + instruction_store(vp, hop); +} + +static int +t_swizzle(GLuint swz) +{ + int x, y, z, w; + x = GET_SWZ(swz, 0); + y = GET_SWZ(swz, 1); + z = GET_SWZ(swz, 2); + w = GET_SWZ(swz, 3); + + if ((xFile) { + case PROGRAM_TEMPORARY: + ns->hw = &vp->temps[src->Index]; + break; + case PROGRAM_INPUT: + ns->hw = &vp->inputs[src->Index]; + break; + default: + fprintf(stderr, "Unhandled source register file!\n"); + break; + } + + ns->swizzle = t_swizzle(src->Swizzle); + if ((src->NegateBase != 0xF && src->NegateBase != 0x0) || + ns->swizzle == -1) { + WARN_ONCE("Unhandled source swizzle/negate, results will be incorrect\n"); + ns->swizzle = 0x1B; // 00 01 10 11 - XYZW + ns->negate = (src->NegateBase) ? 1 : 0; + } else + ns->negate = (src->NegateBase) ? 1 : 0; + +} + +static int +t_dst_mask(int mask) +{ + int hwmask = 0; + + if (mask & WRITEMASK_X) hwmask |= NV40_VP_INST_WRITEMASK_X; + if (mask & WRITEMASK_Y) hwmask |= NV40_VP_INST_WRITEMASK_Y; + if (mask & WRITEMASK_Z) hwmask |= NV40_VP_INST_WRITEMASK_Z; + if (mask & WRITEMASK_W) hwmask |= NV40_VP_INST_WRITEMASK_W; + + return hwmask; +} + +static int +t_dst_index(int idx) +{ + int hwidx; + + switch (idx) { + case VERT_RESULT_HPOS: + return NV40_VP_INST_DEST_POS; + case VERT_RESULT_COL0: + return NV40_VP_INST_DEST_COL0; + case VERT_RESULT_COL1: + return NV40_VP_INST_DEST_COL1; + case VERT_RESULT_FOGC: + return NV40_VP_INST_DEST_FOGC; + case VERT_RESULT_TEX0: + case VERT_RESULT_TEX1: + case VERT_RESULT_TEX2: + case VERT_RESULT_TEX3: + case VERT_RESULT_TEX4: + case VERT_RESULT_TEX5: + case VERT_RESULT_TEX6: + case VERT_RESULT_TEX7: + return NV40_VP_INST_DEST_TC(idx - VERT_RESULT_TEX0); + case VERT_RESULT_PSIZ: + return NV40_VP_INST_DEST_PSZ; + case VERT_RESULT_BFC0: + return NV40_VP_INST_DEST_BFC0; + case VERT_RESULT_BFC1: + return NV40_VP_INST_DEST_BFC1; + default: + fprintf(stderr, "Unknown result reg index!\n"); + return -1; + } +} + +static int +t_cond_test(GLuint test) +{ + switch(test) { + case COND_GT: return NV40_VP_INST_COND_GT; + case COND_EQ: return NV40_VP_INST_COND_EQ; + case COND_LT: return NV40_VP_INST_COND_LT; + case COND_GE: return NV40_VP_INST_COND_GE; + case COND_LE: return NV40_VP_INST_COND_LE; + case COND_NE: return NV40_VP_INST_COND_NE; + case COND_TR: return NV40_VP_INST_COND_TR; + case COND_FL: return NV40_VP_INST_COND_FL; + default: + WARN_ONCE("unknown CondMask!\n"); + return -1; + } +} + +#define ARITH_1OP(op) do { \ + t_src_reg(vp, &vpi->SrcReg[0], &src0); \ + emit_arith(vp, op, &dest, &src0, NULL, NULL, 0); \ +} while(0); +#define ARITH_1OP_SCALAR(op) do { \ + t_src_reg(vp, &vpi->SrcReg[0], &src0); \ + emit_arith(vp, op, &dest, NULL, NULL, &src0, 0); \ +} while(0); +#define ARITH_2OP(op) do { \ + t_src_reg(vp, &vpi->SrcReg[0], &src0); \ + t_src_reg(vp, &vpi->SrcReg[1], &src1); \ + emit_arith(vp, op, &dest, &src0, &src1, NULL, 0); \ +} while(0); +#define ARITH_3OP(op) do { \ + t_src_reg(vp, &vpi->SrcReg[0], &src0); \ + t_src_reg(vp, &vpi->SrcReg[1], &src1); \ + t_src_reg(vp, &vpi->SrcReg[2], &src2); \ + emit_arith(vp, op, &dest, &src0, &src1, &src2, 0); \ +} while(0); + +static int +translate(nouveau_vertex_program *vp) +{ + struct vertex_program *mvp = &vp->mesa_program; + struct prog_instruction *vpi; + + + for (vpi=mvp->Base.Instructions; vpi->Opcode!=OPCODE_END; vpi++) { + nouveau_srcreg src0, src1, src2, sT0; + nouveau_dstreg dest, dT0; + + switch (vpi->DstReg.File) { + case PROGRAM_OUTPUT: + make_dstreg(vp, &dest, HW_OUTPUT, t_dst_index(vpi->DstReg.Index)); + break; + case PROGRAM_TEMPORARY: + make_dstreg(vp, &dest, HW_TEMP, vpi->DstReg.Index); + break; + default: + assert(0); + } + dest.mask = t_dst_mask(vpi->DstReg.WriteMask); + dest.condtest = t_cond_test(vpi->DstReg.CondMask); + dest.condswz = t_swizzle(vpi->DstReg.CondSwizzle); + dest.condreg = vpi->DstReg.CondSrc; + + switch (vpi->Opcode) { + /* ARB_vertex_program requirements */ + case OPCODE_ABS: + t_src_reg(vp, &vpi->SrcReg[0], &src0); + emit_arith(vp, NV40_VP_INST_OP_MOV, &dest, + &src0, NULL, NULL, + NOUVEAU_OUT_ABS + ); + break; + case OPCODE_ADD: + t_src_reg(vp, &vpi->SrcReg[0], &src0); + t_src_reg(vp, &vpi->SrcReg[1], &src1); + emit_arith(vp, NV40_VP_INST_OP_ADD, &dest, + &src0, NULL, &src1, + 0 + ); + break; + case OPCODE_ARL: + break; + case OPCODE_DP3: + ARITH_2OP(NV40_VP_INST_OP_DP3); + break; + case OPCODE_DP4: + ARITH_2OP(NV40_VP_INST_OP_DP4); + break; + case OPCODE_DPH: + ARITH_2OP(NV40_VP_INST_OP_DPH); + break; + case OPCODE_DST: + ARITH_2OP(NV40_VP_INST_OP_DST); + break; + case OPCODE_EX2: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_EX2); + break; + case OPCODE_EXP: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_EXP); + break; + case OPCODE_FLR: + ARITH_1OP(NV40_VP_INST_OP_FLR); + break; + case OPCODE_FRC: + ARITH_1OP(NV40_VP_INST_OP_FRC); + break; + case OPCODE_LG2: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_LG2); + break; + case OPCODE_LIT: + t_src_reg(vp, &vpi->SrcReg[0], &src0); + t_src_reg(vp, &vpi->SrcReg[1], &src1); + t_src_reg(vp, &vpi->SrcReg[2], &src2); + emit_arith(vp, NV40_VP_INST_OP_LIT, &dest, + &src0, &src1, &src2, + 0 + ); + break; + case OPCODE_LOG: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_LOG); + break; + case OPCODE_MAD: + ARITH_3OP(NV40_VP_INST_OP_MAD); + break; + case OPCODE_MAX: + ARITH_2OP(NV40_VP_INST_OP_MAX); + break; + case OPCODE_MIN: + ARITH_2OP(NV40_VP_INST_OP_MIN); + break; + case OPCODE_MOV: + ARITH_1OP(NV40_VP_INST_OP_MOV); + break; + case OPCODE_MUL: + ARITH_2OP(NV40_VP_INST_OP_MOV); + break; + case OPCODE_POW: + t_src_reg(vp, &vpi->SrcReg[0], &src0); + t_src_reg(vp, &vpi->SrcReg[1], &src1); + make_dstreg(vp, &dT0, HW_TEMP, -1); + make_srcreg(vp, &sT0, HW_TEMP, dT0.idx); + + dT0.mask = t_dst_mask(WRITEMASK_X); + emit_arith(vp, NV40_VP_INST_OP_LG2, &dT0, + NULL, NULL, &src0, + 0); + sT0.swizzle = 0x0; /* 00000000 - XXXX */ + emit_arith(vp, NV40_VP_INST_OP_MUL, &dT0, + &sT0, &src1, NULL, + 0); + emit_arith(vp, NV40_VP_INST_OP_EX2, &dest, + NULL, NULL, &sT0, + 0); + break; + case OPCODE_RCP: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_RCP); + break; + case OPCODE_RSQ: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_RSQ); + break; + case OPCODE_SGE: + ARITH_2OP(NV40_VP_INST_OP_SGE); + break; + case OPCODE_SLT: + ARITH_2OP(NV40_VP_INST_OP_SLT); + break; + case OPCODE_SUB: + t_src_reg(vp, &vpi->SrcReg[0], &src0); + t_src_reg(vp, &vpi->SrcReg[1], &src1); + src1.negate = !src1.negate; + + emit_arith(vp, NV40_VP_INST_OP_ADD, &dest, + &src0, NULL, &src1, + 0 + ); + break; + case OPCODE_SWZ: + ARITH_1OP(NV40_VP_INST_OP_MOV); + break; + + case OPCODE_XPD: + break; + /* NV_vertex_program3 requirements */ + case OPCODE_SEQ: + ARITH_2OP(NV40_VP_INST_OP_SEQ); + break; + case OPCODE_SFL: + ARITH_2OP(NV40_VP_INST_OP_SFL); + break; + case OPCODE_SGT: + ARITH_2OP(NV40_VP_INST_OP_SGT); + break; + case OPCODE_SLE: + ARITH_2OP(NV40_VP_INST_OP_SLE); + break; + case OPCODE_SNE: + ARITH_2OP(NV40_VP_INST_OP_SNE); + break; + case OPCODE_STR: + ARITH_2OP(NV40_VP_INST_OP_STR); + break; + case OPCODE_SSG: + ARITH_1OP(NV40_VP_INST_OP_SSG); + break; + case OPCODE_ARL_NV: + break; + case OPCODE_ARR: + break; + case OPCODE_ARA: + break; + case OPCODE_RCC: + ARITH_1OP_SCALAR(NV40_VP_INST_OP_SSG); + break; + case OPCODE_BRA: + break; + case OPCODE_CAL: + break; + case OPCODE_RET: + break; + case OPCODE_PUSHA: + break; + case OPCODE_POPA: + break; + default: + break; + } + } + + return 0; +} + +/* Pre-init vertex program + * - Grab reference counts on temps + * - Where multiple inputs are used in a single instruction, + * emit instructions to move the extras into temps + */ +static int +init(nouveau_vertex_program *vp) +{ + struct vertex_program *mvp = &vp->mesa_program; + struct prog_instruction *vpi; + int i; + + nvsRecInit(&vp->temps_in_use, 64); + nvsRecInit(&vp->hwtemps_written, 64); + nvsRecInit(&vp->hwtemps_in_use , 64); + + for (vpi=mvp->Base.Instructions; vpi->Opcode!=OPCODE_END; vpi++) { + int in_done = 0; + int in_idx; + + for (i=0;i<3;i++) { + struct prog_src_register *src = &vpi->SrcReg[i]; + /*FIXME: does not handle relative addressing!*/ + int idx = src->Index; + + switch (src->File) { + case PROGRAM_TEMPORARY: + vp->temps[idx].file = HW_TEMP; + vp->temps[idx].hw_id = -1; + vp->temps[idx].ref++; + nvsBitSet(vp->temps_in_use, idx); + break; + case PROGRAM_INPUT: + if (vp->inputs[idx].file == HW_TEMP) { + vp->inputs[idx].ref++; + break; + } + + if (!in_done || (in_idx == idx)) { + vp->inputs[idx].file = HW_INPUT; + vp->inputs[idx].hw_id = idx; + vp->inputs[idx].ref++; + in_done = 1; + in_idx = idx; + } else { + vp->inputs[idx].file = HW_TEMP; + vp->inputs[idx].ref++; + } + break; + default: + break; + } + } + + switch (vpi->DstReg.File) { + case PROGRAM_TEMPORARY: + vp->temps[vpi->DstReg.Index].file = HW_TEMP; + vp->temps[vpi->DstReg.Index].hw_id = -1; + vp->temps[vpi->DstReg.Index].ref++; + nvsBitSet(vp->temps_in_use, vpi->DstReg.Index); + break; + default: + break; + } + } + + /* Now we can move any inputs that need it into temps */ + for (i=0; i<14; i++) { + if (vp->inputs[i].file == HW_TEMP) { + nouveau_srcreg src; + nouveau_dstreg dest; + + make_dstreg(vp, &dest, HW_TEMP , -1); + make_srcreg(vp, &src , HW_INPUT, i); + + emit_arith(vp, NV40_VP_INST_OP_MOV, &dest, + &src, NULL, NULL, + 0 + ); + + vp->inputs[i].file = HW_TEMP; + vp->inputs[i].hw_id = dest.hw->hw_id; + } + } + + return 0; +} + +int +nv40TranslateVertexProgram(nouveau_vertex_program *vp) +{ + int ret; + + ret = init(vp); + if (ret) + return ret; + + ret = translate(vp); + if (ret) + return ret; + + return 0; +} + +int +main(int argc, char **argv) +{ + nouveau_vertex_program *vp = calloc(1, sizeof(nouveau_vertex_program)); + struct vertex_program *mvp = &vp->mesa_program; + struct prog_instruction inst[3]; + + /* + "ADD t0, vertex.color, vertex.position;\n" + "ADD result.position, t0, vertex.position;\n" + */ + + inst[0].Opcode = OPCODE_ADD; + inst[0].SrcReg[0].File = PROGRAM_INPUT; + inst[0].SrcReg[0].Index = VERT_ATTRIB_COLOR0; + inst[0].SrcReg[0].NegateBase = 0; + inst[0].SrcReg[0].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); + inst[0].SrcReg[1].File = PROGRAM_INPUT; + inst[0].SrcReg[1].Index = VERT_ATTRIB_POS; + inst[0].SrcReg[1].NegateBase = 0; + inst[0].SrcReg[1].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); + inst[0].SrcReg[2].File = PROGRAM_UNDEFINED; + inst[0].DstReg.File = PROGRAM_TEMPORARY; + inst[0].DstReg.Index = 0; + inst[0].DstReg.WriteMask = WRITEMASK_XYZW; + + inst[1].Opcode = OPCODE_ADD; + inst[1].SrcReg[0].File = PROGRAM_TEMPORARY; + inst[1].SrcReg[0].Index = 0; + inst[1].SrcReg[0].NegateBase = 0; + inst[1].SrcReg[0].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); + inst[1].SrcReg[1].File = PROGRAM_INPUT; + inst[1].SrcReg[1].Index = VERT_ATTRIB_POS; + inst[1].SrcReg[1].NegateBase = 0; + inst[1].SrcReg[1].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); + inst[0].SrcReg[2].File = PROGRAM_UNDEFINED; + inst[1].DstReg.File = PROGRAM_OUTPUT; + inst[1].DstReg.Index = VERT_RESULT_HPOS; + inst[1].DstReg.WriteMask = WRITEMASK_XYZW; + + inst[2].Opcode = OPCODE_END; + + mvp->Base.Instructions = inst; + + nv40TranslateVertexProgram(vp); +} + -- cgit v1.2.3 From ac9d1ecec2ad5f55742fa1ccc4853f560ca7fcd9 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 3 Jun 2006 16:37:46 +0000 Subject: Another TODO, so I don't forget.. --- src/mesa/drivers/dri/nouveau/nv40_vtxprog.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c index 582bf65ea0..43909725df 100644 --- a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c +++ b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c @@ -16,6 +16,7 @@ * - Handle ARB_position_invarient * - Relative register addressing * - Implement any missing instructions + * - Fix scalar instructions (the other "writemask") */ static int t_dst_mask(int mask); -- cgit v1.2.3 From 6d1f98da2ba921fa18cd19ef43f2760549a2aea4 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 3 Jun 2006 17:15:50 +0000 Subject: A couple of quick fixes, the original had some half-finished modifications.. --- src/mesa/drivers/dri/nouveau/nv40_vtxprog.c | 75 +++++++++++++++++------------ 1 file changed, 45 insertions(+), 30 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c index 43909725df..8bdacb89e7 100644 --- a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c +++ b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c @@ -67,7 +67,7 @@ make_srcreg(nouveau_vertex_program *vp, { switch (type) { case HW_INPUT: - src->hw = &vp->inputs[id]; + src->hw = NULL; src->idx = id; break; case HW_TEMP: @@ -134,33 +134,38 @@ src_to_hw(nouveau_vertex_program *vp, nouveau_srcreg *src, return hs; } - switch (src->hw->file) { - case HW_INPUT: - if (*is != -1) { - fprintf(stderr, "multiple inputs detected... not good\n"); - return; - } - *is = src->hw->hw_id; + if (!src->hw) { /* this is a forced read from a "real" hardware source */ + *is = src->idx; hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); - break; - case HW_CONST: - if (*cs != -1) { - fprintf(stderr, "multiple consts detected... not good\n"); - return; - } - *cs = src->hw->hw_id; - hs |= (NV40_VP_SRC_REG_TYPE_CONST << NV40_VP_SRC_REG_TYPE_SHIFT); - break; - case HW_TEMP: - if (src->hw->hw_id == -1) { - fprintf(stderr, "read from unwritten temp!\n"); - return; - } - hs |= (NV40_VP_SRC_REG_TYPE_TEMP << NV40_VP_SRC_REG_TYPE_SHIFT) | - (src->hw->hw_id << NV40_VP_SRC_TEMP_SRC_SHIFT); + } else { + switch (src->hw->file) { + case HW_INPUT: + if (*is != -1) { + fprintf(stderr, "multiple inputs detected... not good\n"); + return; + } + *is = src->hw->hw_id; + hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); + break; + case HW_CONST: + if (*cs != -1) { + fprintf(stderr, "multiple consts detected... not good\n"); + return; + } + *cs = src->hw->hw_id; + hs |= (NV40_VP_SRC_REG_TYPE_CONST << NV40_VP_SRC_REG_TYPE_SHIFT); + break; + case HW_TEMP: + if (src->hw->hw_id == -1) { + fprintf(stderr, "read from unwritten temp!\n"); + return; + } + hs |= (NV40_VP_SRC_REG_TYPE_TEMP << NV40_VP_SRC_REG_TYPE_SHIFT) | + (src->hw->hw_id << NV40_VP_SRC_TEMP_SRC_SHIFT); - if (--src->hw->ref == 0) - free_hw_temp(vp, src->hw->hw_id); + if (--src->hw->ref == 0) + free_hw_temp(vp, src->hw->hw_id); + } } hs |= (src->swizzle << NV40_VP_SRC_SWZ_ALL_SHIFT); @@ -219,13 +224,13 @@ emit_arith(nouveau_vertex_program *vp, int op, if (dest->condreg) hop[0] |= NV40_VP_INST_COND_REG_SELECT_1; if (dest->condup ) hop[0] |= NV40_VP_INST_COND_UPDATE_ENABLE; - if (hwdest->file == HW_OUTPUT) + if (hwdest == NULL /* write output */) hop[0] |= NV40_VP_INST0_UNK0; else { if (hwdest->hw_id == -1) hwdest->hw_id = alloc_hw_temp(vp); - hop[0] = (hwdest->hw_id << NV40_VP_INST_DEST_TEMP_SHIFT); + hop[0] |= (hwdest->hw_id << NV40_VP_INST_DEST_TEMP_SHIFT); if (flags & NOUVEAU_OUT_ABS) hop[0] |= NV40_VP_INST_DEST_TEMP_ABS; @@ -245,8 +250,8 @@ emit_arith(nouveau_vertex_program *vp, int op, (insrc << NV40_VP_INST_INPUT_SRC_SHIFT); /* bits 31:0 */ - if (hwdest->file == HW_OUTPUT) { - hop[3] |= (dest->mask | (hwdest->hw_id << NV40_VP_INST_DEST_SHIFT)); + if (hwdest == NULL) { + hop[3] |= (dest->mask | (dest->idx << NV40_VP_INST_DEST_SHIFT)); } else { hop[3] |= (dest->mask | (NV40_VP_INST_DEST_TEMP << NV40_VP_INST_DEST_SHIFT)); } @@ -713,6 +718,11 @@ main(int argc, char **argv) inst[0].DstReg.File = PROGRAM_TEMPORARY; inst[0].DstReg.Index = 0; inst[0].DstReg.WriteMask = WRITEMASK_XYZW; + inst[0].DstReg.CondMask = COND_TR; + inst[0].DstReg.CondSwizzle = MAKE_SWIZZLE4(0, 1, 2, 3); + inst[0].DstReg.CondSrc = 0; + inst[0].CondUpdate = 0; + inst[0].CondDst = 0; inst[1].Opcode = OPCODE_ADD; inst[1].SrcReg[0].File = PROGRAM_TEMPORARY; @@ -727,6 +737,11 @@ main(int argc, char **argv) inst[1].DstReg.File = PROGRAM_OUTPUT; inst[1].DstReg.Index = VERT_RESULT_HPOS; inst[1].DstReg.WriteMask = WRITEMASK_XYZW; + inst[1].DstReg.CondMask = COND_TR; + inst[1].DstReg.CondSwizzle = MAKE_SWIZZLE4(0, 1, 2, 3); + inst[1].DstReg.CondSrc = 0; + inst[1].CondUpdate = 0; + inst[1].CondDst = 0; inst[2].Opcode = OPCODE_END; -- cgit v1.2.3 From 179c1013d2a8aa83e6bd716a791930863604c46b Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 20:17:59 +0000 Subject: Remove useless reference to fifo_num field --- src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c index 32bdcef06b..4530cf9133 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c @@ -39,15 +39,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. void nouveauIoctlInitFifo() { int ret; - int fifo_num; __DRIscreenPrivate *sPriv; drm_nouveau_fifo_init_t fifo_init; - fifo_init.fifo_num=&fifo_num; ret = drmCommandWriteRead(sPriv->fd, DRM_NOUVEAU_FIFO_INIT, &fifo_init, sizeof(fifo_init)); if (ret) FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); - MESSAGE("Fifo init ok. Got number %d\n",fifo_num); + MESSAGE("Fifo init ok. Channel %d\n", fifo_init.channel); // XXX needs more stuff } -- cgit v1.2.3 From 6f0388ec71aaab8673fe2facf6811259a9787797 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 21:23:04 +0000 Subject: basic primitives --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 71 ++++++++++++++++++------------- 1 file changed, 41 insertions(+), 30 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index d825de6559..bbd674855c 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -170,40 +170,51 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, * Macros for nouveau_dd_tritmp.h to draw basic primitives * ***********************************************************************/ -#define TRI(a, b, c) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_tri(nmesa, a, b, c); \ - else \ - nv10_draw_triangle(nmesa, a, b, c); \ - } while (0) +#define CTX_ARG nouveauContextPtr nmesa +#define VERTEX nouveauVertex -#define QUAD(a, b, c, d) \ - do { \ - if (DO_FALLBACK) { \ - nmesa->draw_tri(nmesa, a, b, d); \ - nmesa->draw_tri(nmesa, b, c, d); \ - } \ - else \ - nv10_draw_quad(nmesa, a, b, c, d); \ - } while (0) +#undef TAG +#define TAG(x) nouveau_##x -#define LINE(v0, v1) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_line(nmesa, v0, v1); \ - else \ - nv10_draw_line(nmesa, v0, v1); \ - } while (0) +static __inline void TAG(quad)( CTX_ARG, + VERTEX *v0, + VERTEX *v1, + VERTEX *v2, + VERTEX *v3 ) +{ + (*nmesa->draw_tri)(nmesa, v0, v1, v3); + (*nmesa->draw_tri)(nmesa, v1, v2, v3); + /* FIXME: Need to add nmesa->draw_quad in nouveau_context ? */ + /* nv10_draw_quad(nmesa, v0, v1, v2, v3); */ +} -#define POINT(v0) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_point(nmesa, v0); \ - else \ - nv10_draw_point(nmesa, v0); \ - } while (0) +static __inline void TAG(triangle)( CTX_ARG, + VERTEX *v0, + VERTEX *v1, + VERTEX *v2 ) +{ + (*nmesa->draw_tri)(nmesa, v0, v1, v2); +} +static __inline void TAG(line)( CTX_ARG, + VERTEX *v0, + VERTEX *v1 ) +{ + (*nmesa->draw_line)(nmesa, v0, v1); +} + +static __inline void TAG(point)( CTX_ARG, + VERTEX *v0 ) +{ + (*nmesa->draw_point)(nmesa, v0); +} + +#define QUAD( a, b, c, d ) nouveau_quad( nmesa, a, b, c, d ) +#define TRI( a, b, c ) nouveau_triangle( nmesa, a, b, c ) +#define LINE( a, b ) nouveau_line( nmesa, a, b ) +#define POINT( a ) nouveau_point( nmesa, a ) + +#undef TAG /*********************************************************************** * Build render functions from dd templates * -- cgit v1.2.3 From ad0f65537695492a6651857d59d7bad27bae6c8b Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 21:27:17 +0000 Subject: vert_copy_rgba macro --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index bbd674855c..7f3d275c40 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -272,15 +272,7 @@ static struct { color->alpha=(c)[3]; \ } while (0) -#define VERT_COPY_RGBA( v0, v1 ) \ - do { \ - if (coloroffset) { \ - v0->f[coloroffset][0] = v1->f[coloroffset][0]; \ - v0->f[coloroffset][1] = v1->f[coloroffset][1]; \ - v0->f[coloroffset][2] = v1->f[coloroffset][2]; \ - v0->f[coloroffset][3] = v1->f[coloroffset][3]; \ - } \ - } while (0) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] #define VERT_SET_SPEC( v, c ) \ do { \ -- cgit v1.2.3 From 07d4c63ddc39a41c1048bd92c41b22b8c11712f3 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 21:30:32 +0000 Subject: vert_copy_spec macro --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 7f3d275c40..75b35271f6 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -286,9 +286,11 @@ static struct { #define VERT_COPY_SPEC( v0, v1 ) \ do { \ if (specoffset) { \ - v0->f[specoffset][0] = v1->f[specoffset][0]; \ - v0->f[specoffset][1] = v1->f[specoffset][1]; \ - v0->f[specoffset][2] = v1->f[specoffset][2]; \ + nouveau_color_t *spec0 = (nouveau_color_t *)&((v0)->ui[specoffset]); \ + nouveau_color_t *spec1 = (nouveau_color_t *)&((v1)->ui[specoffset]); \ + spec0->red = spec1->red; \ + spec0->green = spec1->green; \ + spec0->blue = spec1->blue; \ } \ } while (0) -- cgit v1.2.3 From 7a968481a00216e07d9a7d6400de147ddab66efd Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 21:34:47 +0000 Subject: render_primitive macro --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 75b35271f6..217193ba99 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -327,7 +327,7 @@ static const GLuint hw_prim[GL_POLYGON+1] = { }; #define RASTERIZE(x) nv10RasterPrimitive( ctx, x, hw_prim[x] ) -#define RENDER_PRIMITIVE nmesa->renderPrimitive +#define RENDER_PRIMITIVE nmesa->current_primitive #define TAG(x) x #define IND NOUVEAU_FALLBACK_BIT #include "tnl_dd/t_dd_unfilled.h" -- cgit v1.2.3 From 1961611247313603f72315285be91c6b97df7e03 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 21:41:58 +0000 Subject: reimport sw stuff --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 40 ++++--------------------------- 1 file changed, 4 insertions(+), 36 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 217193ba99..2ed151f0fc 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -166,48 +166,16 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, -/*********************************************************************** - * Macros for nouveau_dd_tritmp.h to draw basic primitives * - ***********************************************************************/ - #define CTX_ARG nouveauContextPtr nmesa #define VERTEX nouveauVertex #undef TAG #define TAG(x) nouveau_##x +#include "tnl_dd/t_dd_triemit.h" -static __inline void TAG(quad)( CTX_ARG, - VERTEX *v0, - VERTEX *v1, - VERTEX *v2, - VERTEX *v3 ) -{ - (*nmesa->draw_tri)(nmesa, v0, v1, v3); - (*nmesa->draw_tri)(nmesa, v1, v2, v3); - /* FIXME: Need to add nmesa->draw_quad in nouveau_context ? */ - /* nv10_draw_quad(nmesa, v0, v1, v2, v3); */ -} - -static __inline void TAG(triangle)( CTX_ARG, - VERTEX *v0, - VERTEX *v1, - VERTEX *v2 ) -{ - (*nmesa->draw_tri)(nmesa, v0, v1, v2); -} - -static __inline void TAG(line)( CTX_ARG, - VERTEX *v0, - VERTEX *v1 ) -{ - (*nmesa->draw_line)(nmesa, v0, v1); -} - -static __inline void TAG(point)( CTX_ARG, - VERTEX *v0 ) -{ - (*nmesa->draw_point)(nmesa, v0); -} +/*********************************************************************** + * Macros for nouveau_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ #define QUAD( a, b, c, d ) nouveau_quad( nmesa, a, b, c, d ) #define TRI( a, b, c ) nouveau_triangle( nmesa, a, b, c ) -- cgit v1.2.3 From cdd433b29be9ad39b0c2e69d76d2de51f29eba2b Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 21:52:25 +0000 Subject: more macros, still missing the alloc_verts one --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 2ed151f0fc..35135fc706 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -167,6 +167,11 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, #define CTX_ARG nouveauContextPtr nmesa +#define GET_VERTEX_DWORDS() nmesa->vertex_size +#define LOCAL_VARS \ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \ + const char *nouveauverts = (char *)nmesa->verts; +#define VERT(x) (r200Vertex *)(r200verts + ((x) * vertsize * sizeof(int))) #define VERTEX nouveauVertex #undef TAG @@ -269,6 +274,7 @@ static struct { #define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] +#undef LOCAL_VARS #define LOCAL_VARS(n) \ struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ GLuint color[n], spec[n]; \ -- cgit v1.2.3 From ddaf3060fa5105dd9c769086a4bbfdb2488ae86b Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 23:18:27 +0000 Subject: nv10: vertex attribute output format --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 2 ++ src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 5f4b0624ad..583a2b82cb 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -65,6 +65,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV20_VERTEX_ATTRIBUTE_TYPE_MASK 0x0000000f #define NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT 0x00000002 #define NV20_VERTEX_ATTRIBUTE_SIZE_MASK 0x000000f0 +#define NV10_VERTEX_ATTRIBUTE(i) (0x00000d04+i*8) +#define NV10_VERTEX_SET_FORMAT 0x00000cf0 /* Rendering commands */ #define NV10_PRIMITIVE 0x00000dfc diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 35135fc706..55507b277b 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -670,7 +670,28 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint * Tell the hardware about the vertex format */ if (nmesa->screen->card_type==NV_10) { - // XXX needs some love + int size; + +#define NV10_SET_VERTEX_ATTRIB(i,j,k) \ + do { \ + size = attr_size[j] << 4; \ + size |= (attr_size[j]*4) << 8; \ + size |= NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT; \ + BEGIN_RING_SIZE(channel, NV10_VERTEX_ATTRIBUTE(i),1); \ + OUT_RING(size); \ + } while (0) + + NV10_SET_VERTEX_ATTRIB(0, _TNL_ATTRIB_POS); + NV10_SET_VERTEX_ATTRIB(1, _TNL_ATTRIB_COLOR0); + NV10_SET_VERTEX_ATTRIB(2, _TNL_ATTRIB_COLOR1); + NV10_SET_VERTEX_ATTRIB(3, _TNL_ATTRIB_TX0); + NV10_SET_VERTEX_ATTRIB(4, _TNL_ATTRIB_TX1); + NV10_SET_VERTEX_ATTRIB(5, _TNL_ATTRIB_NORMAL); + NV10_SET_VERTEX_ATTRIB(6, _TNL_ATTRIB_WEIGHT); + NV10_SET_VERTEX_ATTRIB(7, _TNL_ATTRIB_FOG); + + BEGIN_RING_SIZE(channel, NV10_VERTEX_SET_FORMAT); + OUT_RING(0); } else if (nmesa->screen->card_type==NV_20) { for(i=0;i<16;i++) { -- cgit v1.2.3 From ae481e1560d0c99b6fb2c4b240f9b99dafd9c4b1 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Sep 2006 23:19:45 +0000 Subject: oops, time to go to bed --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 55507b277b..31a54b3e5c 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -672,7 +672,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint if (nmesa->screen->card_type==NV_10) { int size; -#define NV10_SET_VERTEX_ATTRIB(i,j,k) \ +#define NV10_SET_VERTEX_ATTRIB(i,j) \ do { \ size = attr_size[j] << 4; \ size |= (attr_size[j]*4) << 8; \ -- cgit v1.2.3 From 908388b11841c50c94c1c746819276809a545a32 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 17 Sep 2006 11:58:52 +0000 Subject: Some work towards making the nv10 swtcl compile --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 6 ++-- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 41 ++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index e1c5d4d54e..ad3d00f588 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -103,9 +103,9 @@ typedef struct nouveau_context { /* The drawing fallbacks */ GLuint Fallback; - nouveau_tri_func* draw_tri; - nouveau_line_func* draw_line; - nouveau_point_func* draw_point; + nouveau_tri_func draw_tri; + nouveau_line_func draw_line; + nouveau_point_func draw_point; /* Cliprects information */ GLuint numClipRects; diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 31a54b3e5c..0ddc466d5b 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -171,7 +171,7 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, #define LOCAL_VARS \ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \ const char *nouveauverts = (char *)nmesa->verts; -#define VERT(x) (r200Vertex *)(r200verts + ((x) * vertsize * sizeof(int))) +#define VERT(x) (nouveauVertex *)(nouveauverts + ((x) * vertsize * sizeof(int))) #define VERTEX nouveauVertex #undef TAG @@ -182,10 +182,39 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, * Macros for nouveau_dd_tritmp.h to draw basic primitives * ***********************************************************************/ -#define QUAD( a, b, c, d ) nouveau_quad( nmesa, a, b, c, d ) -#define TRI( a, b, c ) nouveau_triangle( nmesa, a, b, c ) -#define LINE( a, b ) nouveau_line( nmesa, a, b ) -#define POINT( a ) nouveau_point( nmesa, a ) +#define TRI(a, b, c) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_tri(nmesa, a, b, c); \ + else \ + nv10_draw_triangle(nmesa, a, b, c); \ + } while (0) + +#define QUAD(a, b, c, d) \ + do { \ + if (DO_FALLBACK) { \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ + } \ + else \ + nv10_draw_quad(nmesa, a, b, c, d); \ + } while (0) + +#define LINE(v0, v1) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_line(nmesa, v0, v1); \ + else \ + nv10_draw_line(nmesa, v0, v1); \ + } while (0) + +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nv10_draw_point(nmesa, v0); \ + } while (0) #undef TAG @@ -467,7 +496,7 @@ static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; + GLuint prim = NOUVEAU_CONTEXT(ctx)->current_primitive; /* Render the new vertices as an unclipped polygon. */ -- cgit v1.2.3 From e324c52237fd1184a1f8436c8735cdd9ade5e067 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 17 Sep 2006 12:09:11 +0000 Subject: Make nouveau actually compile --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 +- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 26 +++++++++++++++++--------- src/mesa/drivers/dri/nouveau/nv10_swtcl.h | 1 - 3 files changed, 18 insertions(+), 11 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index ad3d00f588..28fe944280 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -113,7 +113,7 @@ typedef struct nouveau_context { /* The rendering context information */ GLenum current_primitive; /* the current primitive enum */ - GLuint render_inputs; /* the current render inputs */ + GLuint render_inputs_bitset; /* the current render inputs */ nouveauScreenRec *screen; drm_nouveau_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 0ddc466d5b..65c24f3779 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -52,8 +52,9 @@ /* XXX hack for now */ #define channel 1 -static void nv10RenderPrimitive( GLcontext *ctx, GLenum prim ); static void nv10RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); +static void nv10RenderPrimitive( GLcontext *ctx, GLenum prim ); +static void nv10ResetLineStipple( GLcontext *ctx ); @@ -466,7 +467,7 @@ const GLuint vertsize = nmesa->vertex_size; \ const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ const GLboolean stipple = ctx->Line.StippleFlag; \ (void) elt; (void) stipple; -#define RESET_STIPPLE if ( stipple ) nouveauResetLineStipple( ctx ); +#define RESET_STIPPLE if ( stipple ) nv10ResetLineStipple( ctx ); #define RESET_OCCLUSION #define PRESERVE_VB_DEFS #define ELT(x) x @@ -650,6 +651,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint for(i=8;i<16;i++) { if (index&(1<TexCoordPtr[i]; else attr_size[i]=0; @@ -713,13 +715,13 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint NV10_SET_VERTEX_ATTRIB(0, _TNL_ATTRIB_POS); NV10_SET_VERTEX_ATTRIB(1, _TNL_ATTRIB_COLOR0); NV10_SET_VERTEX_ATTRIB(2, _TNL_ATTRIB_COLOR1); - NV10_SET_VERTEX_ATTRIB(3, _TNL_ATTRIB_TX0); - NV10_SET_VERTEX_ATTRIB(4, _TNL_ATTRIB_TX1); + NV10_SET_VERTEX_ATTRIB(3, _TNL_ATTRIB_TEX0); + NV10_SET_VERTEX_ATTRIB(4, _TNL_ATTRIB_TEX1); NV10_SET_VERTEX_ATTRIB(5, _TNL_ATTRIB_NORMAL); NV10_SET_VERTEX_ATTRIB(6, _TNL_ATTRIB_WEIGHT); NV10_SET_VERTEX_ATTRIB(7, _TNL_ATTRIB_FOG); - BEGIN_RING_SIZE(channel, NV10_VERTEX_SET_FORMAT); + BEGIN_RING_SIZE(channel, NV10_VERTEX_SET_FORMAT,1); OUT_RING(0); } else if (nmesa->screen->card_type==NV_20) { for(i=0;i<16;i++) @@ -749,11 +751,11 @@ static void nv10ChooseVertexState( GLcontext *ctx ) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); - GLuint index = tnl->render_inputs; + GLuint index = tnl->render_inputs_bitset; - if (index!=nmesa->render_inputs) + if (index!=nmesa->render_inputs_bitset) { - nmesa->render_inputs=index; + nmesa->render_inputs_bitset=index; nv10OutputVertexFormat(nmesa,index); } } @@ -766,6 +768,7 @@ static void nv10ChooseVertexState( GLcontext *ctx ) static void nv10RenderStart(GLcontext *ctx) { + TNLcontext *tnl = TNL_CONTEXT(ctx); struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); if (nmesa->new_state) { @@ -816,6 +819,11 @@ static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim ) nv10RasterPrimitive( ctx, prim, hw_prim[prim] ); } +static void nv10ResetLineStipple( GLcontext *ctx ) +{ + /* FIXME do something here */ +} + /**********************************************************************/ /* Initialization. */ @@ -836,7 +844,7 @@ void nv10TriInitFunctions(GLcontext *ctx) tnl->Driver.Render.Start = nv10RenderStart; tnl->Driver.Render.Finish = nv10RenderFinish; tnl->Driver.Render.PrimitiveNotify = nv10RenderPrimitive; - tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple; + tnl->Driver.Render.ResetLineStipple = nv10ResetLineStipple; tnl->Driver.Render.BuildVertices = _tnl_build_vertices; tnl->Driver.Render.CopyPV = _tnl_copy_pv; tnl->Driver.Render.Interp = _tnl_interp; diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h index 03338fbe13..7c854addd2 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.h +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.h @@ -33,7 +33,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. extern void nv10Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); extern void nv10FinishPrimitive(struct nouveau_context *nmesa); -extern void nv10RenderStart(GLcontext *ctx); extern void nv10TriInitFunctions(GLcontext *ctx); #define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) -- cgit v1.2.3 From c67f54552077b780df574cbcdea70b2cc37076ef Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 17 Sep 2006 14:36:07 +0000 Subject: Small changes --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 -- src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_tris.c | 1 - src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 5 +++-- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 683e6d6ea6..d84e73c015 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -55,8 +55,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. int NOUVEAU_DEBUG = 0; #endif -#define NOUVEAU_FALLBACK_DISABLE 1 - static const struct dri_debug_control debug_control[] = { { NULL, 0 } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 28fe944280..c5783993c7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -92,7 +92,7 @@ typedef struct nouveau_context { /* Vertex state */ GLuint vertex_size; - char *verts; + GLubyte *verts; struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; GLuint vertex_attr_count; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c index 8622b9349c..bb8ead3b23 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tris.c @@ -74,7 +74,6 @@ void nouveau_fallback_point(struct nouveau_context *nmesa, void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) { GLcontext *ctx = nmesa->glCtx; - TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint oldfallback = nmesa->Fallback; if (mode) { diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 65c24f3779..af9f4fabf4 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -48,6 +48,7 @@ #include "nouveau_reg.h" #include "nouveau_tex.h" #include "nouveau_fifo.h" +#include "nouveau_msg.h" /* XXX hack for now */ #define channel 1 @@ -651,8 +652,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint for(i=8;i<16;i++) { if (index&(1<TexCoordPtr[i]; + attr_size[i]=VB->TexCoordPtr[i]->size; else attr_size[i]=0; } @@ -822,6 +822,7 @@ static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim ) static void nv10ResetLineStipple( GLcontext *ctx ) { /* FIXME do something here */ + WARN_ONCE("Unimplemented nv10ResetLineStipple\n"); } -- cgit v1.2.3 From 473a38622e46d46b74d7426d0a2f4b60f4a1d5d4 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 17 Sep 2006 15:30:40 +0000 Subject: Rename nouveau_tris.* to nouveau_swtcl.* --- src/mesa/drivers/dri/nouveau/Makefile | 2 +- src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 5 +- src/mesa/drivers/dri/nouveau/nouveau_ioctl.h | 4 +- src/mesa/drivers/dri/nouveau/nouveau_state.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_swtcl.c | 127 +++++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_swtcl.h | 55 ++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_tris.c | 125 -------------------------- src/mesa/drivers/dri/nouveau/nouveau_tris.h | 55 ------------ src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 2 +- 9 files changed, 190 insertions(+), 187 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_swtcl.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_swtcl.h delete mode 100644 src/mesa/drivers/dri/nouveau/nouveau_tris.c delete mode 100644 src/mesa/drivers/dri/nouveau/nouveau_tris.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index fc51205019..ee7bc5d317 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -16,7 +16,7 @@ DRIVER_SOURCES = \ nouveau_span.c \ nouveau_state.c \ nouveau_tex.c \ - nouveau_tris.c \ + nouveau_swtcl.c \ nv10_swtcl.c C_SOURCES = \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c index 4530cf9133..46ac527f83 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c @@ -36,13 +36,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_msg.h" // here we call the fifo initialization ioctl and fill in stuff accordingly -void nouveauIoctlInitFifo() +void nouveauIoctlInitFifo(nouveauContextPtr nmesa) { int ret; - __DRIscreenPrivate *sPriv; drm_nouveau_fifo_init_t fifo_init; - ret = drmCommandWriteRead(sPriv->fd, DRM_NOUVEAU_FIFO_INIT, &fifo_init, sizeof(fifo_init)); + ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_INIT, &fifo_init, sizeof(fifo_init)); if (ret) FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); MESSAGE("Fifo init ok. Channel %d\n", fifo_init.channel); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h index 3147265e90..ce77d3d11e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h @@ -28,7 +28,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __NOUVEAU_IOCTL_H__ #define __NOUVEAU_IOCTL_H__ -extern void nouveauIoctlInitFifo(); +#include "nouveau_context.h" + +extern void nouveauIoctlInitFifo(nouveauContextPtr nmesa); extern void nouveauIoctlInitFunctions(struct dd_function_table *functions); #endif /* __NOUVEAU_IOCTL_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index b7f53ff957..417fd9fbcc 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -27,7 +27,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_state.h" #include "nouveau_ioctl.h" -#include "nouveau_tris.h" +#include "nouveau_swtcl.h" #include "nouveau_fifo.h" #include "swrast/swrast.h" diff --git a/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c new file mode 100644 index 0000000000..7c7ba7374b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c @@ -0,0 +1,127 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP 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. + +**************************************************************************/ + +/* Common software TCL code */ + +#include "nouveau_context.h" +#include "nouveau_swtcl.h" +#include "nv10_swtcl.h" +#include "nouveau_span.h" +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + +/* Common tri functions */ + +/* The fallbacks */ +void nouveau_fallback_tri(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1, + nouveauVertex *v2) +{ + GLcontext *ctx = nmesa->glCtx; + SWvertex v[3]; + _swsetup_Translate(ctx, v0, &v[0]); + _swsetup_Translate(ctx, v1, &v[1]); + _swsetup_Translate(ctx, v2, &v[2]); + _swrast_Triangle(ctx, &v[0], &v[1], &v[2]); +} + + +void nouveau_fallback_line(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1) +{ + GLcontext *ctx = nmesa->glCtx; + SWvertex v[2]; + _swsetup_Translate(ctx, v0, &v[0]); + _swsetup_Translate(ctx, v1, &v[1]); + _swrast_Line(ctx, &v[0], &v[1]); +} + + +void nouveau_fallback_point(struct nouveau_context *nmesa, + nouveauVertex *v0) +{ + GLcontext *ctx = nmesa->glCtx; + SWvertex v[1]; + _swsetup_Translate(ctx, v0, &v[0]); + _swrast_Point(ctx, &v[0]); +} + +void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) +{ + GLcontext *ctx = nmesa->glCtx; + GLuint oldfallback = nmesa->Fallback; + + if (mode) { + nmesa->Fallback |= bit; + if (oldfallback == 0) { + if (nmesa->screen->card_typerender_index = ~0; + } + } + else { + nmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + + if (nmesa->screen->card_typevertex_attrs, + nmesa->vertex_attr_count, + nmesa->viewport.m, 0 ); + } + } +} + + +void nouveauRunPipeline( GLcontext *ctx ) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->new_state) { + nmesa->new_render_state |= nmesa->new_state; + } + + _tnl_run_pipeline( ctx ); +} + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_swtcl.h b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.h new file mode 100644 index 0000000000..ba4d8725a6 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.h @@ -0,0 +1,55 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + + + +#ifndef __NOUVEAU_SWTCL_H__ +#define __NOUVEAU_SWTCL_H__ + +#include "nouveau_context.h" + +extern void nouveau_fallback_tri(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1, + nouveauVertex *v2); + +extern void nouveau_fallback_line(struct nouveau_context *nmesa, + nouveauVertex *v0, + nouveauVertex *v1); + +extern void nouveau_fallback_point(struct nouveau_context *nmesa, + nouveauVertex *v0); + +extern void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode); + +extern void nouveauRunPipeline( GLcontext *ctx ); + +extern void nouveauTriInitFunctions( GLcontext *ctx ); + + +#endif /* __NOUVEAU_SWTCL_H__ */ + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.c b/src/mesa/drivers/dri/nouveau/nouveau_tris.c deleted file mode 100644 index bb8ead3b23..0000000000 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.c +++ /dev/null @@ -1,125 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -#include "nouveau_context.h" -#include "nouveau_tris.h" -#include "nv10_swtcl.h" -#include "nouveau_span.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/tnl.h" -#include "tnl/t_pipeline.h" - -/* Common tri functions */ - -/* The fallbacks */ -void nouveau_fallback_tri(struct nouveau_context *nmesa, - nouveauVertex *v0, - nouveauVertex *v1, - nouveauVertex *v2) -{ - GLcontext *ctx = nmesa->glCtx; - SWvertex v[3]; - _swsetup_Translate(ctx, v0, &v[0]); - _swsetup_Translate(ctx, v1, &v[1]); - _swsetup_Translate(ctx, v2, &v[2]); - _swrast_Triangle(ctx, &v[0], &v[1], &v[2]); -} - - -void nouveau_fallback_line(struct nouveau_context *nmesa, - nouveauVertex *v0, - nouveauVertex *v1) -{ - GLcontext *ctx = nmesa->glCtx; - SWvertex v[2]; - _swsetup_Translate(ctx, v0, &v[0]); - _swsetup_Translate(ctx, v1, &v[1]); - _swrast_Line(ctx, &v[0], &v[1]); -} - - -void nouveau_fallback_point(struct nouveau_context *nmesa, - nouveauVertex *v0) -{ - GLcontext *ctx = nmesa->glCtx; - SWvertex v[1]; - _swsetup_Translate(ctx, v0, &v[0]); - _swrast_Point(ctx, &v[0]); -} - -void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) -{ - GLcontext *ctx = nmesa->glCtx; - GLuint oldfallback = nmesa->Fallback; - - if (mode) { - nmesa->Fallback |= bit; - if (oldfallback == 0) { - if (nmesa->screen->card_typerender_index = ~0; - } - } - else { - nmesa->Fallback &= ~bit; - if (oldfallback == bit) { - _swrast_flush( ctx ); - - if (nmesa->screen->card_typevertex_attrs, - nmesa->vertex_attr_count, - nmesa->viewport.m, 0 ); - } - } -} - - -void nouveauRunPipeline( GLcontext *ctx ) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - if (nmesa->new_state) { - nmesa->new_render_state |= nmesa->new_state; - } - - _tnl_run_pipeline( ctx ); -} - - diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tris.h b/src/mesa/drivers/dri/nouveau/nouveau_tris.h deleted file mode 100644 index 950f662570..0000000000 --- a/src/mesa/drivers/dri/nouveau/nouveau_tris.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - - - -#ifndef __NOUVEAU_TRIS_H__ -#define __NOUVEAU_TRIS_H__ - -#include "nouveau_context.h" - -extern void nouveau_fallback_tri(struct nouveau_context *nmesa, - nouveauVertex *v0, - nouveauVertex *v1, - nouveauVertex *v2); - -extern void nouveau_fallback_line(struct nouveau_context *nmesa, - nouveauVertex *v0, - nouveauVertex *v1); - -extern void nouveau_fallback_point(struct nouveau_context *nmesa, - nouveauVertex *v0); - -extern void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode); - -extern void nouveauRunPipeline( GLcontext *ctx ); - -extern void nouveauTriInitFunctions( GLcontext *ctx ); - - -#endif /* __NOUVEAU_TRIS_H__ */ - - diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index af9f4fabf4..34546cc234 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -40,7 +40,7 @@ #include "tnl/t_context.h" #include "tnl/t_pipeline.h" -#include "nouveau_tris.h" +#include "nouveau_swtcl.h" #include "nv10_swtcl.h" #include "nouveau_context.h" #include "nouveau_span.h" -- cgit v1.2.3 From 7d907ef69c3cbd6cd0c49f454bc933bc9c343d31 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 17 Sep 2006 17:46:36 +0000 Subject: Some small changes --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 7 ++++--- src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 9 +++++++-- src/mesa/drivers/dri/nouveau/nouveau_lock.c | 1 - 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index d84e73c015..3ca5edf782 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -71,7 +71,6 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, struct dd_function_table functions; nouveauContextPtr nmesa; nouveauScreenPtr screen; - int i; /* Allocate the context */ nmesa = (nouveauContextPtr) CALLOC( sizeof(*nmesa) ); @@ -129,16 +128,18 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, switch(nmesa->screen->card_type) { case NV_03: + //nv03TriInitFunctions( ctx ); + break; case NV_04: case NV_05: - default: - //nv03TriInitFunctions( ctx ); + //nv04TriInitFunctions( ctx ); break; case NV_10: case NV_20: case NV_30: case NV_40: case G_70: + default: nv10TriInitFunctions( ctx ); break; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c index 46ac527f83..ce55373934 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c @@ -44,8 +44,13 @@ void nouveauIoctlInitFifo(nouveauContextPtr nmesa) ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_INIT, &fifo_init, sizeof(fifo_init)); if (ret) FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); - MESSAGE("Fifo init ok. Channel %d\n", fifo_init.channel); - // XXX needs more stuff + MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); + + // XXX needs more stuff : + // - map the command buffer + // - map the fifo control regs + // - create the 3D object + } void nouveauIoctlInitFunctions(struct dd_function_table *functions) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_lock.c b/src/mesa/drivers/dri/nouveau/nouveau_lock.c index 1bd2ee4ca9..7dd67a143a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_lock.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_lock.c @@ -44,7 +44,6 @@ void nouveauGetLock( nouveauContextPtr nmesa, GLuint flags ) __DRIdrawablePrivate *dPriv = nmesa->driDrawable; __DRIscreenPrivate *sPriv = nmesa->driScreen; drm_nouveau_sarea_t *sarea = nmesa->sarea; - int i; drmGetLock( nmesa->driFd, nmesa->hHWContext, flags ); -- cgit v1.2.3 From a05db7f505caef75296170bcb6884ba287b1ab25 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 24 Sep 2006 13:16:23 +0000 Subject: Kill all the current shader code. --- src/mesa/drivers/dri/nouveau/nouveau_shader.c | 91 ---- src/mesa/drivers/dri/nouveau/nouveau_shader.h | 74 --- src/mesa/drivers/dri/nouveau/nv40_reg.h | 472 ---------------- src/mesa/drivers/dri/nouveau/nv40_vtxprog.c | 752 -------------------------- 4 files changed, 1389 deletions(-) delete mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader.c delete mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader.h delete mode 100644 src/mesa/drivers/dri/nouveau/nv40_reg.h delete mode 100644 src/mesa/drivers/dri/nouveau/nv40_vtxprog.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c deleted file mode 100644 index ef8f02e910..0000000000 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ /dev/null @@ -1,91 +0,0 @@ -#include "glheader.h" -#include "macros.h" -#include "enums.h" - -#include "program.h" -#include "nouveau_context.h" -#include "nouveau_shader.h" - -static struct program * -nv40NewProgram(GLcontext *ctx, GLenum target, GLuint id) -{ -} - -static void -nv40BindProgram(GLcontext *ctx, GLenum target, struct program *prog) -{ -} - -static void -nv40DeleteProgram(GLcontext *ctx, struct program *prog) -{ -} - -static void -nv40ProgramStringNotify(GLcontext *ctx, GLenum target, - struct program *prog) -{ -} - -static GLboolean -nv40IsProgramNative(GLcontext *ctx, GLenum target, struct program *prog) -{ -} - -void -nouveauInitShaderFuncs(GLcontext *ctx) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - - if (nmesa->screen->card_type == NV_40) { - ctx->Driver.NewProgram = nv40NewProgram; - ctx->Driver.BindProgram = nv40BindProgram; - ctx->Driver.DeleteProgram = nv40DeleteProgram; - ctx->Driver.ProgramStringNotify = nv40ProgramStringNotify; - ctx->Driver.IsProgramNative = nv40IsProgramNative; - } -} - -#define LONGBITS (sizeof(long) * 8) -void -nvsBitSet(long *rec, int bit) -{ - int ri = bit / LONGBITS; - int rb = bit % LONGBITS; - - rec[ri] |= (1 << rb); -} - -void -nvsBitClear(long *rec, int bit) -{ - int ri = bit / LONGBITS; - int rb = bit % LONGBITS; - - rec[ri] &= ~(1 << rb); -} - -void -nvsRecInit(long **rec, int max) -{ - int c = (max / LONGBITS) + ((max % LONGBITS) ? 1 : 0); - *rec = calloc(c, sizeof(long)); -} - -int -nvsAllocIndex(long *rec, int max) -{ - int c = (max / LONGBITS) + ((max % LONGBITS) ? 1 : 0); - int i, idx = 0; - - for (i=0;i (guess..) */ -#define NV40_VP_PROGRAM_START_ID 0x1EA0 /* Start executing program from instruction */ - -/* Vertex programs instruction set - * - * 128bit opcodes, split into 4 32-bit ones for ease of use. - * - * Non-native instructions - * ABS - MOV + NV40_VP_INST0_DEST_ABS - * POW - EX2 + MUL + LG2 - * SUB - ADD, second source negated - * SWZ - MOV - * XPD - - * - * Register access - * - Only one INPUT can be accessed per-instruction (move extras into TEMPs) - * - Only one CONST can be accessed per-instruction (move extras into TEMPs) - * - * Relative Addressing - * According to the value returned for MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB - * there are only two address registers available. The destination in the ARL - * instruction is set to TEMP (The temp isn't actually written). - * - * When using vanilla ARB_v_p, the proprietary driver will squish both the available - * ADDRESS regs into the first hardware reg in the X and Y components. - * - * To use an address reg as an index into consts, the CONST_SRC is set to - * (const_base + offset) and INDEX_CONST is set. - * - * It is similar for inputs, INPUT_SRC is set to the offset value and INDEX_INPUT - * is set. - * - * To access the second address reg use ADDR_REG_SELECT_1. A particular component - * of the address regs is selected with ADDR_SWZ. - * - * Only one address register can be accessed per instruction, but you may use - * the address reg as an index into both consts and inputs in the same instruction - * as long as the swizzles also match. - * - * Conditional execution (see NV_vertex_program{2,3} for details) - * All instructions appear to be able to modify one of two condition code registers. - * This is enabled by setting COND_UPDATE_ENABLE. The second condition registers is - * updated by setting COND_REG_SELECT_1. - * - * Conditional execution of an instruction is enabled by setting COND_TEST_ENABLE, and - * selecting the condition which will allow the test to pass with COND_{FL,LT,...}. - * It is possible to swizzle the values in the condition register, which allows for - * testing against an individual component. - * - * Branching - * The BRA/CAL instructions seem to follow a slightly different opcode layout. The - * destination instruction ID (IADDR) overlaps SRC2. Instruction ID's seem to be - * numbered based on the UPLOAD_FROM_ID FIFO command, and is incremented automatically - * on each UPLOAD_INST FIFO command. - * - * Conditional branching is achieved by using the condition tests described above. - * There doesn't appear to be dedicated looping instructions, but this can be done - * using a temp reg + conditional branching. - * - * Subroutines may be uploaded before the main program itself, but the first executed - * instruction is determined by the PROGRAM_START_ID FIFO command. - * - * Texture lookup - * TODO - */ - -/* ---- OPCODE BITS 127:96 / data DWORD 0 --- */ -#define NV40_VP_INST0_UNK0 (1 << 30) /* set when writing result regs */ -#define NV40_VP_INST_COND_UPDATE_ENABLE ((1 << 14)|1<<29) /* unsure about this */ -#define NV40_VP_INST_INDEX_INPUT (1 << 27) /* Use an address reg as in index into attribs */ -#define NV40_VP_INST_COND_REG_SELECT_1 (1 << 25) -#define NV40_VP_INST_ADDR_REG_SELECT_1 (1 << 24) -#define NV40_VP_INST_DEST_TEMP_ABS (1 << 21) -#define NV40_VP_INST_DEST_TEMP_SHIFT 15 -#define NV40_VP_INST_DEST_TEMP_MASK (0x3F << 15) -#define NV40_VP_INST_COND_TEST_ENABLE (1 << 13) /* write masking based on condition test */ -#define NV40_VP_INST_COND_SHIFT 10 -#define NV40_VP_INST_COND_MASK (0x7 << 10) -# define NV40_VP_INST_COND_FL 0 -# define NV40_VP_INST_COND_LT 1 -# define NV40_VP_INST_COND_EQ 2 -# define NV40_VP_INST_COND_LE 3 -# define NV40_VP_INST_COND_GT 4 -# define NV40_VP_INST_COND_NE 5 -# define NV40_VP_INST_COND_GE 6 -# define NV40_VP_INST_COND_TR 7 -#define NV40_VP_INST_COND_SWZ_X_SHIFT 8 -#define NV40_VP_INST_COND_SWZ_X_MASK (3 << 8) -#define NV40_VP_INST_COND_SWZ_Y_SHIFT 6 -#define NV40_VP_INST_COND_SWZ_Y_MASK (3 << 6) -#define NV40_VP_INST_COND_SWZ_Z_SHIFT 4 -#define NV40_VP_INST_COND_SWZ_Z_MASK (3 << 4) -#define NV40_VP_INST_COND_SWZ_W_SHIFT 2 -#define NV40_VP_INST_COND_SWZ_W_MASK (3 << 2) -#define NV40_VP_INST_COND_SWZ_ALL_SHIFT 2 -#define NV40_VP_INST_COND_SWZ_ALL_MASK (0xFF << 2) -#define NV40_VP_INST_ADDR_SWZ_SHIFT 0 -#define NV40_VP_INST_ADDR_SWZ_MASK (0x03 << 0) - -/* ---- OPCODE BITS 95:64 / data DWORD 1 --- */ -#define NV40_VP_INST_OPCODE_SHIFT 22 -#define NV40_VP_INST_OPCODE_MASK (0x3FF << 22) -/*TODO: confirm which source slots correspond to the GL sources, - * renouveau should be correct in most places though.. Also, - * document them here. - */ -# define NV40_VP_INST_OP_NOP 0x000 -# define NV40_VP_INST_OP_MOV 0x001 -# define NV40_VP_INST_OP_MUL 0x002 -# define NV40_VP_INST_OP_ADD 0x003 -# define NV40_VP_INST_OP_MAD 0x004 -# define NV40_VP_INST_OP_DP3 0x005 -# define NV40_VP_INST_OP_DP4 0x007 -# define NV40_VP_INST_OP_DPH 0x006 -# define NV40_VP_INST_OP_DST 0x008 -# define NV40_VP_INST_OP_MIN 0x009 -# define NV40_VP_INST_OP_MAX 0x00A -# define NV40_VP_INST_OP_SLT 0x00B -# define NV40_VP_INST_OP_SGE 0x00C -# define NV40_VP_INST_OP_ARL 0x00D -# define NV40_VP_INST_OP_FRC 0x00E -# define NV40_VP_INST_OP_FLR 0x00F -# define NV40_VP_INST_OP_SEQ 0x010 -# define NV40_VP_INST_OP_SFL 0x011 -# define NV40_VP_INST_OP_SGT 0x012 -# define NV40_VP_INST_OP_SLE 0x013 -# define NV40_VP_INST_OP_SNE 0x014 -# define NV40_VP_INST_OP_STR 0x015 -# define NV40_VP_INST_OP_SSG 0x016 -# define NV40_VP_INST_OP_ARR 0x017 -# define NV40_VP_INST_OP_ARA 0x018 -# define NV40_VP_INST_OP_RCP 0x040 -# define NV40_VP_INST_OP_RCC 0x060 -# define NV40_VP_INST_OP_RSQ 0x080 -# define NV40_VP_INST_OP_EXP 0x0A0 -# define NV40_VP_INST_OP_LOG 0x0C0 -# define NV40_VP_INST_OP_LIT 0x0E0 -# define NV40_VP_INST_OP_BRA 0x120 -# define NV40_VP_INST_OP_CAL 0x160 -# define NV40_VP_INST_OP_RET 0x180 -# define NV40_VP_INST_OP_LG2 0x1A0 -# define NV40_VP_INST_OP_EX2 0x1C0 -# define NV40_VP_INST_OP_COS 0x200 -# define NV40_VP_INST_OP_PUSHA 0x260 -# define NV40_VP_INST_OP_POPA 0x280 -#define NV40_VP_INST_CONST_SRC_SHIFT 12 -#define NV40_VP_INST_CONST_SRC_MASK (0xFF << 12) -#define NV40_VP_INST_INPUT_SRC_SHIFT 8 -#define NV40_VP_INST_INPUT_SRC_MASK (0x0F << 8) -# define NV40_VP_INST_IN_POS 0 /* These seem to match the bindings specified in */ -# define NV40_VP_INST_IN_WEIGHT 1 /* the ARB_v_p spec (2.14.3.1) */ -# define NV40_VP_INST_IN_NORMAL 2 -# define NV40_VP_INST_IN_COL0 3 /* Should probably confirm them all thougth */ -# define NV40_VP_INST_IN_COL1 4 -# define NV40_VP_INST_IN_FOGC 5 -# define NV40_VP_INST_IN_TC0 8 -# define NV40_VP_INST_IN_TC(n) (8+n) -#define NV40_VP_INST_SRC0H_SHIFT 0 -#define NV40_VP_INST_SRC0H_MASK (0xFF << 0) - -/* ---- OPCODE BITS 63:32 / data DWORD 2 --- */ -#define NV40_VP_INST_SRC0L_SHIFT 23 -#define NV40_VP_INST_SRC0L_MASK (0x1FF << 23) -#define NV40_VP_INST_SRC1_SHIFT 6 -#define NV40_VP_INST_SRC1_MASK (0x1FFFF << 6) -#define NV40_VP_INST_SRC2H_SHIFT 0 -#define NV40_VP_INST_SRC2H_MASK (0x3F << 0) -#define NV40_VP_INST_IADDRH_SHIFT 0 -#define NV40_VP_INST_IADDRH_MASK (0x1F << 0) /* guess, need to test this */ -# -/* ---- OPCODE BITS 31:0 / data DWORD 3 --- */ -#define NV40_VP_INST_IADDRL_SHIFT 29 -#define NV40_VP_INST_IADDRL_MASK (7 << 29) -#define NV40_VP_INST_SRC2L_SHIFT 21 -#define NV40_VP_INST_SRC2L_MASK (0x7FF << 21) -/* bits 7-12 seem to always be set to 1 */ -#define NV40_VP_INST_WRITEMASK_SHIFT 13 -#define NV40_VP_INST_WRITEMASK_MASK (0xF << 13) -# define NV40_VP_INST_WRITEMASK_X (1 << 16) -# define NV40_VP_INST_WRITEMASK_Y (1 << 15) -# define NV40_VP_INST_WRITEMASK_Z (1 << 14) -# define NV40_VP_INST_WRITEMASK_W (1 << 13) -#define NV40_VP_INST_DEST_SHIFT 2 -#define NV40_VP_INST_DEST_MASK (31 << 2) -# define NV40_VP_INST_DEST_POS 0 -# define NV40_VP_INST_DEST_COL0 1 -# define NV40_VP_INST_DEST_COL1 2 -# define NV40_VP_INST_DEST_BFC0 3 -# define NV40_VP_INST_DEST_BFC1 4 -# define NV40_VP_INST_DEST_FOGC 5 -# define NV40_VP_INST_DEST_PSZ 6 -# define NV40_VP_INST_DEST_TC0 7 -# define NV40_VP_INST_DEST_TC(n) (7+n) -# define NV40_VP_INST_DEST_TEMP 0x1F /* see NV40_VP_INST0_* for actual register */ -#define NV40_VP_INST_INDEX_CONST (1 << 1) -#define NV40_VP_INST_UNK_00 (1 << 0) /* appears to be set on the last inst only */ - -/* Useful to split the source selection regs into their pieces */ -#define NV40_VP_SRC0_HIGH_SHIFT 9 -#define NV40_VP_SRC0_HIGH_MASK 0x0001FE00 -#define NV40_VP_SRC0_LOW_MASK 0x000001FF -#define NV40_VP_SRC2_HIGH_SHIFT 11 -#define NV40_VP_SRC2_HIGH_MASK 0x0001F800 -#define NV40_VP_SRC2_LOW_MASK 0x000007FF - -/* Source selection - these are the bits you fill NV40_VP_INST_SRCn with */ -#define NV40_VP_SRC_NEGATE 16 -#define NV40_VP_SRC_SWZ_X_SHIFT 14 -#define NV40_VP_SRC_SWZ_X_MASK (3 << 14) -#define NV40_VP_SRC_SWZ_Y_SHIFT 12 -#define NV40_VP_SRC_SWZ_Y_MASK (3 << 12) -#define NV40_VP_SRC_SWZ_Z_SHIFT 10 -#define NV40_VP_SRC_SWZ_Z_MASK (3 << 10) -#define NV40_VP_SRC_SWZ_W_SHIFT 8 -#define NV40_VP_SRC_SWZ_W_MASK (3 << 8) -#define NV40_VP_SRC_SWZ_ALL_SHIFT 8 -#define NV40_VP_SRC_SWZ_ALL_MASK (0xFF << 8) -#define NV40_VP_SRC_TEMP_SRC_SHIFT 2 -#define NV40_VP_SRC_TEMP_SRC_MASK (0x3F << 2) -#define NV40_VP_SRC_REG_TYPE_SHIFT 0 -#define NV40_VP_SRC_REG_TYPE_MASK (3 << 0) -# define NV40_VP_SRC_REG_TYPE_UNK0 0 -# define NV40_VP_SRC_REG_TYPE_TEMP 1 -# define NV40_VP_SRC_REG_TYPE_INPUT 2 -# define NV40_VP_SRC_REG_TYPE_CONST 3 - -/* --- GF6800GT - PCIID 10de:0045 (rev a1) -- - -== Fragment program instruction set - Not FIFO commands, uploaded into a memory buffer. The fragment program has - always appeared in the same map as the texture image data has. Usually it's - the first thing in the map, followed immediately by the textures. -*/ - - -/* - * Each fragment program opcode appears to be comprised of 4 32-bit values. - * - * 0 - Opcode, output reg/mask, ATTRIB source - * 1 - Source 0 - * 2 - Source 1 - * 3 - Source 2 - * - * Constants are inserted directly after the instruction that uses them. - * - * It appears that it's not possible to use two input registers in one - * instruction as the input sourcing is done in the instruction dword - * and not the source selection dwords. As such instructions such as: - * - * ADD result.color, fragment.color, fragment.texcoord[0]; - * - * must be split into two MOV's and then an ADD (nvidia does this) but - * I'm not sure why it's not just one MOV and then source the second input - * in the ADD instruction.. - * - * Negation of the full source is done with NV40_FP_REG_NEGATE, arbitrary - * negation requires multiplication with a const. - * - * Arbitrary swizzling is supported with the exception of SWIZZLE_ZERO/SWIZZLE_ONE - * The temp/result regs appear to be initialised to (0.0, 0.0, 0.0, 0.0) as SWIZZLE_ZERO - * is implemented simply by not writing to the relevant components of the destination. - * - * Non-native instructions: - * LIT - * LRP - MAD+MAD - * SUB - ADD, negate second source - * RSQ - LG2 + EX2 - * POW - LG2 + MUL + EX2 - * SCS - COS + SIN - * XPD - * DP2 - MUL + ADD - */ - -//== Opcode / Destination selection == -#define NV40_FP_OP_PROGRAM_END 0x00000001 -#define NV40_FP_OP_OUT_RESULT (1 << 0) /* uncertain? and what about depth? */ -#define NV40_FP_OP_OUT_REG_SHIFT 1 -#define NV40_FP_OP_OUT_REG_MASK (31 << 1) /* uncertain */ -#define NV40_FP_OP_OUTMASK_SHIFT 9 -#define NV40_FP_OP_OUTMASK_MASK (0xF << 9) -# define NV40_FP_OP_OUT_X (1 << 9) -# define NV40_FP_OP_OUT_Y (1 << 10) -# define NV40_FP_OP_OUT_Z (1 << 11) -# define NV40_FP_OP_OUT_W (1 << 12) -/* Uncertain about these, especially the input_src values.. it's possible that - * they can be dynamically changed. - */ -#define NV40_FP_OP_INPUT_SRC_SHIFT 13 -#define NV40_FP_OP_INPUT_SRC_MASK (15 << 13) -# define NV40_FP_OP_INPUT_SRC_POSITION 0x0 -# define NV40_FP_OP_INPUT_SRC_COL0 0x1 -# define NV40_FP_OP_INPUT_SRC_COL1 0x2 -# define NV40_FP_OP_INPUT_SRC_TC0 0x4 -# define NV40_FP_OP_INPUT_SRC_TC(n) (0x4 + n) -#define NV40_FP_OP_TEX_UNIT_SHIFT 17 -#define NV40_FP_OP_TEX_UNIT_MASK (0xF << 17) /* guess */ -#define NV40_FP_OP_PRECISION_SHIFT 22 -#define NV40_FP_OP_PRECISION_MASK (3 << 22) -# define NV40_FP_PRECISION_FP32 0 -# define NV40_FP_PRECISION_FP16 1 -# define NV40_FP_PRECISION_FX12 2 -#define NV40_FP_OP_OPCODE_SHIFT 24 -#define NV40_FP_OP_OPCODE_MASK (0x7F << 24) -# define NV40_FP_OP_OPCODE_MOV 0x01 -# define NV40_FP_OP_OPCODE_MUL 0x02 -# define NV40_FP_OP_OPCODE_ADD 0x03 -# define NV40_FP_OP_OPCODE_MAD 0x04 -# define NV40_FP_OP_OPCODE_DP3 0x05 -# define NV40_FP_OP_OPCODE_DP4 0x06 -# define NV40_FP_OP_OPCODE_DST 0x07 -# define NV40_FP_OP_OPCODE_MIN 0x08 -# define NV40_FP_OP_OPCODE_MAX 0x09 -# define NV40_FP_OP_OPCODE_SLT 0x0A -# define NV40_FP_OP_OPCODE_SGE 0x0B -# define NV40_FP_OP_OPCODE_SLE 0x0C -# define NV40_FP_OP_OPCODE_SGT 0x0D -# define NV40_FP_OP_OPCODE_SNE 0x0E -# define NV40_FP_OP_OPCODE_SEQ 0x0F -# define NV40_FP_OP_OPCODE_FRC 0x10 -# define NV40_FP_OP_OPCODE_FLR 0x11 -# define NV40_FP_OP_OPCODE_TEX 0x17 -# define NV40_FP_OP_OPCODE_TXP 0x18 -# define NV40_FP_OP_OPCODE_RCP 0x1A -# define NV40_FP_OP_OPCODE_EX2 0x1C -# define NV40_FP_OP_OPCODE_LG2 0x1D -# define NV40_FP_OP_OPCODE_COS 0x22 -# define NV40_FP_OP_OPCODE_SIN 0x23 -# define NV40_FP_OP_OPCODE_DP2A 0x2E -# define NV40_FP_OP_OPCODE_TXB 0x31 -# define NV40_FP_OP_OPCODE_DIV 0x3A -#define NV40_FP_OP_OUT_SAT (1 << 31) - -/* high order bits of SRC0 */ -#define NV40_FP_OP_OUT_ABS (1 << 29) -#define NV40_FP_OP_COND_SWZ_W_SHIFT 27 -#define NV40_FP_OP_COND_SWZ_W_MASK (3 << 27) -#define NV40_FP_OP_COND_SWZ_Z_SHIFT 25 -#define NV40_FP_OP_COND_SWZ_Z_MASK (3 << 25) -#define NV40_FP_OP_COND_SWZ_Y_SHIFT 23 -#define NV40_FP_OP_COND_SWZ_Y_MASK (3 << 23) -#define NV40_FP_OP_COND_SWZ_X_SHIFT 21 -#define NV40_FP_OP_COND_SWZ_X_MASK (3 << 21) -#define NV40_FP_OP_COND_SWZ_ALL_SHIFT 21 -#define NV40_FP_OP_COND_SWZ_ALL_MASK (0xFF << 21) -#define NV40_FP_OP_COND_SHIFT 18 -#define NV40_FP_OP_COND_MASK (0x07 << 18) -# define NV40_FP_OP_COND_FL 0 -# define NV40_FP_OP_COND_LT 1 -# define NV40_FP_OP_COND_EQ 2 -# define NV40_FP_OP_COND_LE 3 -# define NV40_FP_OP_COND_GT 4 -# define NV40_FP_OP_COND_NE 5 -# define NV40_FP_OP_COND_GE 6 -# define NV40_FP_OP_COND_TR 7 - -/* high order bits of SRC1 */ -#define NV40_FP_OP_SRC_SCALE_SHIFT 28 -#define NV40_FP_OP_SRC_SCALE_MASK (3 << 28) - -//== Register selection == -#define NV40_FP_REG_SRC_INPUT (1 << 0) /* uncertain */ -#define NV40_FP_REG_SRC_CONST (1 << 1) -#define NV40_FP_REG_SRC_SHIFT 2 /* uncertain */ -#define NV40_FP_REG_SRC_MASK (31 << 2) -#define NV40_FP_REG_UNK_0 (1 << 8) -#define NV40_FP_REG_SWZ_ALL_SHIFT 9 -#define NV40_FP_REG_SWZ_ALL_MASK (255 << 9) -#define NV40_FP_REG_SWZ_X_SHIFT 9 -#define NV40_FP_REG_SWZ_X_MASK (3 << 9) -#define NV40_FP_REG_SWZ_Y_SHIFT 11 -#define NV40_FP_REG_SWZ_Y_MASK (3 << 11) -#define NV40_FP_REG_SWZ_Z_SHIFT 13 -#define NV40_FP_REG_SWZ_Z_MASK (3 << 13) -#define NV40_FP_REG_SWZ_W_SHIFT 15 -#define NV40_FP_REG_SWZ_W_MASK (3 << 15) -# define NV40_FP_SWIZZLE_X 0 -# define NV40_FP_SWIZZLE_Y 1 -# define NV40_FP_SWIZZLE_Z 2 -# define NV40_FP_SWIZZLE_W 3 -#define NV40_FP_REG_NEGATE (1 << 17) - -#endif diff --git a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c b/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c deleted file mode 100644 index 8bdacb89e7..0000000000 --- a/src/mesa/drivers/dri/nouveau/nv40_vtxprog.c +++ /dev/null @@ -1,752 +0,0 @@ -#include "glheader.h" -#include "macros.h" -#include "enums.h" -#include "program.h" -#include "program_instruction.h" - -#include "nouveau_reg.h" -#include "nouveau_shader.h" -#include "nouveau_msg.h" - -#include "nv40_reg.h" - -/* TODO: - * - Implement support for constants - * - Handle SWZ with 0/1 components and partial negate masks - * - Handle ARB_position_invarient - * - Relative register addressing - * - Implement any missing instructions - * - Fix scalar instructions (the other "writemask") - */ - -static int t_dst_mask(int mask); - -static int -alloc_hw_temp(nouveau_vertex_program *vp) -{ - return nvsAllocIndex(vp->hwtemps_in_use, 64); -} - -static void -free_hw_temp(nouveau_vertex_program *vp, int id) -{ - nvsBitClear(vp->hwtemps_in_use, id); -} - -static int -alloc_temp(nouveau_vertex_program *vp) -{ - int idx; - - idx = nvsAllocIndex(vp->temps_in_use, 64); - if (!idx) - return -1; - - vp->temps[idx].file = HW_TEMP; - vp->temps[idx].hw_id = -1; - vp->temps[idx].ref = -1; - - return idx; -} - -static void -free_temp(nouveau_vertex_program *vp, nouveau_srcreg *temp) -{ - if (!temp) return; - - if (vp->temps[temp->idx].hw_id != -1) - free_hw_temp(vp, vp->temps[temp->idx].hw_id); - nvsBitClear(vp->temps_in_use, temp->idx); -} - -static void -make_srcreg(nouveau_vertex_program *vp, - nouveau_srcreg *src, - nouveau_regtype type, - int id) -{ - switch (type) { - case HW_INPUT: - src->hw = NULL; - src->idx = id; - break; - case HW_TEMP: - src->hw = &vp->temps[id]; - src->idx = id; - break; - case HW_CONST: - //FIXME: TODO - break; - default: - assert(0); - break; - } - - src->negate = 0; - src->swizzle = 0x1B /* 00011011 - XYZW */; -} - -static void -make_dstreg(nouveau_vertex_program *vp, - nouveau_dstreg *dest, - nouveau_regtype type, - int id) -{ - if (type == HW_TEMP && id == -1) - dest->idx = alloc_temp(vp); - else - dest->idx = id; - switch (type) { - case HW_TEMP: - dest->idx = id; - if (dest->idx == -1) - dest->idx = alloc_temp(vp); - dest->hw = &vp->temps[dest->idx]; - break; - case HW_OUTPUT: - dest->hw = NULL; - dest->idx = id; - break; - default: - assert(0); - break; - } - - dest->mask = t_dst_mask(WRITEMASK_XYZW); - dest->condup = 0; - dest->condreg = 0; - dest->condtest = NV40_VP_INST_COND_TR; - dest->condswz = 0x1B /* 00011011 - XYZW */; -} - -static unsigned int -src_to_hw(nouveau_vertex_program *vp, nouveau_srcreg *src, - unsigned int *is, unsigned int *cs) -{ - unsigned int hs = 0; - - if (!src) { - /* unused sources seem to be INPUT swz XYZW, dont't know if this - * actually matters or not... - */ - hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); - hs |= (0x1B << NV40_VP_SRC_SWZ_ALL_SHIFT); - return hs; - } - - if (!src->hw) { /* this is a forced read from a "real" hardware source */ - *is = src->idx; - hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); - } else { - switch (src->hw->file) { - case HW_INPUT: - if (*is != -1) { - fprintf(stderr, "multiple inputs detected... not good\n"); - return; - } - *is = src->hw->hw_id; - hs |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); - break; - case HW_CONST: - if (*cs != -1) { - fprintf(stderr, "multiple consts detected... not good\n"); - return; - } - *cs = src->hw->hw_id; - hs |= (NV40_VP_SRC_REG_TYPE_CONST << NV40_VP_SRC_REG_TYPE_SHIFT); - break; - case HW_TEMP: - if (src->hw->hw_id == -1) { - fprintf(stderr, "read from unwritten temp!\n"); - return; - } - hs |= (NV40_VP_SRC_REG_TYPE_TEMP << NV40_VP_SRC_REG_TYPE_SHIFT) | - (src->hw->hw_id << NV40_VP_SRC_TEMP_SRC_SHIFT); - - if (--src->hw->ref == 0) - free_hw_temp(vp, src->hw->hw_id); - } - } - - hs |= (src->swizzle << NV40_VP_SRC_SWZ_ALL_SHIFT); - if (src->negate) - hs |= NV40_VP_SRC_NEGATE; - - return hs; -} - -static void -instruction_store(nouveau_vertex_program *vp, unsigned int inst[]) -{ - if ((vp->inst_count+1) > vp->insns_alloced) { - vp->insns = realloc(vp->insns, sizeof(unsigned int) * (vp->inst_count+1) * 4); - vp->insns_alloced = vp->inst_count+1; - } - vp->insns[(vp->inst_count*4) + 0] = inst[0]; - vp->insns[(vp->inst_count*4) + 1] = inst[1]; - vp->insns[(vp->inst_count*4) + 2] = inst[2]; - vp->insns[(vp->inst_count*4) + 3] = inst[3]; - vp->inst_count++; -} - -static void -emit_arith(nouveau_vertex_program *vp, int op, - nouveau_dstreg *dest, - nouveau_srcreg *src0, - nouveau_srcreg *src1, - nouveau_srcreg *src2, - int flags) -{ - nouveau_regrec *hwdest = dest->hw; - unsigned int hs0, hs1, hs2; - unsigned int hop[4] = { 0, 0, 0, 0 }; - int insrc = -1, constsrc = -1; - - /* Calculate source reg state */ - hs0 = src_to_hw(vp, src0, &insrc, &constsrc); - hs1 = src_to_hw(vp, src1, &insrc, &constsrc); - hs2 = src_to_hw(vp, src2, &insrc, &constsrc); - - /* Append it to the instruction */ - hop[1] |= (((hs0 & NV40_VP_SRC0_HIGH_MASK) >> NV40_VP_SRC0_HIGH_SHIFT) - << NV40_VP_INST_SRC0H_SHIFT); - hop[2] |= ((hs0 & NV40_VP_SRC0_LOW_MASK) << NV40_VP_INST_SRC0L_SHIFT) | - (hs1 << NV40_VP_INST_SRC1_SHIFT) | - (((hs2 & NV40_VP_SRC2_HIGH_MASK) >> NV40_VP_SRC2_HIGH_SHIFT) - << NV40_VP_INST_SRC2H_SHIFT); - hop[3] |= (hs2 & NV40_VP_SRC2_LOW_MASK) << NV40_VP_INST_SRC2L_SHIFT; - - /* bits 127:96 */ - hop[0] |= (dest->condtest << NV40_VP_INST_COND_SHIFT) | - (dest->condswz << NV40_VP_INST_COND_SWZ_ALL_SHIFT); - if (dest->condtest != NV40_VP_INST_COND_TR) - hop[0] |= NV40_VP_INST_COND_TEST_ENABLE; - if (dest->condreg) hop[0] |= NV40_VP_INST_COND_REG_SELECT_1; - if (dest->condup ) hop[0] |= NV40_VP_INST_COND_UPDATE_ENABLE; - - if (hwdest == NULL /* write output */) - hop[0] |= NV40_VP_INST0_UNK0; - else { - if (hwdest->hw_id == -1) - hwdest->hw_id = alloc_hw_temp(vp); - - hop[0] |= (hwdest->hw_id << NV40_VP_INST_DEST_TEMP_SHIFT); - if (flags & NOUVEAU_OUT_ABS) - hop[0] |= NV40_VP_INST_DEST_TEMP_ABS; - - nvsBitSet(vp->hwtemps_written, hwdest->hw_id); - if (--hwdest->ref == 0) - free_hw_temp(vp, hwdest->hw_id); - } - - /* bits 95:64 */ - if (constsrc == -1) constsrc = 0; - if (insrc == -1) insrc = 0; - - constsrc &= 0xFF; - insrc &= 0x0F; - hop[1] |= (op << NV40_VP_INST_OPCODE_SHIFT) | - (constsrc << NV40_VP_INST_CONST_SRC_SHIFT) | - (insrc << NV40_VP_INST_INPUT_SRC_SHIFT); - - /* bits 31:0 */ - if (hwdest == NULL) { - hop[3] |= (dest->mask | (dest->idx << NV40_VP_INST_DEST_SHIFT)); - } else { - hop[3] |= (dest->mask | (NV40_VP_INST_DEST_TEMP << NV40_VP_INST_DEST_SHIFT)); - } - hop[3] |= (0x3F << 7); /*FIXME: what is this?*/ - - printf("0x%08x\n", hop[0]); - printf("0x%08x\n", hop[1]); - printf("0x%08x\n", hop[2]); - printf("0x%08x\n", hop[3]); - - instruction_store(vp, hop); -} - -static int -t_swizzle(GLuint swz) -{ - int x, y, z, w; - x = GET_SWZ(swz, 0); - y = GET_SWZ(swz, 1); - z = GET_SWZ(swz, 2); - w = GET_SWZ(swz, 3); - - if ((xFile) { - case PROGRAM_TEMPORARY: - ns->hw = &vp->temps[src->Index]; - break; - case PROGRAM_INPUT: - ns->hw = &vp->inputs[src->Index]; - break; - default: - fprintf(stderr, "Unhandled source register file!\n"); - break; - } - - ns->swizzle = t_swizzle(src->Swizzle); - if ((src->NegateBase != 0xF && src->NegateBase != 0x0) || - ns->swizzle == -1) { - WARN_ONCE("Unhandled source swizzle/negate, results will be incorrect\n"); - ns->swizzle = 0x1B; // 00 01 10 11 - XYZW - ns->negate = (src->NegateBase) ? 1 : 0; - } else - ns->negate = (src->NegateBase) ? 1 : 0; - -} - -static int -t_dst_mask(int mask) -{ - int hwmask = 0; - - if (mask & WRITEMASK_X) hwmask |= NV40_VP_INST_WRITEMASK_X; - if (mask & WRITEMASK_Y) hwmask |= NV40_VP_INST_WRITEMASK_Y; - if (mask & WRITEMASK_Z) hwmask |= NV40_VP_INST_WRITEMASK_Z; - if (mask & WRITEMASK_W) hwmask |= NV40_VP_INST_WRITEMASK_W; - - return hwmask; -} - -static int -t_dst_index(int idx) -{ - int hwidx; - - switch (idx) { - case VERT_RESULT_HPOS: - return NV40_VP_INST_DEST_POS; - case VERT_RESULT_COL0: - return NV40_VP_INST_DEST_COL0; - case VERT_RESULT_COL1: - return NV40_VP_INST_DEST_COL1; - case VERT_RESULT_FOGC: - return NV40_VP_INST_DEST_FOGC; - case VERT_RESULT_TEX0: - case VERT_RESULT_TEX1: - case VERT_RESULT_TEX2: - case VERT_RESULT_TEX3: - case VERT_RESULT_TEX4: - case VERT_RESULT_TEX5: - case VERT_RESULT_TEX6: - case VERT_RESULT_TEX7: - return NV40_VP_INST_DEST_TC(idx - VERT_RESULT_TEX0); - case VERT_RESULT_PSIZ: - return NV40_VP_INST_DEST_PSZ; - case VERT_RESULT_BFC0: - return NV40_VP_INST_DEST_BFC0; - case VERT_RESULT_BFC1: - return NV40_VP_INST_DEST_BFC1; - default: - fprintf(stderr, "Unknown result reg index!\n"); - return -1; - } -} - -static int -t_cond_test(GLuint test) -{ - switch(test) { - case COND_GT: return NV40_VP_INST_COND_GT; - case COND_EQ: return NV40_VP_INST_COND_EQ; - case COND_LT: return NV40_VP_INST_COND_LT; - case COND_GE: return NV40_VP_INST_COND_GE; - case COND_LE: return NV40_VP_INST_COND_LE; - case COND_NE: return NV40_VP_INST_COND_NE; - case COND_TR: return NV40_VP_INST_COND_TR; - case COND_FL: return NV40_VP_INST_COND_FL; - default: - WARN_ONCE("unknown CondMask!\n"); - return -1; - } -} - -#define ARITH_1OP(op) do { \ - t_src_reg(vp, &vpi->SrcReg[0], &src0); \ - emit_arith(vp, op, &dest, &src0, NULL, NULL, 0); \ -} while(0); -#define ARITH_1OP_SCALAR(op) do { \ - t_src_reg(vp, &vpi->SrcReg[0], &src0); \ - emit_arith(vp, op, &dest, NULL, NULL, &src0, 0); \ -} while(0); -#define ARITH_2OP(op) do { \ - t_src_reg(vp, &vpi->SrcReg[0], &src0); \ - t_src_reg(vp, &vpi->SrcReg[1], &src1); \ - emit_arith(vp, op, &dest, &src0, &src1, NULL, 0); \ -} while(0); -#define ARITH_3OP(op) do { \ - t_src_reg(vp, &vpi->SrcReg[0], &src0); \ - t_src_reg(vp, &vpi->SrcReg[1], &src1); \ - t_src_reg(vp, &vpi->SrcReg[2], &src2); \ - emit_arith(vp, op, &dest, &src0, &src1, &src2, 0); \ -} while(0); - -static int -translate(nouveau_vertex_program *vp) -{ - struct vertex_program *mvp = &vp->mesa_program; - struct prog_instruction *vpi; - - - for (vpi=mvp->Base.Instructions; vpi->Opcode!=OPCODE_END; vpi++) { - nouveau_srcreg src0, src1, src2, sT0; - nouveau_dstreg dest, dT0; - - switch (vpi->DstReg.File) { - case PROGRAM_OUTPUT: - make_dstreg(vp, &dest, HW_OUTPUT, t_dst_index(vpi->DstReg.Index)); - break; - case PROGRAM_TEMPORARY: - make_dstreg(vp, &dest, HW_TEMP, vpi->DstReg.Index); - break; - default: - assert(0); - } - dest.mask = t_dst_mask(vpi->DstReg.WriteMask); - dest.condtest = t_cond_test(vpi->DstReg.CondMask); - dest.condswz = t_swizzle(vpi->DstReg.CondSwizzle); - dest.condreg = vpi->DstReg.CondSrc; - - switch (vpi->Opcode) { - /* ARB_vertex_program requirements */ - case OPCODE_ABS: - t_src_reg(vp, &vpi->SrcReg[0], &src0); - emit_arith(vp, NV40_VP_INST_OP_MOV, &dest, - &src0, NULL, NULL, - NOUVEAU_OUT_ABS - ); - break; - case OPCODE_ADD: - t_src_reg(vp, &vpi->SrcReg[0], &src0); - t_src_reg(vp, &vpi->SrcReg[1], &src1); - emit_arith(vp, NV40_VP_INST_OP_ADD, &dest, - &src0, NULL, &src1, - 0 - ); - break; - case OPCODE_ARL: - break; - case OPCODE_DP3: - ARITH_2OP(NV40_VP_INST_OP_DP3); - break; - case OPCODE_DP4: - ARITH_2OP(NV40_VP_INST_OP_DP4); - break; - case OPCODE_DPH: - ARITH_2OP(NV40_VP_INST_OP_DPH); - break; - case OPCODE_DST: - ARITH_2OP(NV40_VP_INST_OP_DST); - break; - case OPCODE_EX2: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_EX2); - break; - case OPCODE_EXP: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_EXP); - break; - case OPCODE_FLR: - ARITH_1OP(NV40_VP_INST_OP_FLR); - break; - case OPCODE_FRC: - ARITH_1OP(NV40_VP_INST_OP_FRC); - break; - case OPCODE_LG2: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_LG2); - break; - case OPCODE_LIT: - t_src_reg(vp, &vpi->SrcReg[0], &src0); - t_src_reg(vp, &vpi->SrcReg[1], &src1); - t_src_reg(vp, &vpi->SrcReg[2], &src2); - emit_arith(vp, NV40_VP_INST_OP_LIT, &dest, - &src0, &src1, &src2, - 0 - ); - break; - case OPCODE_LOG: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_LOG); - break; - case OPCODE_MAD: - ARITH_3OP(NV40_VP_INST_OP_MAD); - break; - case OPCODE_MAX: - ARITH_2OP(NV40_VP_INST_OP_MAX); - break; - case OPCODE_MIN: - ARITH_2OP(NV40_VP_INST_OP_MIN); - break; - case OPCODE_MOV: - ARITH_1OP(NV40_VP_INST_OP_MOV); - break; - case OPCODE_MUL: - ARITH_2OP(NV40_VP_INST_OP_MOV); - break; - case OPCODE_POW: - t_src_reg(vp, &vpi->SrcReg[0], &src0); - t_src_reg(vp, &vpi->SrcReg[1], &src1); - make_dstreg(vp, &dT0, HW_TEMP, -1); - make_srcreg(vp, &sT0, HW_TEMP, dT0.idx); - - dT0.mask = t_dst_mask(WRITEMASK_X); - emit_arith(vp, NV40_VP_INST_OP_LG2, &dT0, - NULL, NULL, &src0, - 0); - sT0.swizzle = 0x0; /* 00000000 - XXXX */ - emit_arith(vp, NV40_VP_INST_OP_MUL, &dT0, - &sT0, &src1, NULL, - 0); - emit_arith(vp, NV40_VP_INST_OP_EX2, &dest, - NULL, NULL, &sT0, - 0); - break; - case OPCODE_RCP: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_RCP); - break; - case OPCODE_RSQ: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_RSQ); - break; - case OPCODE_SGE: - ARITH_2OP(NV40_VP_INST_OP_SGE); - break; - case OPCODE_SLT: - ARITH_2OP(NV40_VP_INST_OP_SLT); - break; - case OPCODE_SUB: - t_src_reg(vp, &vpi->SrcReg[0], &src0); - t_src_reg(vp, &vpi->SrcReg[1], &src1); - src1.negate = !src1.negate; - - emit_arith(vp, NV40_VP_INST_OP_ADD, &dest, - &src0, NULL, &src1, - 0 - ); - break; - case OPCODE_SWZ: - ARITH_1OP(NV40_VP_INST_OP_MOV); - break; - - case OPCODE_XPD: - break; - /* NV_vertex_program3 requirements */ - case OPCODE_SEQ: - ARITH_2OP(NV40_VP_INST_OP_SEQ); - break; - case OPCODE_SFL: - ARITH_2OP(NV40_VP_INST_OP_SFL); - break; - case OPCODE_SGT: - ARITH_2OP(NV40_VP_INST_OP_SGT); - break; - case OPCODE_SLE: - ARITH_2OP(NV40_VP_INST_OP_SLE); - break; - case OPCODE_SNE: - ARITH_2OP(NV40_VP_INST_OP_SNE); - break; - case OPCODE_STR: - ARITH_2OP(NV40_VP_INST_OP_STR); - break; - case OPCODE_SSG: - ARITH_1OP(NV40_VP_INST_OP_SSG); - break; - case OPCODE_ARL_NV: - break; - case OPCODE_ARR: - break; - case OPCODE_ARA: - break; - case OPCODE_RCC: - ARITH_1OP_SCALAR(NV40_VP_INST_OP_SSG); - break; - case OPCODE_BRA: - break; - case OPCODE_CAL: - break; - case OPCODE_RET: - break; - case OPCODE_PUSHA: - break; - case OPCODE_POPA: - break; - default: - break; - } - } - - return 0; -} - -/* Pre-init vertex program - * - Grab reference counts on temps - * - Where multiple inputs are used in a single instruction, - * emit instructions to move the extras into temps - */ -static int -init(nouveau_vertex_program *vp) -{ - struct vertex_program *mvp = &vp->mesa_program; - struct prog_instruction *vpi; - int i; - - nvsRecInit(&vp->temps_in_use, 64); - nvsRecInit(&vp->hwtemps_written, 64); - nvsRecInit(&vp->hwtemps_in_use , 64); - - for (vpi=mvp->Base.Instructions; vpi->Opcode!=OPCODE_END; vpi++) { - int in_done = 0; - int in_idx; - - for (i=0;i<3;i++) { - struct prog_src_register *src = &vpi->SrcReg[i]; - /*FIXME: does not handle relative addressing!*/ - int idx = src->Index; - - switch (src->File) { - case PROGRAM_TEMPORARY: - vp->temps[idx].file = HW_TEMP; - vp->temps[idx].hw_id = -1; - vp->temps[idx].ref++; - nvsBitSet(vp->temps_in_use, idx); - break; - case PROGRAM_INPUT: - if (vp->inputs[idx].file == HW_TEMP) { - vp->inputs[idx].ref++; - break; - } - - if (!in_done || (in_idx == idx)) { - vp->inputs[idx].file = HW_INPUT; - vp->inputs[idx].hw_id = idx; - vp->inputs[idx].ref++; - in_done = 1; - in_idx = idx; - } else { - vp->inputs[idx].file = HW_TEMP; - vp->inputs[idx].ref++; - } - break; - default: - break; - } - } - - switch (vpi->DstReg.File) { - case PROGRAM_TEMPORARY: - vp->temps[vpi->DstReg.Index].file = HW_TEMP; - vp->temps[vpi->DstReg.Index].hw_id = -1; - vp->temps[vpi->DstReg.Index].ref++; - nvsBitSet(vp->temps_in_use, vpi->DstReg.Index); - break; - default: - break; - } - } - - /* Now we can move any inputs that need it into temps */ - for (i=0; i<14; i++) { - if (vp->inputs[i].file == HW_TEMP) { - nouveau_srcreg src; - nouveau_dstreg dest; - - make_dstreg(vp, &dest, HW_TEMP , -1); - make_srcreg(vp, &src , HW_INPUT, i); - - emit_arith(vp, NV40_VP_INST_OP_MOV, &dest, - &src, NULL, NULL, - 0 - ); - - vp->inputs[i].file = HW_TEMP; - vp->inputs[i].hw_id = dest.hw->hw_id; - } - } - - return 0; -} - -int -nv40TranslateVertexProgram(nouveau_vertex_program *vp) -{ - int ret; - - ret = init(vp); - if (ret) - return ret; - - ret = translate(vp); - if (ret) - return ret; - - return 0; -} - -int -main(int argc, char **argv) -{ - nouveau_vertex_program *vp = calloc(1, sizeof(nouveau_vertex_program)); - struct vertex_program *mvp = &vp->mesa_program; - struct prog_instruction inst[3]; - - /* - "ADD t0, vertex.color, vertex.position;\n" - "ADD result.position, t0, vertex.position;\n" - */ - - inst[0].Opcode = OPCODE_ADD; - inst[0].SrcReg[0].File = PROGRAM_INPUT; - inst[0].SrcReg[0].Index = VERT_ATTRIB_COLOR0; - inst[0].SrcReg[0].NegateBase = 0; - inst[0].SrcReg[0].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); - inst[0].SrcReg[1].File = PROGRAM_INPUT; - inst[0].SrcReg[1].Index = VERT_ATTRIB_POS; - inst[0].SrcReg[1].NegateBase = 0; - inst[0].SrcReg[1].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); - inst[0].SrcReg[2].File = PROGRAM_UNDEFINED; - inst[0].DstReg.File = PROGRAM_TEMPORARY; - inst[0].DstReg.Index = 0; - inst[0].DstReg.WriteMask = WRITEMASK_XYZW; - inst[0].DstReg.CondMask = COND_TR; - inst[0].DstReg.CondSwizzle = MAKE_SWIZZLE4(0, 1, 2, 3); - inst[0].DstReg.CondSrc = 0; - inst[0].CondUpdate = 0; - inst[0].CondDst = 0; - - inst[1].Opcode = OPCODE_ADD; - inst[1].SrcReg[0].File = PROGRAM_TEMPORARY; - inst[1].SrcReg[0].Index = 0; - inst[1].SrcReg[0].NegateBase = 0; - inst[1].SrcReg[0].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); - inst[1].SrcReg[1].File = PROGRAM_INPUT; - inst[1].SrcReg[1].Index = VERT_ATTRIB_POS; - inst[1].SrcReg[1].NegateBase = 0; - inst[1].SrcReg[1].Swizzle = MAKE_SWIZZLE4(0, 1, 2, 3); - inst[0].SrcReg[2].File = PROGRAM_UNDEFINED; - inst[1].DstReg.File = PROGRAM_OUTPUT; - inst[1].DstReg.Index = VERT_RESULT_HPOS; - inst[1].DstReg.WriteMask = WRITEMASK_XYZW; - inst[1].DstReg.CondMask = COND_TR; - inst[1].DstReg.CondSwizzle = MAKE_SWIZZLE4(0, 1, 2, 3); - inst[1].DstReg.CondSrc = 0; - inst[1].CondUpdate = 0; - inst[1].CondDst = 0; - - inst[2].Opcode = OPCODE_END; - - mvp->Base.Instructions = inst; - - nv40TranslateVertexProgram(vp); -} - -- cgit v1.2.3 From 2581ba7f1e0352ad7ed5e863647a545a0eec851c Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Wed, 1 Nov 2006 02:44:27 +0000 Subject: Fix compile errors. Add vblank_seq to nouveau_context. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 3ca5edf782..4bb4116026 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -188,7 +188,7 @@ GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv, nouveauContextPtr oldNOUVEAUCtx = ctx ? NOUVEAU_CONTEXT(ctx) : NULL; nouveauContextPtr newNOUVEAUCtx = (nouveauContextPtr) driContextPriv->driverPrivate; - driDrawableInitVBlank( driDrawPriv, newNOUVEAUCtx->vblank_flags ); + driDrawableInitVBlank(driDrawPriv, newNOUVEAUCtx->vblank_flags, &newNOUVEAUCtx->vblank_seq ); newNOUVEAUCtx->driDrawable = driDrawPriv; _mesa_make_current( newNOUVEAUCtx->glCtx, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c index ce55373934..3f6e3076e2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c @@ -39,9 +39,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. void nouveauIoctlInitFifo(nouveauContextPtr nmesa) { int ret; - drm_nouveau_fifo_init_t fifo_init; + drm_nouveau_fifo_alloc_t fifo_init; - ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_INIT, &fifo_init, sizeof(fifo_init)); + ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_ALLOC, &fifo_init, sizeof(fifo_init)); if (ret) FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); -- cgit v1.2.3 From 2d2d617dbc17817f214e0b523f929de1f5d8f48a Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Wed, 1 Nov 2006 02:45:12 +0000 Subject: Oops. Forgot to check in the context change. --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index c5783993c7..21aa1a6313 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -129,7 +129,9 @@ typedef struct nouveau_context { /* Configuration cache */ driOptionCache optionCache; + /* vblank stuff */ uint32_t vblank_flags; + uint32_t vblank_seq; GLuint new_state; GLuint new_render_state; -- cgit v1.2.3 From 1ebe921228ef896804384002d8a3acd0885afc98 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Wed, 1 Nov 2006 02:48:34 +0000 Subject: Added OUT_RING* debugging macros. Compile with NOUVEAU_RING_DEBUG to use. --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index bf528a24ca..95c78b5675 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -48,9 +48,28 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * - WAIT_RING waits for size (in uint32_ts) to be available in the fifo */ +/* Enable for ring debugging. Prints out writes to the ring buffer + * but does not actually write to it. + */ +#ifdef NOUVEAU_RING_DEBUG + +#define OUT_RINGp(ptr,sz) do { \ +int i; printf("OUT_RINGp:\n"); for(i=0;ififo.buffer+nmesa->fifo.current,ptr,sz); \ - nmesa->fifo.current+=sz; \ + nmesa->fifo.current+=(sz/sizeof(*ptr)); \ }while(0) #define OUT_RING(n) do { \ @@ -61,6 +80,8 @@ nmesa->fifo.buffer[nmesa->fifo.current++]=n; \ *((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=n; \ }while(0) +#endif + extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); #define BEGIN_RING_PRIM(subchannel,tag,size) do { \ -- cgit v1.2.3 From 467c773f798516f86425c14fe8406298e00baba1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 00:41:40 +0000 Subject: Add ATI_separate_stencil and use it in preference to EXT_stencil_two_side since the former is what's used for OpenGL 2.0. --- src/mesa/main/extensions.c | 7 +++- src/mesa/main/getstring.c | 4 +- src/mesa/main/mtypes.h | 1 + src/mesa/main/stencil.c | 101 ++++++++++++++++++++++----------------------- 4 files changed, 57 insertions(+), 56 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 5edf9a7dd6..39f8e26f57 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -135,6 +135,7 @@ static const struct { { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)}, { OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)}, { OFF, "GL_ATI_fragment_shader", F(ATI_fragment_shader)}, + { OFF, "GL_ATI_separate_stencil", F(ATI_separate_stencil)}, { OFF, "GL_IBM_multimode_draw_arrays", F(IBM_multimode_draw_arrays) }, { ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) }, { OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)}, @@ -222,6 +223,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) #endif ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE; ctx->Extensions.ATI_texture_mirror_once = GL_TRUE; + ctx->Extensions.ATI_separate_stencil = GL_TRUE; ctx->Extensions.EXT_blend_color = GL_TRUE; ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; ctx->Extensions.EXT_blend_func_separate = GL_TRUE; @@ -249,7 +251,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.EXT_secondary_color = GL_TRUE; ctx->Extensions.EXT_shared_texture_palette = GL_TRUE; ctx->Extensions.EXT_stencil_wrap = GL_TRUE; - ctx->Extensions.EXT_stencil_two_side = GL_TRUE; + ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */ ctx->Extensions.EXT_texture_env_add = GL_TRUE; ctx->Extensions.EXT_texture_env_combine = GL_TRUE; ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; @@ -388,7 +390,8 @@ _mesa_enable_2_0_extensions(GLcontext *ctx) #if FEATURE_ARB_shading_language_100 ctx->Extensions.ARB_shading_language_100 = GL_TRUE; #endif - ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* yes, turn it off */ + ctx->Extensions.ATI_separate_stencil = GL_TRUE; + ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */ #if FEATURE_ARB_vertex_shader ctx->Extensions.ARB_vertex_shader = GL_TRUE; #endif diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index a68bf9ff74..f2989aaefa 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -54,7 +54,7 @@ _mesa_GetString( GLenum name ) static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING; static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING; static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING; - static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING;/*XXX FIX*/ + static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING; #if FEATURE_ARB_shading_language_100 static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING; @@ -111,7 +111,7 @@ _mesa_GetString( GLenum name ) if (ctx->Extensions.ARB_draw_buffers && ctx->Extensions.ARB_point_sprite && ctx->Extensions.ARB_texture_non_power_of_two && - ctx->Extensions.EXT_stencil_two_side) { + ctx->Extensions.ATI_separate_stencil) { return (const GLubyte *) version_2_0; } else { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1399dddf50..337b0d2720 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2477,6 +2477,7 @@ struct gl_extensions GLboolean ATI_texture_mirror_once; GLboolean ATI_texture_env_combine3; GLboolean ATI_fragment_shader; + GLboolean ATI_separate_stencil; GLboolean IBM_rasterpos_clip; GLboolean IBM_multimode_draw_arrays; GLboolean MESA_pack_invert; diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c index 9992ec9b6e..d6be410e76 100644 --- a/src/mesa/main/stencil.c +++ b/src/mesa/main/stencil.c @@ -115,23 +115,7 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) ref = CLAMP( ref, 0, stencilMax ); - if (ctx->Extensions.EXT_stencil_two_side) { - /* only set active face state */ - const GLint face = ctx->Stencil.ActiveFace; - if (ctx->Stencil.Function[face] == func && - ctx->Stencil.ValueMask[face] == mask && - ctx->Stencil.Ref[face] == ref) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.Function[face] = func; - ctx->Stencil.Ref[face] = ref; - ctx->Stencil.ValueMask[face] = mask; - if (ctx->Driver.StencilFuncSeparate) { - ctx->Driver.StencilFuncSeparate(ctx, face ? GL_BACK : GL_FRONT, - func, ref, mask); - } - } - else { + if (ctx->Extensions.ATI_separate_stencil) { /* set both front and back state */ if (ctx->Stencil.Function[0] == func && ctx->Stencil.Function[1] == func && @@ -149,6 +133,22 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) func, ref, mask); } } + else { + /* only set active face state */ + const GLint face = ctx->Stencil.ActiveFace; + if (ctx->Stencil.Function[face] == func && + ctx->Stencil.ValueMask[face] == mask && + ctx->Stencil.Ref[face] == ref) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.Function[face] = func; + ctx->Stencil.Ref[face] = ref; + ctx->Stencil.ValueMask[face] = mask; + if (ctx->Driver.StencilFuncSeparate) { + ctx->Driver.StencilFuncSeparate(ctx, face ? GL_BACK : GL_FRONT, + func, ref, mask); + } + } } @@ -169,26 +169,26 @@ _mesa_StencilMask( GLuint mask ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Extensions.EXT_stencil_two_side) { - /* only set active face state */ - const GLint face = ctx->Stencil.ActiveFace; - if (ctx->Stencil.WriteMask[face] == mask) + if (ctx->Extensions.ATI_separate_stencil) { + /* set both front and back state */ + if (ctx->Stencil.WriteMask[0] == mask && + ctx->Stencil.WriteMask[1] == mask) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.WriteMask[face] = mask; + ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask; if (ctx->Driver.StencilMaskSeparate) { - ctx->Driver.StencilMaskSeparate(ctx, face ? GL_BACK : GL_FRONT, mask); + ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT_AND_BACK, mask); } } else { - /* set both front and back state */ - if (ctx->Stencil.WriteMask[0] == mask && - ctx->Stencil.WriteMask[1] == mask) + /* only set active face state */ + const GLint face = ctx->Stencil.ActiveFace; + if (ctx->Stencil.WriteMask[face] == mask) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask; + ctx->Stencil.WriteMask[face] = mask; if (ctx->Driver.StencilMaskSeparate) { - ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT_AND_BACK, mask); + ctx->Driver.StencilMaskSeparate(ctx, face ? GL_BACK : GL_FRONT, mask); } } } @@ -269,23 +269,7 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) return; } - if (ctx->Extensions.EXT_stencil_two_side) { - /* only set active face state */ - const GLint face = ctx->Stencil.ActiveFace; - if (ctx->Stencil.ZFailFunc[face] == zfail && - ctx->Stencil.ZPassFunc[face] == zpass && - ctx->Stencil.FailFunc[face] == fail) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.ZFailFunc[face] = zfail; - ctx->Stencil.ZPassFunc[face] = zpass; - ctx->Stencil.FailFunc[face] = fail; - if (ctx->Driver.StencilOpSeparate) { - ctx->Driver.StencilOpSeparate(ctx, face ? GL_BACK : GL_FRONT, - fail, zfail, zpass); - } - } - else { + if (ctx->Extensions.ATI_separate_stencil) { /* set both front and back state */ if (ctx->Stencil.ZFailFunc[0] == zfail && ctx->Stencil.ZFailFunc[1] == zfail && @@ -303,6 +287,22 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) fail, zfail, zpass); } } + else { + /* only set active face state */ + const GLint face = ctx->Stencil.ActiveFace; + if (ctx->Stencil.ZFailFunc[face] == zfail && + ctx->Stencil.ZPassFunc[face] == zpass && + ctx->Stencil.FailFunc[face] == fail) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.ZFailFunc[face] = zfail; + ctx->Stencil.ZPassFunc[face] = zpass; + ctx->Stencil.FailFunc[face] = fail; + if (ctx->Driver.StencilOpSeparate) { + ctx->Driver.StencilOpSeparate(ctx, face ? GL_BACK : GL_FRONT, + fail, zfail, zpass); + } + } } @@ -406,17 +406,16 @@ _mesa_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) FLUSH_VERTICES(ctx, _NEW_STENCIL); - if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + if (face != GL_BACK) { ctx->Stencil.FailFunc[0] = fail; ctx->Stencil.ZFailFunc[0] = zfail; ctx->Stencil.ZPassFunc[0] = zpass; } - if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + if (face != GL_FRONT) { ctx->Stencil.FailFunc[1] = fail; ctx->Stencil.ZFailFunc[1] = zfail; ctx->Stencil.ZPassFunc[1] = zpass; } - if (ctx->Driver.StencilOpSeparate) { ctx->Driver.StencilOpSeparate(ctx, face, fail, zfail, zpass); } @@ -465,7 +464,6 @@ _mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) ctx->Stencil.Ref[1] = ref; ctx->Stencil.ValueMask[1] = mask; } - if (ctx->Driver.StencilFuncSeparate) { ctx->Driver.StencilFuncSeparate(ctx, face, func, ref, mask); } @@ -486,13 +484,12 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask) FLUSH_VERTICES(ctx, _NEW_STENCIL); - if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + if (face != GL_BACK) { ctx->Stencil.WriteMask[0] = mask; } - if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + if (face != GL_FRONT) { ctx->Stencil.WriteMask[1] = mask; } - if (ctx->Driver.StencilMaskSeparate) { ctx->Driver.StencilMaskSeparate(ctx, face, mask); } -- cgit v1.2.3 From e71e4c9e476b0dae5aaff68e71e09b3a6ff3d63a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 16:09:10 +0000 Subject: run indent on the code --- src/mesa/shader/shaderobjects.c | 1686 +++++++++++++++++++-------------------- 1 file changed, 821 insertions(+), 865 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index f26ff12adf..d1436d6be3 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -51,7 +51,8 @@ (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) static struct gl2_unknown_intf ** -lookup_handle (GLcontext *ctx, GLhandleARB handle, enum gl2_uiid uiid, const char *function) +lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, + const char *function) { struct gl2_unknown_intf **unk; @@ -60,18 +61,20 @@ lookup_handle (GLcontext *ctx, GLhandleARB handle, enum gl2_uiid uiid, const cha * must be checked beforehand. */ if (handle == 0) { - _mesa_error (ctx, GL_INVALID_VALUE, function); + _mesa_error(ctx, GL_INVALID_VALUE, function); return NULL; } - _glthread_LOCK_MUTEX (ctx->Shared->Mutex); - unk = (struct gl2_unknown_intf **) (_mesa_HashLookup (ctx->Shared->GL2Objects, handle)); - _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex); + _glthread_LOCK_MUTEX(ctx->Shared->Mutex); + unk = + (struct gl2_unknown_intf + **) (_mesa_HashLookup(ctx->Shared->GL2Objects, handle)); + _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); if (unk == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, function); + _mesa_error(ctx, GL_INVALID_VALUE, function); else { - unk = (**unk).QueryInterface (unk, uiid); + unk = (**unk).QueryInterface(unk, uiid); if (unk == NULL) - _mesa_error (ctx, GL_INVALID_OPERATION, function); + _mesa_error(ctx, GL_INVALID_OPERATION, function); } return unk; } @@ -116,871 +119,823 @@ lookup_handle (GLcontext *ctx, GLhandleARB handle, enum gl2_uiid uiid, const cha GLvoid GLAPIENTRY -_mesa_DeleteObjectARB (GLhandleARB obj) +_mesa_DeleteObjectARB(GLhandleARB obj) { - if (obj != 0) - { + if (obj != 0) { GET_CURRENT_CONTEXT(ctx); GET_GENERIC(gen, obj, "glDeleteObjectARB"); - if (gen != NULL) - { - (**gen).Delete (gen); + if (gen != NULL) { + (**gen).Delete(gen); RELEASE_GENERIC(gen); } } } GLhandleARB GLAPIENTRY -_mesa_GetHandleARB (GLenum pname) +_mesa_GetHandleARB(GLenum pname) { - GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_CONTEXT(ctx); - switch (pname) - { + switch (pname) { case GL_PROGRAM_OBJECT_ARB: { struct gl2_program_intf **pro = ctx->ShaderObjects.CurrentProgram; if (pro != NULL) - return (**pro)._container._generic.GetName ((struct gl2_generic_intf **) (pro)); + return (**pro)._container._generic. + GetName((struct gl2_generic_intf **) (pro)); } break; - default: - _mesa_error (ctx, GL_INVALID_ENUM, "glGetHandleARB"); - } + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); + } - return 0; + return 0; } GLvoid GLAPIENTRY -_mesa_DetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj) +_mesa_DetachObjectARB(GLhandleARB containerObj, GLhandleARB attachedObj) { - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glDetachObjectARB"); - - if (con != NULL) - { - GET_GENERIC(att, attachedObj, "glDetachObjectARB"); - - if (att != NULL) - { - (**con).Detach (con, att); - RELEASE_GENERIC(att); - } - RELEASE_CONTAINER(con); - } + GET_CURRENT_CONTEXT(ctx); + GET_CONTAINER(con, containerObj, "glDetachObjectARB"); + + if (con != NULL) { + GET_GENERIC(att, attachedObj, "glDetachObjectARB"); + + if (att != NULL) { + (**con).Detach(con, att); + RELEASE_GENERIC(att); + } + RELEASE_CONTAINER(con); + } } GLhandleARB GLAPIENTRY -_mesa_CreateShaderObjectARB (GLenum shaderType) +_mesa_CreateShaderObjectARB(GLenum shaderType) { - return _mesa_3dlabs_create_shader_object (shaderType); + return _mesa_3dlabs_create_shader_object(shaderType); } GLvoid GLAPIENTRY -_mesa_ShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, - const GLint *length) +_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, + const GLcharARB ** string, const GLint * length) { - GET_CURRENT_CONTEXT(ctx); - GLint *offsets; - GLsizei i; - GLcharARB *source; - GET_SHADER(sha, shaderObj, "glShaderSourceARB"); - - if (sha == NULL) - return; - - if (string == NULL) - { - RELEASE_SHADER(sha); - _mesa_error (ctx, GL_INVALID_VALUE, "glShaderSourceARB"); - return; - } - - /* - * This array holds offsets of where the appropriate string ends, thus the last - * element will be set to the total length of the source code. - */ - offsets = (GLint *) _mesa_malloc (count * sizeof (GLint)); - if (offsets == NULL) - { - RELEASE_SHADER(sha); - _mesa_error (ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } - - for (i = 0; i < count; i++) - { - if (string[i] == NULL) - { - _mesa_free ((GLvoid *) offsets); - RELEASE_SHADER(sha); - _mesa_error (ctx, GL_INVALID_VALUE, "glShaderSourceARB"); - return; - } - if (length == NULL || length[i] < 0) - offsets[i] = _mesa_strlen (string[i]); - else - offsets[i] = length[i]; - /* accumulate string lengths */ - if (i > 0) - offsets[i] += offsets[i - 1]; - } - - source = (GLcharARB *) _mesa_malloc ((offsets[count - 1] + 1) * sizeof (GLcharARB)); - if (source == NULL) - { - _mesa_free ((GLvoid *) offsets); - RELEASE_SHADER(sha); - _mesa_error (ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } - - for (i = 0; i < count; i++) - { - GLint start = (i > 0) ? offsets[i - 1] : 0; - _mesa_memcpy (source + start, string[i], (offsets[i] - start) * sizeof (GLcharARB)); - } - source[offsets[count - 1]] = '\0'; - - (**sha).SetSource (sha, source, offsets, count); - RELEASE_SHADER(sha); + GET_CURRENT_CONTEXT(ctx); + GLint *offsets; + GLsizei i; + GLcharARB *source; + GET_SHADER(sha, shaderObj, "glShaderSourceARB"); + + if (sha == NULL) + return; + + if (string == NULL) { + RELEASE_SHADER(sha); + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); + return; + } + + /* + * This array holds offsets of where the appropriate string ends, thus the last + * element will be set to the total length of the source code. + */ + offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); + if (offsets == NULL) { + RELEASE_SHADER(sha); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); + return; + } + + for (i = 0; i < count; i++) { + if (string[i] == NULL) { + _mesa_free((GLvoid *) offsets); + RELEASE_SHADER(sha); + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); + return; + } + if (length == NULL || length[i] < 0) + offsets[i] = _mesa_strlen(string[i]); + else + offsets[i] = length[i]; + /* accumulate string lengths */ + if (i > 0) + offsets[i] += offsets[i - 1]; + } + + source = + (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * + sizeof(GLcharARB)); + if (source == NULL) { + _mesa_free((GLvoid *) offsets); + RELEASE_SHADER(sha); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); + return; + } + + for (i = 0; i < count; i++) { + GLint start = (i > 0) ? offsets[i - 1] : 0; + _mesa_memcpy(source + start, string[i], + (offsets[i] - start) * sizeof(GLcharARB)); + } + source[offsets[count - 1]] = '\0'; + + (**sha).SetSource(sha, source, offsets, count); + RELEASE_SHADER(sha); } -GLvoid GLAPIENTRY -_mesa_CompileShaderARB (GLhandleARB shaderObj) +GLvoid GLAPIENTRY +_mesa_CompileShaderARB(GLhandleARB shaderObj) { - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sha, shaderObj, "glCompileShaderARB"); - - if (sha != NULL) - { - (**sha).Compile (sha); - RELEASE_SHADER(sha); - } + GET_CURRENT_CONTEXT(ctx); + GET_SHADER(sha, shaderObj, "glCompileShaderARB"); + + if (sha != NULL) { + (**sha).Compile(sha); + RELEASE_SHADER(sha); + } } GLhandleARB GLAPIENTRY -_mesa_CreateProgramObjectARB (GLvoid) +_mesa_CreateProgramObjectARB(GLvoid) { - return _mesa_3dlabs_create_program_object (); + return _mesa_3dlabs_create_program_object(); } GLvoid GLAPIENTRY -_mesa_AttachObjectARB (GLhandleARB containerObj, GLhandleARB obj) +_mesa_AttachObjectARB(GLhandleARB containerObj, GLhandleARB obj) { - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glAttachObjectARB"); - - if (con != NULL) - { - GET_GENERIC(att, obj, "glAttachObjectARB"); - - if (att != NULL) - { - (**con).Attach (con, att); - RELEASE_GENERIC(att); - } - RELEASE_CONTAINER(con); - } + GET_CURRENT_CONTEXT(ctx); + GET_CONTAINER(con, containerObj, "glAttachObjectARB"); + + if (con != NULL) { + GET_GENERIC(att, obj, "glAttachObjectARB"); + + if (att != NULL) { + (**con).Attach(con, att); + RELEASE_GENERIC(att); + } + RELEASE_CONTAINER(con); + } } GLvoid GLAPIENTRY -_mesa_LinkProgramARB (GLhandleARB programObj) +_mesa_LinkProgramARB(GLhandleARB programObj) { - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glLinkProgramARB"); - - if (pro != NULL) - { - (**pro).Link (pro); - if (pro == ctx->ShaderObjects.CurrentProgram) - { - if ((**pro).GetLinkStatus (pro)) - _mesa_UseProgramObjectARB (programObj); - else - _mesa_UseProgramObjectARB (0); - } - RELEASE_PROGRAM(pro); - } + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glLinkProgramARB"); + + if (pro != NULL) { + (**pro).Link(pro); + if (pro == ctx->ShaderObjects.CurrentProgram) { + if ((**pro).GetLinkStatus(pro)) + _mesa_UseProgramObjectARB(programObj); + else + _mesa_UseProgramObjectARB(0); + } + RELEASE_PROGRAM(pro); + } } GLvoid GLAPIENTRY -_mesa_UseProgramObjectARB (GLhandleARB programObj) +_mesa_UseProgramObjectARB(GLhandleARB programObj) { - GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_CONTEXT(ctx); struct gl2_program_intf **program = NULL; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (programObj != 0) - { - GET_PROGRAM(pro, programObj, "glUseProgramObjectARB"); - - if (pro == NULL) - return; - - if ((**pro).GetLinkStatus (pro) == GL_FALSE) - { - RELEASE_PROGRAM(pro); - _mesa_error (ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB"); - return; - } - - program = pro; - - ctx->ShaderObjects._VertexShaderPresent = (**pro).IsShaderPresent (pro, GL_VERTEX_SHADER_ARB); - ctx->ShaderObjects._FragmentShaderPresent = (**pro).IsShaderPresent (pro, - GL_FRAGMENT_SHADER_ARB); - } - else - { - ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; - ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; - } - - if (ctx->ShaderObjects.CurrentProgram != NULL) - RELEASE_PROGRAM(ctx->ShaderObjects.CurrentProgram); - ctx->ShaderObjects.CurrentProgram = program; + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (programObj != 0) { + GET_PROGRAM(pro, programObj, "glUseProgramObjectARB"); + + if (pro == NULL) + return; + + if ((**pro).GetLinkStatus(pro) == GL_FALSE) { + RELEASE_PROGRAM(pro); + _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB"); + return; + } + + program = pro; + + ctx->ShaderObjects._VertexShaderPresent = + (**pro).IsShaderPresent(pro, GL_VERTEX_SHADER_ARB); + ctx->ShaderObjects._FragmentShaderPresent = + (**pro).IsShaderPresent(pro, GL_FRAGMENT_SHADER_ARB); + } + else { + ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; + ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; + } + + if (ctx->ShaderObjects.CurrentProgram != NULL) + RELEASE_PROGRAM(ctx->ShaderObjects.CurrentProgram); + ctx->ShaderObjects.CurrentProgram = program; } GLvoid GLAPIENTRY -_mesa_ValidateProgramARB (GLhandleARB programObj) +_mesa_ValidateProgramARB(GLhandleARB programObj) { - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glValidateProgramARB"); - - if (pro != NULL) - { - (**pro).Validate (pro); - RELEASE_PROGRAM(pro); - } + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glValidateProgramARB"); + + if (pro != NULL) { + (**pro).Validate(pro); + RELEASE_PROGRAM(pro); + } } GLvoid GLAPIENTRY -_mesa_Uniform1fARB (GLint location, GLfloat v0) +_mesa_Uniform1fARB(GLint location, GLfloat v0) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fARB"); + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fARB"); - FLUSH_VERTICES(ctx, _NEW_PROGRAM); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, 1, &v0, GL_FLOAT)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1fARB"); - } + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, 1, &v0, GL_FLOAT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1fARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform2fARB (GLint location, GLfloat v0, GLfloat v1) +_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fARB"); + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fARB"); - FLUSH_VERTICES(ctx, _NEW_PROGRAM); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) - { - GLfloat v[2]; - v[0] = v0; - v[1] = v1; + if (pro != NULL) { + GLfloat v[2]; + v[0] = v0; + v[1] = v1; - if (!(**pro).WriteUniform (pro, location, 1, v, GL_FLOAT_VEC2)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2fARB"); - } + if (!(**pro).WriteUniform(pro, location, 1, v, GL_FLOAT_VEC2)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2fARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fARB"); + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fARB"); - FLUSH_VERTICES(ctx, _NEW_PROGRAM); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) - { - GLfloat v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; + if (pro != NULL) { + GLfloat v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; - if (!(**pro).WriteUniform (pro, location, 1, v, GL_FLOAT_VEC3)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3fARB"); - } + if (!(**pro).WriteUniform(pro, location, 1, v, GL_FLOAT_VEC3)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3fARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - GLfloat v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - - if (!(**pro).WriteUniform (pro, location, 1, v, GL_FLOAT_VEC4)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4fARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fARB"); + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + GLfloat v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + + if (!(**pro).WriteUniform(pro, location, 1, v, GL_FLOAT_VEC4)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4fARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform1iARB (GLint location, GLint v0) +_mesa_Uniform1iARB(GLint location, GLint v0) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1iARB"); + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1iARB"); - FLUSH_VERTICES(ctx, _NEW_PROGRAM); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, 1, &v0, GL_INT)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1iARB"); - } + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, 1, &v0, GL_INT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1iARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform2iARB (GLint location, GLint v0, GLint v1) +_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2iARB"); + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2iARB"); - FLUSH_VERTICES(ctx, _NEW_PROGRAM); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) - { - GLint v[2]; - v[0] = v0; - v[1] = v1; + if (pro != NULL) { + GLint v[2]; + v[0] = v0; + v[1] = v1; - if (!(**pro).WriteUniform (pro, location, 1, v, GL_INT_VEC2)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2iARB"); - } + if (!(**pro).WriteUniform(pro, location, 1, v, GL_INT_VEC2)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2iARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform3iARB (GLint location, GLint v0, GLint v1, GLint v2) +_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3iARB"); + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3iARB"); - FLUSH_VERTICES(ctx, _NEW_PROGRAM); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) - { - GLint v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; + if (pro != NULL) { + GLint v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; - if (!(**pro).WriteUniform (pro, location, 1, v, GL_INT_VEC3)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3iARB"); - } + if (!(**pro).WriteUniform(pro, location, 1, v, GL_INT_VEC3)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3iARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4iARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - GLint v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - - if (!(**pro).WriteUniform (pro, location, 1, v, GL_INT_VEC4)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4iARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4iARB"); + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + GLint v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + + if (!(**pro).WriteUniform(pro, location, 1, v, GL_INT_VEC4)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4iARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform1fvARB (GLint location, GLsizei count, const GLfloat *value) +_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform1fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1fvARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform1fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1fvARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform2fvARB (GLint location, GLsizei count, const GLfloat *value) +_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform2fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT_VEC2)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2fvARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform2fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT_VEC2)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2fvARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform3fvARB (GLint location, GLsizei count, const GLfloat *value) +_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform3fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT_VEC3)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3fvARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform3fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT_VEC3)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3fvARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform4fvARB (GLint location, GLsizei count, const GLfloat *value) +_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform4fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT_VEC4)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4fvARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform4fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT_VEC4)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4fvARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform1ivARB (GLint location, GLsizei count, const GLint *value) +_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1ivARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform1ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_INT)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1ivARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1ivARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform1ivARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_INT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1ivARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform2ivARB (GLint location, GLsizei count, const GLint *value) +_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2ivARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform2ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_INT_VEC2)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2ivARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2ivARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform2ivARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_INT_VEC2)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2ivARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform3ivARB (GLint location, GLsizei count, const GLint *value) +_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3ivARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform3ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_INT_VEC3)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3ivARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3ivARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform3ivARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_INT_VEC3)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3ivARB"); + } } GLvoid GLAPIENTRY -_mesa_Uniform4ivARB (GLint location, GLsizei count, const GLint *value) +_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4ivARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniform4ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_INT_VEC4)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4ivARB"); - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4ivARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform4ivARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (!(**pro).WriteUniform(pro, location, count, value, GL_INT_VEC4)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4ivARB"); + } } GLvoid GLAPIENTRY -_mesa_UniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix2fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniformMatrix2fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (transpose) - { - GLfloat *trans, *pt; - const GLfloat *pv; - - trans = (GLfloat *) _mesa_malloc (count * 4 * sizeof (GLfloat)); - if (trans == NULL) - { - _mesa_error (ctx, GL_OUT_OF_MEMORY, "glUniformMatrix2fvARB"); - return; - } - for (pt = trans, pv = value; pt != trans + count * 4; pt += 4, pv += 4) - { - pt[0] = pv[0]; - pt[1] = pv[2]; - pt[2] = pv[1]; - pt[3] = pv[3]; - } - if (!(**pro).WriteUniform (pro, location, count, trans, GL_FLOAT_MAT2)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB"); - _mesa_free (trans); - } - else - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT_MAT2)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB"); - } - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix2fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix2fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + + trans = (GLfloat *) _mesa_malloc(count * 4 * sizeof(GLfloat)); + if (trans == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glUniformMatrix2fvARB"); + return; + } + for (pt = trans, pv = value; pt != trans + count * 4; + pt += 4, pv += 4) { + pt[0] = pv[0]; + pt[1] = pv[2]; + pt[2] = pv[1]; + pt[3] = pv[3]; + } + if (!(**pro). + WriteUniform(pro, location, count, trans, GL_FLOAT_MAT2)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB"); + _mesa_free(trans); + } + else { + if (!(**pro). + WriteUniform(pro, location, count, value, GL_FLOAT_MAT2)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB"); + } + } } GLvoid GLAPIENTRY -_mesa_UniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix3fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniformMatrix3fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (transpose) - { - GLfloat *trans, *pt; - const GLfloat *pv; - - trans = (GLfloat *) _mesa_malloc (count * 9 * sizeof (GLfloat)); - if (trans == NULL) - { - _mesa_error (ctx, GL_OUT_OF_MEMORY, "glUniformMatrix3fvARB"); - return; - } - for (pt = trans, pv = value; pt != trans + count * 9; pt += 9, pv += 9) - { - pt[0] = pv[0]; - pt[1] = pv[3]; - pt[2] = pv[6]; - pt[3] = pv[1]; - pt[4] = pv[4]; - pt[5] = pv[7]; - pt[6] = pv[2]; - pt[7] = pv[5]; - pt[8] = pv[8]; - } - if (!(**pro).WriteUniform (pro, location, count, trans, GL_FLOAT_MAT3)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB"); - _mesa_free (trans); - } - else - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT_MAT3)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB"); - } - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix3fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix3fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + + trans = (GLfloat *) _mesa_malloc(count * 9 * sizeof(GLfloat)); + if (trans == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glUniformMatrix3fvARB"); + return; + } + for (pt = trans, pv = value; pt != trans + count * 9; + pt += 9, pv += 9) { + pt[0] = pv[0]; + pt[1] = pv[3]; + pt[2] = pv[6]; + pt[3] = pv[1]; + pt[4] = pv[4]; + pt[5] = pv[7]; + pt[6] = pv[2]; + pt[7] = pv[5]; + pt[8] = pv[8]; + } + if (!(**pro). + WriteUniform(pro, location, count, trans, GL_FLOAT_MAT3)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB"); + _mesa_free(trans); + } + else { + if (!(**pro). + WriteUniform(pro, location, count, value, GL_FLOAT_MAT3)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB"); + } + } } GLvoid GLAPIENTRY -_mesa_UniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix4fvARB"); - - if (value == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glUniformMatrix4fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) - { - if (transpose) - { - GLfloat *trans, *pt; - const GLfloat *pv; - - trans = (GLfloat *) _mesa_malloc (count * 16 * sizeof (GLfloat)); - if (trans == NULL) - { - _mesa_error (ctx, GL_OUT_OF_MEMORY, "glUniformMatrix4fvARB"); - return; - } - for (pt = trans, pv = value; pt != trans + count * 16; pt += 16, pv += 16) - { - _math_transposef (pt, pv); - } - if (!(**pro).WriteUniform (pro, location, count, trans, GL_FLOAT_MAT4)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB"); - _mesa_free (trans); - } - else - { - if (!(**pro).WriteUniform (pro, location, count, value, GL_FLOAT_MAT4)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB"); - } - } + GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix4fvARB"); + + if (value == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix4fvARB"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (pro != NULL) { + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + + trans = (GLfloat *) _mesa_malloc(count * 16 * sizeof(GLfloat)); + if (trans == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glUniformMatrix4fvARB"); + return; + } + for (pt = trans, pv = value; pt != trans + count * 16; + pt += 16, pv += 16) { + _math_transposef(pt, pv); + } + if (!(**pro). + WriteUniform(pro, location, count, trans, GL_FLOAT_MAT4)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB"); + _mesa_free(trans); + } + else { + if (!(**pro). + WriteUniform(pro, location, count, value, GL_FLOAT_MAT4)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB"); + } + } } static GLboolean -_mesa_get_object_parameter (GLhandleARB obj, GLenum pname, GLvoid *params, GLboolean *integral, - GLint *size) +_mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, + GLboolean * integral, GLint * size) { - GET_CURRENT_CONTEXT(ctx); - GLint *ipar = (GLint *) params; - - /* set default values */ - *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ - *size = 1; /* param array size */ - - switch (pname) - { - case GL_OBJECT_TYPE_ARB: - case GL_OBJECT_DELETE_STATUS_ARB: - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - { - GET_GENERIC(gen, obj, "glGetObjectParameterivARB"); - - if (gen == NULL) - return GL_FALSE; - - switch (pname) - { - case GL_OBJECT_TYPE_ARB: - *ipar = (**gen).GetType (gen); - break; - case GL_OBJECT_DELETE_STATUS_ARB: - *ipar = (**gen).GetDeleteStatus (gen); - break; + GET_CURRENT_CONTEXT(ctx); + GLint *ipar = (GLint *) params; + + /* set default values */ + *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ + *size = 1; /* param array size */ + + switch (pname) { + case GL_OBJECT_TYPE_ARB: + case GL_OBJECT_DELETE_STATUS_ARB: + case GL_OBJECT_INFO_LOG_LENGTH_ARB: + { + GET_GENERIC(gen, obj, "glGetObjectParameterivARB"); + + if (gen == NULL) + return GL_FALSE; + + switch (pname) { + case GL_OBJECT_TYPE_ARB: + *ipar = (**gen).GetType(gen); + break; + case GL_OBJECT_DELETE_STATUS_ARB: + *ipar = (**gen).GetDeleteStatus(gen); + break; case GL_OBJECT_INFO_LOG_LENGTH_ARB: - *ipar = (**gen).GetInfoLogLength (gen); + *ipar = (**gen).GetInfoLogLength(gen); + break; + } + + RELEASE_GENERIC(gen); + } + break; + case GL_OBJECT_SUBTYPE_ARB: + case GL_OBJECT_COMPILE_STATUS_ARB: + case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: + { + GET_SHADER(sha, obj, "glGetObjectParameterivARB"); + + if (sha == NULL) + return GL_FALSE; + + switch (pname) { + case GL_OBJECT_SUBTYPE_ARB: + *ipar = (**sha).GetSubType(sha); + break; + case GL_OBJECT_COMPILE_STATUS_ARB: + *ipar = (**sha).GetCompileStatus(sha); + break; + case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: + { + const GLcharARB *src = (**sha).GetSource(sha); + + if (src == NULL) + *ipar = 0; + else + *ipar = _mesa_strlen(src) + 1; + } + break; + } + + RELEASE_SHADER(sha); + } + break; + case GL_OBJECT_LINK_STATUS_ARB: + case GL_OBJECT_VALIDATE_STATUS_ARB: + case GL_OBJECT_ATTACHED_OBJECTS_ARB: + case GL_OBJECT_ACTIVE_UNIFORMS_ARB: + case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: + { + GET_PROGRAM(pro, obj, "glGetObjectParameterivARB"); + + if (pro == NULL) + return GL_FALSE; + + switch (pname) { + case GL_OBJECT_LINK_STATUS_ARB: + *ipar = (**pro).GetLinkStatus(pro); + break; + case GL_OBJECT_VALIDATE_STATUS_ARB: + *ipar = (**pro).GetValidateStatus(pro); break; - } - - RELEASE_GENERIC(gen); - } - break; - case GL_OBJECT_SUBTYPE_ARB: - case GL_OBJECT_COMPILE_STATUS_ARB: - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - GET_SHADER(sha, obj, "glGetObjectParameterivARB"); - - if (sha == NULL) - return GL_FALSE; - - switch (pname) - { - case GL_OBJECT_SUBTYPE_ARB: - *ipar = (**sha).GetSubType (sha); - break; - case GL_OBJECT_COMPILE_STATUS_ARB: - *ipar = (**sha).GetCompileStatus (sha); - break; - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - const GLcharARB *src = (**sha).GetSource (sha); - - if (src == NULL) - *ipar = 0; - else - *ipar = _mesa_strlen (src) + 1; - } - break; - } - - RELEASE_SHADER(sha); - } - break; - case GL_OBJECT_LINK_STATUS_ARB: - case GL_OBJECT_VALIDATE_STATUS_ARB: - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - { - GET_PROGRAM(pro, obj, "glGetObjectParameterivARB"); - - if (pro == NULL) - return GL_FALSE; - - switch (pname) - { - case GL_OBJECT_LINK_STATUS_ARB: - *ipar = (**pro).GetLinkStatus (pro); - break; - case GL_OBJECT_VALIDATE_STATUS_ARB: - *ipar = (**pro).GetValidateStatus (pro); - break; case GL_OBJECT_ATTACHED_OBJECTS_ARB: - *ipar = (**pro)._container.GetAttachedCount ((struct gl2_container_intf **) (pro)); + *ipar = + (**pro)._container. + GetAttachedCount((struct gl2_container_intf **) (pro)); + break; + case GL_OBJECT_ACTIVE_UNIFORMS_ARB: + *ipar = (**pro).GetActiveUniformCount(pro); + break; + case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: + *ipar = (**pro).GetActiveUniformMaxLength(pro); + break; + case GL_OBJECT_ACTIVE_ATTRIBUTES_ARB: + *ipar = (**pro).GetActiveAttribCount(pro); break; - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - *ipar = (**pro).GetActiveUniformCount (pro); - break; - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveUniformMaxLength (pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTES_ARB: - *ipar = (**pro).GetActiveAttribCount (pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveAttribMaxLength (pro); - break; - } - - RELEASE_PROGRAM(pro); - } - break; - default: - _mesa_error (ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB"); - return GL_FALSE; - } - - return GL_TRUE; + case GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB: + *ipar = (**pro).GetActiveAttribMaxLength(pro); + break; + } + + RELEASE_PROGRAM(pro); + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB"); + return GL_FALSE; + } + + return GL_TRUE; } GLvoid GLAPIENTRY -_mesa_GetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params) +_mesa_GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) { - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glGetObjectParameterfvARB"); - return; - } - - assert (sizeof (GLfloat) == sizeof (GLint)); - - if (_mesa_get_object_parameter (obj, pname, (GLvoid *) params, &integral, &size)) - if (integral) - { - GLint i; - - for (i = 0; i < size; i++) - params[i] = (GLfloat) ((GLint *) params)[i]; - } + GET_CURRENT_CONTEXT(ctx); + GLboolean integral; + GLint size; + + if (params == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterfvARB"); + return; + } + + assert(sizeof(GLfloat) == sizeof(GLint)); + + if (_mesa_get_object_parameter + (obj, pname, (GLvoid *) params, &integral, &size)) + if (integral) { + GLint i; + + for (i = 0; i < size; i++) + params[i] = (GLfloat) ((GLint *) params)[i]; + } } GLvoid GLAPIENTRY -_mesa_GetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params) +_mesa_GetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) { - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) - { - _mesa_error (ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB"); - return; - } - - assert (sizeof (GLfloat) == sizeof (GLint)); - - if (_mesa_get_object_parameter (obj, pname, (GLvoid *) params, &integral, &size)) - if (!integral) - { - GLint i; - - for (i = 0; i < size; i++) - params[i] = (GLint) ((GLfloat *) params)[i]; - } + GET_CURRENT_CONTEXT(ctx); + GLboolean integral; + GLint size; + + if (params == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB"); + return; + } + + assert(sizeof(GLfloat) == sizeof(GLint)); + + if (_mesa_get_object_parameter + (obj, pname, (GLvoid *) params, &integral, &size)) + if (!integral) { + GLint i; + + for (i = 0; i < size; i++) + params[i] = (GLint) ((GLfloat *) params)[i]; + } } @@ -993,222 +948,223 @@ _mesa_GetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params) * \param dst the string destination */ static GLvoid -copy_string(const GLcharARB *src, GLsizei maxLength, GLsizei *length, - GLcharARB *dst) +copy_string(const GLcharARB * src, GLsizei maxLength, GLsizei * length, + GLcharARB * dst) { - GLsizei len; - for (len = 0; len < maxLength - 1 && src && src[len]; len++) - dst[len] = src[len]; - if (maxLength > 0) - dst[len] = 0; - if (length) - *length = len; + GLsizei len; + for (len = 0; len < maxLength - 1 && src && src[len]; len++) + dst[len] = src[len]; + if (maxLength > 0) + dst[len] = 0; + if (length) + *length = len; } GLvoid GLAPIENTRY -_mesa_GetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) +_mesa_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, + GLcharARB * infoLog) { - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glGetInfoLogARB"); + GET_CURRENT_CONTEXT(ctx); + GET_GENERIC(gen, obj, "glGetInfoLogARB"); - if (gen == NULL) - return; + if (gen == NULL) + return; - if (infoLog == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetInfoLogARB"); + if (infoLog == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetInfoLogARB"); else { - GLsizei actualsize = (**gen).GetInfoLogLength (gen); + GLsizei actualsize = (**gen).GetInfoLogLength(gen); if (actualsize > maxLength) actualsize = maxLength; - (**gen).GetInfoLog (gen, actualsize, infoLog); + (**gen).GetInfoLog(gen, actualsize, infoLog); if (length != NULL) *length = (actualsize > 0) ? actualsize - 1 : 0; } - RELEASE_GENERIC(gen); + RELEASE_GENERIC(gen); } GLvoid GLAPIENTRY -_mesa_GetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, - GLhandleARB *obj) +_mesa_GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, + GLsizei * count, GLhandleARB * obj) { - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB"); - - if (con == NULL) - return; - - if (obj == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB"); - else - { - GLsizei cnt, i; - - cnt = (**con).GetAttachedCount (con); - if (cnt > maxCount) - cnt = maxCount; - if (count != NULL) - *count = cnt; - - for (i = 0; i < cnt; i++) - { - struct gl2_generic_intf **x = (**con).GetAttached (con, i); - obj[i] = (**x).GetName (x); - RELEASE_GENERIC(x); - } - } - RELEASE_CONTAINER(con); + GET_CURRENT_CONTEXT(ctx); + GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB"); + + if (con == NULL) + return; + + if (obj == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB"); + else { + GLsizei cnt, i; + + cnt = (**con).GetAttachedCount(con); + if (cnt > maxCount) + cnt = maxCount; + if (count != NULL) + *count = cnt; + + for (i = 0; i < cnt; i++) { + struct gl2_generic_intf **x = (**con).GetAttached(con, i); + obj[i] = (**x).GetName(x); + RELEASE_GENERIC(x); + } + } + RELEASE_CONTAINER(con); } GLint GLAPIENTRY -_mesa_GetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name) +_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) { - GET_CURRENT_CONTEXT(ctx); - GLint loc = -1; - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformLocationARB"); - - if (pro == NULL) - return -1; - - if (name == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetUniformLocationARB"); - else - { - if (!IS_NAME_WITH_GL_PREFIX(name)) - loc = (**pro).GetUniformLocation (pro, name); - } - RELEASE_PROGRAM(pro); - return loc; + GET_CURRENT_CONTEXT(ctx); + GLint loc = -1; + GET_LINKED_PROGRAM(pro, programObj, "glGetUniformLocationARB"); + + if (pro == NULL) + return -1; + + if (name == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetUniformLocationARB"); + else { + if (!IS_NAME_WITH_GL_PREFIX(name)) + loc = (**pro).GetUniformLocation(pro, name); + } + RELEASE_PROGRAM(pro); + return loc; } GLvoid GLAPIENTRY -_mesa_GetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, - GLint *size, GLenum *type, GLcharARB *name) +_mesa_GetActiveUniformARB(GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name) { - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveUniformARB"); - - if (pro == NULL) - return; - - if (size == NULL || type == NULL || name == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - else - { - if (index < (**pro).GetActiveUniformCount (pro)) - (**pro).GetActiveUniform (pro, index, maxLength, length, size, type, name); - else - _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - } - RELEASE_PROGRAM(pro); + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glGetActiveUniformARB"); + + if (pro == NULL) + return; + + if (size == NULL || type == NULL || name == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); + else { + if (index < (**pro).GetActiveUniformCount(pro)) + (**pro).GetActiveUniform(pro, index, maxLength, length, size, type, + name); + else + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); + } + RELEASE_PROGRAM(pro); } GLvoid GLAPIENTRY -_mesa_GetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params) +_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, + GLfloat * params) { - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); - - if (pro != NULL) - { - /* TODO */ - RELEASE_PROGRAM(pro); - } + GET_CURRENT_CONTEXT(ctx); + GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); + + if (pro != NULL) { + /* TODO */ + RELEASE_PROGRAM(pro); + } } GLvoid GLAPIENTRY -_mesa_GetUniformivARB (GLhandleARB programObj, GLint location, GLint *params) +_mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) { - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); - - if (pro != NULL) - { - /* TODO */ - RELEASE_PROGRAM(pro); - } + GET_CURRENT_CONTEXT(ctx); + GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); + + if (pro != NULL) { + /* TODO */ + RELEASE_PROGRAM(pro); + } } GLvoid GLAPIENTRY -_mesa_GetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source) +_mesa_GetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, + GLcharARB * source) { - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sha, obj, "glGetShaderSourceARB"); + GET_CURRENT_CONTEXT(ctx); + GET_SHADER(sha, obj, "glGetShaderSourceARB"); - if (sha == NULL) - return; + if (sha == NULL) + return; - if (source == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetShaderSourceARB"); - else - copy_string ((**sha).GetSource (sha), maxLength, length, source); - RELEASE_SHADER(sha); + if (source == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSourceARB"); + else + copy_string((**sha).GetSource(sha), maxLength, length, source); + RELEASE_SHADER(sha); } /* GL_ARB_vertex_shader */ GLvoid GLAPIENTRY -_mesa_BindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name) +_mesa_BindAttribLocationARB(GLhandleARB programObj, GLuint index, + const GLcharARB * name) { - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glBindAttribLocationARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= MAX_VERTEX_ATTRIBS) - _mesa_error (ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); - else if (IS_NAME_WITH_GL_PREFIX(name)) - _mesa_error (ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); - else - (**pro).OverrideAttribBinding (pro, index, name); - RELEASE_PROGRAM(pro); + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glBindAttribLocationARB"); + + if (pro == NULL) + return; + + if (name == NULL || index >= MAX_VERTEX_ATTRIBS) + _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); + else if (IS_NAME_WITH_GL_PREFIX(name)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); + else + (**pro).OverrideAttribBinding(pro, index, name); + RELEASE_PROGRAM(pro); } GLvoid GLAPIENTRY -_mesa_GetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, - GLint *size, GLenum *type, GLcharARB *name) +_mesa_GetActiveAttribARB(GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name) { - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveAttribARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= (**pro).GetActiveAttribCount (pro)) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveAttribARB"); - else - (**pro).GetActiveAttrib (pro, index, maxLength, length, size, type, name); - RELEASE_PROGRAM(pro); + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glGetActiveAttribARB"); + + if (pro == NULL) + return; + + if (name == NULL || index >= (**pro).GetActiveAttribCount(pro)) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveAttribARB"); + else + (**pro).GetActiveAttrib(pro, index, maxLength, length, size, type, + name); + RELEASE_PROGRAM(pro); } GLint GLAPIENTRY -_mesa_GetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name) +_mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) { - GET_CURRENT_CONTEXT(ctx); - GLint loc = -1; - GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); - - if (pro == NULL) - return -1; - - if (name == NULL) - _mesa_error (ctx, GL_INVALID_VALUE, "glGetAttribLocationARB"); - else if (!IS_NAME_WITH_GL_PREFIX(name)) - loc = (**pro).GetAttribLocation (pro, name); - RELEASE_PROGRAM(pro); - return loc; + GET_CURRENT_CONTEXT(ctx); + GLint loc = -1; + GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); + + if (pro == NULL) + return -1; + + if (name == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocationARB"); + else if (!IS_NAME_WITH_GL_PREFIX(name)) + loc = (**pro).GetAttribLocation(pro, name); + RELEASE_PROGRAM(pro); + return loc; } #endif GLvoid -_mesa_init_shaderobjects (GLcontext *ctx) +_mesa_init_shaderobjects(GLcontext * ctx) { - ctx->ShaderObjects.CurrentProgram = NULL; - ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; - ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; + ctx->ShaderObjects.CurrentProgram = NULL; + ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; + ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; - _mesa_init_shaderobjects_3dlabs (ctx); + _mesa_init_shaderobjects_3dlabs(ctx); } - -- cgit v1.2.3 From f961d394e30586fa61d53d93b65fe4424b5cef36 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 16:11:31 +0000 Subject: OpenGL 2.0 entrypoints --- src/mesa/shader/shaderobjects.c | 93 +++++++++++++++++++++++++++++++++++++++++ src/mesa/shader/shaderobjects.h | 45 ++++++++++++++++++++ 2 files changed, 138 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index d1436d6be3..7936a22946 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -1157,6 +1157,99 @@ _mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) return loc; } + +/** + ** OpenGL 2.0 functions which basically wrap the ARB_shader functions + **/ + +void GLAPIENTRY +_mesa_AttachShader(GLuint program, GLuint shader) +{ + _mesa_AttachObjectARB(program, shader); +} + + +GLuint GLAPIENTRY +_mesa_CreateShader(GLenum type) +{ + return (GLuint) _mesa_CreateShaderObjectARB(type); +} + +GLuint GLAPIENTRY +_mesa_CreateProgram(void) +{ + return (GLuint) _mesa_CreateProgramObjectARB(); +} + +void GLAPIENTRY +_mesa_DeleteProgram(GLuint program) +{ + _mesa_DeleteObjectARB(program); +} + + +void GLAPIENTRY +_mesa_DeleteShader(GLuint shader) +{ + _mesa_DeleteObjectARB(shader); +} + +void GLAPIENTRY +_mesa_DetachShader(GLuint program, GLuint shader) +{ + _mesa_DetachObjectARB(program, shader); +} + +void GLAPIENTRY +_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj) +{ + _mesa_GetAttachedObjectsARB(program, maxCount, count, obj); +} + +void GLAPIENTRY +_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) +{ + /* XXX to do */ +} + +void GLAPIENTRY +_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + _mesa_GetInfoLogARB(program, bufSize, length, infoLog); +} + +void GLAPIENTRY +_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) +{ + /* XXX to do */ +} + +void GLAPIENTRY +_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + _mesa_GetInfoLogARB(shader, bufSize, length, infoLog); +} + +GLboolean GLAPIENTRY +_mesa_IsProgram2(GLuint program) +{ + GET_CURRENT_CONTEXT(ctx); + GET_GENERIC(gen, program, "glIsProgram"); + return gen ? GL_TRUE : GL_FALSE; +} + +GLboolean GLAPIENTRY +_mesa_IsShader(GLuint shader) +{ + GET_CURRENT_CONTEXT(ctx); + GET_GENERIC(gen, shader, "glIsProgram"); + return gen ? GL_TRUE : GL_FALSE; +} + + #endif GLvoid diff --git a/src/mesa/shader/shaderobjects.h b/src/mesa/shader/shaderobjects.h index cc67021629..9b16599549 100644 --- a/src/mesa/shader/shaderobjects.h +++ b/src/mesa/shader/shaderobjects.h @@ -270,6 +270,51 @@ _mesa_GetAttribLocationARB (GLhandleARB, const GLcharARB *); #endif /* FEATURE_ARB_vertex_shader */ + +/* 2.0 */ +extern void GLAPIENTRY +_mesa_AttachShader(GLuint program, GLuint shader); + +extern GLuint GLAPIENTRY +_mesa_CreateShader(GLenum); + +extern GLuint GLAPIENTRY +_mesa_CreateProgram(void); + +extern void GLAPIENTRY +_mesa_DeleteProgram(GLuint program); + +extern void GLAPIENTRY +_mesa_DeleteShader(GLuint shader); + +extern void GLAPIENTRY +_mesa_DetachShader(GLuint program, GLuint shader); + +extern void GLAPIENTRY +_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj); + +extern void GLAPIENTRY +_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params); + +extern void GLAPIENTRY +_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern void GLAPIENTRY +_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params); + +extern void GLAPIENTRY +_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern GLboolean GLAPIENTRY +_mesa_IsProgram2(GLuint program); + +extern GLboolean GLAPIENTRY +_mesa_IsShader(GLuint shader); + + #endif /* FEATURE_ARB_shader_objects */ extern void -- cgit v1.2.3 From f49c0d0dfbae5624c4db57b24fff23bd7dbaae01 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 16:20:29 +0000 Subject: Rename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with the OpenGL 2.0 function of the same name. --- src/mesa/main/dlist.c | 4 ++-- src/mesa/main/state.c | 2 +- src/mesa/shader/arbprogram.c | 26 +++++++++++++++++++++++++- src/mesa/shader/arbprogram.h | 8 ++++++-- src/mesa/shader/program.c | 24 ------------------------ src/mesa/shader/program.h | 5 +---- 6 files changed, 35 insertions(+), 34 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index b5187045d6..dca6ede6cb 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -8052,7 +8052,7 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_GetVertexAttribfvNV(table, _mesa_GetVertexAttribfvNV); SET_GetVertexAttribivNV(table, _mesa_GetVertexAttribivNV); SET_GetVertexAttribPointervNV(table, _mesa_GetVertexAttribPointervNV); - SET_IsProgramNV(table, _mesa_IsProgram); + SET_IsProgramNV(table, _mesa_IsProgramARB); SET_LoadProgramNV(table, save_LoadProgramNV); SET_ProgramParameter4dNV(table, save_ProgramParameter4dNV); SET_ProgramParameter4dvNV(table, save_ProgramParameter4dvNV); @@ -8145,7 +8145,7 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_BindProgramNV(table, save_BindProgramNV); SET_DeleteProgramsNV(table, _mesa_DeletePrograms); SET_GenProgramsNV(table, _mesa_GenPrograms); - SET_IsProgramNV(table, _mesa_IsProgram); + SET_IsProgramNV(table, _mesa_IsProgramARB); SET_GetVertexAttribdvNV(table, _mesa_GetVertexAttribdvNV); SET_GetVertexAttribfvNV(table, _mesa_GetVertexAttribfvNV); SET_GetVertexAttribivNV(table, _mesa_GetVertexAttribivNV); diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 8bc4036c98..1ced2a081e 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -507,7 +507,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_GetVertexAttribfvNV(exec, _mesa_GetVertexAttribfvNV); SET_GetVertexAttribivNV(exec, _mesa_GetVertexAttribivNV); SET_GetVertexAttribPointervNV(exec, _mesa_GetVertexAttribPointervNV); - SET_IsProgramNV(exec, _mesa_IsProgram); + SET_IsProgramNV(exec, _mesa_IsProgramARB); SET_LoadProgramNV(exec, _mesa_LoadProgramNV); SET_ProgramParameter4dNV(exec, _mesa_ProgramParameter4dNV); SET_ProgramParameter4dvNV(exec, _mesa_ProgramParameter4dvNV); diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 89f2d20cc9..e1b2a94c8a 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -36,6 +36,7 @@ #include "imports.h" #include "macros.h" #include "mtypes.h" +#include "program.h" void GLAPIENTRY @@ -179,6 +180,29 @@ _mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer) } +/** + * Determine if id names a vertex or fragment program. + * \note Not compiled into display lists. + * \note Called from both glIsProgramNV and glIsProgramARB. + * \param id is the program identifier + * \return GL_TRUE if id is a program, else GL_FALSE. + */ +GLboolean GLAPIENTRY +_mesa_IsProgramARB(GLuint id) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); + + if (id == 0) + return GL_FALSE; + + if (_mesa_lookup_program(ctx, id)) + return GL_TRUE; + else + return GL_FALSE; +} + + void GLAPIENTRY _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid *string) diff --git a/src/mesa/shader/arbprogram.h b/src/mesa/shader/arbprogram.h index 54a14bbb9f..233f662965 100644 --- a/src/mesa/shader/arbprogram.h +++ b/src/mesa/shader/arbprogram.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.5.2 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * 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"), @@ -51,6 +51,10 @@ extern void GLAPIENTRY _mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer); +extern GLboolean GLAPIENTRY +_mesa_IsProgramARB(GLuint id); + + extern void GLAPIENTRY _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid *string); diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 681584941e..eabfbc24d7 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -1973,30 +1973,6 @@ _mesa_GenPrograms(GLsizei n, GLuint *ids) } -/** - * Determine if id names a vertex or fragment program. - * \note Not compiled into display lists. - * \note Called from both glIsProgramNV and glIsProgramARB. - * \param id is the program identifier - * \return GL_TRUE if id is a program, else GL_FALSE. - */ -GLboolean GLAPIENTRY -_mesa_IsProgram(GLuint id) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (id == 0) - return GL_FALSE; - - if (_mesa_lookup_program(ctx, id)) - return GL_TRUE; - else - return GL_FALSE; -} - - - /**********************************************************************/ /* GL_MESA_program_debug extension */ /**********************************************************************/ diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index cf3b1cc099..50958394c2 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -290,9 +290,6 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids); extern void GLAPIENTRY _mesa_GenPrograms(GLsizei n, GLuint *ids); -extern GLboolean GLAPIENTRY -_mesa_IsProgram(GLuint id); - /* -- cgit v1.2.3 From 12fe1b3a580c267ccef53a5dbfd5183eaac1489b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 16:21:04 +0000 Subject: s/_mesa_IsProgram2/_mesa_IsProgram/ --- src/mesa/shader/shaderobjects.c | 2 +- src/mesa/shader/shaderobjects.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 7936a22946..6540525e6e 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -1234,7 +1234,7 @@ _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, } GLboolean GLAPIENTRY -_mesa_IsProgram2(GLuint program) +_mesa_IsProgram(GLuint program) { GET_CURRENT_CONTEXT(ctx); GET_GENERIC(gen, program, "glIsProgram"); diff --git a/src/mesa/shader/shaderobjects.h b/src/mesa/shader/shaderobjects.h index 9b16599549..ebcf591611 100644 --- a/src/mesa/shader/shaderobjects.h +++ b/src/mesa/shader/shaderobjects.h @@ -309,7 +309,7 @@ _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); extern GLboolean GLAPIENTRY -_mesa_IsProgram2(GLuint program); +_mesa_IsProgram(GLuint program); extern GLboolean GLAPIENTRY _mesa_IsShader(GLuint shader); -- cgit v1.2.3 From abc73d9cba655479af493fabd13a488e5f7951eb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 17:49:47 +0000 Subject: new RGBA_LOGICOP_ENABLED() macro --- src/mesa/main/context.h | 8 ++++++++ src/mesa/main/state.c | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index c72fe8a56a..e7e0fda72e 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -317,4 +317,12 @@ do { \ ) +/** + * Is RGBA LogicOp enabled? + */ +#define RGBA_LOGICOP_ENABLED(CTX) \ + ((CTX)->Color.ColorLogicOpEnabled || \ + ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP)) + + #endif /* CONTEXT_H */ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 1ced2a081e..de513926de 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -983,9 +983,7 @@ update_color(GLcontext *ctx) /* This is needed to support 1.1's RGB logic ops AND * 1.0's blending logicops. */ - ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled || - (ctx->Color.BlendEnabled && - ctx->Color.BlendEquationRGB == GL_LOGIC_OP)); + ctx->Color._LogicOpEnabled = RGBA_LOGICOP_ENABLED(ctx); } -- cgit v1.2.3 From 7a9c7c1133d5cf17d032c8568e8f040a7c171a72 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 17:51:04 +0000 Subject: Use RGBA_LOGICOP_ENABLED() instead of ctx->Color._LogicOpEnabled since we often need to check for this condition before the later field has been computed. Fixes logicop bug #8860. --- src/mesa/drivers/dri/i915/i830_state.c | 2 +- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i915tex/i830_state.c | 2 +- src/mesa/drivers/dri/i915tex/i915_state.c | 2 +- src/mesa/drivers/dri/i915tex/i915_vtbl.c | 1 + src/mesa/drivers/dri/mga/mgastate.c | 9 +++++---- src/mesa/drivers/dri/r300/r300_state.c | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c index ec9dca6231..9512519010 100644 --- a/src/mesa/drivers/dri/i915/i830_state.c +++ b/src/mesa/drivers/dri/i915/i830_state.c @@ -225,7 +225,7 @@ static void i830EvalLogicOpBlendState(GLcontext *ctx) I830_STATECHANGE(i830, I830_UPLOAD_CTX); - if (ctx->Color._LogicOpEnabled) { + if (RGBA_LOGICOP_ENABLED(ctx)) { i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | ENABLE_LOGIC_OP_MASK); i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index db5bb9ddc7..3cec6a2ddf 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -141,7 +141,7 @@ static void i915EvalLogicOpBlendState(GLcontext *ctx) I915_STATECHANGE(i915, I915_UPLOAD_CTX); - if (ctx->Color._LogicOpEnabled) { + if (RGBA_LOGICOP_ENABLED(ctx)) { i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE; i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE; } else { diff --git a/src/mesa/drivers/dri/i915tex/i830_state.c b/src/mesa/drivers/dri/i915tex/i830_state.c index 83d82882a6..c0673363f3 100644 --- a/src/mesa/drivers/dri/i915tex/i830_state.c +++ b/src/mesa/drivers/dri/i915tex/i830_state.c @@ -231,7 +231,7 @@ i830EvalLogicOpBlendState(GLcontext * ctx) I830_STATECHANGE(i830, I830_UPLOAD_CTX); - if (ctx->Color._LogicOpEnabled) { + if (RGBA_LOGICOP_ENABLED(ctx)) { i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | ENABLE_LOGIC_OP_MASK); i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | diff --git a/src/mesa/drivers/dri/i915tex/i915_state.c b/src/mesa/drivers/dri/i915tex/i915_state.c index d68801d3f9..2f5a30787e 100644 --- a/src/mesa/drivers/dri/i915tex/i915_state.c +++ b/src/mesa/drivers/dri/i915tex/i915_state.c @@ -144,7 +144,7 @@ i915EvalLogicOpBlendState(GLcontext * ctx) I915_STATECHANGE(i915, I915_UPLOAD_CTX); - if (ctx->Color._LogicOpEnabled) { + if (RGBA_LOGICOP_ENABLED(ctx)) { i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE; i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE; } diff --git a/src/mesa/drivers/dri/i915tex/i915_vtbl.c b/src/mesa/drivers/dri/i915tex/i915_vtbl.c index 827990d2cf..52db9a95e6 100644 --- a/src/mesa/drivers/dri/i915tex/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915tex/i915_vtbl.c @@ -314,6 +314,7 @@ i915_emit_state(struct intel_context *intel) if (dirty & I915_UPLOAD_CTX) { if (INTEL_DEBUG & DEBUG_STATE) fprintf(stderr, "I915_UPLOAD_CTX:\n"); + emit(intel, state->Ctx, sizeof(state->Ctx)); } diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index 71a1150d02..3cbffdde7d 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -113,14 +113,15 @@ static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) static void updateBlendLogicOp(GLcontext *ctx) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLboolean logicOp = RGBA_LOGICOP_ENABLED(ctx); MGA_STATECHANGE( mmesa, MGA_UPLOAD_CONTEXT ); mmesa->hw.blend_func_enable = - (ctx->Color.BlendEnabled && !ctx->Color._LogicOpEnabled) ? ~0 : 0; + (ctx->Color.BlendEnabled && !logicOp) ? ~0 : 0; FALLBACK( ctx, MGA_FALLBACK_BLEND, - ctx->Color.BlendEnabled && !ctx->Color._LogicOpEnabled && + ctx->Color.BlendEnabled && !logicOp && mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) ); } @@ -195,7 +196,7 @@ static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, mmesa->hw.blend_func = (src | dst); FALLBACK( ctx, MGA_FALLBACK_BLEND, - ctx->Color.BlendEnabled && !ctx->Color._LogicOpEnabled && + ctx->Color.BlendEnabled && !RGBA_LOGICOP_ENALBED(ctx) && mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) ); } @@ -965,7 +966,7 @@ void mgaEmitHwStateLocked( mgaContextPtr mmesa ) ? mmesa->hw.zmode : (DC_zmode_nozcmp | DC_atype_i); mmesa->setup.dwgctl &= DC_bop_MASK; - mmesa->setup.dwgctl |= (ctx->Color._LogicOpEnabled) + mmesa->setup.dwgctl |= RGBA_LOGICOP_ENABLED(ctx) ? mmesa->hw.rop : mgarop_NoBLK[ GL_COPY & 0x0f ]; mmesa->setup.alphactrl &= AC_src_MASK & AC_dst_MASK & AC_atmode_MASK diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 9fd769f321..b06336457d 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -206,7 +206,7 @@ static void r300_set_blend_state(GLcontext * ctx) (R300_BLEND_GL_ZERO << R300_DST_BLEND_SHIFT); int eqnA = R300_COMB_FCN_ADD_CLAMP; - if (ctx->Color._LogicOpEnabled || !ctx->Color.BlendEnabled) { + if (RGBA_LOGICOP_ENABLED(ctx) || !ctx->Color.BlendEnabled) { r300_set_blend_cntl(r300, func, eqn, 0, func, eqn); -- cgit v1.2.3 From 29ed8946338dde55e6a337dd9e64f6d003518ed3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 18:13:40 +0000 Subject: bump driver date --- src/mesa/drivers/dri/i915tex/intel_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c index 3d51a6341c..cd725fc3e1 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.c +++ b/src/mesa/drivers/dri/i915tex/intel_context.c @@ -86,7 +86,7 @@ int INTEL_DEBUG = (0); #include "extension_helper.h" -#define DRIVER_DATE "20060929" +#define DRIVER_DATE "20061102" _glthread_Mutex lockMutex; static GLboolean lockMutexInit = GL_FALSE; -- cgit v1.2.3 From 51b115d5aec4ae7386d143f8bdd0289002802b7b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 18:15:26 +0000 Subject: remove unneeded extern declaration of lockMutex --- src/mesa/drivers/dri/i915tex/intel_context.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c index cd725fc3e1..080ff10d88 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.c +++ b/src/mesa/drivers/dri/i915tex/intel_context.c @@ -655,9 +655,6 @@ intelContendedLock(struct intel_context *intel, GLuint flags) } -extern _glthread_Mutex lockMutex; - - /* Lock the hardware and validate our state. */ void LOCK_HARDWARE( struct intel_context *intel ) -- cgit v1.2.3 From 6f676f4871b1701ec56298f9d22460677ed0e982 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 18:35:19 +0000 Subject: always load frag prog state params for now (see comments) --- src/mesa/swrast/s_context.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 62cf6f2f5a..52d560ffdb 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -227,7 +227,12 @@ _swrast_update_fragment_program(GLcontext *ctx, GLbitfield newState) { if (ctx->FragmentProgram._Enabled) { const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; +#if 0 + /* XXX Need a way to trigger the initial loading of parameters + * even when there's no recent state changes. + */ if (fp->Base.Parameters->StateFlags & newState) +#endif _mesa_load_state_parameters(ctx, fp->Base.Parameters); } } -- cgit v1.2.3 From c97bc619d63cafb7b0bb3724b07734e6cbd296e5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 19:16:08 +0000 Subject: remove GetBufferSize code --- src/mesa/drivers/dri/i915tex/intel_buffers.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c index d3925bbc1e..eb3422fb44 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffers.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c @@ -105,32 +105,6 @@ intel_readbuf_region(struct intel_context *intel) -static void -intelBufferSize(GLframebuffer * buffer, GLuint * width, GLuint * height) -{ - GET_CURRENT_CONTEXT(ctx); - struct intel_context *intel = intel_context(ctx); - /* Need to lock to make sure the driDrawable is uptodate. This - * information is used to resize Mesa's software buffers, so it has - * to be correct. - */ - /* XXX This isn't 100% correct, the given buffer might not be - * bound to the current context! - */ - LOCK_HARDWARE(intel); - if (intel->driDrawable) { - *width = intel->driDrawable->w; - *height = intel->driDrawable->h; - } - else { - *width = 0; - *height = 0; - } - UNLOCK_HARDWARE(intel); -} - - - /** * Update the following fields for rendering to a user-created FBO: * intel->numClipRects @@ -949,8 +923,6 @@ void intelInitBufferFuncs(struct dd_function_table *functions) { functions->Clear = intelClear; - functions->GetBufferSize = intelBufferSize; - functions->ResizeBuffers = _mesa_resize_framebuffer; functions->DrawBuffer = intelDrawBuffer; functions->ReadBuffer = intelReadBuffer; } -- cgit v1.2.3 From df5edb21f8f01f8d3e9b87b8103685690b35646f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 19:18:09 +0000 Subject: Fixes Glean vertex/fragment test failures. Those tests never called glViewport so the viewport was 0 by 0 pixels. --- src/mesa/drivers/dri/i915tex/intel_context.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c index 080ff10d88..c77d365360 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.c +++ b/src/mesa/drivers/dri/i915tex/intel_context.c @@ -577,6 +577,16 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, } } + /* set initial GLframebuffer size to match window, if needed */ + if (drawFb->Width == 0 && driDrawPriv->w) { + _mesa_resize_framebuffer(&intel->ctx, drawFb, + driDrawPriv->w, driDrawPriv->h); + } + if (readFb->Width == 0 && driReadPriv->w) { + _mesa_resize_framebuffer(&intel->ctx, readFb, + driReadPriv->w, driReadPriv->h); + } + _mesa_make_current(&intel->ctx, drawFb, readFb); /* The drawbuffer won't always be updated by _mesa_make_current: -- cgit v1.2.3 From 94249ca333eef997f865d0e0862b913cec061c6c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 19:23:41 +0000 Subject: remove GetBufferSize = NULL; assignment --- src/mesa/drivers/dri/i915/intel_context.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 4be95301c3..0a2e33ffd5 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -242,7 +242,6 @@ void intelInitDriverFunctions( struct dd_function_table *functions ) functions->Clear = intelClear; functions->Flush = intelglFlush; functions->Finish = intelFinish; - functions->GetBufferSize = NULL; /* OBSOLETE */ functions->GetString = intelGetString; functions->UpdateState = intelInvalidateState; -- cgit v1.2.3 From b6c2a6a0f295c078efc4737337ad67deaa7cee0a Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 2 Nov 2006 20:02:26 +0000 Subject: Add requested size to r300RefillCurrentDmaRegion. This way we no longuer have the fixed RADEON_BUFFER_SIZE. Anyway function calling AllocDmaRegion should check if this succeed and fail gracefuly if not (see bug 8348). --- src/mesa/drivers/dri/r300/r300_ioctl.c | 14 ++++++++------ src/mesa/drivers/dri/r300/r300_ioctl.h | 1 - src/mesa/drivers/dri/r300/radeon_context.c | 8 +++++--- src/mesa/drivers/dri/r300/radeon_mm.c | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 87276a11ae..0774a2af6b 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -570,9 +570,10 @@ void r300Flush(GLcontext * ctx) #ifdef USER_BUFFERS #include "radeon_mm.h" -void r300RefillCurrentDmaRegion(r300ContextPtr rmesa) +void r300RefillCurrentDmaRegion(r300ContextPtr rmesa, int size) { struct r300_dma_buffer *dmabuf; + size = MAX2(size, RADEON_BUFFER_SIZE*16); if (RADEON_DEBUG & (DEBUG_IOCTL | DEBUG_DMA)) fprintf(stderr, "%s\n", __FUNCTION__); @@ -591,20 +592,20 @@ void r300RefillCurrentDmaRegion(r300ContextPtr rmesa) dmabuf->buf = (void *)1; /* hack */ dmabuf->refcount = 1; - dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16); + dmabuf->id = radeon_mm_alloc(rmesa, 4, size); if (dmabuf->id == 0) { LOCK_HARDWARE(&rmesa->radeon); /* no need to validate */ r300FlushCmdBufLocked(rmesa, __FUNCTION__); radeonWaitForIdleLocked(&rmesa->radeon); - dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16); + dmabuf->id = radeon_mm_alloc(rmesa, 4, size); #ifdef HW_VBOS if (dmabuf->id == 0) { /* Just kick all */ r300_evict_vbos(rmesa->radeon.glCtx, /*RADEON_BUFFER_SIZE*16*/1<<30); - dmabuf->id = radeon_mm_alloc(rmesa, 4, RADEON_BUFFER_SIZE*16); + dmabuf->id = radeon_mm_alloc(rmesa, 4, size); } #endif UNLOCK_HARDWARE(&rmesa->radeon); @@ -617,7 +618,7 @@ void r300RefillCurrentDmaRegion(r300ContextPtr rmesa) rmesa->dma.current.buf = dmabuf; rmesa->dma.current.address = radeon_mm_ptr(rmesa, dmabuf->id); - rmesa->dma.current.end = RADEON_BUFFER_SIZE*16; + rmesa->dma.current.end = size; rmesa->dma.current.start = 0; rmesa->dma.current.ptr = 0; } @@ -665,7 +666,8 @@ void r300AllocDmaRegion(r300ContextPtr rmesa, (rmesa->dma.current.ptr + alignment) & ~alignment; if (rmesa->dma.current.ptr + bytes > rmesa->dma.current.end) - r300RefillCurrentDmaRegion(rmesa); + r300RefillCurrentDmaRegion(rmesa, + (bytes + 0x7) & ~0x7); region->start = rmesa->dma.current.start; region->ptr = rmesa->dma.current.start; diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.h b/src/mesa/drivers/dri/r300/r300_ioctl.h index 5514214cc6..52325646e9 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.h +++ b/src/mesa/drivers/dri/r300/r300_ioctl.h @@ -50,7 +50,6 @@ extern GLuint r300GartOffsetFromVirtual(r300ContextPtr rmesa, extern void r300Flush(GLcontext * ctx); -extern void r300RefillCurrentDmaRegion(r300ContextPtr rmesa); extern void r300ReleaseDmaRegion(r300ContextPtr rmesa, struct r300_dma_region *region, const char *caller); extern void r300AllocDmaRegion(r300ContextPtr rmesa, diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c index 62a6e1e5f7..9ddd2f4e28 100644 --- a/src/mesa/drivers/dri/r300/radeon_context.c +++ b/src/mesa/drivers/dri/r300/radeon_context.c @@ -267,12 +267,14 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv, fprintf(stderr, "%s ctx %p\n", __FUNCTION__, radeon->glCtx); - if ( (radeon->dri.drawable != driDrawPriv) - || (radeon->dri.readable != driReadPriv) ) { - + if (radeon->dri.drawable != driDrawPriv) { driDrawableInitVBlank(driDrawPriv, radeon->vblank_flags, &radeon->vbl_seq); + } + + if (radeon->dri.drawable != driDrawPriv || + radeon->dri.readable != driReadPriv) { radeon->dri.drawable = driDrawPriv; radeon->dri.readable = driReadPriv; diff --git a/src/mesa/drivers/dri/r300/radeon_mm.c b/src/mesa/drivers/dri/r300/radeon_mm.c index 7595d2144f..f86a1b4e72 100644 --- a/src/mesa/drivers/dri/r300/radeon_mm.c +++ b/src/mesa/drivers/dri/r300/radeon_mm.c @@ -213,7 +213,7 @@ int radeon_mm_alloc(r300ContextPtr rmesa, int alignment, int size) } goto again; #else - WARN_ONCE("Ran out of GART memory!\nPlease consider adjusting GARTSize option.\n"); + WARN_ONCE("Ran out of GART memory (for %d)!\nPlease consider adjusting GARTSize option.\n", size); return 0; #endif } -- cgit v1.2.3 From 67a101759ec0b84e4f30fbb329e86ac5031cf7e7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 21:39:20 +0000 Subject: Call _mesa_problem() from i915_program_error() so we get a nice error message. --- src/mesa/drivers/dri/i915/i915_program.c | 5 +---- src/mesa/drivers/dri/i915tex/i915_program.c | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 0faadb4f1a..9c13290d11 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -369,10 +369,7 @@ GLuint i915_emit_param4fv( struct i915_fragment_program *p, void i915_program_error( struct i915_fragment_program *p, const char *msg ) { - /* XXX we shouldn't print anything to stdout, record GL error or - * call _mesa_problem() - */ - fprintf(stderr, "%s\n", msg); + _mesa_problem(NULL, "i915_program_error: %s", msg); p->error = 1; } diff --git a/src/mesa/drivers/dri/i915tex/i915_program.c b/src/mesa/drivers/dri/i915tex/i915_program.c index 4fb56222c6..0be89d3320 100644 --- a/src/mesa/drivers/dri/i915tex/i915_program.c +++ b/src/mesa/drivers/dri/i915tex/i915_program.c @@ -379,17 +379,14 @@ i915_emit_param4fv(struct i915_fragment_program * p, const GLfloat * values) - void i915_program_error(struct i915_fragment_program *p, const char *msg) { - /* XXX we shouldn't print anything to stdout, record GL error or - * call _mesa_problem() - */ - fprintf(stderr, "%s\n", msg); + _mesa_problem(NULL, "i915_program_error: %s", msg); p->error = 1; } + void i915_init_program(struct i915_context *i915, struct i915_fragment_program *p) { -- cgit v1.2.3 From d78f65cd6cf04dafcf50b4014de9d28546badcfb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 21:43:06 +0000 Subject: Fix fragment program fog problems found with Glean. 1. add PROGRAM_CONSTANT to switch() in src_vector(). 2. use _mesa_append_fog_code() to handle fog options in i915ProgramStringNotify(). 3. Re-enable some vertex attribute emit code that was previously disabled in i915ValidateFragmentProgram(). --- src/mesa/drivers/dri/i915/i915_fragprog.c | 13 ++++++++++++- src/mesa/drivers/dri/i915tex/i915_fragprog.c | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 7160234bce..ef14f3eef7 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -39,6 +39,7 @@ #include "program_instruction.h" #include "program.h" +#include "programopt.h" @@ -123,6 +124,7 @@ static GLuint src_vector( struct i915_fragment_program *p, p, p->ctx->FragmentProgram.Parameters[source->Index]); break; + case PROGRAM_CONSTANT: case PROGRAM_STATE_VAR: case PROGRAM_NAMED_PARAM: src = i915_emit_param4fv( @@ -937,6 +939,12 @@ static void i915ProgramStringNotify( GLcontext *ctx, */ ctx->Driver.Enable( ctx, GL_FRAGMENT_PROGRAM_ARB, ctx->FragmentProgram.Enabled ); + + if (p->FragProg.FogOption) { + /* add extra instructions to do fog, then turn off FogOption field */ + _mesa_append_fog_code(ctx, &p->FragProg); + p->FragProg.FogOption = GL_NONE; + } } _tnl_program_string(ctx, target, prog); @@ -1010,7 +1018,10 @@ void i915ValidateFragmentProgram( i915ContextPtr i915 ) EMIT_PAD( 1 ); } -#if 0 + /* XXX this was disabled, but enabling this code helped fix the Glean + * tfragprog1 fog tests. + */ +#if 1 if ((inputsRead & FRAG_BIT_FOGC) || i915->vertex_fog != I915_FOG_NONE) { EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1F, S4_VFMT_FOG_PARAM, 4 ); } diff --git a/src/mesa/drivers/dri/i915tex/i915_fragprog.c b/src/mesa/drivers/dri/i915tex/i915_fragprog.c index 2ddcbc4325..8772e70230 100644 --- a/src/mesa/drivers/dri/i915tex/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915tex/i915_fragprog.c @@ -39,6 +39,7 @@ #include "program_instruction.h" #include "program.h" +#include "programopt.h" @@ -127,6 +128,7 @@ src_vector(struct i915_fragment_program *p, Index]); break; + case PROGRAM_CONSTANT: case PROGRAM_STATE_VAR: case PROGRAM_NAMED_PARAM: src = @@ -928,6 +930,12 @@ i915ProgramStringNotify(GLcontext * ctx, */ ctx->Driver.Enable(ctx, GL_FRAGMENT_PROGRAM_ARB, ctx->FragmentProgram.Enabled); + + if (p->FragProg.FogOption) { + /* add extra instructions to do fog, then turn off FogOption field */ + _mesa_append_fog_code(ctx, &p->FragProg); + p->FragProg.FogOption = GL_NONE; + } } _tnl_program_string(ctx, target, prog); @@ -1001,7 +1009,10 @@ i915ValidateFragmentProgram(struct i915_context *i915) EMIT_PAD(1); } -#if 0 + /* XXX this was disabled, but enabling this code helped fix the Glean + * tfragprog1 fog tests. + */ +#if 1 if ((inputsRead & FRAG_BIT_FOGC) || i915->vertex_fog != I915_FOG_NONE) { EMIT_ATTR(_TNL_ATTRIB_FOG, EMIT_1F, S4_VFMT_FOG_PARAM, 4); } -- cgit v1.2.3 From e812081253b2857b59d17f40dc6c9909e1957d87 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 22:39:29 +0000 Subject: Undo some of yesterday's ATI_separate_stencil changes. The ATI extension doesn't exactly match OpenGL 2.0. --- src/mesa/main/extensions.c | 3 -- src/mesa/main/mtypes.h | 1 - src/mesa/main/stencil.c | 98 ++++++++++++++++++++++++---------------------- 3 files changed, 51 insertions(+), 51 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 39f8e26f57..081ec995d3 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -135,7 +135,6 @@ static const struct { { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)}, { OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)}, { OFF, "GL_ATI_fragment_shader", F(ATI_fragment_shader)}, - { OFF, "GL_ATI_separate_stencil", F(ATI_separate_stencil)}, { OFF, "GL_IBM_multimode_draw_arrays", F(IBM_multimode_draw_arrays) }, { ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) }, { OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)}, @@ -223,7 +222,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx) #endif ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE; ctx->Extensions.ATI_texture_mirror_once = GL_TRUE; - ctx->Extensions.ATI_separate_stencil = GL_TRUE; ctx->Extensions.EXT_blend_color = GL_TRUE; ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; ctx->Extensions.EXT_blend_func_separate = GL_TRUE; @@ -390,7 +388,6 @@ _mesa_enable_2_0_extensions(GLcontext *ctx) #if FEATURE_ARB_shading_language_100 ctx->Extensions.ARB_shading_language_100 = GL_TRUE; #endif - ctx->Extensions.ATI_separate_stencil = GL_TRUE; ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */ #if FEATURE_ARB_vertex_shader ctx->Extensions.ARB_vertex_shader = GL_TRUE; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 337b0d2720..1399dddf50 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2477,7 +2477,6 @@ struct gl_extensions GLboolean ATI_texture_mirror_once; GLboolean ATI_texture_env_combine3; GLboolean ATI_fragment_shader; - GLboolean ATI_separate_stencil; GLboolean IBM_rasterpos_clip; GLboolean IBM_multimode_draw_arrays; GLboolean MESA_pack_invert; diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c index d6be410e76..ad71a81f6e 100644 --- a/src/mesa/main/stencil.c +++ b/src/mesa/main/stencil.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * 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"), @@ -38,6 +38,10 @@ * * So either we advertise the GL_EXT_stencil_two_side extension, or OpenGL * 2.0, but not both. + * + * Also, note that GL_ATI_separate_stencil is different as well: + * glStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, ...) vs. + * glStencilFuncSeparate(GLenum face, GLenum func, ...). */ @@ -115,7 +119,23 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) ref = CLAMP( ref, 0, stencilMax ); - if (ctx->Extensions.ATI_separate_stencil) { + if (ctx->Extensions.EXT_stencil_two_side) { + /* only set active face state */ + const GLint face = ctx->Stencil.ActiveFace; + if (ctx->Stencil.Function[face] == func && + ctx->Stencil.ValueMask[face] == mask && + ctx->Stencil.Ref[face] == ref) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.Function[face] = func; + ctx->Stencil.Ref[face] = ref; + ctx->Stencil.ValueMask[face] = mask; + if (ctx->Driver.StencilFuncSeparate) { + ctx->Driver.StencilFuncSeparate(ctx, face ? GL_BACK : GL_FRONT, + func, ref, mask); + } + } + else { /* set both front and back state */ if (ctx->Stencil.Function[0] == func && ctx->Stencil.Function[1] == func && @@ -133,22 +153,6 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) func, ref, mask); } } - else { - /* only set active face state */ - const GLint face = ctx->Stencil.ActiveFace; - if (ctx->Stencil.Function[face] == func && - ctx->Stencil.ValueMask[face] == mask && - ctx->Stencil.Ref[face] == ref) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.Function[face] = func; - ctx->Stencil.Ref[face] = ref; - ctx->Stencil.ValueMask[face] = mask; - if (ctx->Driver.StencilFuncSeparate) { - ctx->Driver.StencilFuncSeparate(ctx, face ? GL_BACK : GL_FRONT, - func, ref, mask); - } - } } @@ -169,26 +173,26 @@ _mesa_StencilMask( GLuint mask ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Extensions.ATI_separate_stencil) { - /* set both front and back state */ - if (ctx->Stencil.WriteMask[0] == mask && - ctx->Stencil.WriteMask[1] == mask) + if (ctx->Extensions.EXT_stencil_two_side) { + /* only set active face state */ + const GLint face = ctx->Stencil.ActiveFace; + if (ctx->Stencil.WriteMask[face] == mask) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask; + ctx->Stencil.WriteMask[face] = mask; if (ctx->Driver.StencilMaskSeparate) { - ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT_AND_BACK, mask); + ctx->Driver.StencilMaskSeparate(ctx, face ? GL_BACK : GL_FRONT, mask); } } else { - /* only set active face state */ - const GLint face = ctx->Stencil.ActiveFace; - if (ctx->Stencil.WriteMask[face] == mask) + /* set both front and back state */ + if (ctx->Stencil.WriteMask[0] == mask && + ctx->Stencil.WriteMask[1] == mask) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.WriteMask[face] = mask; + ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask; if (ctx->Driver.StencilMaskSeparate) { - ctx->Driver.StencilMaskSeparate(ctx, face ? GL_BACK : GL_FRONT, mask); + ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT_AND_BACK, mask); } } } @@ -269,7 +273,23 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) return; } - if (ctx->Extensions.ATI_separate_stencil) { + if (ctx->Extensions.EXT_stencil_two_side) { + /* only set active face state */ + const GLint face = ctx->Stencil.ActiveFace; + if (ctx->Stencil.ZFailFunc[face] == zfail && + ctx->Stencil.ZPassFunc[face] == zpass && + ctx->Stencil.FailFunc[face] == fail) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.ZFailFunc[face] = zfail; + ctx->Stencil.ZPassFunc[face] = zpass; + ctx->Stencil.FailFunc[face] = fail; + if (ctx->Driver.StencilOpSeparate) { + ctx->Driver.StencilOpSeparate(ctx, face ? GL_BACK : GL_FRONT, + fail, zfail, zpass); + } + } + else { /* set both front and back state */ if (ctx->Stencil.ZFailFunc[0] == zfail && ctx->Stencil.ZFailFunc[1] == zfail && @@ -287,22 +307,6 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) fail, zfail, zpass); } } - else { - /* only set active face state */ - const GLint face = ctx->Stencil.ActiveFace; - if (ctx->Stencil.ZFailFunc[face] == zfail && - ctx->Stencil.ZPassFunc[face] == zpass && - ctx->Stencil.FailFunc[face] == fail) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.ZFailFunc[face] = zfail; - ctx->Stencil.ZPassFunc[face] = zpass; - ctx->Stencil.FailFunc[face] = fail; - if (ctx->Driver.StencilOpSeparate) { - ctx->Driver.StencilOpSeparate(ctx, face ? GL_BACK : GL_FRONT, - fail, zfail, zpass); - } - } } -- cgit v1.2.3 From af864bb0daf3aba9bc2526d207925eea0c44d162 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 22:40:43 +0000 Subject: check for shader extensions for OpenGL 2.0 --- src/mesa/main/getstring.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index f2989aaefa..f68bbf2ff3 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -110,8 +110,10 @@ _mesa_GetString( GLenum name ) ctx->Extensions.EXT_shadow_funcs) { if (ctx->Extensions.ARB_draw_buffers && ctx->Extensions.ARB_point_sprite && - ctx->Extensions.ARB_texture_non_power_of_two && - ctx->Extensions.ATI_separate_stencil) { + ctx->Extensions.ARB_shader_objects && + ctx->Extensions.ARB_vertex_shader && + ctx->Extensions.ARB_fragment_shader && + ctx->Extensions.ARB_texture_non_power_of_two) { return (const GLubyte *) version_2_0; } else { -- cgit v1.2.3 From e441427f40d564656771447ea96685a6028a8273 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 22:53:32 +0000 Subject: Added GL_STENCIL_BACK_WRITEMASK --- src/mesa/main/get.c | 9 +++++++++ src/mesa/main/get_gen.py | 1 + 2 files changed, 10 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 9185a03943..858c822659 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1833,6 +1833,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) case GL_STENCIL_BACK_VALUE_MASK: params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]); break; + case GL_STENCIL_BACK_WRITEMASK: + params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[1]); + break; case GL_STENCIL_BACK_REF: params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]); break; @@ -3657,6 +3660,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) case GL_STENCIL_BACK_VALUE_MASK: params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]); break; + case GL_STENCIL_BACK_WRITEMASK: + params[0] = (GLfloat)(ctx->Stencil.WriteMask[1]); + break; case GL_STENCIL_BACK_REF: params[0] = (GLfloat)(ctx->Stencil.Ref[1]); break; @@ -5481,6 +5487,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) case GL_STENCIL_BACK_VALUE_MASK: params[0] = ctx->Stencil.ValueMask[1]; break; + case GL_STENCIL_BACK_WRITEMASK: + params[0] = ctx->Stencil.WriteMask[1]; + break; case GL_STENCIL_BACK_REF: params[0] = ctx->Stencil.Ref[1]; break; diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 4555bbb5f9..0f2ca00b83 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -958,6 +958,7 @@ StateVars = [ # OpenGL 2.0 ( "GL_STENCIL_BACK_FUNC", GLenum, ["ctx->Stencil.Function[1]"], "", None ), ( "GL_STENCIL_BACK_VALUE_MASK", GLint, ["ctx->Stencil.ValueMask[1]"], "", None ), + ( "GL_STENCIL_BACK_WRITEMASK", GLint, ["ctx->Stencil.WriteMask[1]"], "", None ), ( "GL_STENCIL_BACK_REF", GLint, ["ctx->Stencil.Ref[1]"], "", None ), ( "GL_STENCIL_BACK_FAIL", GLenum, ["ctx->Stencil.FailFunc[1]"], "", None ), ( "GL_STENCIL_BACK_PASS_DEPTH_FAIL", GLenum, ["ctx->Stencil.ZFailFunc[1]"], "", None ), -- cgit v1.2.3 From 959571f83595dcc8026bc6c7eb52bb9ee50cc6d5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 22:54:18 +0000 Subject: init SecondaryRasterColor --- src/mesa/main/rastpos.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index 4f490db724..ddf2ac51d3 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -994,6 +994,7 @@ void _mesa_init_rastpos( GLcontext * ctx ) ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 ); ctx->Current.RasterDistance = 0.0; ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 ); + ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 ); ctx->Current.RasterIndex = 1.0; for (i=0; iCurrent.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 ); -- cgit v1.2.3 From 71f71c2c8ab0b8af95cddc99df5dd01e4ca6af68 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 22:55:59 +0000 Subject: s/GLchan/GLubyte/ in debug code --- src/mesa/main/teximage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 662f697147..543d6efc98 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -73,11 +73,11 @@ _mesa_free_texmemory(void *m) #if 0 static void PrintTexture(GLcontext *ctx, const struct gl_texture_image *img) { -#if CHAN_TYPE == GL_FLOAT - _mesa_problem(NULL, "PrintTexture doesn't support float channels"); +#if CHAN_TYPE != GL_UNSIGNED_BYTE + _mesa_problem(NULL, "PrintTexture not supported"); #else GLuint i, j, c; - const GLchan *data = (const GLchan *) img->Data; + const GLubyte *data = (const GLubyte *) img->Data; if (!data) { _mesa_printf("No texture data\n"); -- cgit v1.2.3 From 05267501af5288a9d380df1306e5b74dcab1ec40 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 22:56:27 +0000 Subject: comment about a valgrind error --- src/mesa/main/texstore.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 2a34cfba5a..89563842c2 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -699,6 +699,7 @@ swizzle_copy(GLubyte *dst, GLuint dstComponents, const GLubyte *src, } break; case 1: + /* XXX investigate valgrind invalid read when running demos/texenv.c */ for (i = 0; i < count; i++) { COPY_4UBV(tmp, src); src += srcComponents; -- cgit v1.2.3 From dd0830228b5b4d7d730068a607c68e8bf85c2906 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:16:18 +0000 Subject: Fix GL_EXT_packed_depth_stencil crash, but shadowtex still broken --- src/mesa/drivers/dri/i915tex/intel_buffers.c | 2 +- src/mesa/drivers/dri/i915tex/intel_tex_format.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c index eb3422fb44..a6b3298623 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffers.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c @@ -827,7 +827,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb) ***/ if (fb->_DepthBuffer && fb->_DepthBuffer->Wrapped) { irbDepth = intel_renderbuffer(fb->_DepthBuffer->Wrapped); - if (irbDepth->region) { + if (irbDepth && irbDepth->region) { FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_FALSE); depthRegion = irbDepth->region; } diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_format.c b/src/mesa/drivers/dri/i915tex/intel_tex_format.c index d7612dcbaa..33281295dc 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_format.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_format.c @@ -136,6 +136,10 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat, case GL_DEPTH_COMPONENT32: return &_mesa_texformat_z16; + case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH24_STENCIL8_EXT: + return &_mesa_texformat_z24_s8; + default: fprintf(stderr, "unexpected texture format %s in %s\n", _mesa_lookup_enum_by_nr(internalFormat), __FUNCTION__); -- cgit v1.2.3 From 071db86299d25b3d3110067fbafd8d6fdd220098 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:29:03 +0000 Subject: fix typo, silence warnings --- src/mesa/drivers/dri/mga/mgastate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index 3cbffdde7d..075fd348cf 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -24,7 +24,6 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.13 2002/10/30 12:51:36 alanh Exp $ */ #include "mtypes.h" @@ -49,6 +48,8 @@ #include "swrast_setup/swrast_setup.h" #include "xmlpool.h" +#include "drirenderbuffer.h" + static void updateSpecularLighting( GLcontext *ctx ); @@ -196,7 +197,7 @@ static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, mmesa->hw.blend_func = (src | dst); FALLBACK( ctx, MGA_FALLBACK_BLEND, - ctx->Color.BlendEnabled && !RGBA_LOGICOP_ENALBED(ctx) && + ctx->Color.BlendEnabled && !RGBA_LOGICOP_ENABLED(ctx) && mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) ); } -- cgit v1.2.3 From 15193e78c944aabd9d748e24a294525cc19e67c9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:34:02 +0000 Subject: s/GLint/GLuint/ to fix sign warnings --- src/mesa/drivers/dri/r128/r128_span.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r128/r128_span.c b/src/mesa/drivers/dri/r128/r128_span.c index 25e57133cc..85798c1601 100644 --- a/src/mesa/drivers/dri/r128/r128_span.c +++ b/src/mesa/drivers/dri/r128/r128_span.c @@ -209,7 +209,7 @@ do { \ */ #define WRITE_DEPTH_SPAN() \ do { \ - GLint buf[n]; \ + GLuint buf[n]; \ GLint i; \ GLuint *readbuf = (GLuint *)((GLubyte *)sPriv->pFB + \ r128scrn->spanOffset); \ @@ -228,7 +228,7 @@ do { \ #define WRITE_DEPTH_PIXELS() \ do { \ - GLint buf[n]; \ + GLuint buf[n]; \ GLint ox[MAX_WIDTH]; \ GLint oy[MAX_WIDTH]; \ GLuint *readbuf = (GLuint *)((GLubyte *)sPriv->pFB + \ @@ -309,7 +309,7 @@ do { \ */ #define WRITE_STENCIL_SPAN() \ do { \ - GLint buf[n]; \ + GLuint buf[n]; \ GLint i; \ GLuint *readbuf = (GLuint *)((GLubyte *)sPriv->pFB + \ r128scrn->spanOffset); \ @@ -328,7 +328,7 @@ do { \ #define WRITE_STENCIL_PIXELS() \ do { \ - GLint buf[n]; \ + GLuint buf[n]; \ GLint ox[MAX_WIDTH]; \ GLint oy[MAX_WIDTH]; \ GLuint *readbuf = (GLuint *)((GLubyte *)sPriv->pFB + \ -- cgit v1.2.3 From 7941474a219b8d690e9e6df301acaeec3e94085d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:40:24 +0000 Subject: casting, type changes to silence warnings --- src/mesa/drivers/dri/r200/r200_fragshader.c | 6 +++--- src/mesa/drivers/dri/r200/r200_texstate.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_fragshader.c b/src/mesa/drivers/dri/r200/r200_fragshader.c index 7993e3015a..c350b9aaf3 100644 --- a/src/mesa/drivers/dri/r200/r200_fragshader.c +++ b/src/mesa/drivers/dri/r200/r200_fragshader.c @@ -132,10 +132,10 @@ static void r200UpdateFSArith( GLcontext *ctx ) R200_STATECHANGE( rmesa, afs[1] ); if (shader->NumPasses < 2) { - afs_cmd = rmesa->hw.afs[1].cmd; + afs_cmd = (GLuint *) rmesa->hw.afs[1].cmd; } else { - afs_cmd = rmesa->hw.afs[0].cmd; + afs_cmd = (GLuint *) rmesa->hw.afs[0].cmd; } for (pass = 0; pass < shader->NumPasses; pass++) { GLuint opnum = 0; @@ -317,7 +317,7 @@ static void r200UpdateFSArith( GLcontext *ctx ) SET_INST(opnum, 1), SET_INST_2(opnum, 1));*/ opnum++; } - afs_cmd = rmesa->hw.afs[1].cmd; + afs_cmd = (GLuint *) rmesa->hw.afs[1].cmd; } rmesa->afs_loaded = ctx->ATIFragmentShader.Current; } diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 397b27ae52..875d3bab73 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -1178,7 +1178,7 @@ static void import_tex_obj_state( r200ContextPtr rmesa, r200TexObjPtr texobj ) { /* do not use RADEON_DB_STATE to avoid stale texture caches */ - GLuint *cmd = &rmesa->hw.tex[unit].cmd[TEX_CMD_0]; + int *cmd = &rmesa->hw.tex[unit].cmd[TEX_CMD_0]; R200_STATECHANGE( rmesa, tex[unit] ); @@ -1199,7 +1199,7 @@ static void import_tex_obj_state( r200ContextPtr rmesa, } if (texobj->base.tObj->Target == GL_TEXTURE_CUBE_MAP) { - GLuint *cube_cmd = &rmesa->hw.cube[unit].cmd[CUBE_CMD_0]; + int *cube_cmd = &rmesa->hw.cube[unit].cmd[CUBE_CMD_0]; GLuint bytesPerFace = texobj->base.totalSize / 6; ASSERT(texobj->base.totalSize % 6 == 0); -- cgit v1.2.3 From ce55bbe9ef8077a0d5b93cf0d128306c888263d4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:41:37 +0000 Subject: s/GLuint/int/ to silence warnings --- src/mesa/drivers/dri/radeon/radeon_texstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index cfa8d4c9fa..37bb749223 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texstate.c +++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c @@ -865,7 +865,7 @@ static void import_tex_obj_state( radeonContextPtr rmesa, radeonTexObjPtr texobj ) { /* do not use RADEON_DB_STATE to avoid stale texture caches */ - GLuint *cmd = &rmesa->hw.tex[unit].cmd[TEX_CMD_0]; + int *cmd = &rmesa->hw.tex[unit].cmd[TEX_CMD_0]; GLuint se_coord_fmt = rmesa->hw.set.cmd[SET_SE_COORDFMT]; RADEON_STATECHANGE( rmesa, tex[unit] ); @@ -888,7 +888,7 @@ static void import_tex_obj_state( radeonContextPtr rmesa, se_coord_fmt &= ~(RADEON_VTX_ST0_NONPARAMETRIC << unit); if (texobj->base.tObj->Target == GL_TEXTURE_CUBE_MAP) { - GLuint *cube_cmd = &rmesa->hw.cube[unit].cmd[CUBE_CMD_0]; + int *cube_cmd = &rmesa->hw.cube[unit].cmd[CUBE_CMD_0]; GLuint bytesPerFace = texobj->base.totalSize / 6; ASSERT(texobj->base.totalSize % 6 == 0); -- cgit v1.2.3 From fc69beecb680daa8cbc9cac173bd8c5650270f52 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:43:22 +0000 Subject: include utils.h to silence warning --- src/mesa/drivers/dri/trident/trident_context.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/trident/trident_context.c b/src/mesa/drivers/dri/trident/trident_context.c index 9c8f7ef01f..d380658647 100644 --- a/src/mesa/drivers/dri/trident/trident_context.c +++ b/src/mesa/drivers/dri/trident/trident_context.c @@ -50,6 +50,7 @@ #include "drivers/common/driverfuncs.h" #include "dri_util.h" +#include "utils.h" static const struct tnl_pipeline_stage *trident_pipeline[] = { &_tnl_vertex_transform_stage, -- cgit v1.2.3 From 7a28779b2e85bc346f0f3f4cda0d4f4e77d3719f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:56:08 +0000 Subject: minor change in _mesa_ResizeBuffersMESA() --- src/mesa/main/buffers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index ece53463b3..0e3ed15584 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -648,7 +648,8 @@ _mesa_ResizeBuffersMESA( void ) { GET_CURRENT_CONTEXT(ctx); - _mesa_resizebuffers( ctx ); + if (ctx->Extensions.MESA_resize_buffers) + _mesa_resizebuffers( ctx ); } -- cgit v1.2.3 From 83a5c2bf63ef285dea096612f4d84236e9c8d543 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:58:27 +0000 Subject: Update gl_API.xml with OpenGL 2.0 functions, regenerate derived files. --- src/glx/x11/indirect.c | 2 +- src/glx/x11/indirect_vertex_array.c | 6 +- src/mesa/drivers/dri/common/extension_helper.h | 528 ++- src/mesa/glapi/dispatch.h | 783 ++-- src/mesa/glapi/gl_API.xml | 628 ++- src/mesa/glapi/glapioffsets.h | 718 +-- src/mesa/glapi/glapitable.h | 703 +-- src/mesa/glapi/glapitemp.h | 748 ++- src/mesa/glapi/glprocs.h | 1312 +++--- src/mesa/main/enums.c | 5872 ++++++++++++------------ src/mesa/sparc/glapi_sparc.S | 223 +- src/mesa/x86-64/glapi_x86-64.S | 3608 ++++++++------- src/mesa/x86/glapi_x86.S | 210 +- 13 files changed, 8925 insertions(+), 6416 deletions(-) (limited to 'src/mesa') diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index b62f2a3a17..b5c306c562 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -31,8 +31,8 @@ #include "glxclient.h" #include "indirect_size.h" #include "dispatch.h" -#include "glthread.h" #include "glapi.h" +#include "glthread.h" #include #ifdef USE_XCB #include diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c index 5a5cd6697e..429b52ae63 100644 --- a/src/glx/x11/indirect_vertex_array.c +++ b/src/glx/x11/indirect_vertex_array.c @@ -123,10 +123,8 @@ __glXInitVertexArrayState( __GLXcontext * gc ) struct array_state_vector * arrays; unsigned array_count; - unsigned texture_units = 1; - unsigned i; - unsigned j; - unsigned vertex_program_attribs = 0; + int texture_units = 1, vertex_program_attribs = 0; + unsigned i, j; GLboolean got_fog = GL_FALSE; GLboolean got_secondary_color = GL_FALSE; diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h index 618f1794c1..1434edb4cb 100644 --- a/src/mesa/drivers/dri/common/extension_helper.h +++ b/src/mesa/drivers/dri/common/extension_helper.h @@ -32,9 +32,10 @@ # define NULL 0 #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char UniformMatrix3fvARB_names[] = "iiip\0" /* Parameter signature */ + "glUniformMatrix3fv\0" "glUniformMatrix3fvARB\0" ""; #endif @@ -78,6 +79,13 @@ static const char PointParameteriNV_names[] = ""; #endif +#if defined(need_GL_VERSION_2_0) +static const char GetProgramiv_names[] = + "iip\0" /* Parameter signature */ + "glGetProgramiv\0" + ""; +#endif + #if defined(need_GL_VERSION_1_3) static const char MultiTexCoord3sARB_names[] = "iiii\0" /* Parameter signature */ @@ -231,16 +239,17 @@ static const char TexCoord2fColor4ubVertex3fvSUN_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) -static const char ProgramEnvParameter4dvARB_names[] = - "iip\0" /* Parameter signature */ - "glProgramEnvParameter4dvARB\0" +#if defined(need_GL_VERSION_2_0) +static const char AttachShader_names[] = + "ii\0" /* Parameter signature */ + "glAttachShader\0" ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2fARB_names[] = "iff\0" /* Parameter signature */ + "glVertexAttrib2f\0" "glVertexAttrib2fARB\0" ""; #endif @@ -252,9 +261,10 @@ static const char GetDebugLogLengthMESA_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib3fARB_names[] = "ifff\0" /* Parameter signature */ + "glVertexAttrib3f\0" "glVertexAttrib3fARB\0" ""; #endif @@ -305,16 +315,25 @@ static const char CompressedTexSubImage2DARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_NV_register_combiners) +static const char CombinerOutputNV_names[] = + "iiiiiiiiii\0" /* Parameter signature */ + "glCombinerOutputNV\0" + ""; +#endif + +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform2fARB_names[] = "iff\0" /* Parameter signature */ + "glUniform2f\0" "glUniform2fARB\0" ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib1svARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib1sv\0" "glVertexAttrib1svARB\0" ""; #endif @@ -326,9 +345,10 @@ static const char VertexAttribs1dvNV_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform2ivARB_names[] = "iip\0" /* Parameter signature */ + "glUniform2iv\0" "glUniform2ivARB\0" ""; #endif @@ -347,6 +367,13 @@ static const char WeightubvARB_names[] = ""; #endif +#if defined(need_GL_NV_vertex_program) +static const char VertexAttrib1fvNV_names[] = + "ip\0" /* Parameter signature */ + "glVertexAttrib1fvNV\0" + ""; +#endif + #if defined(need_GL_EXT_convolution) static const char CopyConvolutionFilter1D_names[] = "iiiii\0" /* Parameter signature */ @@ -377,9 +404,10 @@ static const char BlendColor_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char UniformMatrix4fvARB_names[] = "iiip\0" /* Parameter signature */ + "glUniformMatrix4fv\0" "glUniformMatrix4fvARB\0" ""; #endif @@ -412,9 +440,10 @@ static const char GetListParameterivSGIX_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NusvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4Nusv\0" "glVertexAttrib4NusvARB\0" ""; #endif @@ -536,9 +565,10 @@ static const char ProgramParameter4dvNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char DisableVertexAttribArrayARB_names[] = "i\0" /* Parameter signature */ + "glDisableVertexAttribArray\0" "glDisableVertexAttribArrayARB\0" ""; #endif @@ -573,9 +603,10 @@ static const char GetConvolutionParameteriv_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib1fARB_names[] = "if\0" /* Parameter signature */ + "glVertexAttrib1f\0" "glVertexAttrib1fARB\0" ""; #endif @@ -688,16 +719,25 @@ static const char VertexAttrib2dNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) +static const char GetProgramInfoLog_names[] = + "iipp\0" /* Parameter signature */ + "glGetProgramInfoLog\0" + ""; +#endif + +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NbvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4Nbv\0" "glVertexAttrib4NbvARB\0" ""; #endif -#if defined(need_GL_ARB_vertex_shader) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_shader) static const char GetActiveAttribARB_names[] = "iiipppp\0" /* Parameter signature */ + "glGetActiveAttrib\0" "glGetActiveAttribARB\0" ""; #endif @@ -863,9 +903,10 @@ static const char ReplacementCodeubvSUN_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform3iARB_names[] = "iiii\0" /* Parameter signature */ + "glUniform3i\0" "glUniform3iARB\0" ""; #endif @@ -877,10 +918,10 @@ static const char GetFragmentMaterialfvSGIX_names[] = ""; #endif -#if defined(need_GL_EXT_coordinate_frame) -static const char Binormal3fEXT_names[] = - "fff\0" /* Parameter signature */ - "glBinormal3fEXT\0" +#if defined(need_GL_VERSION_2_0) +static const char GetShaderInfoLog_names[] = + "iipp\0" /* Parameter signature */ + "glGetShaderInfoLog\0" ""; #endif @@ -998,9 +1039,10 @@ static const char TexSubImage1D_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib1sARB_names[] = "ii\0" /* Parameter signature */ + "glVertexAttrib1s\0" "glVertexAttrib1sARB\0" ""; #endif @@ -1026,9 +1068,10 @@ static const char ReplacementCodeuiTexCoord2fVertex3fSUN_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform1fARB_names[] = "if\0" /* Parameter signature */ + "glUniform1f\0" "glUniform1fARB\0" ""; #endif @@ -1162,9 +1205,10 @@ static const char GetFragmentLightivSGIX_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char UniformMatrix2fvARB_names[] = "iiip\0" /* Parameter signature */ + "glUniformMatrix2fv\0" "glUniformMatrix2fvARB\0" ""; #endif @@ -1208,9 +1252,10 @@ static const char MapParameterfvNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib3dvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib3dv\0" "glVertexAttrib3dvARB\0" ""; #endif @@ -1301,9 +1346,10 @@ static const char GetAttachedObjectsARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform3fvARB_names[] = "iip\0" /* Parameter signature */ + "glUniform3fv\0" "glUniform3fvARB\0" ""; #endif @@ -1344,9 +1390,10 @@ static const char GetHandleARB_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char GetVertexAttribivARB_names[] = "iip\0" /* Parameter signature */ + "glGetVertexAttribiv\0" "glGetVertexAttribivARB\0" ""; #endif @@ -1358,10 +1405,10 @@ static const char GetCombinerInputParameterfvNV_names[] = ""; #endif -#if defined(need_GL_SUN_vertex) -static const char ReplacementCodeuiNormal3fVertex3fvSUN_names[] = - "ppp\0" /* Parameter signature */ - "glReplacementCodeuiNormal3fVertex3fvSUN\0" +#if defined(need_GL_VERSION_2_0) +static const char CreateProgram_names[] = + "\0" /* Parameter signature */ + "glCreateProgram\0" ""; #endif @@ -1599,9 +1646,10 @@ static const char VertexAttrib3dNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib3dARB_names[] = "iddd\0" /* Parameter signature */ + "glVertexAttrib3d\0" "glVertexAttrib3dARB\0" ""; #endif @@ -1613,9 +1661,10 @@ static const char ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_names[] ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4fARB_names[] = "iffff\0" /* Parameter signature */ + "glVertexAttrib4f\0" "glVertexAttrib4fARB\0" ""; #endif @@ -1664,9 +1713,10 @@ static const char SecondaryColorPointerEXT_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4fvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4fv\0" "glVertexAttrib4fvARB\0" ""; #endif @@ -1678,9 +1728,10 @@ static const char ColorPointerListIBM_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char GetActiveUniformARB_names[] = "iiipppp\0" /* Parameter signature */ + "glGetActiveUniform\0" "glGetActiveUniformARB\0" ""; #endif @@ -1722,6 +1773,13 @@ static const char DeformationMap3dSGIX_names[] = ""; #endif +#if defined(need_GL_VERSION_2_0) +static const char IsShader_names[] = + "i\0" /* Parameter signature */ + "glIsShader\0" + ""; +#endif + #if defined(need_GL_HP_image_transform) static const char GetImageTransformParameterivHP_names[] = "iip\0" /* Parameter signature */ @@ -1766,9 +1824,10 @@ static const char ResizeBuffersMESA_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char GetUniformivARB_names[] = "iip\0" /* Parameter signature */ + "glGetUniformiv\0" "glGetUniformivARB\0" ""; #endif @@ -1860,6 +1919,13 @@ static const char MultiTexCoord3iARB_names[] = ""; #endif +#if defined(need_GL_VERSION_2_0) +static const char IsProgram_names[] = + "i\0" /* Parameter signature */ + "glIsProgram\0" + ""; +#endif + #if defined(need_GL_IBM_vertex_array_lists) static const char TexCoordPointerListIBM_names[] = "iiipi\0" /* Parameter signature */ @@ -1998,9 +2064,10 @@ static const char PointParameterivNV_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform2fvARB_names[] = "iip\0" /* Parameter signature */ + "glUniform2fv\0" "glUniform2fvARB\0" ""; #endif @@ -2027,10 +2094,10 @@ static const char DeleteObjectARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) -static const char UseProgramObjectARB_names[] = - "i\0" /* Parameter signature */ - "glUseProgramObjectARB\0" +#if defined(need_GL_ARB_matrix_palette) +static const char MatrixIndexPointerARB_names[] = + "iiip\0" /* Parameter signature */ + "glMatrixIndexPointerARB\0" ""; #endif @@ -2055,10 +2122,11 @@ static const char BindFramebufferEXT_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) -static const char VertexAttrib4usvARB_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib4usvARB\0" +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) +static const char ValidateProgramARB_names[] = + "i\0" /* Parameter signature */ + "glValidateProgram\0" + "glValidateProgramARB\0" ""; #endif @@ -2100,9 +2168,10 @@ static const char CopyTexSubImage3D_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2dARB_names[] = "idd\0" /* Parameter signature */ + "glVertexAttrib2d\0" "glVertexAttrib2dARB\0" ""; #endif @@ -2169,9 +2238,10 @@ static const char MultiTexCoord2sARB_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib1dvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib1dv\0" "glVertexAttrib1dvARB\0" ""; #endif @@ -2226,9 +2296,10 @@ static const char DeformSGIX_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char GetVertexAttribfvARB_names[] = "iip\0" /* Parameter signature */ + "glGetVertexAttribfv\0" "glGetVertexAttribfvARB\0" ""; #endif @@ -2255,6 +2326,13 @@ static const char GetCombinerStageParameterfvNV_names[] = ""; #endif +#if defined(need_GL_EXT_coordinate_frame) +static const char Binormal3fEXT_names[] = + "fff\0" /* Parameter signature */ + "glBinormal3fEXT\0" + ""; +#endif + #if defined(need_GL_SUN_vertex) static const char Color4ubVertex2fvSUN_names[] = "pp\0" /* Parameter signature */ @@ -2277,9 +2355,10 @@ static const char SampleMaskSGIS_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_shader) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_shader) static const char GetAttribLocationARB_names[] = "ip\0" /* Parameter signature */ + "glGetAttribLocation\0" "glGetAttribLocationARB\0" ""; #endif @@ -2328,9 +2407,10 @@ static const char ProgramEnvParameter4fARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform3ivARB_names[] = "iip\0" /* Parameter signature */ + "glUniform3iv\0" "glUniform3ivARB\0" ""; #endif @@ -2365,10 +2445,10 @@ static const char MultiTexCoord4ivARB_names[] = ""; #endif -#if defined(need_GL_EXT_gpu_program_parameters) -static const char ProgramLocalParameters4fvEXT_names[] = - "iiip\0" /* Parameter signature */ - "glProgramLocalParameters4fvEXT\0" +#if defined(need_GL_VERSION_2_0) +static const char GetVertexAttribPointervARB_names[] = + "iip\0" /* Parameter signature */ + "glGetVertexAttribPointerv\0" ""; #endif @@ -2379,9 +2459,10 @@ static const char GetMapAttribParameterfvNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4sARB_names[] = "iiiii\0" /* Parameter signature */ + "glVertexAttrib4s\0" "glVertexAttrib4sARB\0" ""; #endif @@ -2408,9 +2489,10 @@ static const char GenRenderbuffersEXT_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2dvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib2dv\0" "glVertexAttrib2dvARB\0" ""; #endif @@ -2436,9 +2518,10 @@ static const char WeightbvARB_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2fvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib2fv\0" "glVertexAttrib2fvARB\0" ""; #endif @@ -2472,17 +2555,18 @@ static const char InstrumentsBufferSGIX_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NivARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4Niv\0" "glVertexAttrib4NivARB\0" ""; #endif -#if defined(need_GL_SUN_triangle_list) -static const char ReplacementCodeuivSUN_names[] = - "p\0" /* Parameter signature */ - "glReplacementCodeuivSUN\0" +#if defined(need_GL_VERSION_2_0) +static const char GetAttachedShaders_names[] = + "iipp\0" /* Parameter signature */ + "glGetAttachedShaders\0" ""; #endif @@ -2500,6 +2584,13 @@ static const char ProgramEnvParameters4fvEXT_names[] = ""; #endif +#if defined(need_GL_SUN_vertex) +static const char TexCoord2fColor4fNormal3fVertex3fvSUN_names[] = + "pppp\0" /* Parameter signature */ + "glTexCoord2fColor4fNormal3fVertex3fvSUN\0" + ""; +#endif + #if defined(need_GL_VERSION_1_4) || defined(need_GL_ARB_window_pos) || defined(need_GL_MESA_window_pos) static const char WindowPos2iMESA_names[] = "ii\0" /* Parameter signature */ @@ -2539,17 +2630,26 @@ static const char GetProgramStringARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char CompileShaderARB_names[] = "i\0" /* Parameter signature */ + "glCompileShader\0" "glCompileShaderARB\0" ""; #endif -#if defined(need_GL_NV_register_combiners) -static const char CombinerOutputNV_names[] = - "iiiiiiiiii\0" /* Parameter signature */ - "glCombinerOutputNV\0" +#if defined(need_GL_VERSION_2_0) +static const char DeleteShader_names[] = + "i\0" /* Parameter signature */ + "glDeleteShader\0" + ""; +#endif + +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) +static const char Uniform3fARB_names[] = + "ifff\0" /* Parameter signature */ + "glUniform3f\0" + "glUniform3fARB\0" ""; #endif @@ -2611,9 +2711,10 @@ static const char WindowPos4sMESA_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NuivARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4Nuiv\0" "glVertexAttrib4NuivARB\0" ""; #endif @@ -2640,9 +2741,10 @@ static const char ReplacementCodeusvSUN_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform4fARB_names[] = "iffff\0" /* Parameter signature */ + "glUniform4f\0" "glUniform4fARB\0" ""; #endif @@ -2713,9 +2815,10 @@ static const char VertexWeightfvEXT_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib1dARB_names[] = "id\0" /* Parameter signature */ + "glVertexAttrib1d\0" "glVertexAttrib1dARB\0" ""; #endif @@ -2779,9 +2882,17 @@ static const char ReplacementCodeuiColor4ubVertex3fSUN_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_ARB_vertex_program) +static const char VertexAttrib4usvARB_names[] = + "ip\0" /* Parameter signature */ + "glVertexAttrib4usvARB\0" + ""; +#endif + +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char LinkProgramARB_names[] = "i\0" /* Parameter signature */ + "glLinkProgram\0" "glLinkProgramARB\0" ""; #endif @@ -2793,9 +2904,10 @@ static const char VertexAttrib2fNV_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char ShaderSourceARB_names[] = "iipp\0" /* Parameter signature */ + "glShaderSource\0" "glShaderSourceARB\0" ""; #endif @@ -2807,9 +2919,10 @@ static const char FragmentMaterialiSGIX_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib3svARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib3sv\0" "glVertexAttrib3svARB\0" ""; #endif @@ -2838,16 +2951,18 @@ static const char IsFramebufferEXT_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform4ivARB_names[] = "iip\0" /* Parameter signature */ + "glUniform4iv\0" "glUniform4ivARB\0" ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char GetVertexAttribdvARB_names[] = "iip\0" /* Parameter signature */ + "glGetVertexAttribdv\0" "glGetVertexAttribdvARB\0" ""; #endif @@ -2910,9 +3025,10 @@ static const char MultiDrawElementsEXT_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform1ivARB_names[] = "iip\0" /* Parameter signature */ + "glUniform1iv\0" "glUniform1ivARB\0" ""; #endif @@ -2956,16 +3072,18 @@ static const char SecondaryColor3ubvEXT_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4dvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4dv\0" "glVertexAttrib4dvARB\0" ""; #endif -#if defined(need_GL_ARB_vertex_shader) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_shader) static const char BindAttribLocationARB_names[] = "iip\0" /* Parameter signature */ + "glBindAttribLocation\0" "glBindAttribLocationARB\0" ""; #endif @@ -3013,6 +3131,13 @@ static const char VertexAttribPointerNV_names[] = ""; #endif +#if defined(need_GL_EXT_gpu_program_parameters) +static const char ProgramLocalParameters4fvEXT_names[] = + "iiip\0" /* Parameter signature */ + "glProgramLocalParameters4fvEXT\0" + ""; +#endif + #if defined(need_GL_EXT_framebuffer_object) static const char GetFramebufferAttachmentParameterivEXT_names[] = "iiip\0" /* Parameter signature */ @@ -3035,13 +3160,6 @@ static const char PixelTransformParameteriEXT_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) -static const char ValidateProgramARB_names[] = - "i\0" /* Parameter signature */ - "glValidateProgramARB\0" - ""; -#endif - #if defined(need_GL_SUN_vertex) static const char TexCoord2fColor4ubVertex3fSUN_names[] = "ffiiiifff\0" /* Parameter signature */ @@ -3049,16 +3167,18 @@ static const char TexCoord2fColor4ubVertex3fSUN_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform1iARB_names[] = "ii\0" /* Parameter signature */ + "glUniform1i\0" "glUniform1iARB\0" ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttribPointerARB_names[] = "iiiiip\0" /* Parameter signature */ + "glVertexAttribPointer\0" "glVertexAttribPointerARB\0" ""; #endif @@ -3120,16 +3240,18 @@ static const char Normal3fVertex3fvSUN_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NsvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4Nsv\0" "glVertexAttrib4NsvARB\0" ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib3fvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib3fv\0" "glVertexAttrib3fvARB\0" ""; #endif @@ -3192,10 +3314,10 @@ static const char PixelTexGenParameterfSGIS_names[] = ""; #endif -#if defined(need_GL_SUN_vertex) -static const char TexCoord2fColor4fNormal3fVertex3fvSUN_names[] = - "pppp\0" /* Parameter signature */ - "glTexCoord2fColor4fNormal3fVertex3fvSUN\0" +#if defined(need_GL_VERSION_2_0) +static const char CreateShader_names[] = + "i\0" /* Parameter signature */ + "glCreateShader\0" ""; #endif @@ -3258,16 +3380,17 @@ static const char FragmentLightfvSGIX_names[] = ""; #endif -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib3sNV_names[] = - "iiii\0" /* Parameter signature */ - "glVertexAttrib3sNV\0" +#if defined(need_GL_VERSION_2_0) +static const char DetachShader_names[] = + "ii\0" /* Parameter signature */ + "glDetachShader\0" ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NubARB_names[] = "iiiii\0" /* Parameter signature */ + "glVertexAttrib4Nub\0" "glVertexAttrib4NubARB\0" ""; #endif @@ -3293,9 +3416,10 @@ static const char VertexAttrib3svNV_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform4fvARB_names[] = "iip\0" /* Parameter signature */ + "glUniform4fv\0" "glUniform4fvARB\0" ""; #endif @@ -3315,9 +3439,10 @@ static const char ColorFragmentOp1ATI_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char GetUniformfvARB_names[] = "iip\0" /* Parameter signature */ + "glGetUniformfv\0" "glGetUniformfvARB\0" ""; #endif @@ -3462,9 +3587,10 @@ static const char GetMapParameterivNV_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform4iARB_names[] = "iiiii\0" /* Parameter signature */ + "glUniform4i\0" "glUniform4iARB\0" ""; #endif @@ -3501,6 +3627,13 @@ static const char GetColorTableParameteriv_names[] = ""; #endif +#if defined(need_GL_ARB_vertex_program) +static const char ProgramEnvParameter4dvARB_names[] = + "iip\0" /* Parameter signature */ + "glProgramEnvParameter4dvARB\0" + ""; +#endif + #if defined(need_GL_NV_vertex_program) static const char VertexAttribs2fvNV_names[] = "iip\0" /* Parameter signature */ @@ -3508,10 +3641,11 @@ static const char VertexAttribs2fvNV_names[] = ""; #endif -#if defined(need_GL_ARB_matrix_palette) -static const char MatrixIndexPointerARB_names[] = - "iiip\0" /* Parameter signature */ - "glMatrixIndexPointerARB\0" +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) +static const char UseProgramObjectARB_names[] = + "i\0" /* Parameter signature */ + "glUseProgram\0" + "glUseProgramObjectARB\0" ""; #endif @@ -3529,10 +3663,10 @@ static const char PassTexCoordATI_names[] = ""; #endif -#if defined(need_GL_NV_vertex_program) -static const char VertexAttrib1fvNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexAttrib1fvNV\0" +#if defined(need_GL_VERSION_2_0) +static const char DeleteProgram_names[] = + "i\0" /* Parameter signature */ + "glDeleteProgram\0" ""; #endif @@ -3635,9 +3769,10 @@ static const char MultiTexCoord1dvARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform2iARB_names[] = "iii\0" /* Parameter signature */ + "glUniform2i\0" "glUniform2iARB\0" ""; #endif @@ -3729,9 +3864,10 @@ static const char VertexAttribs4dvNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4dARB_names[] = "idddd\0" /* Parameter signature */ + "glVertexAttrib4d\0" "glVertexAttrib4dARB\0" ""; #endif @@ -3907,9 +4043,10 @@ static const char GetFogFuncSGIS_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char GetUniformLocationARB_names[] = "ip\0" /* Parameter signature */ + "glGetUniformLocation\0" "glGetUniformLocationARB\0" ""; #endif @@ -3929,13 +4066,21 @@ static const char CombinerInputNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib3sARB_names[] = "iiii\0" /* Parameter signature */ + "glVertexAttrib3s\0" "glVertexAttrib3sARB\0" ""; #endif +#if defined(need_GL_SUN_vertex) +static const char ReplacementCodeuiNormal3fVertex3fvSUN_names[] = + "ppp\0" /* Parameter signature */ + "glReplacementCodeuiNormal3fVertex3fvSUN\0" + ""; +#endif + #if defined(need_GL_ARB_vertex_program) static const char ProgramStringARB_names[] = "iiip\0" /* Parameter signature */ @@ -3950,6 +4095,13 @@ static const char TexCoord4fVertex4fvSUN_names[] = ""; #endif +#if defined(need_GL_NV_vertex_program) +static const char VertexAttrib3sNV_names[] = + "iiii\0" /* Parameter signature */ + "glVertexAttrib3sNV\0" + ""; +#endif + #if defined(need_GL_NV_vertex_program) static const char VertexAttrib1fNV_names[] = "if\0" /* Parameter signature */ @@ -3994,9 +4146,10 @@ static const char ActiveStencilFaceEXT_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char GetShaderSourceARB_names[] = "iipp\0" /* Parameter signature */ + "glGetShaderSource\0" "glGetShaderSourceARB\0" ""; #endif @@ -4111,9 +4264,10 @@ static const char WeightsvARB_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char Uniform1fvARB_names[] = "iip\0" /* Parameter signature */ + "glUniform1fv\0" "glUniform1fvARB\0" ""; #endif @@ -4156,9 +4310,17 @@ static const char VertexAttribs3svNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_SUN_triangle_list) +static const char ReplacementCodeuivSUN_names[] = + "p\0" /* Parameter signature */ + "glReplacementCodeuivSUN\0" + ""; +#endif + +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char EnableVertexAttribArrayARB_names[] = "i\0" /* Parameter signature */ + "glEnableVertexAttribArray\0" "glEnableVertexAttribArrayARB\0" ""; #endif @@ -4305,9 +4467,10 @@ static const char BindProgramNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4svARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4sv\0" "glVertexAttrib4svARB\0" ""; #endif @@ -4319,10 +4482,10 @@ static const char CreateDebugObjectMESA_names[] = ""; #endif -#if defined(need_GL_ARB_shader_objects) -static const char Uniform3fARB_names[] = - "ifff\0" /* Parameter signature */ - "glUniform3fARB\0" +#if defined(need_GL_VERSION_2_0) +static const char GetShaderiv_names[] = + "iip\0" /* Parameter signature */ + "glGetShaderiv\0" ""; #endif @@ -4378,9 +4541,10 @@ static const char GetFinalCombinerInputParameterfvNV_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2svARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib2sv\0" "glVertexAttrib2svARB\0" ""; #endif @@ -4423,9 +4587,10 @@ static const char PollInstrumentsSGIX_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib4NubvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib4Nubv\0" "glVertexAttrib4NubvARB\0" ""; #endif @@ -4530,9 +4695,10 @@ static const char WeightuivARB_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2sARB_names[] = "iii\0" /* Parameter signature */ + "glVertexAttrib2s\0" "glVertexAttrib2sARB\0" ""; #endif @@ -4588,9 +4754,10 @@ static const char GetMinmaxParameterfv_names[] = ""; #endif -#if defined(need_GL_ARB_vertex_program) +#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib1fvARB_names[] = "ip\0" /* Parameter signature */ + "glVertexAttrib1fv\0" "glVertexAttrib1fvARB\0" ""; #endif @@ -4697,9 +4864,9 @@ static const struct dri_extension_function GL_ARB_draw_buffers_functions[] = { static const struct dri_extension_function GL_ARB_matrix_palette_functions[] = { { MatrixIndexusvARB_names, MatrixIndexusvARB_remap_index, -1 }, { MatrixIndexuivARB_names, MatrixIndexuivARB_remap_index, -1 }, + { MatrixIndexPointerARB_names, MatrixIndexPointerARB_remap_index, -1 }, { CurrentPaletteMatrixARB_names, CurrentPaletteMatrixARB_remap_index, -1 }, { MatrixIndexubvARB_names, MatrixIndexubvARB_remap_index, -1 }, - { MatrixIndexPointerARB_names, MatrixIndexPointerARB_remap_index, -1 }, { NULL, 0, 0 } }; #endif @@ -4752,26 +4919,26 @@ static const struct dri_extension_function GL_ARB_shader_objects_functions[] = { { GetUniformivARB_names, GetUniformivARB_remap_index, -1 }, { Uniform2fvARB_names, Uniform2fvARB_remap_index, -1 }, { DeleteObjectARB_names, DeleteObjectARB_remap_index, -1 }, - { UseProgramObjectARB_names, UseProgramObjectARB_remap_index, -1 }, + { ValidateProgramARB_names, ValidateProgramARB_remap_index, -1 }, { Uniform3ivARB_names, Uniform3ivARB_remap_index, -1 }, { CompileShaderARB_names, CompileShaderARB_remap_index, -1 }, + { Uniform3fARB_names, Uniform3fARB_remap_index, -1 }, { Uniform4fARB_names, Uniform4fARB_remap_index, -1 }, { LinkProgramARB_names, LinkProgramARB_remap_index, -1 }, { ShaderSourceARB_names, ShaderSourceARB_remap_index, -1 }, { Uniform4ivARB_names, Uniform4ivARB_remap_index, -1 }, { Uniform1ivARB_names, Uniform1ivARB_remap_index, -1 }, - { ValidateProgramARB_names, ValidateProgramARB_remap_index, -1 }, { Uniform1iARB_names, Uniform1iARB_remap_index, -1 }, { Uniform4fvARB_names, Uniform4fvARB_remap_index, -1 }, { GetUniformfvARB_names, GetUniformfvARB_remap_index, -1 }, { DetachObjectARB_names, DetachObjectARB_remap_index, -1 }, { Uniform4iARB_names, Uniform4iARB_remap_index, -1 }, + { UseProgramObjectARB_names, UseProgramObjectARB_remap_index, -1 }, { Uniform2iARB_names, Uniform2iARB_remap_index, -1 }, { GetObjectParameterivARB_names, GetObjectParameterivARB_remap_index, -1 }, { GetUniformLocationARB_names, GetUniformLocationARB_remap_index, -1 }, { GetShaderSourceARB_names, GetShaderSourceARB_remap_index, -1 }, { Uniform1fvARB_names, Uniform1fvARB_remap_index, -1 }, - { Uniform3fARB_names, Uniform3fARB_remap_index, -1 }, { GetObjectParameterfvARB_names, GetObjectParameterfvARB_remap_index, -1 }, { GetInfoLogARB_names, GetInfoLogARB_remap_index, -1 }, { NULL, 0, 0 } @@ -4836,7 +5003,6 @@ static const struct dri_extension_function GL_ARB_vertex_buffer_object_functions #if defined(need_GL_ARB_vertex_program) static const struct dri_extension_function GL_ARB_vertex_program_functions[] = { - { ProgramEnvParameter4dvARB_names, ProgramEnvParameter4dvARB_remap_index, -1 }, { VertexAttrib2fARB_names, VertexAttrib2fARB_remap_index, -1 }, { VertexAttrib3fARB_names, VertexAttrib3fARB_remap_index, -1 }, { VertexAttrib1svARB_names, VertexAttrib1svARB_remap_index, -1 }, @@ -4856,7 +5022,6 @@ static const struct dri_extension_function GL_ARB_vertex_program_functions[] = { { VertexAttrib4fARB_names, VertexAttrib4fARB_remap_index, -1 }, { VertexAttrib4fvARB_names, VertexAttrib4fvARB_remap_index, -1 }, { ProgramLocalParameter4dvARB_names, ProgramLocalParameter4dvARB_remap_index, -1 }, - { VertexAttrib4usvARB_names, VertexAttrib4usvARB_remap_index, -1 }, { VertexAttrib2dARB_names, VertexAttrib2dARB_remap_index, -1 }, { VertexAttrib1dvARB_names, VertexAttrib1dvARB_remap_index, -1 }, { GetVertexAttribfvARB_names, GetVertexAttribfvARB_remap_index, -1 }, @@ -4871,6 +5036,7 @@ static const struct dri_extension_function GL_ARB_vertex_program_functions[] = { { IsProgramNV_names, IsProgramNV_remap_index, -1 }, { ProgramEnvParameter4dARB_names, ProgramEnvParameter4dARB_remap_index, -1 }, { VertexAttrib1dARB_names, VertexAttrib1dARB_remap_index, -1 }, + { VertexAttrib4usvARB_names, VertexAttrib4usvARB_remap_index, -1 }, { VertexAttrib3svARB_names, VertexAttrib3svARB_remap_index, -1 }, { GetVertexAttribdvARB_names, GetVertexAttribdvARB_remap_index, -1 }, { VertexAttrib4dvARB_names, VertexAttrib4dvARB_remap_index, -1 }, @@ -4879,6 +5045,7 @@ static const struct dri_extension_function GL_ARB_vertex_program_functions[] = { { VertexAttrib3fvARB_names, VertexAttrib3fvARB_remap_index, -1 }, { VertexAttrib4NubARB_names, VertexAttrib4NubARB_remap_index, -1 }, { GetProgramEnvParameterfvARB_names, GetProgramEnvParameterfvARB_remap_index, -1 }, + { ProgramEnvParameter4dvARB_names, ProgramEnvParameter4dvARB_remap_index, -1 }, { ProgramLocalParameter4fvARB_names, ProgramLocalParameter4fvARB_remap_index, -1 }, { DeleteProgramsNV_names, DeleteProgramsNV_remap_index, -1 }, { GetVertexAttribPointervNV_names, GetVertexAttribPointervNV_remap_index, -1 }, @@ -5032,11 +5199,11 @@ static const struct dri_extension_function GL_EXT_convolution_functions[] = { #if defined(need_GL_EXT_coordinate_frame) static const struct dri_extension_function GL_EXT_coordinate_frame_functions[] = { - { Binormal3fEXT_names, Binormal3fEXT_remap_index, -1 }, { TangentPointerEXT_names, TangentPointerEXT_remap_index, -1 }, { Binormal3ivEXT_names, Binormal3ivEXT_remap_index, -1 }, { Tangent3sEXT_names, Tangent3sEXT_remap_index, -1 }, { Tangent3fvEXT_names, Tangent3fvEXT_remap_index, -1 }, + { Binormal3fEXT_names, Binormal3fEXT_remap_index, -1 }, { Tangent3dvEXT_names, Tangent3dvEXT_remap_index, -1 }, { Binormal3bvEXT_names, Binormal3bvEXT_remap_index, -1 }, { Binormal3dEXT_names, Binormal3dEXT_remap_index, -1 }, @@ -5134,8 +5301,8 @@ static const struct dri_extension_function GL_EXT_framebuffer_object_functions[] #if defined(need_GL_EXT_gpu_program_parameters) static const struct dri_extension_function GL_EXT_gpu_program_parameters_functions[] = { - { ProgramLocalParameters4fvEXT_names, ProgramLocalParameters4fvEXT_remap_index, -1 }, { ProgramEnvParameters4fvEXT_names, ProgramEnvParameters4fvEXT_remap_index, -1 }, + { ProgramLocalParameters4fvEXT_names, ProgramLocalParameters4fvEXT_remap_index, -1 }, { NULL, 0, 0 } }; #endif @@ -5475,12 +5642,12 @@ static const struct dri_extension_function GL_NV_point_sprite_functions[] = { #if defined(need_GL_NV_register_combiners) static const struct dri_extension_function GL_NV_register_combiners_functions[] = { + { CombinerOutputNV_names, CombinerOutputNV_remap_index, -1 }, { CombinerParameterfvNV_names, CombinerParameterfvNV_remap_index, -1 }, { GetCombinerOutputParameterfvNV_names, GetCombinerOutputParameterfvNV_remap_index, -1 }, { FinalCombinerInputNV_names, FinalCombinerInputNV_remap_index, -1 }, { GetCombinerInputParameterfvNV_names, GetCombinerInputParameterfvNV_remap_index, -1 }, { GetCombinerOutputParameterivNV_names, GetCombinerOutputParameterivNV_remap_index, -1 }, - { CombinerOutputNV_names, CombinerOutputNV_remap_index, -1 }, { CombinerParameteriNV_names, CombinerParameteriNV_remap_index, -1 }, { GetFinalCombinerInputParameterivNV_names, GetFinalCombinerInputParameterivNV_remap_index, -1 }, { CombinerInputNV_names, CombinerInputNV_remap_index, -1 }, @@ -5514,6 +5681,7 @@ static const struct dri_extension_function GL_NV_vertex_program_functions[] = { { VertexAttrib4ubvNV_names, VertexAttrib4ubvNV_remap_index, -1 }, { VertexAttrib4svNV_names, VertexAttrib4svNV_remap_index, -1 }, { VertexAttribs1dvNV_names, VertexAttribs1dvNV_remap_index, -1 }, + { VertexAttrib1fvNV_names, VertexAttrib1fvNV_remap_index, -1 }, { ProgramParameter4dvNV_names, ProgramParameter4dvNV_remap_index, -1 }, { VertexAttrib4fNV_names, VertexAttrib4fNV_remap_index, -1 }, { VertexAttrib2dNV_names, VertexAttrib2dNV_remap_index, -1 }, @@ -5546,7 +5714,6 @@ static const struct dri_extension_function GL_NV_vertex_program_functions[] = { { VertexAttribPointerNV_names, VertexAttribPointerNV_remap_index, -1 }, { TrackMatrixNV_names, TrackMatrixNV_remap_index, -1 }, { GetProgramParameterdvNV_names, GetProgramParameterdvNV_remap_index, -1 }, - { VertexAttrib3sNV_names, VertexAttrib3sNV_remap_index, -1 }, { GetTrackMatrixivNV_names, GetTrackMatrixivNV_remap_index, -1 }, { VertexAttrib3svNV_names, VertexAttrib3svNV_remap_index, -1 }, { ProgramParameters4fvNV_names, ProgramParameters4fvNV_remap_index, -1 }, @@ -5554,13 +5721,13 @@ static const struct dri_extension_function GL_NV_vertex_program_functions[] = { { GetVertexAttribdvNV_names, GetVertexAttribdvNV_remap_index, -1 }, { VertexAttrib3fvNV_names, VertexAttrib3fvNV_remap_index, -1 }, { VertexAttribs2fvNV_names, VertexAttribs2fvNV_remap_index, -1 }, - { VertexAttrib1fvNV_names, VertexAttrib1fvNV_remap_index, -1 }, { DeleteProgramsNV_names, DeleteProgramsNV_remap_index, -1 }, { GetVertexAttribPointervNV_names, GetVertexAttribPointervNV_remap_index, -1 }, { GetProgramStringNV_names, GetProgramStringNV_remap_index, -1 }, { VertexAttrib4sNV_names, VertexAttrib4sNV_remap_index, -1 }, { VertexAttribs4dvNV_names, VertexAttribs4dvNV_remap_index, -1 }, { ProgramParameters4dvNV_names, ProgramParameters4dvNV_remap_index, -1 }, + { VertexAttrib3sNV_names, VertexAttrib3sNV_remap_index, -1 }, { VertexAttrib1fNV_names, VertexAttrib1fNV_remap_index, -1 }, { VertexAttrib4dNV_names, VertexAttrib4dNV_remap_index, -1 }, { VertexAttribs4ubvNV_names, VertexAttribs4ubvNV_remap_index, -1 }, @@ -5827,11 +5994,11 @@ static const struct dri_extension_function GL_SUN_mesh_array_functions[] = { static const struct dri_extension_function GL_SUN_triangle_list_functions[] = { { ReplacementCodeubSUN_names, ReplacementCodeubSUN_remap_index, -1 }, { ReplacementCodeubvSUN_names, ReplacementCodeubvSUN_remap_index, -1 }, - { ReplacementCodeuivSUN_names, ReplacementCodeuivSUN_remap_index, -1 }, { ReplacementCodeusvSUN_names, ReplacementCodeusvSUN_remap_index, -1 }, { ReplacementCodePointerSUN_names, ReplacementCodePointerSUN_remap_index, -1 }, { ReplacementCodeusSUN_names, ReplacementCodeusSUN_remap_index, -1 }, { ReplacementCodeuiSUN_names, ReplacementCodeuiSUN_remap_index, -1 }, + { ReplacementCodeuivSUN_names, ReplacementCodeuivSUN_remap_index, -1 }, { NULL, 0, 0 } }; #endif @@ -5853,7 +6020,6 @@ static const struct dri_extension_function GL_SUN_vertex_functions[] = { { ReplacementCodeuiTexCoord2fVertex3fSUN_names, ReplacementCodeuiTexCoord2fVertex3fSUN_remap_index, -1 }, { TexCoord2fNormal3fVertex3fSUN_names, TexCoord2fNormal3fVertex3fSUN_remap_index, -1 }, { Color3fVertex3fSUN_names, Color3fVertex3fSUN_remap_index, -1 }, - { ReplacementCodeuiNormal3fVertex3fvSUN_names, ReplacementCodeuiNormal3fVertex3fvSUN_remap_index, -1 }, { Color3fVertex3fvSUN_names, Color3fVertex3fvSUN_remap_index, -1 }, { Color4fNormal3fVertex3fvSUN_names, Color4fNormal3fVertex3fvSUN_remap_index, -1 }, { ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_names, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN_remap_index, -1 }, @@ -5864,18 +6030,19 @@ static const struct dri_extension_function GL_SUN_vertex_functions[] = { { Color4ubVertex2fvSUN_names, Color4ubVertex2fvSUN_remap_index, -1 }, { Normal3fVertex3fSUN_names, Normal3fVertex3fSUN_remap_index, -1 }, { ReplacementCodeuiColor4fNormal3fVertex3fSUN_names, ReplacementCodeuiColor4fNormal3fVertex3fSUN_remap_index, -1 }, + { TexCoord2fColor4fNormal3fVertex3fvSUN_names, TexCoord2fColor4fNormal3fVertex3fvSUN_remap_index, -1 }, { TexCoord2fVertex3fvSUN_names, TexCoord2fVertex3fvSUN_remap_index, -1 }, { Color4ubVertex2fSUN_names, Color4ubVertex2fSUN_remap_index, -1 }, { ReplacementCodeuiColor4ubVertex3fSUN_names, ReplacementCodeuiColor4ubVertex3fSUN_remap_index, -1 }, { TexCoord2fColor4ubVertex3fSUN_names, TexCoord2fColor4ubVertex3fSUN_remap_index, -1 }, { Normal3fVertex3fvSUN_names, Normal3fVertex3fvSUN_remap_index, -1 }, { Color4fNormal3fVertex3fSUN_names, Color4fNormal3fVertex3fSUN_remap_index, -1 }, - { TexCoord2fColor4fNormal3fVertex3fvSUN_names, TexCoord2fColor4fNormal3fVertex3fvSUN_remap_index, -1 }, { ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_names, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN_remap_index, -1 }, { ReplacementCodeuiColor4ubVertex3fvSUN_names, ReplacementCodeuiColor4ubVertex3fvSUN_remap_index, -1 }, { ReplacementCodeuiColor3fVertex3fSUN_names, ReplacementCodeuiColor3fVertex3fSUN_remap_index, -1 }, { TexCoord4fVertex4fSUN_names, TexCoord4fVertex4fSUN_remap_index, -1 }, { TexCoord2fColor3fVertex3fvSUN_names, TexCoord2fColor3fVertex3fvSUN_remap_index, -1 }, + { ReplacementCodeuiNormal3fVertex3fvSUN_names, ReplacementCodeuiNormal3fVertex3fvSUN_remap_index, -1 }, { TexCoord4fVertex4fvSUN_names, TexCoord4fVertex4fvSUN_remap_index, -1 }, { ReplacementCodeuiVertex3fSUN_names, ReplacementCodeuiVertex3fSUN_remap_index, -1 }, { NULL, 0, 0 } @@ -6012,11 +6179,94 @@ static const struct dri_extension_function GL_VERSION_1_5_functions[] = { #if defined(need_GL_VERSION_2_0) static const struct dri_extension_function GL_VERSION_2_0_functions[] = { + { UniformMatrix3fvARB_names, UniformMatrix3fvARB_remap_index, -1 }, + { GetProgramiv_names, GetProgramiv_remap_index, -1 }, { BlendEquationSeparateEXT_names, BlendEquationSeparateEXT_remap_index, -1 }, + { AttachShader_names, AttachShader_remap_index, -1 }, + { VertexAttrib2fARB_names, VertexAttrib2fARB_remap_index, -1 }, + { VertexAttrib3fARB_names, VertexAttrib3fARB_remap_index, -1 }, + { Uniform2fARB_names, Uniform2fARB_remap_index, -1 }, + { VertexAttrib1svARB_names, VertexAttrib1svARB_remap_index, -1 }, + { Uniform2ivARB_names, Uniform2ivARB_remap_index, -1 }, + { UniformMatrix4fvARB_names, UniformMatrix4fvARB_remap_index, -1 }, + { VertexAttrib4NusvARB_names, VertexAttrib4NusvARB_remap_index, -1 }, + { DisableVertexAttribArrayARB_names, DisableVertexAttribArrayARB_remap_index, -1 }, { StencilMaskSeparate_names, StencilMaskSeparate_remap_index, -1 }, + { VertexAttrib1fARB_names, VertexAttrib1fARB_remap_index, -1 }, + { GetProgramInfoLog_names, GetProgramInfoLog_remap_index, -1 }, + { VertexAttrib4NbvARB_names, VertexAttrib4NbvARB_remap_index, -1 }, + { GetActiveAttribARB_names, GetActiveAttribARB_remap_index, -1 }, + { Uniform3iARB_names, Uniform3iARB_remap_index, -1 }, + { GetShaderInfoLog_names, GetShaderInfoLog_remap_index, -1 }, + { VertexAttrib1sARB_names, VertexAttrib1sARB_remap_index, -1 }, + { Uniform1fARB_names, Uniform1fARB_remap_index, -1 }, { StencilOpSeparate_names, StencilOpSeparate_remap_index, -1 }, + { UniformMatrix2fvARB_names, UniformMatrix2fvARB_remap_index, -1 }, + { VertexAttrib3dvARB_names, VertexAttrib3dvARB_remap_index, -1 }, + { Uniform3fvARB_names, Uniform3fvARB_remap_index, -1 }, + { GetVertexAttribivARB_names, GetVertexAttribivARB_remap_index, -1 }, + { CreateProgram_names, CreateProgram_remap_index, -1 }, { StencilFuncSeparate_names, StencilFuncSeparate_remap_index, -1 }, + { VertexAttrib3dARB_names, VertexAttrib3dARB_remap_index, -1 }, + { VertexAttrib4fARB_names, VertexAttrib4fARB_remap_index, -1 }, + { VertexAttrib4fvARB_names, VertexAttrib4fvARB_remap_index, -1 }, + { GetActiveUniformARB_names, GetActiveUniformARB_remap_index, -1 }, + { IsShader_names, IsShader_remap_index, -1 }, + { GetUniformivARB_names, GetUniformivARB_remap_index, -1 }, + { IsProgram_names, IsProgram_remap_index, -1 }, + { Uniform2fvARB_names, Uniform2fvARB_remap_index, -1 }, + { ValidateProgramARB_names, ValidateProgramARB_remap_index, -1 }, + { VertexAttrib2dARB_names, VertexAttrib2dARB_remap_index, -1 }, + { VertexAttrib1dvARB_names, VertexAttrib1dvARB_remap_index, -1 }, + { GetVertexAttribfvARB_names, GetVertexAttribfvARB_remap_index, -1 }, + { GetAttribLocationARB_names, GetAttribLocationARB_remap_index, -1 }, + { Uniform3ivARB_names, Uniform3ivARB_remap_index, -1 }, + { GetVertexAttribPointervARB_names, GetVertexAttribPointervARB_remap_index, -1 }, + { VertexAttrib4sARB_names, VertexAttrib4sARB_remap_index, -1 }, + { VertexAttrib2dvARB_names, VertexAttrib2dvARB_remap_index, -1 }, + { VertexAttrib2fvARB_names, VertexAttrib2fvARB_remap_index, -1 }, + { VertexAttrib4NivARB_names, VertexAttrib4NivARB_remap_index, -1 }, + { GetAttachedShaders_names, GetAttachedShaders_remap_index, -1 }, + { CompileShaderARB_names, CompileShaderARB_remap_index, -1 }, + { DeleteShader_names, DeleteShader_remap_index, -1 }, + { Uniform3fARB_names, Uniform3fARB_remap_index, -1 }, + { VertexAttrib4NuivARB_names, VertexAttrib4NuivARB_remap_index, -1 }, + { Uniform4fARB_names, Uniform4fARB_remap_index, -1 }, + { VertexAttrib1dARB_names, VertexAttrib1dARB_remap_index, -1 }, + { LinkProgramARB_names, LinkProgramARB_remap_index, -1 }, + { ShaderSourceARB_names, ShaderSourceARB_remap_index, -1 }, + { VertexAttrib3svARB_names, VertexAttrib3svARB_remap_index, -1 }, + { Uniform4ivARB_names, Uniform4ivARB_remap_index, -1 }, + { GetVertexAttribdvARB_names, GetVertexAttribdvARB_remap_index, -1 }, + { Uniform1ivARB_names, Uniform1ivARB_remap_index, -1 }, + { VertexAttrib4dvARB_names, VertexAttrib4dvARB_remap_index, -1 }, + { BindAttribLocationARB_names, BindAttribLocationARB_remap_index, -1 }, + { Uniform1iARB_names, Uniform1iARB_remap_index, -1 }, + { VertexAttribPointerARB_names, VertexAttribPointerARB_remap_index, -1 }, + { VertexAttrib4NsvARB_names, VertexAttrib4NsvARB_remap_index, -1 }, + { VertexAttrib3fvARB_names, VertexAttrib3fvARB_remap_index, -1 }, + { CreateShader_names, CreateShader_remap_index, -1 }, + { DetachShader_names, DetachShader_remap_index, -1 }, + { VertexAttrib4NubARB_names, VertexAttrib4NubARB_remap_index, -1 }, + { Uniform4fvARB_names, Uniform4fvARB_remap_index, -1 }, + { GetUniformfvARB_names, GetUniformfvARB_remap_index, -1 }, + { Uniform4iARB_names, Uniform4iARB_remap_index, -1 }, + { UseProgramObjectARB_names, UseProgramObjectARB_remap_index, -1 }, + { DeleteProgram_names, DeleteProgram_remap_index, -1 }, + { Uniform2iARB_names, Uniform2iARB_remap_index, -1 }, + { VertexAttrib4dARB_names, VertexAttrib4dARB_remap_index, -1 }, + { GetUniformLocationARB_names, GetUniformLocationARB_remap_index, -1 }, + { VertexAttrib3sARB_names, VertexAttrib3sARB_remap_index, -1 }, + { GetShaderSourceARB_names, GetShaderSourceARB_remap_index, -1 }, { DrawBuffersARB_names, DrawBuffersARB_remap_index, -1 }, + { Uniform1fvARB_names, Uniform1fvARB_remap_index, -1 }, + { EnableVertexAttribArrayARB_names, EnableVertexAttribArrayARB_remap_index, -1 }, + { VertexAttrib4svARB_names, VertexAttrib4svARB_remap_index, -1 }, + { GetShaderiv_names, GetShaderiv_remap_index, -1 }, + { VertexAttrib2svARB_names, VertexAttrib2svARB_remap_index, -1 }, + { VertexAttrib4NubvARB_names, VertexAttrib4NubvARB_remap_index, -1 }, + { VertexAttrib2sARB_names, VertexAttrib2sARB_remap_index, -1 }, + { VertexAttrib1fvARB_names, VertexAttrib1fvARB_remap_index, -1 }, { NULL, 0, 0 } }; #endif diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h index 1179ac463c..e57ca002e1 100644 --- a/src/mesa/glapi/dispatch.h +++ b/src/mesa/glapi/dispatch.h @@ -1282,6 +1282,45 @@ #if !defined(IN_DRI_DRIVER) +#define CALL_AttachShader(disp, parameters) (*((disp)->AttachShader)) parameters +#define GET_AttachShader(disp) ((disp)->AttachShader) +#define SET_AttachShader(disp, fn) ((disp)->AttachShader = fn) +#define CALL_CreateProgram(disp, parameters) (*((disp)->CreateProgram)) parameters +#define GET_CreateProgram(disp) ((disp)->CreateProgram) +#define SET_CreateProgram(disp, fn) ((disp)->CreateProgram = fn) +#define CALL_CreateShader(disp, parameters) (*((disp)->CreateShader)) parameters +#define GET_CreateShader(disp) ((disp)->CreateShader) +#define SET_CreateShader(disp, fn) ((disp)->CreateShader = fn) +#define CALL_DeleteProgram(disp, parameters) (*((disp)->DeleteProgram)) parameters +#define GET_DeleteProgram(disp) ((disp)->DeleteProgram) +#define SET_DeleteProgram(disp, fn) ((disp)->DeleteProgram = fn) +#define CALL_DeleteShader(disp, parameters) (*((disp)->DeleteShader)) parameters +#define GET_DeleteShader(disp) ((disp)->DeleteShader) +#define SET_DeleteShader(disp, fn) ((disp)->DeleteShader = fn) +#define CALL_DetachShader(disp, parameters) (*((disp)->DetachShader)) parameters +#define GET_DetachShader(disp) ((disp)->DetachShader) +#define SET_DetachShader(disp, fn) ((disp)->DetachShader = fn) +#define CALL_GetAttachedShaders(disp, parameters) (*((disp)->GetAttachedShaders)) parameters +#define GET_GetAttachedShaders(disp) ((disp)->GetAttachedShaders) +#define SET_GetAttachedShaders(disp, fn) ((disp)->GetAttachedShaders = fn) +#define CALL_GetProgramInfoLog(disp, parameters) (*((disp)->GetProgramInfoLog)) parameters +#define GET_GetProgramInfoLog(disp) ((disp)->GetProgramInfoLog) +#define SET_GetProgramInfoLog(disp, fn) ((disp)->GetProgramInfoLog = fn) +#define CALL_GetProgramiv(disp, parameters) (*((disp)->GetProgramiv)) parameters +#define GET_GetProgramiv(disp) ((disp)->GetProgramiv) +#define SET_GetProgramiv(disp, fn) ((disp)->GetProgramiv = fn) +#define CALL_GetShaderInfoLog(disp, parameters) (*((disp)->GetShaderInfoLog)) parameters +#define GET_GetShaderInfoLog(disp) ((disp)->GetShaderInfoLog) +#define SET_GetShaderInfoLog(disp, fn) ((disp)->GetShaderInfoLog = fn) +#define CALL_GetShaderiv(disp, parameters) (*((disp)->GetShaderiv)) parameters +#define GET_GetShaderiv(disp) ((disp)->GetShaderiv) +#define SET_GetShaderiv(disp, fn) ((disp)->GetShaderiv = fn) +#define CALL_IsProgram(disp, parameters) (*((disp)->IsProgram)) parameters +#define GET_IsProgram(disp) ((disp)->IsProgram) +#define SET_IsProgram(disp, fn) ((disp)->IsProgram = fn) +#define CALL_IsShader(disp, parameters) (*((disp)->IsShader)) parameters +#define GET_IsShader(disp) ((disp)->IsShader) +#define SET_IsShader(disp, fn) ((disp)->IsShader = fn) #define CALL_StencilFuncSeparate(disp, parameters) (*((disp)->StencilFuncSeparate)) parameters #define GET_StencilFuncSeparate(disp) ((disp)->StencilFuncSeparate) #define SET_StencilFuncSeparate(disp, fn) ((disp)->StencilFuncSeparate = fn) @@ -2320,355 +2359,407 @@ #else -#define driDispatchRemapTable_size 345 +#define driDispatchRemapTable_size 358 extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; -#define StencilFuncSeparate_remap_index 0 -#define StencilMaskSeparate_remap_index 1 -#define StencilOpSeparate_remap_index 2 -#define LoadTransposeMatrixdARB_remap_index 3 -#define LoadTransposeMatrixfARB_remap_index 4 -#define MultTransposeMatrixdARB_remap_index 5 -#define MultTransposeMatrixfARB_remap_index 6 -#define SampleCoverageARB_remap_index 7 -#define CompressedTexImage1DARB_remap_index 8 -#define CompressedTexImage2DARB_remap_index 9 -#define CompressedTexImage3DARB_remap_index 10 -#define CompressedTexSubImage1DARB_remap_index 11 -#define CompressedTexSubImage2DARB_remap_index 12 -#define CompressedTexSubImage3DARB_remap_index 13 -#define GetCompressedTexImageARB_remap_index 14 -#define DisableVertexAttribArrayARB_remap_index 15 -#define EnableVertexAttribArrayARB_remap_index 16 -#define GetProgramEnvParameterdvARB_remap_index 17 -#define GetProgramEnvParameterfvARB_remap_index 18 -#define GetProgramLocalParameterdvARB_remap_index 19 -#define GetProgramLocalParameterfvARB_remap_index 20 -#define GetProgramStringARB_remap_index 21 -#define GetProgramivARB_remap_index 22 -#define GetVertexAttribdvARB_remap_index 23 -#define GetVertexAttribfvARB_remap_index 24 -#define GetVertexAttribivARB_remap_index 25 -#define ProgramEnvParameter4dARB_remap_index 26 -#define ProgramEnvParameter4dvARB_remap_index 27 -#define ProgramEnvParameter4fARB_remap_index 28 -#define ProgramEnvParameter4fvARB_remap_index 29 -#define ProgramLocalParameter4dARB_remap_index 30 -#define ProgramLocalParameter4dvARB_remap_index 31 -#define ProgramLocalParameter4fARB_remap_index 32 -#define ProgramLocalParameter4fvARB_remap_index 33 -#define ProgramStringARB_remap_index 34 -#define VertexAttrib1dARB_remap_index 35 -#define VertexAttrib1dvARB_remap_index 36 -#define VertexAttrib1fARB_remap_index 37 -#define VertexAttrib1fvARB_remap_index 38 -#define VertexAttrib1sARB_remap_index 39 -#define VertexAttrib1svARB_remap_index 40 -#define VertexAttrib2dARB_remap_index 41 -#define VertexAttrib2dvARB_remap_index 42 -#define VertexAttrib2fARB_remap_index 43 -#define VertexAttrib2fvARB_remap_index 44 -#define VertexAttrib2sARB_remap_index 45 -#define VertexAttrib2svARB_remap_index 46 -#define VertexAttrib3dARB_remap_index 47 -#define VertexAttrib3dvARB_remap_index 48 -#define VertexAttrib3fARB_remap_index 49 -#define VertexAttrib3fvARB_remap_index 50 -#define VertexAttrib3sARB_remap_index 51 -#define VertexAttrib3svARB_remap_index 52 -#define VertexAttrib4NbvARB_remap_index 53 -#define VertexAttrib4NivARB_remap_index 54 -#define VertexAttrib4NsvARB_remap_index 55 -#define VertexAttrib4NubARB_remap_index 56 -#define VertexAttrib4NubvARB_remap_index 57 -#define VertexAttrib4NuivARB_remap_index 58 -#define VertexAttrib4NusvARB_remap_index 59 -#define VertexAttrib4bvARB_remap_index 60 -#define VertexAttrib4dARB_remap_index 61 -#define VertexAttrib4dvARB_remap_index 62 -#define VertexAttrib4fARB_remap_index 63 -#define VertexAttrib4fvARB_remap_index 64 -#define VertexAttrib4ivARB_remap_index 65 -#define VertexAttrib4sARB_remap_index 66 -#define VertexAttrib4svARB_remap_index 67 -#define VertexAttrib4ubvARB_remap_index 68 -#define VertexAttrib4uivARB_remap_index 69 -#define VertexAttrib4usvARB_remap_index 70 -#define VertexAttribPointerARB_remap_index 71 -#define BindBufferARB_remap_index 72 -#define BufferDataARB_remap_index 73 -#define BufferSubDataARB_remap_index 74 -#define DeleteBuffersARB_remap_index 75 -#define GenBuffersARB_remap_index 76 -#define GetBufferParameterivARB_remap_index 77 -#define GetBufferPointervARB_remap_index 78 -#define GetBufferSubDataARB_remap_index 79 -#define IsBufferARB_remap_index 80 -#define MapBufferARB_remap_index 81 -#define UnmapBufferARB_remap_index 82 -#define BeginQueryARB_remap_index 83 -#define DeleteQueriesARB_remap_index 84 -#define EndQueryARB_remap_index 85 -#define GenQueriesARB_remap_index 86 -#define GetQueryObjectivARB_remap_index 87 -#define GetQueryObjectuivARB_remap_index 88 -#define GetQueryivARB_remap_index 89 -#define IsQueryARB_remap_index 90 -#define AttachObjectARB_remap_index 91 -#define CompileShaderARB_remap_index 92 -#define CreateProgramObjectARB_remap_index 93 -#define CreateShaderObjectARB_remap_index 94 -#define DeleteObjectARB_remap_index 95 -#define DetachObjectARB_remap_index 96 -#define GetActiveUniformARB_remap_index 97 -#define GetAttachedObjectsARB_remap_index 98 -#define GetHandleARB_remap_index 99 -#define GetInfoLogARB_remap_index 100 -#define GetObjectParameterfvARB_remap_index 101 -#define GetObjectParameterivARB_remap_index 102 -#define GetShaderSourceARB_remap_index 103 -#define GetUniformLocationARB_remap_index 104 -#define GetUniformfvARB_remap_index 105 -#define GetUniformivARB_remap_index 106 -#define LinkProgramARB_remap_index 107 -#define ShaderSourceARB_remap_index 108 -#define Uniform1fARB_remap_index 109 -#define Uniform1fvARB_remap_index 110 -#define Uniform1iARB_remap_index 111 -#define Uniform1ivARB_remap_index 112 -#define Uniform2fARB_remap_index 113 -#define Uniform2fvARB_remap_index 114 -#define Uniform2iARB_remap_index 115 -#define Uniform2ivARB_remap_index 116 -#define Uniform3fARB_remap_index 117 -#define Uniform3fvARB_remap_index 118 -#define Uniform3iARB_remap_index 119 -#define Uniform3ivARB_remap_index 120 -#define Uniform4fARB_remap_index 121 -#define Uniform4fvARB_remap_index 122 -#define Uniform4iARB_remap_index 123 -#define Uniform4ivARB_remap_index 124 -#define UniformMatrix2fvARB_remap_index 125 -#define UniformMatrix3fvARB_remap_index 126 -#define UniformMatrix4fvARB_remap_index 127 -#define UseProgramObjectARB_remap_index 128 -#define ValidateProgramARB_remap_index 129 -#define BindAttribLocationARB_remap_index 130 -#define GetActiveAttribARB_remap_index 131 -#define GetAttribLocationARB_remap_index 132 -#define DrawBuffersARB_remap_index 133 -#define PolygonOffsetEXT_remap_index 134 -#define GetPixelTexGenParameterfvSGIS_remap_index 135 -#define GetPixelTexGenParameterivSGIS_remap_index 136 -#define PixelTexGenParameterfSGIS_remap_index 137 -#define PixelTexGenParameterfvSGIS_remap_index 138 -#define PixelTexGenParameteriSGIS_remap_index 139 -#define PixelTexGenParameterivSGIS_remap_index 140 -#define SampleMaskSGIS_remap_index 141 -#define SamplePatternSGIS_remap_index 142 -#define ColorPointerEXT_remap_index 143 -#define EdgeFlagPointerEXT_remap_index 144 -#define IndexPointerEXT_remap_index 145 -#define NormalPointerEXT_remap_index 146 -#define TexCoordPointerEXT_remap_index 147 -#define VertexPointerEXT_remap_index 148 -#define PointParameterfEXT_remap_index 149 -#define PointParameterfvEXT_remap_index 150 -#define LockArraysEXT_remap_index 151 -#define UnlockArraysEXT_remap_index 152 -#define CullParameterdvEXT_remap_index 153 -#define CullParameterfvEXT_remap_index 154 -#define SecondaryColor3bEXT_remap_index 155 -#define SecondaryColor3bvEXT_remap_index 156 -#define SecondaryColor3dEXT_remap_index 157 -#define SecondaryColor3dvEXT_remap_index 158 -#define SecondaryColor3fEXT_remap_index 159 -#define SecondaryColor3fvEXT_remap_index 160 -#define SecondaryColor3iEXT_remap_index 161 -#define SecondaryColor3ivEXT_remap_index 162 -#define SecondaryColor3sEXT_remap_index 163 -#define SecondaryColor3svEXT_remap_index 164 -#define SecondaryColor3ubEXT_remap_index 165 -#define SecondaryColor3ubvEXT_remap_index 166 -#define SecondaryColor3uiEXT_remap_index 167 -#define SecondaryColor3uivEXT_remap_index 168 -#define SecondaryColor3usEXT_remap_index 169 -#define SecondaryColor3usvEXT_remap_index 170 -#define SecondaryColorPointerEXT_remap_index 171 -#define MultiDrawArraysEXT_remap_index 172 -#define MultiDrawElementsEXT_remap_index 173 -#define FogCoordPointerEXT_remap_index 174 -#define FogCoorddEXT_remap_index 175 -#define FogCoorddvEXT_remap_index 176 -#define FogCoordfEXT_remap_index 177 -#define FogCoordfvEXT_remap_index 178 -#define PixelTexGenSGIX_remap_index 179 -#define BlendFuncSeparateEXT_remap_index 180 -#define FlushVertexArrayRangeNV_remap_index 181 -#define VertexArrayRangeNV_remap_index 182 -#define CombinerInputNV_remap_index 183 -#define CombinerOutputNV_remap_index 184 -#define CombinerParameterfNV_remap_index 185 -#define CombinerParameterfvNV_remap_index 186 -#define CombinerParameteriNV_remap_index 187 -#define CombinerParameterivNV_remap_index 188 -#define FinalCombinerInputNV_remap_index 189 -#define GetCombinerInputParameterfvNV_remap_index 190 -#define GetCombinerInputParameterivNV_remap_index 191 -#define GetCombinerOutputParameterfvNV_remap_index 192 -#define GetCombinerOutputParameterivNV_remap_index 193 -#define GetFinalCombinerInputParameterfvNV_remap_index 194 -#define GetFinalCombinerInputParameterivNV_remap_index 195 -#define ResizeBuffersMESA_remap_index 196 -#define WindowPos2dMESA_remap_index 197 -#define WindowPos2dvMESA_remap_index 198 -#define WindowPos2fMESA_remap_index 199 -#define WindowPos2fvMESA_remap_index 200 -#define WindowPos2iMESA_remap_index 201 -#define WindowPos2ivMESA_remap_index 202 -#define WindowPos2sMESA_remap_index 203 -#define WindowPos2svMESA_remap_index 204 -#define WindowPos3dMESA_remap_index 205 -#define WindowPos3dvMESA_remap_index 206 -#define WindowPos3fMESA_remap_index 207 -#define WindowPos3fvMESA_remap_index 208 -#define WindowPos3iMESA_remap_index 209 -#define WindowPos3ivMESA_remap_index 210 -#define WindowPos3sMESA_remap_index 211 -#define WindowPos3svMESA_remap_index 212 -#define WindowPos4dMESA_remap_index 213 -#define WindowPos4dvMESA_remap_index 214 -#define WindowPos4fMESA_remap_index 215 -#define WindowPos4fvMESA_remap_index 216 -#define WindowPos4iMESA_remap_index 217 -#define WindowPos4ivMESA_remap_index 218 -#define WindowPos4sMESA_remap_index 219 -#define WindowPos4svMESA_remap_index 220 -#define MultiModeDrawArraysIBM_remap_index 221 -#define MultiModeDrawElementsIBM_remap_index 222 -#define DeleteFencesNV_remap_index 223 -#define FinishFenceNV_remap_index 224 -#define GenFencesNV_remap_index 225 -#define GetFenceivNV_remap_index 226 -#define IsFenceNV_remap_index 227 -#define SetFenceNV_remap_index 228 -#define TestFenceNV_remap_index 229 -#define AreProgramsResidentNV_remap_index 230 -#define BindProgramNV_remap_index 231 -#define DeleteProgramsNV_remap_index 232 -#define ExecuteProgramNV_remap_index 233 -#define GenProgramsNV_remap_index 234 -#define GetProgramParameterdvNV_remap_index 235 -#define GetProgramParameterfvNV_remap_index 236 -#define GetProgramStringNV_remap_index 237 -#define GetProgramivNV_remap_index 238 -#define GetTrackMatrixivNV_remap_index 239 -#define GetVertexAttribPointervNV_remap_index 240 -#define GetVertexAttribdvNV_remap_index 241 -#define GetVertexAttribfvNV_remap_index 242 -#define GetVertexAttribivNV_remap_index 243 -#define IsProgramNV_remap_index 244 -#define LoadProgramNV_remap_index 245 -#define ProgramParameter4dNV_remap_index 246 -#define ProgramParameter4dvNV_remap_index 247 -#define ProgramParameter4fNV_remap_index 248 -#define ProgramParameter4fvNV_remap_index 249 -#define ProgramParameters4dvNV_remap_index 250 -#define ProgramParameters4fvNV_remap_index 251 -#define RequestResidentProgramsNV_remap_index 252 -#define TrackMatrixNV_remap_index 253 -#define VertexAttrib1dNV_remap_index 254 -#define VertexAttrib1dvNV_remap_index 255 -#define VertexAttrib1fNV_remap_index 256 -#define VertexAttrib1fvNV_remap_index 257 -#define VertexAttrib1sNV_remap_index 258 -#define VertexAttrib1svNV_remap_index 259 -#define VertexAttrib2dNV_remap_index 260 -#define VertexAttrib2dvNV_remap_index 261 -#define VertexAttrib2fNV_remap_index 262 -#define VertexAttrib2fvNV_remap_index 263 -#define VertexAttrib2sNV_remap_index 264 -#define VertexAttrib2svNV_remap_index 265 -#define VertexAttrib3dNV_remap_index 266 -#define VertexAttrib3dvNV_remap_index 267 -#define VertexAttrib3fNV_remap_index 268 -#define VertexAttrib3fvNV_remap_index 269 -#define VertexAttrib3sNV_remap_index 270 -#define VertexAttrib3svNV_remap_index 271 -#define VertexAttrib4dNV_remap_index 272 -#define VertexAttrib4dvNV_remap_index 273 -#define VertexAttrib4fNV_remap_index 274 -#define VertexAttrib4fvNV_remap_index 275 -#define VertexAttrib4sNV_remap_index 276 -#define VertexAttrib4svNV_remap_index 277 -#define VertexAttrib4ubNV_remap_index 278 -#define VertexAttrib4ubvNV_remap_index 279 -#define VertexAttribPointerNV_remap_index 280 -#define VertexAttribs1dvNV_remap_index 281 -#define VertexAttribs1fvNV_remap_index 282 -#define VertexAttribs1svNV_remap_index 283 -#define VertexAttribs2dvNV_remap_index 284 -#define VertexAttribs2fvNV_remap_index 285 -#define VertexAttribs2svNV_remap_index 286 -#define VertexAttribs3dvNV_remap_index 287 -#define VertexAttribs3fvNV_remap_index 288 -#define VertexAttribs3svNV_remap_index 289 -#define VertexAttribs4dvNV_remap_index 290 -#define VertexAttribs4fvNV_remap_index 291 -#define VertexAttribs4svNV_remap_index 292 -#define VertexAttribs4ubvNV_remap_index 293 -#define AlphaFragmentOp1ATI_remap_index 294 -#define AlphaFragmentOp2ATI_remap_index 295 -#define AlphaFragmentOp3ATI_remap_index 296 -#define BeginFragmentShaderATI_remap_index 297 -#define BindFragmentShaderATI_remap_index 298 -#define ColorFragmentOp1ATI_remap_index 299 -#define ColorFragmentOp2ATI_remap_index 300 -#define ColorFragmentOp3ATI_remap_index 301 -#define DeleteFragmentShaderATI_remap_index 302 -#define EndFragmentShaderATI_remap_index 303 -#define GenFragmentShadersATI_remap_index 304 -#define PassTexCoordATI_remap_index 305 -#define SampleMapATI_remap_index 306 -#define SetFragmentShaderConstantATI_remap_index 307 -#define PointParameteriNV_remap_index 308 -#define PointParameterivNV_remap_index 309 -#define ActiveStencilFaceEXT_remap_index 310 -#define BindVertexArrayAPPLE_remap_index 311 -#define DeleteVertexArraysAPPLE_remap_index 312 -#define GenVertexArraysAPPLE_remap_index 313 -#define IsVertexArrayAPPLE_remap_index 314 -#define GetProgramNamedParameterdvNV_remap_index 315 -#define GetProgramNamedParameterfvNV_remap_index 316 -#define ProgramNamedParameter4dNV_remap_index 317 -#define ProgramNamedParameter4dvNV_remap_index 318 -#define ProgramNamedParameter4fNV_remap_index 319 -#define ProgramNamedParameter4fvNV_remap_index 320 -#define DepthBoundsEXT_remap_index 321 -#define BlendEquationSeparateEXT_remap_index 322 -#define BindFramebufferEXT_remap_index 323 -#define BindRenderbufferEXT_remap_index 324 -#define CheckFramebufferStatusEXT_remap_index 325 -#define DeleteFramebuffersEXT_remap_index 326 -#define DeleteRenderbuffersEXT_remap_index 327 -#define FramebufferRenderbufferEXT_remap_index 328 -#define FramebufferTexture1DEXT_remap_index 329 -#define FramebufferTexture2DEXT_remap_index 330 -#define FramebufferTexture3DEXT_remap_index 331 -#define GenFramebuffersEXT_remap_index 332 -#define GenRenderbuffersEXT_remap_index 333 -#define GenerateMipmapEXT_remap_index 334 -#define GetFramebufferAttachmentParameterivEXT_remap_index 335 -#define GetRenderbufferParameterivEXT_remap_index 336 -#define IsFramebufferEXT_remap_index 337 -#define IsRenderbufferEXT_remap_index 338 -#define RenderbufferStorageEXT_remap_index 339 -#define BlitFramebufferEXT_remap_index 340 -#define ProgramEnvParameters4fvEXT_remap_index 341 -#define ProgramLocalParameters4fvEXT_remap_index 342 -#define GetQueryObjecti64vEXT_remap_index 343 -#define GetQueryObjectui64vEXT_remap_index 344 +#define AttachShader_remap_index 0 +#define CreateProgram_remap_index 1 +#define CreateShader_remap_index 2 +#define DeleteProgram_remap_index 3 +#define DeleteShader_remap_index 4 +#define DetachShader_remap_index 5 +#define GetAttachedShaders_remap_index 6 +#define GetProgramInfoLog_remap_index 7 +#define GetProgramiv_remap_index 8 +#define GetShaderInfoLog_remap_index 9 +#define GetShaderiv_remap_index 10 +#define IsProgram_remap_index 11 +#define IsShader_remap_index 12 +#define StencilFuncSeparate_remap_index 13 +#define StencilMaskSeparate_remap_index 14 +#define StencilOpSeparate_remap_index 15 +#define LoadTransposeMatrixdARB_remap_index 16 +#define LoadTransposeMatrixfARB_remap_index 17 +#define MultTransposeMatrixdARB_remap_index 18 +#define MultTransposeMatrixfARB_remap_index 19 +#define SampleCoverageARB_remap_index 20 +#define CompressedTexImage1DARB_remap_index 21 +#define CompressedTexImage2DARB_remap_index 22 +#define CompressedTexImage3DARB_remap_index 23 +#define CompressedTexSubImage1DARB_remap_index 24 +#define CompressedTexSubImage2DARB_remap_index 25 +#define CompressedTexSubImage3DARB_remap_index 26 +#define GetCompressedTexImageARB_remap_index 27 +#define DisableVertexAttribArrayARB_remap_index 28 +#define EnableVertexAttribArrayARB_remap_index 29 +#define GetProgramEnvParameterdvARB_remap_index 30 +#define GetProgramEnvParameterfvARB_remap_index 31 +#define GetProgramLocalParameterdvARB_remap_index 32 +#define GetProgramLocalParameterfvARB_remap_index 33 +#define GetProgramStringARB_remap_index 34 +#define GetProgramivARB_remap_index 35 +#define GetVertexAttribdvARB_remap_index 36 +#define GetVertexAttribfvARB_remap_index 37 +#define GetVertexAttribivARB_remap_index 38 +#define ProgramEnvParameter4dARB_remap_index 39 +#define ProgramEnvParameter4dvARB_remap_index 40 +#define ProgramEnvParameter4fARB_remap_index 41 +#define ProgramEnvParameter4fvARB_remap_index 42 +#define ProgramLocalParameter4dARB_remap_index 43 +#define ProgramLocalParameter4dvARB_remap_index 44 +#define ProgramLocalParameter4fARB_remap_index 45 +#define ProgramLocalParameter4fvARB_remap_index 46 +#define ProgramStringARB_remap_index 47 +#define VertexAttrib1dARB_remap_index 48 +#define VertexAttrib1dvARB_remap_index 49 +#define VertexAttrib1fARB_remap_index 50 +#define VertexAttrib1fvARB_remap_index 51 +#define VertexAttrib1sARB_remap_index 52 +#define VertexAttrib1svARB_remap_index 53 +#define VertexAttrib2dARB_remap_index 54 +#define VertexAttrib2dvARB_remap_index 55 +#define VertexAttrib2fARB_remap_index 56 +#define VertexAttrib2fvARB_remap_index 57 +#define VertexAttrib2sARB_remap_index 58 +#define VertexAttrib2svARB_remap_index 59 +#define VertexAttrib3dARB_remap_index 60 +#define VertexAttrib3dvARB_remap_index 61 +#define VertexAttrib3fARB_remap_index 62 +#define VertexAttrib3fvARB_remap_index 63 +#define VertexAttrib3sARB_remap_index 64 +#define VertexAttrib3svARB_remap_index 65 +#define VertexAttrib4NbvARB_remap_index 66 +#define VertexAttrib4NivARB_remap_index 67 +#define VertexAttrib4NsvARB_remap_index 68 +#define VertexAttrib4NubARB_remap_index 69 +#define VertexAttrib4NubvARB_remap_index 70 +#define VertexAttrib4NuivARB_remap_index 71 +#define VertexAttrib4NusvARB_remap_index 72 +#define VertexAttrib4bvARB_remap_index 73 +#define VertexAttrib4dARB_remap_index 74 +#define VertexAttrib4dvARB_remap_index 75 +#define VertexAttrib4fARB_remap_index 76 +#define VertexAttrib4fvARB_remap_index 77 +#define VertexAttrib4ivARB_remap_index 78 +#define VertexAttrib4sARB_remap_index 79 +#define VertexAttrib4svARB_remap_index 80 +#define VertexAttrib4ubvARB_remap_index 81 +#define VertexAttrib4uivARB_remap_index 82 +#define VertexAttrib4usvARB_remap_index 83 +#define VertexAttribPointerARB_remap_index 84 +#define BindBufferARB_remap_index 85 +#define BufferDataARB_remap_index 86 +#define BufferSubDataARB_remap_index 87 +#define DeleteBuffersARB_remap_index 88 +#define GenBuffersARB_remap_index 89 +#define GetBufferParameterivARB_remap_index 90 +#define GetBufferPointervARB_remap_index 91 +#define GetBufferSubDataARB_remap_index 92 +#define IsBufferARB_remap_index 93 +#define MapBufferARB_remap_index 94 +#define UnmapBufferARB_remap_index 95 +#define BeginQueryARB_remap_index 96 +#define DeleteQueriesARB_remap_index 97 +#define EndQueryARB_remap_index 98 +#define GenQueriesARB_remap_index 99 +#define GetQueryObjectivARB_remap_index 100 +#define GetQueryObjectuivARB_remap_index 101 +#define GetQueryivARB_remap_index 102 +#define IsQueryARB_remap_index 103 +#define AttachObjectARB_remap_index 104 +#define CompileShaderARB_remap_index 105 +#define CreateProgramObjectARB_remap_index 106 +#define CreateShaderObjectARB_remap_index 107 +#define DeleteObjectARB_remap_index 108 +#define DetachObjectARB_remap_index 109 +#define GetActiveUniformARB_remap_index 110 +#define GetAttachedObjectsARB_remap_index 111 +#define GetHandleARB_remap_index 112 +#define GetInfoLogARB_remap_index 113 +#define GetObjectParameterfvARB_remap_index 114 +#define GetObjectParameterivARB_remap_index 115 +#define GetShaderSourceARB_remap_index 116 +#define GetUniformLocationARB_remap_index 117 +#define GetUniformfvARB_remap_index 118 +#define GetUniformivARB_remap_index 119 +#define LinkProgramARB_remap_index 120 +#define ShaderSourceARB_remap_index 121 +#define Uniform1fARB_remap_index 122 +#define Uniform1fvARB_remap_index 123 +#define Uniform1iARB_remap_index 124 +#define Uniform1ivARB_remap_index 125 +#define Uniform2fARB_remap_index 126 +#define Uniform2fvARB_remap_index 127 +#define Uniform2iARB_remap_index 128 +#define Uniform2ivARB_remap_index 129 +#define Uniform3fARB_remap_index 130 +#define Uniform3fvARB_remap_index 131 +#define Uniform3iARB_remap_index 132 +#define Uniform3ivARB_remap_index 133 +#define Uniform4fARB_remap_index 134 +#define Uniform4fvARB_remap_index 135 +#define Uniform4iARB_remap_index 136 +#define Uniform4ivARB_remap_index 137 +#define UniformMatrix2fvARB_remap_index 138 +#define UniformMatrix3fvARB_remap_index 139 +#define UniformMatrix4fvARB_remap_index 140 +#define UseProgramObjectARB_remap_index 141 +#define ValidateProgramARB_remap_index 142 +#define BindAttribLocationARB_remap_index 143 +#define GetActiveAttribARB_remap_index 144 +#define GetAttribLocationARB_remap_index 145 +#define DrawBuffersARB_remap_index 146 +#define PolygonOffsetEXT_remap_index 147 +#define GetPixelTexGenParameterfvSGIS_remap_index 148 +#define GetPixelTexGenParameterivSGIS_remap_index 149 +#define PixelTexGenParameterfSGIS_remap_index 150 +#define PixelTexGenParameterfvSGIS_remap_index 151 +#define PixelTexGenParameteriSGIS_remap_index 152 +#define PixelTexGenParameterivSGIS_remap_index 153 +#define SampleMaskSGIS_remap_index 154 +#define SamplePatternSGIS_remap_index 155 +#define ColorPointerEXT_remap_index 156 +#define EdgeFlagPointerEXT_remap_index 157 +#define IndexPointerEXT_remap_index 158 +#define NormalPointerEXT_remap_index 159 +#define TexCoordPointerEXT_remap_index 160 +#define VertexPointerEXT_remap_index 161 +#define PointParameterfEXT_remap_index 162 +#define PointParameterfvEXT_remap_index 163 +#define LockArraysEXT_remap_index 164 +#define UnlockArraysEXT_remap_index 165 +#define CullParameterdvEXT_remap_index 166 +#define CullParameterfvEXT_remap_index 167 +#define SecondaryColor3bEXT_remap_index 168 +#define SecondaryColor3bvEXT_remap_index 169 +#define SecondaryColor3dEXT_remap_index 170 +#define SecondaryColor3dvEXT_remap_index 171 +#define SecondaryColor3fEXT_remap_index 172 +#define SecondaryColor3fvEXT_remap_index 173 +#define SecondaryColor3iEXT_remap_index 174 +#define SecondaryColor3ivEXT_remap_index 175 +#define SecondaryColor3sEXT_remap_index 176 +#define SecondaryColor3svEXT_remap_index 177 +#define SecondaryColor3ubEXT_remap_index 178 +#define SecondaryColor3ubvEXT_remap_index 179 +#define SecondaryColor3uiEXT_remap_index 180 +#define SecondaryColor3uivEXT_remap_index 181 +#define SecondaryColor3usEXT_remap_index 182 +#define SecondaryColor3usvEXT_remap_index 183 +#define SecondaryColorPointerEXT_remap_index 184 +#define MultiDrawArraysEXT_remap_index 185 +#define MultiDrawElementsEXT_remap_index 186 +#define FogCoordPointerEXT_remap_index 187 +#define FogCoorddEXT_remap_index 188 +#define FogCoorddvEXT_remap_index 189 +#define FogCoordfEXT_remap_index 190 +#define FogCoordfvEXT_remap_index 191 +#define PixelTexGenSGIX_remap_index 192 +#define BlendFuncSeparateEXT_remap_index 193 +#define FlushVertexArrayRangeNV_remap_index 194 +#define VertexArrayRangeNV_remap_index 195 +#define CombinerInputNV_remap_index 196 +#define CombinerOutputNV_remap_index 197 +#define CombinerParameterfNV_remap_index 198 +#define CombinerParameterfvNV_remap_index 199 +#define CombinerParameteriNV_remap_index 200 +#define CombinerParameterivNV_remap_index 201 +#define FinalCombinerInputNV_remap_index 202 +#define GetCombinerInputParameterfvNV_remap_index 203 +#define GetCombinerInputParameterivNV_remap_index 204 +#define GetCombinerOutputParameterfvNV_remap_index 205 +#define GetCombinerOutputParameterivNV_remap_index 206 +#define GetFinalCombinerInputParameterfvNV_remap_index 207 +#define GetFinalCombinerInputParameterivNV_remap_index 208 +#define ResizeBuffersMESA_remap_index 209 +#define WindowPos2dMESA_remap_index 210 +#define WindowPos2dvMESA_remap_index 211 +#define WindowPos2fMESA_remap_index 212 +#define WindowPos2fvMESA_remap_index 213 +#define WindowPos2iMESA_remap_index 214 +#define WindowPos2ivMESA_remap_index 215 +#define WindowPos2sMESA_remap_index 216 +#define WindowPos2svMESA_remap_index 217 +#define WindowPos3dMESA_remap_index 218 +#define WindowPos3dvMESA_remap_index 219 +#define WindowPos3fMESA_remap_index 220 +#define WindowPos3fvMESA_remap_index 221 +#define WindowPos3iMESA_remap_index 222 +#define WindowPos3ivMESA_remap_index 223 +#define WindowPos3sMESA_remap_index 224 +#define WindowPos3svMESA_remap_index 225 +#define WindowPos4dMESA_remap_index 226 +#define WindowPos4dvMESA_remap_index 227 +#define WindowPos4fMESA_remap_index 228 +#define WindowPos4fvMESA_remap_index 229 +#define WindowPos4iMESA_remap_index 230 +#define WindowPos4ivMESA_remap_index 231 +#define WindowPos4sMESA_remap_index 232 +#define WindowPos4svMESA_remap_index 233 +#define MultiModeDrawArraysIBM_remap_index 234 +#define MultiModeDrawElementsIBM_remap_index 235 +#define DeleteFencesNV_remap_index 236 +#define FinishFenceNV_remap_index 237 +#define GenFencesNV_remap_index 238 +#define GetFenceivNV_remap_index 239 +#define IsFenceNV_remap_index 240 +#define SetFenceNV_remap_index 241 +#define TestFenceNV_remap_index 242 +#define AreProgramsResidentNV_remap_index 243 +#define BindProgramNV_remap_index 244 +#define DeleteProgramsNV_remap_index 245 +#define ExecuteProgramNV_remap_index 246 +#define GenProgramsNV_remap_index 247 +#define GetProgramParameterdvNV_remap_index 248 +#define GetProgramParameterfvNV_remap_index 249 +#define GetProgramStringNV_remap_index 250 +#define GetProgramivNV_remap_index 251 +#define GetTrackMatrixivNV_remap_index 252 +#define GetVertexAttribPointervNV_remap_index 253 +#define GetVertexAttribdvNV_remap_index 254 +#define GetVertexAttribfvNV_remap_index 255 +#define GetVertexAttribivNV_remap_index 256 +#define IsProgramNV_remap_index 257 +#define LoadProgramNV_remap_index 258 +#define ProgramParameter4dNV_remap_index 259 +#define ProgramParameter4dvNV_remap_index 260 +#define ProgramParameter4fNV_remap_index 261 +#define ProgramParameter4fvNV_remap_index 262 +#define ProgramParameters4dvNV_remap_index 263 +#define ProgramParameters4fvNV_remap_index 264 +#define RequestResidentProgramsNV_remap_index 265 +#define TrackMatrixNV_remap_index 266 +#define VertexAttrib1dNV_remap_index 267 +#define VertexAttrib1dvNV_remap_index 268 +#define VertexAttrib1fNV_remap_index 269 +#define VertexAttrib1fvNV_remap_index 270 +#define VertexAttrib1sNV_remap_index 271 +#define VertexAttrib1svNV_remap_index 272 +#define VertexAttrib2dNV_remap_index 273 +#define VertexAttrib2dvNV_remap_index 274 +#define VertexAttrib2fNV_remap_index 275 +#define VertexAttrib2fvNV_remap_index 276 +#define VertexAttrib2sNV_remap_index 277 +#define VertexAttrib2svNV_remap_index 278 +#define VertexAttrib3dNV_remap_index 279 +#define VertexAttrib3dvNV_remap_index 280 +#define VertexAttrib3fNV_remap_index 281 +#define VertexAttrib3fvNV_remap_index 282 +#define VertexAttrib3sNV_remap_index 283 +#define VertexAttrib3svNV_remap_index 284 +#define VertexAttrib4dNV_remap_index 285 +#define VertexAttrib4dvNV_remap_index 286 +#define VertexAttrib4fNV_remap_index 287 +#define VertexAttrib4fvNV_remap_index 288 +#define VertexAttrib4sNV_remap_index 289 +#define VertexAttrib4svNV_remap_index 290 +#define VertexAttrib4ubNV_remap_index 291 +#define VertexAttrib4ubvNV_remap_index 292 +#define VertexAttribPointerNV_remap_index 293 +#define VertexAttribs1dvNV_remap_index 294 +#define VertexAttribs1fvNV_remap_index 295 +#define VertexAttribs1svNV_remap_index 296 +#define VertexAttribs2dvNV_remap_index 297 +#define VertexAttribs2fvNV_remap_index 298 +#define VertexAttribs2svNV_remap_index 299 +#define VertexAttribs3dvNV_remap_index 300 +#define VertexAttribs3fvNV_remap_index 301 +#define VertexAttribs3svNV_remap_index 302 +#define VertexAttribs4dvNV_remap_index 303 +#define VertexAttribs4fvNV_remap_index 304 +#define VertexAttribs4svNV_remap_index 305 +#define VertexAttribs4ubvNV_remap_index 306 +#define AlphaFragmentOp1ATI_remap_index 307 +#define AlphaFragmentOp2ATI_remap_index 308 +#define AlphaFragmentOp3ATI_remap_index 309 +#define BeginFragmentShaderATI_remap_index 310 +#define BindFragmentShaderATI_remap_index 311 +#define ColorFragmentOp1ATI_remap_index 312 +#define ColorFragmentOp2ATI_remap_index 313 +#define ColorFragmentOp3ATI_remap_index 314 +#define DeleteFragmentShaderATI_remap_index 315 +#define EndFragmentShaderATI_remap_index 316 +#define GenFragmentShadersATI_remap_index 317 +#define PassTexCoordATI_remap_index 318 +#define SampleMapATI_remap_index 319 +#define SetFragmentShaderConstantATI_remap_index 320 +#define PointParameteriNV_remap_index 321 +#define PointParameterivNV_remap_index 322 +#define ActiveStencilFaceEXT_remap_index 323 +#define BindVertexArrayAPPLE_remap_index 324 +#define DeleteVertexArraysAPPLE_remap_index 325 +#define GenVertexArraysAPPLE_remap_index 326 +#define IsVertexArrayAPPLE_remap_index 327 +#define GetProgramNamedParameterdvNV_remap_index 328 +#define GetProgramNamedParameterfvNV_remap_index 329 +#define ProgramNamedParameter4dNV_remap_index 330 +#define ProgramNamedParameter4dvNV_remap_index 331 +#define ProgramNamedParameter4fNV_remap_index 332 +#define ProgramNamedParameter4fvNV_remap_index 333 +#define DepthBoundsEXT_remap_index 334 +#define BlendEquationSeparateEXT_remap_index 335 +#define BindFramebufferEXT_remap_index 336 +#define BindRenderbufferEXT_remap_index 337 +#define CheckFramebufferStatusEXT_remap_index 338 +#define DeleteFramebuffersEXT_remap_index 339 +#define DeleteRenderbuffersEXT_remap_index 340 +#define FramebufferRenderbufferEXT_remap_index 341 +#define FramebufferTexture1DEXT_remap_index 342 +#define FramebufferTexture2DEXT_remap_index 343 +#define FramebufferTexture3DEXT_remap_index 344 +#define GenFramebuffersEXT_remap_index 345 +#define GenRenderbuffersEXT_remap_index 346 +#define GenerateMipmapEXT_remap_index 347 +#define GetFramebufferAttachmentParameterivEXT_remap_index 348 +#define GetRenderbufferParameterivEXT_remap_index 349 +#define IsFramebufferEXT_remap_index 350 +#define IsRenderbufferEXT_remap_index 351 +#define RenderbufferStorageEXT_remap_index 352 +#define BlitFramebufferEXT_remap_index 353 +#define ProgramEnvParameters4fvEXT_remap_index 354 +#define ProgramLocalParameters4fvEXT_remap_index 355 +#define GetQueryObjecti64vEXT_remap_index 356 +#define GetQueryObjectui64vEXT_remap_index 357 +#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters) +#define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index]) +#define SET_AttachShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index], fn) +#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), driDispatchRemapTable[CreateProgram_remap_index], parameters) +#define GET_CreateProgram(disp) GET_by_offset(disp, driDispatchRemapTable[CreateProgram_remap_index]) +#define SET_CreateProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateProgram_remap_index], fn) +#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CreateShader_remap_index], parameters) +#define GET_CreateShader(disp) GET_by_offset(disp, driDispatchRemapTable[CreateShader_remap_index]) +#define SET_CreateShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateShader_remap_index], fn) +#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteProgram_remap_index], parameters) +#define GET_DeleteProgram(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteProgram_remap_index]) +#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteProgram_remap_index], fn) +#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteShader_remap_index], parameters) +#define GET_DeleteShader(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteShader_remap_index]) +#define SET_DeleteShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteShader_remap_index], fn) +#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[DetachShader_remap_index], parameters) +#define GET_DetachShader(disp) GET_by_offset(disp, driDispatchRemapTable[DetachShader_remap_index]) +#define SET_DetachShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DetachShader_remap_index], fn) +#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), driDispatchRemapTable[GetAttachedShaders_remap_index], parameters) +#define GET_GetAttachedShaders(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttachedShaders_remap_index]) +#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttachedShaders_remap_index], fn) +#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), driDispatchRemapTable[GetProgramInfoLog_remap_index], parameters) +#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramInfoLog_remap_index]) +#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramInfoLog_remap_index], fn) +#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetProgramiv_remap_index], parameters) +#define GET_GetProgramiv(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramiv_remap_index]) +#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramiv_remap_index], fn) +#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), driDispatchRemapTable[GetShaderInfoLog_remap_index], parameters) +#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderInfoLog_remap_index]) +#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderInfoLog_remap_index], fn) +#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetShaderiv_remap_index], parameters) +#define GET_GetShaderiv(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderiv_remap_index]) +#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderiv_remap_index], fn) +#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsProgram_remap_index], parameters) +#define GET_IsProgram(disp) GET_by_offset(disp, driDispatchRemapTable[IsProgram_remap_index]) +#define SET_IsProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsProgram_remap_index], fn) +#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsShader_remap_index], parameters) +#define GET_IsShader(disp) GET_by_offset(disp, driDispatchRemapTable[IsShader_remap_index]) +#define SET_IsShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsShader_remap_index], fn) #define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparate_remap_index], parameters) #define GET_StencilFuncSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparate_remap_index]) #define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparate_remap_index], fn) diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index b6169f060d..7da00d2e3b 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -5021,13 +5021,98 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5044,6 +5129,7 @@ + @@ -5051,12 +5137,514 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6834,7 +7422,7 @@ - + @@ -6842,7 +7430,7 @@ - + @@ -6858,17 +7446,17 @@ - + - + - + @@ -7043,16 +7631,16 @@ - + - + - + @@ -7061,22 +7649,22 @@ - + - + - - + + @@ -7093,16 +7681,16 @@ - + - + - + @@ -7111,7 +7699,7 @@ - + diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h index ef3118911d..548d58c79c 100644 --- a/src/mesa/glapi/glapioffsets.h +++ b/src/mesa/glapi/glapioffsets.h @@ -440,355 +440,381 @@ #if !defined(IN_DRI_DRIVER) -#define _gloffset_StencilFuncSeparate 408 -#define _gloffset_StencilMaskSeparate 409 -#define _gloffset_StencilOpSeparate 410 -#define _gloffset_LoadTransposeMatrixdARB 411 -#define _gloffset_LoadTransposeMatrixfARB 412 -#define _gloffset_MultTransposeMatrixdARB 413 -#define _gloffset_MultTransposeMatrixfARB 414 -#define _gloffset_SampleCoverageARB 415 -#define _gloffset_CompressedTexImage1DARB 416 -#define _gloffset_CompressedTexImage2DARB 417 -#define _gloffset_CompressedTexImage3DARB 418 -#define _gloffset_CompressedTexSubImage1DARB 419 -#define _gloffset_CompressedTexSubImage2DARB 420 -#define _gloffset_CompressedTexSubImage3DARB 421 -#define _gloffset_GetCompressedTexImageARB 422 -#define _gloffset_DisableVertexAttribArrayARB 423 -#define _gloffset_EnableVertexAttribArrayARB 424 -#define _gloffset_GetProgramEnvParameterdvARB 425 -#define _gloffset_GetProgramEnvParameterfvARB 426 -#define _gloffset_GetProgramLocalParameterdvARB 427 -#define _gloffset_GetProgramLocalParameterfvARB 428 -#define _gloffset_GetProgramStringARB 429 -#define _gloffset_GetProgramivARB 430 -#define _gloffset_GetVertexAttribdvARB 431 -#define _gloffset_GetVertexAttribfvARB 432 -#define _gloffset_GetVertexAttribivARB 433 -#define _gloffset_ProgramEnvParameter4dARB 434 -#define _gloffset_ProgramEnvParameter4dvARB 435 -#define _gloffset_ProgramEnvParameter4fARB 436 -#define _gloffset_ProgramEnvParameter4fvARB 437 -#define _gloffset_ProgramLocalParameter4dARB 438 -#define _gloffset_ProgramLocalParameter4dvARB 439 -#define _gloffset_ProgramLocalParameter4fARB 440 -#define _gloffset_ProgramLocalParameter4fvARB 441 -#define _gloffset_ProgramStringARB 442 -#define _gloffset_VertexAttrib1dARB 443 -#define _gloffset_VertexAttrib1dvARB 444 -#define _gloffset_VertexAttrib1fARB 445 -#define _gloffset_VertexAttrib1fvARB 446 -#define _gloffset_VertexAttrib1sARB 447 -#define _gloffset_VertexAttrib1svARB 448 -#define _gloffset_VertexAttrib2dARB 449 -#define _gloffset_VertexAttrib2dvARB 450 -#define _gloffset_VertexAttrib2fARB 451 -#define _gloffset_VertexAttrib2fvARB 452 -#define _gloffset_VertexAttrib2sARB 453 -#define _gloffset_VertexAttrib2svARB 454 -#define _gloffset_VertexAttrib3dARB 455 -#define _gloffset_VertexAttrib3dvARB 456 -#define _gloffset_VertexAttrib3fARB 457 -#define _gloffset_VertexAttrib3fvARB 458 -#define _gloffset_VertexAttrib3sARB 459 -#define _gloffset_VertexAttrib3svARB 460 -#define _gloffset_VertexAttrib4NbvARB 461 -#define _gloffset_VertexAttrib4NivARB 462 -#define _gloffset_VertexAttrib4NsvARB 463 -#define _gloffset_VertexAttrib4NubARB 464 -#define _gloffset_VertexAttrib4NubvARB 465 -#define _gloffset_VertexAttrib4NuivARB 466 -#define _gloffset_VertexAttrib4NusvARB 467 -#define _gloffset_VertexAttrib4bvARB 468 -#define _gloffset_VertexAttrib4dARB 469 -#define _gloffset_VertexAttrib4dvARB 470 -#define _gloffset_VertexAttrib4fARB 471 -#define _gloffset_VertexAttrib4fvARB 472 -#define _gloffset_VertexAttrib4ivARB 473 -#define _gloffset_VertexAttrib4sARB 474 -#define _gloffset_VertexAttrib4svARB 475 -#define _gloffset_VertexAttrib4ubvARB 476 -#define _gloffset_VertexAttrib4uivARB 477 -#define _gloffset_VertexAttrib4usvARB 478 -#define _gloffset_VertexAttribPointerARB 479 -#define _gloffset_BindBufferARB 480 -#define _gloffset_BufferDataARB 481 -#define _gloffset_BufferSubDataARB 482 -#define _gloffset_DeleteBuffersARB 483 -#define _gloffset_GenBuffersARB 484 -#define _gloffset_GetBufferParameterivARB 485 -#define _gloffset_GetBufferPointervARB 486 -#define _gloffset_GetBufferSubDataARB 487 -#define _gloffset_IsBufferARB 488 -#define _gloffset_MapBufferARB 489 -#define _gloffset_UnmapBufferARB 490 -#define _gloffset_BeginQueryARB 491 -#define _gloffset_DeleteQueriesARB 492 -#define _gloffset_EndQueryARB 493 -#define _gloffset_GenQueriesARB 494 -#define _gloffset_GetQueryObjectivARB 495 -#define _gloffset_GetQueryObjectuivARB 496 -#define _gloffset_GetQueryivARB 497 -#define _gloffset_IsQueryARB 498 -#define _gloffset_AttachObjectARB 499 -#define _gloffset_CompileShaderARB 500 -#define _gloffset_CreateProgramObjectARB 501 -#define _gloffset_CreateShaderObjectARB 502 -#define _gloffset_DeleteObjectARB 503 -#define _gloffset_DetachObjectARB 504 -#define _gloffset_GetActiveUniformARB 505 -#define _gloffset_GetAttachedObjectsARB 506 -#define _gloffset_GetHandleARB 507 -#define _gloffset_GetInfoLogARB 508 -#define _gloffset_GetObjectParameterfvARB 509 -#define _gloffset_GetObjectParameterivARB 510 -#define _gloffset_GetShaderSourceARB 511 -#define _gloffset_GetUniformLocationARB 512 -#define _gloffset_GetUniformfvARB 513 -#define _gloffset_GetUniformivARB 514 -#define _gloffset_LinkProgramARB 515 -#define _gloffset_ShaderSourceARB 516 -#define _gloffset_Uniform1fARB 517 -#define _gloffset_Uniform1fvARB 518 -#define _gloffset_Uniform1iARB 519 -#define _gloffset_Uniform1ivARB 520 -#define _gloffset_Uniform2fARB 521 -#define _gloffset_Uniform2fvARB 522 -#define _gloffset_Uniform2iARB 523 -#define _gloffset_Uniform2ivARB 524 -#define _gloffset_Uniform3fARB 525 -#define _gloffset_Uniform3fvARB 526 -#define _gloffset_Uniform3iARB 527 -#define _gloffset_Uniform3ivARB 528 -#define _gloffset_Uniform4fARB 529 -#define _gloffset_Uniform4fvARB 530 -#define _gloffset_Uniform4iARB 531 -#define _gloffset_Uniform4ivARB 532 -#define _gloffset_UniformMatrix2fvARB 533 -#define _gloffset_UniformMatrix3fvARB 534 -#define _gloffset_UniformMatrix4fvARB 535 -#define _gloffset_UseProgramObjectARB 536 -#define _gloffset_ValidateProgramARB 537 -#define _gloffset_BindAttribLocationARB 538 -#define _gloffset_GetActiveAttribARB 539 -#define _gloffset_GetAttribLocationARB 540 -#define _gloffset_DrawBuffersARB 541 -#define _gloffset_PolygonOffsetEXT 542 -#define _gloffset_GetPixelTexGenParameterfvSGIS 543 -#define _gloffset_GetPixelTexGenParameterivSGIS 544 -#define _gloffset_PixelTexGenParameterfSGIS 545 -#define _gloffset_PixelTexGenParameterfvSGIS 546 -#define _gloffset_PixelTexGenParameteriSGIS 547 -#define _gloffset_PixelTexGenParameterivSGIS 548 -#define _gloffset_SampleMaskSGIS 549 -#define _gloffset_SamplePatternSGIS 550 -#define _gloffset_ColorPointerEXT 551 -#define _gloffset_EdgeFlagPointerEXT 552 -#define _gloffset_IndexPointerEXT 553 -#define _gloffset_NormalPointerEXT 554 -#define _gloffset_TexCoordPointerEXT 555 -#define _gloffset_VertexPointerEXT 556 -#define _gloffset_PointParameterfEXT 557 -#define _gloffset_PointParameterfvEXT 558 -#define _gloffset_LockArraysEXT 559 -#define _gloffset_UnlockArraysEXT 560 -#define _gloffset_CullParameterdvEXT 561 -#define _gloffset_CullParameterfvEXT 562 -#define _gloffset_SecondaryColor3bEXT 563 -#define _gloffset_SecondaryColor3bvEXT 564 -#define _gloffset_SecondaryColor3dEXT 565 -#define _gloffset_SecondaryColor3dvEXT 566 -#define _gloffset_SecondaryColor3fEXT 567 -#define _gloffset_SecondaryColor3fvEXT 568 -#define _gloffset_SecondaryColor3iEXT 569 -#define _gloffset_SecondaryColor3ivEXT 570 -#define _gloffset_SecondaryColor3sEXT 571 -#define _gloffset_SecondaryColor3svEXT 572 -#define _gloffset_SecondaryColor3ubEXT 573 -#define _gloffset_SecondaryColor3ubvEXT 574 -#define _gloffset_SecondaryColor3uiEXT 575 -#define _gloffset_SecondaryColor3uivEXT 576 -#define _gloffset_SecondaryColor3usEXT 577 -#define _gloffset_SecondaryColor3usvEXT 578 -#define _gloffset_SecondaryColorPointerEXT 579 -#define _gloffset_MultiDrawArraysEXT 580 -#define _gloffset_MultiDrawElementsEXT 581 -#define _gloffset_FogCoordPointerEXT 582 -#define _gloffset_FogCoorddEXT 583 -#define _gloffset_FogCoorddvEXT 584 -#define _gloffset_FogCoordfEXT 585 -#define _gloffset_FogCoordfvEXT 586 -#define _gloffset_PixelTexGenSGIX 587 -#define _gloffset_BlendFuncSeparateEXT 588 -#define _gloffset_FlushVertexArrayRangeNV 589 -#define _gloffset_VertexArrayRangeNV 590 -#define _gloffset_CombinerInputNV 591 -#define _gloffset_CombinerOutputNV 592 -#define _gloffset_CombinerParameterfNV 593 -#define _gloffset_CombinerParameterfvNV 594 -#define _gloffset_CombinerParameteriNV 595 -#define _gloffset_CombinerParameterivNV 596 -#define _gloffset_FinalCombinerInputNV 597 -#define _gloffset_GetCombinerInputParameterfvNV 598 -#define _gloffset_GetCombinerInputParameterivNV 599 -#define _gloffset_GetCombinerOutputParameterfvNV 600 -#define _gloffset_GetCombinerOutputParameterivNV 601 -#define _gloffset_GetFinalCombinerInputParameterfvNV 602 -#define _gloffset_GetFinalCombinerInputParameterivNV 603 -#define _gloffset_ResizeBuffersMESA 604 -#define _gloffset_WindowPos2dMESA 605 -#define _gloffset_WindowPos2dvMESA 606 -#define _gloffset_WindowPos2fMESA 607 -#define _gloffset_WindowPos2fvMESA 608 -#define _gloffset_WindowPos2iMESA 609 -#define _gloffset_WindowPos2ivMESA 610 -#define _gloffset_WindowPos2sMESA 611 -#define _gloffset_WindowPos2svMESA 612 -#define _gloffset_WindowPos3dMESA 613 -#define _gloffset_WindowPos3dvMESA 614 -#define _gloffset_WindowPos3fMESA 615 -#define _gloffset_WindowPos3fvMESA 616 -#define _gloffset_WindowPos3iMESA 617 -#define _gloffset_WindowPos3ivMESA 618 -#define _gloffset_WindowPos3sMESA 619 -#define _gloffset_WindowPos3svMESA 620 -#define _gloffset_WindowPos4dMESA 621 -#define _gloffset_WindowPos4dvMESA 622 -#define _gloffset_WindowPos4fMESA 623 -#define _gloffset_WindowPos4fvMESA 624 -#define _gloffset_WindowPos4iMESA 625 -#define _gloffset_WindowPos4ivMESA 626 -#define _gloffset_WindowPos4sMESA 627 -#define _gloffset_WindowPos4svMESA 628 -#define _gloffset_MultiModeDrawArraysIBM 629 -#define _gloffset_MultiModeDrawElementsIBM 630 -#define _gloffset_DeleteFencesNV 631 -#define _gloffset_FinishFenceNV 632 -#define _gloffset_GenFencesNV 633 -#define _gloffset_GetFenceivNV 634 -#define _gloffset_IsFenceNV 635 -#define _gloffset_SetFenceNV 636 -#define _gloffset_TestFenceNV 637 -#define _gloffset_AreProgramsResidentNV 638 -#define _gloffset_BindProgramNV 639 -#define _gloffset_DeleteProgramsNV 640 -#define _gloffset_ExecuteProgramNV 641 -#define _gloffset_GenProgramsNV 642 -#define _gloffset_GetProgramParameterdvNV 643 -#define _gloffset_GetProgramParameterfvNV 644 -#define _gloffset_GetProgramStringNV 645 -#define _gloffset_GetProgramivNV 646 -#define _gloffset_GetTrackMatrixivNV 647 -#define _gloffset_GetVertexAttribPointervNV 648 -#define _gloffset_GetVertexAttribdvNV 649 -#define _gloffset_GetVertexAttribfvNV 650 -#define _gloffset_GetVertexAttribivNV 651 -#define _gloffset_IsProgramNV 652 -#define _gloffset_LoadProgramNV 653 -#define _gloffset_ProgramParameter4dNV 654 -#define _gloffset_ProgramParameter4dvNV 655 -#define _gloffset_ProgramParameter4fNV 656 -#define _gloffset_ProgramParameter4fvNV 657 -#define _gloffset_ProgramParameters4dvNV 658 -#define _gloffset_ProgramParameters4fvNV 659 -#define _gloffset_RequestResidentProgramsNV 660 -#define _gloffset_TrackMatrixNV 661 -#define _gloffset_VertexAttrib1dNV 662 -#define _gloffset_VertexAttrib1dvNV 663 -#define _gloffset_VertexAttrib1fNV 664 -#define _gloffset_VertexAttrib1fvNV 665 -#define _gloffset_VertexAttrib1sNV 666 -#define _gloffset_VertexAttrib1svNV 667 -#define _gloffset_VertexAttrib2dNV 668 -#define _gloffset_VertexAttrib2dvNV 669 -#define _gloffset_VertexAttrib2fNV 670 -#define _gloffset_VertexAttrib2fvNV 671 -#define _gloffset_VertexAttrib2sNV 672 -#define _gloffset_VertexAttrib2svNV 673 -#define _gloffset_VertexAttrib3dNV 674 -#define _gloffset_VertexAttrib3dvNV 675 -#define _gloffset_VertexAttrib3fNV 676 -#define _gloffset_VertexAttrib3fvNV 677 -#define _gloffset_VertexAttrib3sNV 678 -#define _gloffset_VertexAttrib3svNV 679 -#define _gloffset_VertexAttrib4dNV 680 -#define _gloffset_VertexAttrib4dvNV 681 -#define _gloffset_VertexAttrib4fNV 682 -#define _gloffset_VertexAttrib4fvNV 683 -#define _gloffset_VertexAttrib4sNV 684 -#define _gloffset_VertexAttrib4svNV 685 -#define _gloffset_VertexAttrib4ubNV 686 -#define _gloffset_VertexAttrib4ubvNV 687 -#define _gloffset_VertexAttribPointerNV 688 -#define _gloffset_VertexAttribs1dvNV 689 -#define _gloffset_VertexAttribs1fvNV 690 -#define _gloffset_VertexAttribs1svNV 691 -#define _gloffset_VertexAttribs2dvNV 692 -#define _gloffset_VertexAttribs2fvNV 693 -#define _gloffset_VertexAttribs2svNV 694 -#define _gloffset_VertexAttribs3dvNV 695 -#define _gloffset_VertexAttribs3fvNV 696 -#define _gloffset_VertexAttribs3svNV 697 -#define _gloffset_VertexAttribs4dvNV 698 -#define _gloffset_VertexAttribs4fvNV 699 -#define _gloffset_VertexAttribs4svNV 700 -#define _gloffset_VertexAttribs4ubvNV 701 -#define _gloffset_AlphaFragmentOp1ATI 702 -#define _gloffset_AlphaFragmentOp2ATI 703 -#define _gloffset_AlphaFragmentOp3ATI 704 -#define _gloffset_BeginFragmentShaderATI 705 -#define _gloffset_BindFragmentShaderATI 706 -#define _gloffset_ColorFragmentOp1ATI 707 -#define _gloffset_ColorFragmentOp2ATI 708 -#define _gloffset_ColorFragmentOp3ATI 709 -#define _gloffset_DeleteFragmentShaderATI 710 -#define _gloffset_EndFragmentShaderATI 711 -#define _gloffset_GenFragmentShadersATI 712 -#define _gloffset_PassTexCoordATI 713 -#define _gloffset_SampleMapATI 714 -#define _gloffset_SetFragmentShaderConstantATI 715 -#define _gloffset_PointParameteriNV 716 -#define _gloffset_PointParameterivNV 717 -#define _gloffset_ActiveStencilFaceEXT 718 -#define _gloffset_BindVertexArrayAPPLE 719 -#define _gloffset_DeleteVertexArraysAPPLE 720 -#define _gloffset_GenVertexArraysAPPLE 721 -#define _gloffset_IsVertexArrayAPPLE 722 -#define _gloffset_GetProgramNamedParameterdvNV 723 -#define _gloffset_GetProgramNamedParameterfvNV 724 -#define _gloffset_ProgramNamedParameter4dNV 725 -#define _gloffset_ProgramNamedParameter4dvNV 726 -#define _gloffset_ProgramNamedParameter4fNV 727 -#define _gloffset_ProgramNamedParameter4fvNV 728 -#define _gloffset_DepthBoundsEXT 729 -#define _gloffset_BlendEquationSeparateEXT 730 -#define _gloffset_BindFramebufferEXT 731 -#define _gloffset_BindRenderbufferEXT 732 -#define _gloffset_CheckFramebufferStatusEXT 733 -#define _gloffset_DeleteFramebuffersEXT 734 -#define _gloffset_DeleteRenderbuffersEXT 735 -#define _gloffset_FramebufferRenderbufferEXT 736 -#define _gloffset_FramebufferTexture1DEXT 737 -#define _gloffset_FramebufferTexture2DEXT 738 -#define _gloffset_FramebufferTexture3DEXT 739 -#define _gloffset_GenFramebuffersEXT 740 -#define _gloffset_GenRenderbuffersEXT 741 -#define _gloffset_GenerateMipmapEXT 742 -#define _gloffset_GetFramebufferAttachmentParameterivEXT 743 -#define _gloffset_GetRenderbufferParameterivEXT 744 -#define _gloffset_IsFramebufferEXT 745 -#define _gloffset_IsRenderbufferEXT 746 -#define _gloffset_RenderbufferStorageEXT 747 -#define _gloffset_BlitFramebufferEXT 748 -#define _gloffset_ProgramEnvParameters4fvEXT 749 -#define _gloffset_ProgramLocalParameters4fvEXT 750 -#define _gloffset_GetQueryObjecti64vEXT 751 -#define _gloffset_GetQueryObjectui64vEXT 752 -#define _gloffset_FIRST_DYNAMIC 753 +#define _gloffset_AttachShader 408 +#define _gloffset_CreateProgram 409 +#define _gloffset_CreateShader 410 +#define _gloffset_DeleteProgram 411 +#define _gloffset_DeleteShader 412 +#define _gloffset_DetachShader 413 +#define _gloffset_GetAttachedShaders 414 +#define _gloffset_GetProgramInfoLog 415 +#define _gloffset_GetProgramiv 416 +#define _gloffset_GetShaderInfoLog 417 +#define _gloffset_GetShaderiv 418 +#define _gloffset_IsProgram 419 +#define _gloffset_IsShader 420 +#define _gloffset_StencilFuncSeparate 421 +#define _gloffset_StencilMaskSeparate 422 +#define _gloffset_StencilOpSeparate 423 +#define _gloffset_LoadTransposeMatrixdARB 424 +#define _gloffset_LoadTransposeMatrixfARB 425 +#define _gloffset_MultTransposeMatrixdARB 426 +#define _gloffset_MultTransposeMatrixfARB 427 +#define _gloffset_SampleCoverageARB 428 +#define _gloffset_CompressedTexImage1DARB 429 +#define _gloffset_CompressedTexImage2DARB 430 +#define _gloffset_CompressedTexImage3DARB 431 +#define _gloffset_CompressedTexSubImage1DARB 432 +#define _gloffset_CompressedTexSubImage2DARB 433 +#define _gloffset_CompressedTexSubImage3DARB 434 +#define _gloffset_GetCompressedTexImageARB 435 +#define _gloffset_DisableVertexAttribArrayARB 436 +#define _gloffset_EnableVertexAttribArrayARB 437 +#define _gloffset_GetProgramEnvParameterdvARB 438 +#define _gloffset_GetProgramEnvParameterfvARB 439 +#define _gloffset_GetProgramLocalParameterdvARB 440 +#define _gloffset_GetProgramLocalParameterfvARB 441 +#define _gloffset_GetProgramStringARB 442 +#define _gloffset_GetProgramivARB 443 +#define _gloffset_GetVertexAttribdvARB 444 +#define _gloffset_GetVertexAttribfvARB 445 +#define _gloffset_GetVertexAttribivARB 446 +#define _gloffset_ProgramEnvParameter4dARB 447 +#define _gloffset_ProgramEnvParameter4dvARB 448 +#define _gloffset_ProgramEnvParameter4fARB 449 +#define _gloffset_ProgramEnvParameter4fvARB 450 +#define _gloffset_ProgramLocalParameter4dARB 451 +#define _gloffset_ProgramLocalParameter4dvARB 452 +#define _gloffset_ProgramLocalParameter4fARB 453 +#define _gloffset_ProgramLocalParameter4fvARB 454 +#define _gloffset_ProgramStringARB 455 +#define _gloffset_VertexAttrib1dARB 456 +#define _gloffset_VertexAttrib1dvARB 457 +#define _gloffset_VertexAttrib1fARB 458 +#define _gloffset_VertexAttrib1fvARB 459 +#define _gloffset_VertexAttrib1sARB 460 +#define _gloffset_VertexAttrib1svARB 461 +#define _gloffset_VertexAttrib2dARB 462 +#define _gloffset_VertexAttrib2dvARB 463 +#define _gloffset_VertexAttrib2fARB 464 +#define _gloffset_VertexAttrib2fvARB 465 +#define _gloffset_VertexAttrib2sARB 466 +#define _gloffset_VertexAttrib2svARB 467 +#define _gloffset_VertexAttrib3dARB 468 +#define _gloffset_VertexAttrib3dvARB 469 +#define _gloffset_VertexAttrib3fARB 470 +#define _gloffset_VertexAttrib3fvARB 471 +#define _gloffset_VertexAttrib3sARB 472 +#define _gloffset_VertexAttrib3svARB 473 +#define _gloffset_VertexAttrib4NbvARB 474 +#define _gloffset_VertexAttrib4NivARB 475 +#define _gloffset_VertexAttrib4NsvARB 476 +#define _gloffset_VertexAttrib4NubARB 477 +#define _gloffset_VertexAttrib4NubvARB 478 +#define _gloffset_VertexAttrib4NuivARB 479 +#define _gloffset_VertexAttrib4NusvARB 480 +#define _gloffset_VertexAttrib4bvARB 481 +#define _gloffset_VertexAttrib4dARB 482 +#define _gloffset_VertexAttrib4dvARB 483 +#define _gloffset_VertexAttrib4fARB 484 +#define _gloffset_VertexAttrib4fvARB 485 +#define _gloffset_VertexAttrib4ivARB 486 +#define _gloffset_VertexAttrib4sARB 487 +#define _gloffset_VertexAttrib4svARB 488 +#define _gloffset_VertexAttrib4ubvARB 489 +#define _gloffset_VertexAttrib4uivARB 490 +#define _gloffset_VertexAttrib4usvARB 491 +#define _gloffset_VertexAttribPointerARB 492 +#define _gloffset_BindBufferARB 493 +#define _gloffset_BufferDataARB 494 +#define _gloffset_BufferSubDataARB 495 +#define _gloffset_DeleteBuffersARB 496 +#define _gloffset_GenBuffersARB 497 +#define _gloffset_GetBufferParameterivARB 498 +#define _gloffset_GetBufferPointervARB 499 +#define _gloffset_GetBufferSubDataARB 500 +#define _gloffset_IsBufferARB 501 +#define _gloffset_MapBufferARB 502 +#define _gloffset_UnmapBufferARB 503 +#define _gloffset_BeginQueryARB 504 +#define _gloffset_DeleteQueriesARB 505 +#define _gloffset_EndQueryARB 506 +#define _gloffset_GenQueriesARB 507 +#define _gloffset_GetQueryObjectivARB 508 +#define _gloffset_GetQueryObjectuivARB 509 +#define _gloffset_GetQueryivARB 510 +#define _gloffset_IsQueryARB 511 +#define _gloffset_AttachObjectARB 512 +#define _gloffset_CompileShaderARB 513 +#define _gloffset_CreateProgramObjectARB 514 +#define _gloffset_CreateShaderObjectARB 515 +#define _gloffset_DeleteObjectARB 516 +#define _gloffset_DetachObjectARB 517 +#define _gloffset_GetActiveUniformARB 518 +#define _gloffset_GetAttachedObjectsARB 519 +#define _gloffset_GetHandleARB 520 +#define _gloffset_GetInfoLogARB 521 +#define _gloffset_GetObjectParameterfvARB 522 +#define _gloffset_GetObjectParameterivARB 523 +#define _gloffset_GetShaderSourceARB 524 +#define _gloffset_GetUniformLocationARB 525 +#define _gloffset_GetUniformfvARB 526 +#define _gloffset_GetUniformivARB 527 +#define _gloffset_LinkProgramARB 528 +#define _gloffset_ShaderSourceARB 529 +#define _gloffset_Uniform1fARB 530 +#define _gloffset_Uniform1fvARB 531 +#define _gloffset_Uniform1iARB 532 +#define _gloffset_Uniform1ivARB 533 +#define _gloffset_Uniform2fARB 534 +#define _gloffset_Uniform2fvARB 535 +#define _gloffset_Uniform2iARB 536 +#define _gloffset_Uniform2ivARB 537 +#define _gloffset_Uniform3fARB 538 +#define _gloffset_Uniform3fvARB 539 +#define _gloffset_Uniform3iARB 540 +#define _gloffset_Uniform3ivARB 541 +#define _gloffset_Uniform4fARB 542 +#define _gloffset_Uniform4fvARB 543 +#define _gloffset_Uniform4iARB 544 +#define _gloffset_Uniform4ivARB 545 +#define _gloffset_UniformMatrix2fvARB 546 +#define _gloffset_UniformMatrix3fvARB 547 +#define _gloffset_UniformMatrix4fvARB 548 +#define _gloffset_UseProgramObjectARB 549 +#define _gloffset_ValidateProgramARB 550 +#define _gloffset_BindAttribLocationARB 551 +#define _gloffset_GetActiveAttribARB 552 +#define _gloffset_GetAttribLocationARB 553 +#define _gloffset_DrawBuffersARB 554 +#define _gloffset_PolygonOffsetEXT 555 +#define _gloffset_GetPixelTexGenParameterfvSGIS 556 +#define _gloffset_GetPixelTexGenParameterivSGIS 557 +#define _gloffset_PixelTexGenParameterfSGIS 558 +#define _gloffset_PixelTexGenParameterfvSGIS 559 +#define _gloffset_PixelTexGenParameteriSGIS 560 +#define _gloffset_PixelTexGenParameterivSGIS 561 +#define _gloffset_SampleMaskSGIS 562 +#define _gloffset_SamplePatternSGIS 563 +#define _gloffset_ColorPointerEXT 564 +#define _gloffset_EdgeFlagPointerEXT 565 +#define _gloffset_IndexPointerEXT 566 +#define _gloffset_NormalPointerEXT 567 +#define _gloffset_TexCoordPointerEXT 568 +#define _gloffset_VertexPointerEXT 569 +#define _gloffset_PointParameterfEXT 570 +#define _gloffset_PointParameterfvEXT 571 +#define _gloffset_LockArraysEXT 572 +#define _gloffset_UnlockArraysEXT 573 +#define _gloffset_CullParameterdvEXT 574 +#define _gloffset_CullParameterfvEXT 575 +#define _gloffset_SecondaryColor3bEXT 576 +#define _gloffset_SecondaryColor3bvEXT 577 +#define _gloffset_SecondaryColor3dEXT 578 +#define _gloffset_SecondaryColor3dvEXT 579 +#define _gloffset_SecondaryColor3fEXT 580 +#define _gloffset_SecondaryColor3fvEXT 581 +#define _gloffset_SecondaryColor3iEXT 582 +#define _gloffset_SecondaryColor3ivEXT 583 +#define _gloffset_SecondaryColor3sEXT 584 +#define _gloffset_SecondaryColor3svEXT 585 +#define _gloffset_SecondaryColor3ubEXT 586 +#define _gloffset_SecondaryColor3ubvEXT 587 +#define _gloffset_SecondaryColor3uiEXT 588 +#define _gloffset_SecondaryColor3uivEXT 589 +#define _gloffset_SecondaryColor3usEXT 590 +#define _gloffset_SecondaryColor3usvEXT 591 +#define _gloffset_SecondaryColorPointerEXT 592 +#define _gloffset_MultiDrawArraysEXT 593 +#define _gloffset_MultiDrawElementsEXT 594 +#define _gloffset_FogCoordPointerEXT 595 +#define _gloffset_FogCoorddEXT 596 +#define _gloffset_FogCoorddvEXT 597 +#define _gloffset_FogCoordfEXT 598 +#define _gloffset_FogCoordfvEXT 599 +#define _gloffset_PixelTexGenSGIX 600 +#define _gloffset_BlendFuncSeparateEXT 601 +#define _gloffset_FlushVertexArrayRangeNV 602 +#define _gloffset_VertexArrayRangeNV 603 +#define _gloffset_CombinerInputNV 604 +#define _gloffset_CombinerOutputNV 605 +#define _gloffset_CombinerParameterfNV 606 +#define _gloffset_CombinerParameterfvNV 607 +#define _gloffset_CombinerParameteriNV 608 +#define _gloffset_CombinerParameterivNV 609 +#define _gloffset_FinalCombinerInputNV 610 +#define _gloffset_GetCombinerInputParameterfvNV 611 +#define _gloffset_GetCombinerInputParameterivNV 612 +#define _gloffset_GetCombinerOutputParameterfvNV 613 +#define _gloffset_GetCombinerOutputParameterivNV 614 +#define _gloffset_GetFinalCombinerInputParameterfvNV 615 +#define _gloffset_GetFinalCombinerInputParameterivNV 616 +#define _gloffset_ResizeBuffersMESA 617 +#define _gloffset_WindowPos2dMESA 618 +#define _gloffset_WindowPos2dvMESA 619 +#define _gloffset_WindowPos2fMESA 620 +#define _gloffset_WindowPos2fvMESA 621 +#define _gloffset_WindowPos2iMESA 622 +#define _gloffset_WindowPos2ivMESA 623 +#define _gloffset_WindowPos2sMESA 624 +#define _gloffset_WindowPos2svMESA 625 +#define _gloffset_WindowPos3dMESA 626 +#define _gloffset_WindowPos3dvMESA 627 +#define _gloffset_WindowPos3fMESA 628 +#define _gloffset_WindowPos3fvMESA 629 +#define _gloffset_WindowPos3iMESA 630 +#define _gloffset_WindowPos3ivMESA 631 +#define _gloffset_WindowPos3sMESA 632 +#define _gloffset_WindowPos3svMESA 633 +#define _gloffset_WindowPos4dMESA 634 +#define _gloffset_WindowPos4dvMESA 635 +#define _gloffset_WindowPos4fMESA 636 +#define _gloffset_WindowPos4fvMESA 637 +#define _gloffset_WindowPos4iMESA 638 +#define _gloffset_WindowPos4ivMESA 639 +#define _gloffset_WindowPos4sMESA 640 +#define _gloffset_WindowPos4svMESA 641 +#define _gloffset_MultiModeDrawArraysIBM 642 +#define _gloffset_MultiModeDrawElementsIBM 643 +#define _gloffset_DeleteFencesNV 644 +#define _gloffset_FinishFenceNV 645 +#define _gloffset_GenFencesNV 646 +#define _gloffset_GetFenceivNV 647 +#define _gloffset_IsFenceNV 648 +#define _gloffset_SetFenceNV 649 +#define _gloffset_TestFenceNV 650 +#define _gloffset_AreProgramsResidentNV 651 +#define _gloffset_BindProgramNV 652 +#define _gloffset_DeleteProgramsNV 653 +#define _gloffset_ExecuteProgramNV 654 +#define _gloffset_GenProgramsNV 655 +#define _gloffset_GetProgramParameterdvNV 656 +#define _gloffset_GetProgramParameterfvNV 657 +#define _gloffset_GetProgramStringNV 658 +#define _gloffset_GetProgramivNV 659 +#define _gloffset_GetTrackMatrixivNV 660 +#define _gloffset_GetVertexAttribPointervNV 661 +#define _gloffset_GetVertexAttribdvNV 662 +#define _gloffset_GetVertexAttribfvNV 663 +#define _gloffset_GetVertexAttribivNV 664 +#define _gloffset_IsProgramNV 665 +#define _gloffset_LoadProgramNV 666 +#define _gloffset_ProgramParameter4dNV 667 +#define _gloffset_ProgramParameter4dvNV 668 +#define _gloffset_ProgramParameter4fNV 669 +#define _gloffset_ProgramParameter4fvNV 670 +#define _gloffset_ProgramParameters4dvNV 671 +#define _gloffset_ProgramParameters4fvNV 672 +#define _gloffset_RequestResidentProgramsNV 673 +#define _gloffset_TrackMatrixNV 674 +#define _gloffset_VertexAttrib1dNV 675 +#define _gloffset_VertexAttrib1dvNV 676 +#define _gloffset_VertexAttrib1fNV 677 +#define _gloffset_VertexAttrib1fvNV 678 +#define _gloffset_VertexAttrib1sNV 679 +#define _gloffset_VertexAttrib1svNV 680 +#define _gloffset_VertexAttrib2dNV 681 +#define _gloffset_VertexAttrib2dvNV 682 +#define _gloffset_VertexAttrib2fNV 683 +#define _gloffset_VertexAttrib2fvNV 684 +#define _gloffset_VertexAttrib2sNV 685 +#define _gloffset_VertexAttrib2svNV 686 +#define _gloffset_VertexAttrib3dNV 687 +#define _gloffset_VertexAttrib3dvNV 688 +#define _gloffset_VertexAttrib3fNV 689 +#define _gloffset_VertexAttrib3fvNV 690 +#define _gloffset_VertexAttrib3sNV 691 +#define _gloffset_VertexAttrib3svNV 692 +#define _gloffset_VertexAttrib4dNV 693 +#define _gloffset_VertexAttrib4dvNV 694 +#define _gloffset_VertexAttrib4fNV 695 +#define _gloffset_VertexAttrib4fvNV 696 +#define _gloffset_VertexAttrib4sNV 697 +#define _gloffset_VertexAttrib4svNV 698 +#define _gloffset_VertexAttrib4ubNV 699 +#define _gloffset_VertexAttrib4ubvNV 700 +#define _gloffset_VertexAttribPointerNV 701 +#define _gloffset_VertexAttribs1dvNV 702 +#define _gloffset_VertexAttribs1fvNV 703 +#define _gloffset_VertexAttribs1svNV 704 +#define _gloffset_VertexAttribs2dvNV 705 +#define _gloffset_VertexAttribs2fvNV 706 +#define _gloffset_VertexAttribs2svNV 707 +#define _gloffset_VertexAttribs3dvNV 708 +#define _gloffset_VertexAttribs3fvNV 709 +#define _gloffset_VertexAttribs3svNV 710 +#define _gloffset_VertexAttribs4dvNV 711 +#define _gloffset_VertexAttribs4fvNV 712 +#define _gloffset_VertexAttribs4svNV 713 +#define _gloffset_VertexAttribs4ubvNV 714 +#define _gloffset_AlphaFragmentOp1ATI 715 +#define _gloffset_AlphaFragmentOp2ATI 716 +#define _gloffset_AlphaFragmentOp3ATI 717 +#define _gloffset_BeginFragmentShaderATI 718 +#define _gloffset_BindFragmentShaderATI 719 +#define _gloffset_ColorFragmentOp1ATI 720 +#define _gloffset_ColorFragmentOp2ATI 721 +#define _gloffset_ColorFragmentOp3ATI 722 +#define _gloffset_DeleteFragmentShaderATI 723 +#define _gloffset_EndFragmentShaderATI 724 +#define _gloffset_GenFragmentShadersATI 725 +#define _gloffset_PassTexCoordATI 726 +#define _gloffset_SampleMapATI 727 +#define _gloffset_SetFragmentShaderConstantATI 728 +#define _gloffset_PointParameteriNV 729 +#define _gloffset_PointParameterivNV 730 +#define _gloffset_ActiveStencilFaceEXT 731 +#define _gloffset_BindVertexArrayAPPLE 732 +#define _gloffset_DeleteVertexArraysAPPLE 733 +#define _gloffset_GenVertexArraysAPPLE 734 +#define _gloffset_IsVertexArrayAPPLE 735 +#define _gloffset_GetProgramNamedParameterdvNV 736 +#define _gloffset_GetProgramNamedParameterfvNV 737 +#define _gloffset_ProgramNamedParameter4dNV 738 +#define _gloffset_ProgramNamedParameter4dvNV 739 +#define _gloffset_ProgramNamedParameter4fNV 740 +#define _gloffset_ProgramNamedParameter4fvNV 741 +#define _gloffset_DepthBoundsEXT 742 +#define _gloffset_BlendEquationSeparateEXT 743 +#define _gloffset_BindFramebufferEXT 744 +#define _gloffset_BindRenderbufferEXT 745 +#define _gloffset_CheckFramebufferStatusEXT 746 +#define _gloffset_DeleteFramebuffersEXT 747 +#define _gloffset_DeleteRenderbuffersEXT 748 +#define _gloffset_FramebufferRenderbufferEXT 749 +#define _gloffset_FramebufferTexture1DEXT 750 +#define _gloffset_FramebufferTexture2DEXT 751 +#define _gloffset_FramebufferTexture3DEXT 752 +#define _gloffset_GenFramebuffersEXT 753 +#define _gloffset_GenRenderbuffersEXT 754 +#define _gloffset_GenerateMipmapEXT 755 +#define _gloffset_GetFramebufferAttachmentParameterivEXT 756 +#define _gloffset_GetRenderbufferParameterivEXT 757 +#define _gloffset_IsFramebufferEXT 758 +#define _gloffset_IsRenderbufferEXT 759 +#define _gloffset_RenderbufferStorageEXT 760 +#define _gloffset_BlitFramebufferEXT 761 +#define _gloffset_ProgramEnvParameters4fvEXT 762 +#define _gloffset_ProgramLocalParameters4fvEXT 763 +#define _gloffset_GetQueryObjecti64vEXT 764 +#define _gloffset_GetQueryObjectui64vEXT 765 +#define _gloffset_FIRST_DYNAMIC 766 #else +#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index] +#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index] +#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index] +#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index] +#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index] +#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index] +#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index] +#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index] +#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index] +#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index] +#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index] +#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index] +#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index] #define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] #define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] #define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h index 576916e9f4..e77fe05d59 100644 --- a/src/mesa/glapi/glapitable.h +++ b/src/mesa/glapi/glapitable.h @@ -445,351 +445,364 @@ struct _glapi_table void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */ void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */ void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */ - void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 408 */ - void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 409 */ - void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); /* 410 */ - void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 411 */ - void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 412 */ - void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 413 */ - void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 414 */ - void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 415 */ - void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 416 */ - void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 417 */ - void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 418 */ - void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 419 */ - void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 420 */ - void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 421 */ - void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 422 */ - void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 423 */ - void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 424 */ - void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 425 */ - void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 426 */ - void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 427 */ - void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 428 */ - void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 429 */ - void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 430 */ - void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 431 */ - void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 432 */ - void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 433 */ - void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 434 */ - void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 435 */ - void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 436 */ - void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 437 */ - void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 438 */ - void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 439 */ - void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 440 */ - void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 441 */ - void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 442 */ - void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 443 */ - void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 444 */ - void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 445 */ - void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 446 */ - void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 447 */ - void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 448 */ - void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 449 */ - void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 450 */ - void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 451 */ - void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 452 */ - void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 453 */ - void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 454 */ - void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 455 */ - void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 456 */ - void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 457 */ - void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 458 */ - void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 459 */ - void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 460 */ - void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 461 */ - void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 462 */ - void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 463 */ - void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 464 */ - void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 465 */ - void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 466 */ - void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 467 */ - void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 468 */ - void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 469 */ - void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 470 */ - void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 471 */ - void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 472 */ - void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 473 */ - void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 474 */ - void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 475 */ - void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 476 */ - void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 477 */ - void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 478 */ - void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 479 */ - void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 480 */ - void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 481 */ - void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 482 */ - void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 483 */ - void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 484 */ - void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 485 */ - void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 486 */ - void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 487 */ - GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 488 */ - GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 489 */ - GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 490 */ - void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 491 */ - void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 492 */ - void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 493 */ - void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 494 */ - void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 495 */ - void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 496 */ - void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 497 */ - GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 498 */ - void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 499 */ - void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shaderObj); /* 500 */ - GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 501 */ - GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 502 */ - void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 503 */ - void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 504 */ - void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 505 */ - void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 506 */ - GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 507 */ - void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 508 */ - void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 509 */ - void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 510 */ - void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * source); /* 511 */ - GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB programObj, const GLcharARB * name); /* 512 */ - void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB programObj, GLint location, GLfloat * params); /* 513 */ - void (GLAPIENTRYP GetUniformivARB)(GLhandleARB programObj, GLint location, GLint * params); /* 514 */ - void (GLAPIENTRYP LinkProgramARB)(GLhandleARB programObj); /* 515 */ - void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint * length); /* 516 */ - void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 517 */ - void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 518 */ - void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 519 */ - void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 520 */ - void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 521 */ - void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 522 */ - void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 523 */ - void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 524 */ - void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 525 */ - void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 526 */ - void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 527 */ - void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 528 */ - void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 529 */ - void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 530 */ - void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 531 */ - void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 532 */ - void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 533 */ - void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 534 */ - void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 535 */ - void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB programObj); /* 536 */ - void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB programObj); /* 537 */ - void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB programObj, GLuint index, const GLcharARB * name); /* 538 */ - void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 539 */ - GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB programObj, const GLcharARB * name); /* 540 */ - void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 541 */ - void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 542 */ - void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 543 */ - void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 544 */ - void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 545 */ - void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 546 */ - void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 547 */ - void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 548 */ - void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 549 */ - void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 550 */ - void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 551 */ - void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 552 */ - void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 553 */ - void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 554 */ - void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 555 */ - void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 556 */ - void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 557 */ - void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 558 */ - void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 559 */ - void (GLAPIENTRYP UnlockArraysEXT)(void); /* 560 */ - void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 561 */ - void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 562 */ - void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 563 */ - void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 564 */ - void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 565 */ - void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 566 */ - void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 567 */ - void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 568 */ - void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 569 */ - void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 570 */ - void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 571 */ - void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 572 */ - void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 573 */ - void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 574 */ - void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 575 */ - void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 576 */ - void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 577 */ - void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 578 */ - void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 579 */ - void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 580 */ - void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 581 */ - void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 582 */ - void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 583 */ - void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 584 */ - void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 585 */ - void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 586 */ - void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 587 */ - void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 588 */ - void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 589 */ - void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 590 */ - void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 591 */ - void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 592 */ - void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 593 */ - void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 594 */ - void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 595 */ - void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 596 */ - void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 597 */ - void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 598 */ - void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 599 */ - void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 600 */ - void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 601 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 602 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 603 */ - void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 604 */ - void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 605 */ - void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 606 */ - void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 607 */ - void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 608 */ - void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 609 */ - void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 610 */ - void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 611 */ - void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 612 */ - void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 613 */ - void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 614 */ - void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 615 */ - void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 616 */ - void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 617 */ - void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 618 */ - void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 619 */ - void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 620 */ - void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 621 */ - void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 622 */ - void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 623 */ - void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 624 */ - void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 625 */ - void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 626 */ - void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 627 */ - void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 628 */ - void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 629 */ - void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 630 */ - void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 631 */ - void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 632 */ - void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 633 */ - void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 634 */ - GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 635 */ - void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 636 */ - GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 637 */ - GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 638 */ - void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 639 */ - void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 640 */ - void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 641 */ - void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 642 */ - void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 643 */ - void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 644 */ - void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 645 */ - void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 646 */ - void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 647 */ - void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params); /* 648 */ - void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 649 */ - void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 650 */ - void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 651 */ - GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 652 */ - void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 653 */ - void (GLAPIENTRYP ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 654 */ - void (GLAPIENTRYP ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); /* 655 */ - void (GLAPIENTRYP ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 656 */ - void (GLAPIENTRYP ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); /* 657 */ - void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 658 */ - void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 659 */ - void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 660 */ - void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 661 */ - void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 662 */ - void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 663 */ - void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 664 */ - void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 665 */ - void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 666 */ - void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 667 */ - void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 668 */ - void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 669 */ - void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 670 */ - void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 671 */ - void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 672 */ - void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 673 */ - void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 674 */ - void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 675 */ - void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 676 */ - void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 677 */ - void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 678 */ - void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 679 */ - void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 680 */ - void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 681 */ - void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 682 */ - void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 683 */ - void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 684 */ - void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 685 */ - void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 686 */ - void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 687 */ - void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 688 */ - void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 689 */ - void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 690 */ - void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 691 */ - void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 692 */ - void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 693 */ - void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 694 */ - void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 695 */ - void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 696 */ - void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 697 */ - void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 698 */ - void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 699 */ - void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 700 */ - void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 701 */ - void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 702 */ - void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 703 */ - void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 704 */ - void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 705 */ - void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 706 */ - void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 707 */ - void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 708 */ - void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 709 */ - void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 710 */ - void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 711 */ - GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 712 */ - void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 713 */ - void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 714 */ - void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 715 */ - void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 716 */ - void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 717 */ - void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 718 */ - void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 719 */ - void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 720 */ - void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 721 */ - GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 722 */ - void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 723 */ - void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 724 */ - void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 725 */ - void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 726 */ - void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 727 */ - void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 728 */ - void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 729 */ - void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 730 */ - void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 731 */ - void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 732 */ - GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 733 */ - void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 734 */ - void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 735 */ - void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 736 */ - void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 737 */ - void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 738 */ - void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 739 */ - void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 740 */ - void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 741 */ - void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 742 */ - void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 743 */ - void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 744 */ - GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 745 */ - GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 746 */ - void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 747 */ - void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 748 */ - void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 749 */ - void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 750 */ - void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 751 */ - void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 752 */ + void (GLAPIENTRYP AttachShader)(GLuint program, GLuint shader); /* 408 */ + GLuint (GLAPIENTRYP CreateProgram)(void); /* 409 */ + GLuint (GLAPIENTRYP CreateShader)(GLenum type); /* 410 */ + void (GLAPIENTRYP DeleteProgram)(GLuint program); /* 411 */ + void (GLAPIENTRYP DeleteShader)(GLuint program); /* 412 */ + void (GLAPIENTRYP DetachShader)(GLuint program, GLuint shader); /* 413 */ + void (GLAPIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); /* 414 */ + void (GLAPIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 415 */ + void (GLAPIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint * params); /* 416 */ + void (GLAPIENTRYP GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 417 */ + void (GLAPIENTRYP GetShaderiv)(GLuint shader, GLenum pname, GLint * params); /* 418 */ + GLboolean (GLAPIENTRYP IsProgram)(GLuint program); /* 419 */ + GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 420 */ + void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */ + void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */ + void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); /* 423 */ + void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 424 */ + void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 425 */ + void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 426 */ + void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 427 */ + void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 428 */ + void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 429 */ + void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 430 */ + void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 431 */ + void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 432 */ + void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 433 */ + void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 434 */ + void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 435 */ + void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 436 */ + void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 437 */ + void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 438 */ + void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 439 */ + void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 440 */ + void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 441 */ + void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 442 */ + void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 443 */ + void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 444 */ + void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 445 */ + void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 446 */ + void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 447 */ + void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 448 */ + void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 449 */ + void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 450 */ + void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 451 */ + void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 452 */ + void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 453 */ + void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 454 */ + void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 455 */ + void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 456 */ + void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 457 */ + void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 458 */ + void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 459 */ + void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 460 */ + void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 461 */ + void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 462 */ + void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 463 */ + void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 464 */ + void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 465 */ + void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 466 */ + void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 467 */ + void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 468 */ + void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 469 */ + void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 470 */ + void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 471 */ + void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 472 */ + void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 473 */ + void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 474 */ + void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 475 */ + void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 476 */ + void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 477 */ + void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 478 */ + void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 479 */ + void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 480 */ + void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 481 */ + void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 482 */ + void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 483 */ + void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 484 */ + void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 485 */ + void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 486 */ + void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 487 */ + void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 488 */ + void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 489 */ + void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 490 */ + void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 491 */ + void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 492 */ + void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 493 */ + void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 494 */ + void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 495 */ + void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 496 */ + void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 497 */ + void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 498 */ + void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 499 */ + void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 500 */ + GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 501 */ + GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 502 */ + GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 503 */ + void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 504 */ + void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 505 */ + void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 506 */ + void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 507 */ + void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 508 */ + void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 509 */ + void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 510 */ + GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 511 */ + void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 512 */ + void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 513 */ + GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 514 */ + GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 515 */ + void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 516 */ + void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 517 */ + void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 518 */ + void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 519 */ + GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 520 */ + void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 521 */ + void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 522 */ + void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 523 */ + void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 524 */ + GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 525 */ + void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 526 */ + void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 527 */ + void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 528 */ + void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 529 */ + void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 530 */ + void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 531 */ + void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 532 */ + void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 533 */ + void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 534 */ + void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 535 */ + void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 536 */ + void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 537 */ + void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 538 */ + void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 539 */ + void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 540 */ + void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 541 */ + void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 542 */ + void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 543 */ + void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 544 */ + void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 545 */ + void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 546 */ + void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 547 */ + void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 548 */ + void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 549 */ + void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 550 */ + void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 551 */ + void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 552 */ + GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 553 */ + void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 554 */ + void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 555 */ + void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 556 */ + void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 557 */ + void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 558 */ + void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 559 */ + void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 560 */ + void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 561 */ + void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 562 */ + void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 563 */ + void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 564 */ + void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 565 */ + void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 566 */ + void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 567 */ + void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 568 */ + void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 569 */ + void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 570 */ + void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 571 */ + void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 572 */ + void (GLAPIENTRYP UnlockArraysEXT)(void); /* 573 */ + void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 574 */ + void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 575 */ + void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 576 */ + void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 577 */ + void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 578 */ + void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 579 */ + void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 580 */ + void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 581 */ + void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 582 */ + void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 583 */ + void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 584 */ + void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 585 */ + void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 586 */ + void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 587 */ + void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 588 */ + void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 589 */ + void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 590 */ + void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 591 */ + void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 592 */ + void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 593 */ + void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 594 */ + void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 595 */ + void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 596 */ + void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 597 */ + void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 598 */ + void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 599 */ + void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 600 */ + void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 601 */ + void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 602 */ + void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 603 */ + void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 604 */ + void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 605 */ + void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 606 */ + void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 607 */ + void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 608 */ + void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 609 */ + void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 610 */ + void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 611 */ + void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 612 */ + void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 613 */ + void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 614 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 615 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 616 */ + void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 617 */ + void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 618 */ + void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 619 */ + void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 620 */ + void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 621 */ + void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 622 */ + void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 623 */ + void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 624 */ + void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 625 */ + void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 626 */ + void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 627 */ + void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 628 */ + void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 629 */ + void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 630 */ + void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 631 */ + void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 632 */ + void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 633 */ + void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 634 */ + void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 635 */ + void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 636 */ + void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 637 */ + void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 638 */ + void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 639 */ + void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 640 */ + void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 641 */ + void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 642 */ + void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 643 */ + void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 644 */ + void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 645 */ + void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 646 */ + void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 647 */ + GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 648 */ + void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 649 */ + GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 650 */ + GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 651 */ + void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 652 */ + void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 653 */ + void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 654 */ + void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 655 */ + void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 656 */ + void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 657 */ + void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 658 */ + void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 659 */ + void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 660 */ + void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params); /* 661 */ + void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 662 */ + void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 663 */ + void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 664 */ + GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 665 */ + void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 666 */ + void (GLAPIENTRYP ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 667 */ + void (GLAPIENTRYP ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); /* 668 */ + void (GLAPIENTRYP ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 669 */ + void (GLAPIENTRYP ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); /* 670 */ + void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 671 */ + void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 672 */ + void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 673 */ + void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 674 */ + void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 675 */ + void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 676 */ + void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 677 */ + void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 678 */ + void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 679 */ + void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 680 */ + void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 681 */ + void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 682 */ + void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 683 */ + void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 684 */ + void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 685 */ + void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 686 */ + void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 687 */ + void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 688 */ + void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 689 */ + void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 690 */ + void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 691 */ + void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 692 */ + void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 693 */ + void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 694 */ + void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 695 */ + void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 696 */ + void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 697 */ + void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 698 */ + void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 699 */ + void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 700 */ + void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 701 */ + void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 702 */ + void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 703 */ + void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 704 */ + void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 705 */ + void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 706 */ + void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 707 */ + void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 708 */ + void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 709 */ + void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 710 */ + void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 711 */ + void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 712 */ + void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 713 */ + void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 714 */ + void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 715 */ + void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 716 */ + void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 717 */ + void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 718 */ + void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 719 */ + void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 720 */ + void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 721 */ + void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 722 */ + void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 723 */ + void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 724 */ + GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 725 */ + void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 726 */ + void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 727 */ + void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 728 */ + void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 729 */ + void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 730 */ + void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 731 */ + void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 732 */ + void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 733 */ + void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 734 */ + GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 735 */ + void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 736 */ + void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 737 */ + void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 738 */ + void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 739 */ + void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 740 */ + void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 741 */ + void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 742 */ + void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 743 */ + void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 744 */ + void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 745 */ + GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 746 */ + void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 747 */ + void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 748 */ + void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 749 */ + void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 750 */ + void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 751 */ + void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 752 */ + void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 753 */ + void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 754 */ + void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 755 */ + void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 756 */ + void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 757 */ + GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 758 */ + GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 759 */ + void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 760 */ + void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 761 */ + void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 762 */ + void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 763 */ + void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 764 */ + void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 765 */ }; #endif /* !defined( _GLAPI_TABLE_H_ ) */ diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h index 6b1f237f97..1b17723b08 100644 --- a/src/mesa/glapi/glapitemp.h +++ b/src/mesa/glapi/glapitemp.h @@ -2679,6 +2679,71 @@ KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort * DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4svARB(0x%x, %p);\n", target, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(AttachShader)(GLuint program, GLuint shader) +{ + DISPATCH(AttachShader, (program, shader), (F, "glAttachShader(%d, %d);\n", program, shader)); +} + +KEYWORD1 GLuint KEYWORD2 NAME(CreateProgram)(void) +{ + RETURN_DISPATCH(CreateProgram, (), (F, "glCreateProgram();\n")); +} + +KEYWORD1 GLuint KEYWORD2 NAME(CreateShader)(GLenum type) +{ + RETURN_DISPATCH(CreateShader, (type), (F, "glCreateShader(0x%x);\n", type)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteProgram)(GLuint program) +{ + DISPATCH(DeleteProgram, (program), (F, "glDeleteProgram(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteShader)(GLuint program) +{ + DISPATCH(DeleteShader, (program), (F, "glDeleteShader(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(DetachShader)(GLuint program, GLuint shader) +{ + DISPATCH(DetachShader, (program, shader), (F, "glDetachShader(%d, %d);\n", program, shader)); +} + +KEYWORD1 void KEYWORD2 NAME(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj) +{ + DISPATCH(GetAttachedShaders, (program, maxCount, count, obj), (F, "glGetAttachedShaders(%d, %d, %p, %p);\n", program, maxCount, (const void *) count, (const void *) obj)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) +{ + DISPATCH(GetProgramInfoLog, (program, bufSize, length, infoLog), (F, "glGetProgramInfoLog(%d, %d, %p, %p);\n", program, bufSize, (const void *) length, (const void *) infoLog)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramiv)(GLuint program, GLenum pname, GLint * params) +{ + DISPATCH(GetProgramiv, (program, pname, params), (F, "glGetProgramiv(%d, 0x%x, %p);\n", program, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) +{ + DISPATCH(GetShaderInfoLog, (shader, bufSize, length, infoLog), (F, "glGetShaderInfoLog(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) infoLog)); +} + +KEYWORD1 void KEYWORD2 NAME(GetShaderiv)(GLuint shader, GLenum pname, GLint * params) +{ + DISPATCH(GetShaderiv, (shader, pname, params), (F, "glGetShaderiv(%d, 0x%x, %p);\n", shader, pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsProgram)(GLuint program) +{ + RETURN_DISPATCH(IsProgram, (program), (F, "glIsProgram(%d);\n", program)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsShader)(GLuint shader) +{ + RETURN_DISPATCH(IsShader, (shader), (F, "glIsShader(%d);\n", shader)); +} + KEYWORD1 void KEYWORD2 NAME(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) { DISPATCH(StencilFuncSeparate, (face, func, ref, mask), (F, "glStencilFuncSeparate(0x%x, 0x%x, %d, %d);\n", face, func, ref, mask)); @@ -2814,11 +2879,21 @@ KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint level DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImageARB(0x%x, %d, %p);\n", target, level, (const void *) img)); } +KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArray)(GLuint index) +{ + DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArray(%d);\n", index)); +} + KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArrayARB)(GLuint index) { DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArrayARB(%d);\n", index)); } +KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArray)(GLuint index) +{ + DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArray(%d);\n", index)); +} + KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArrayARB)(GLuint index) { DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArrayARB(%d);\n", index)); @@ -2854,16 +2929,31 @@ KEYWORD1 void KEYWORD2 NAME(GetProgramivARB)(GLenum target, GLenum pname, GLint DISPATCH(GetProgramivARB, (target, pname, params), (F, "glGetProgramivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble * params) +{ + DISPATCH(GetVertexAttribdvARB, (index, pname, params), (F, "glGetVertexAttribdv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params) { DISPATCH(GetVertexAttribdvARB, (index, pname, params), (F, "glGetVertexAttribdvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); } +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat * params) +{ + DISPATCH(GetVertexAttribfvARB, (index, pname, params), (F, "glGetVertexAttribfv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params) { DISPATCH(GetVertexAttribfvARB, (index, pname, params), (F, "glGetVertexAttribfvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); } +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribiv)(GLuint index, GLenum pname, GLint * params) +{ + DISPATCH(GetVertexAttribivARB, (index, pname, params), (F, "glGetVertexAttribiv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params) { DISPATCH(GetVertexAttribivARB, (index, pname, params), (F, "glGetVertexAttribivARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); @@ -2914,126 +3004,251 @@ KEYWORD1 void KEYWORD2 NAME(ProgramStringARB)(GLenum target, GLenum format, GLsi DISPATCH(ProgramStringARB, (target, format, len, string), (F, "glProgramStringARB(0x%x, 0x%x, %d, %p);\n", target, format, len, (const void *) string)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1d)(GLuint index, GLdouble x) +{ + DISPATCH(VertexAttrib1dARB, (index, x), (F, "glVertexAttrib1d(%d, %f);\n", index, x)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dARB)(GLuint index, GLdouble x) { DISPATCH(VertexAttrib1dARB, (index, x), (F, "glVertexAttrib1dARB(%d, %f);\n", index, x)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib1dvARB, (index, v), (F, "glVertexAttrib1dv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvARB)(GLuint index, const GLdouble * v) { DISPATCH(VertexAttrib1dvARB, (index, v), (F, "glVertexAttrib1dvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1f)(GLuint index, GLfloat x) +{ + DISPATCH(VertexAttrib1fARB, (index, x), (F, "glVertexAttrib1f(%d, %f);\n", index, x)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fARB)(GLuint index, GLfloat x) { DISPATCH(VertexAttrib1fARB, (index, x), (F, "glVertexAttrib1fARB(%d, %f);\n", index, x)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib1fvARB, (index, v), (F, "glVertexAttrib1fv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvARB)(GLuint index, const GLfloat * v) { DISPATCH(VertexAttrib1fvARB, (index, v), (F, "glVertexAttrib1fvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1s)(GLuint index, GLshort x) +{ + DISPATCH(VertexAttrib1sARB, (index, x), (F, "glVertexAttrib1s(%d, %d);\n", index, x)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sARB)(GLuint index, GLshort x) { DISPATCH(VertexAttrib1sARB, (index, x), (F, "glVertexAttrib1sARB(%d, %d);\n", index, x)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib1svARB, (index, v), (F, "glVertexAttrib1sv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svARB)(GLuint index, const GLshort * v) { DISPATCH(VertexAttrib1svARB, (index, v), (F, "glVertexAttrib1svARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y) +{ + DISPATCH(VertexAttrib2dARB, (index, x, y), (F, "glVertexAttrib2d(%d, %f, %f);\n", index, x, y)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y) { DISPATCH(VertexAttrib2dARB, (index, x, y), (F, "glVertexAttrib2dARB(%d, %f, %f);\n", index, x, y)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib2dvARB, (index, v), (F, "glVertexAttrib2dv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvARB)(GLuint index, const GLdouble * v) { DISPATCH(VertexAttrib2dvARB, (index, v), (F, "glVertexAttrib2dvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) +{ + DISPATCH(VertexAttrib2fARB, (index, x, y), (F, "glVertexAttrib2f(%d, %f, %f);\n", index, x, y)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y) { DISPATCH(VertexAttrib2fARB, (index, x, y), (F, "glVertexAttrib2fARB(%d, %f, %f);\n", index, x, y)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib2fvARB, (index, v), (F, "glVertexAttrib2fv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvARB)(GLuint index, const GLfloat * v) { DISPATCH(VertexAttrib2fvARB, (index, v), (F, "glVertexAttrib2fvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2s)(GLuint index, GLshort x, GLshort y) +{ + DISPATCH(VertexAttrib2sARB, (index, x, y), (F, "glVertexAttrib2s(%d, %d, %d);\n", index, x, y)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y) { DISPATCH(VertexAttrib2sARB, (index, x, y), (F, "glVertexAttrib2sARB(%d, %d, %d);\n", index, x, y)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib2svARB, (index, v), (F, "glVertexAttrib2sv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svARB)(GLuint index, const GLshort * v) { DISPATCH(VertexAttrib2svARB, (index, v), (F, "glVertexAttrib2svARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(VertexAttrib3dARB, (index, x, y, z), (F, "glVertexAttrib3d(%d, %f, %f, %f);\n", index, x, y, z)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z) { DISPATCH(VertexAttrib3dARB, (index, x, y, z), (F, "glVertexAttrib3dARB(%d, %f, %f, %f);\n", index, x, y, z)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib3dvARB, (index, v), (F, "glVertexAttrib3dv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvARB)(GLuint index, const GLdouble * v) { DISPATCH(VertexAttrib3dvARB, (index, v), (F, "glVertexAttrib3dvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(VertexAttrib3fARB, (index, x, y, z), (F, "glVertexAttrib3f(%d, %f, %f, %f);\n", index, x, y, z)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z) { DISPATCH(VertexAttrib3fARB, (index, x, y, z), (F, "glVertexAttrib3fARB(%d, %f, %f, %f);\n", index, x, y, z)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib3fvARB, (index, v), (F, "glVertexAttrib3fv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvARB)(GLuint index, const GLfloat * v) { DISPATCH(VertexAttrib3fvARB, (index, v), (F, "glVertexAttrib3fvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z) +{ + DISPATCH(VertexAttrib3sARB, (index, x, y, z), (F, "glVertexAttrib3s(%d, %d, %d, %d);\n", index, x, y, z)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z) { DISPATCH(VertexAttrib3sARB, (index, x, y, z), (F, "glVertexAttrib3sARB(%d, %d, %d, %d);\n", index, x, y, z)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib3svARB, (index, v), (F, "glVertexAttrib3sv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svARB)(GLuint index, const GLshort * v) { DISPATCH(VertexAttrib3svARB, (index, v), (F, "glVertexAttrib3svARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nbv)(GLuint index, const GLbyte * v) +{ + DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4Nbv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NbvARB)(GLuint index, const GLbyte * v) { DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4NbvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Niv)(GLuint index, const GLint * v) +{ + DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4Niv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NivARB)(GLuint index, const GLint * v) { DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4NivARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nsv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4Nsv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NsvARB)(GLuint index, const GLshort * v) { DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4NsvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + DISPATCH(VertexAttrib4NubARB, (index, x, y, z, w), (F, "glVertexAttrib4Nub(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) { DISPATCH(VertexAttrib4NubARB, (index, x, y, z, w), (F, "glVertexAttrib4NubARB(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nubv)(GLuint index, const GLubyte * v) +{ + DISPATCH(VertexAttrib4NubvARB, (index, v), (F, "glVertexAttrib4Nubv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubvARB)(GLuint index, const GLubyte * v) { DISPATCH(VertexAttrib4NubvARB, (index, v), (F, "glVertexAttrib4NubvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nuiv)(GLuint index, const GLuint * v) +{ + DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4Nuiv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NuivARB)(GLuint index, const GLuint * v) { DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4NuivARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nusv)(GLuint index, const GLushort * v) +{ + DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4Nusv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NusvARB)(GLuint index, const GLushort * v) { DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4NusvARB(%d, %p);\n", index, (const void *) v)); @@ -3044,21 +3259,41 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bvARB)(GLuint index, const GLbyte * v) DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(VertexAttrib4dARB, (index, x, y, z, w), (F, "glVertexAttrib4d(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { DISPATCH(VertexAttrib4dARB, (index, x, y, z, w), (F, "glVertexAttrib4dARB(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib4dvARB, (index, v), (F, "glVertexAttrib4dv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvARB)(GLuint index, const GLdouble * v) { DISPATCH(VertexAttrib4dvARB, (index, v), (F, "glVertexAttrib4dvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(VertexAttrib4fARB, (index, x, y, z, w), (F, "glVertexAttrib4f(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { DISPATCH(VertexAttrib4fARB, (index, x, y, z, w), (F, "glVertexAttrib4fARB(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvARB)(GLuint index, const GLfloat * v) { DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fvARB(%d, %p);\n", index, (const void *) v)); @@ -3069,11 +3304,21 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ivARB)(GLuint index, const GLint * v) DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4ivARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(VertexAttrib4sARB, (index, x, y, z, w), (F, "glVertexAttrib4s(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) { DISPATCH(VertexAttrib4sARB, (index, x, y, z, w), (F, "glVertexAttrib4sARB(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4sv(%d, %p);\n", index, (const void *) v)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svARB)(GLuint index, const GLshort * v) { DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4svARB(%d, %p);\n", index, (const void *) v)); @@ -3094,6 +3339,11 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usvARB)(GLuint index, const GLushort * DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usvARB(%d, %p);\n", index, (const void *) v)); } +KEYWORD1 void KEYWORD2 NAME(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointer(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer)); +} + KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) { DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointerARB(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer)); @@ -3294,9 +3544,14 @@ KEYWORD1 void KEYWORD2 NAME(AttachObjectARB)(GLhandleARB containerObj, GLhandleA DISPATCH(AttachObjectARB, (containerObj, obj), (F, "glAttachObjectARB(%d, %d);\n", containerObj, obj)); } -KEYWORD1 void KEYWORD2 NAME(CompileShaderARB)(GLhandleARB shaderObj) +KEYWORD1 void KEYWORD2 NAME(CompileShader)(GLuint shader) +{ + DISPATCH(CompileShaderARB, (shader), (F, "glCompileShader(%d);\n", shader)); +} + +KEYWORD1 void KEYWORD2 NAME(CompileShaderARB)(GLhandleARB shader) { - DISPATCH(CompileShaderARB, (shaderObj), (F, "glCompileShaderARB(%d);\n", shaderObj)); + DISPATCH(CompileShaderARB, (shader), (F, "glCompileShaderARB(%d);\n", shader)); } KEYWORD1 GLhandleARB KEYWORD2 NAME(CreateProgramObjectARB)(void) @@ -3319,9 +3574,14 @@ KEYWORD1 void KEYWORD2 NAME(DetachObjectARB)(GLhandleARB containerObj, GLhandleA DISPATCH(DetachObjectARB, (containerObj, attachedObj), (F, "glDetachObjectARB(%d, %d);\n", containerObj, attachedObj)); } -KEYWORD1 void KEYWORD2 NAME(GetActiveUniformARB)(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) +KEYWORD1 void KEYWORD2 NAME(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) { - DISPATCH(GetActiveUniformARB, (programObj, index, maxLength, length, size, type, name), (F, "glGetActiveUniformARB(%d, %d, %d, %p, %p, %p, %p);\n", programObj, index, maxLength, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); + DISPATCH(GetActiveUniformARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniform(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) +{ + DISPATCH(GetActiveUniformARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniformARB(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); } KEYWORD1 void KEYWORD2 NAME(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog) @@ -3349,34 +3609,69 @@ KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivARB)(GLhandleARB obj, GLenum pna DISPATCH(GetObjectParameterivARB, (obj, pname, params), (F, "glGetObjectParameterivARB(%d, 0x%x, %p);\n", obj, pname, (const void *) params)); } -KEYWORD1 void KEYWORD2 NAME(GetShaderSourceARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * source) +KEYWORD1 void KEYWORD2 NAME(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) { - DISPATCH(GetShaderSourceARB, (obj, maxLength, length, source), (F, "glGetShaderSourceARB(%d, %d, %p, %p);\n", obj, maxLength, (const void *) length, (const void *) source)); + DISPATCH(GetShaderSourceARB, (shader, bufSize, length, source), (F, "glGetShaderSource(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source)); } -KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocationARB)(GLhandleARB programObj, const GLcharARB * name) +KEYWORD1 void KEYWORD2 NAME(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source) { - RETURN_DISPATCH(GetUniformLocationARB, (programObj, name), (F, "glGetUniformLocationARB(%d, %p);\n", programObj, (const void *) name)); + DISPATCH(GetShaderSourceARB, (shader, bufSize, length, source), (F, "glGetShaderSourceARB(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source)); } -KEYWORD1 void KEYWORD2 NAME(GetUniformfvARB)(GLhandleARB programObj, GLint location, GLfloat * params) +KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocation)(GLuint program, const GLchar * name) { - DISPATCH(GetUniformfvARB, (programObj, location, params), (F, "glGetUniformfvARB(%d, %d, %p);\n", programObj, location, (const void *) params)); + RETURN_DISPATCH(GetUniformLocationARB, (program, name), (F, "glGetUniformLocation(%d, %p);\n", program, (const void *) name)); } -KEYWORD1 void KEYWORD2 NAME(GetUniformivARB)(GLhandleARB programObj, GLint location, GLint * params) +KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name) { - DISPATCH(GetUniformivARB, (programObj, location, params), (F, "glGetUniformivARB(%d, %d, %p);\n", programObj, location, (const void *) params)); + RETURN_DISPATCH(GetUniformLocationARB, (program, name), (F, "glGetUniformLocationARB(%d, %p);\n", program, (const void *) name)); } -KEYWORD1 void KEYWORD2 NAME(LinkProgramARB)(GLhandleARB programObj) +KEYWORD1 void KEYWORD2 NAME(GetUniformfv)(GLuint program, GLint location, GLfloat * params) { - DISPATCH(LinkProgramARB, (programObj), (F, "glLinkProgramARB(%d);\n", programObj)); + DISPATCH(GetUniformfvARB, (program, location, params), (F, "glGetUniformfv(%d, %d, %p);\n", program, location, (const void *) params)); } -KEYWORD1 void KEYWORD2 NAME(ShaderSourceARB)(GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint * length) +KEYWORD1 void KEYWORD2 NAME(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params) { - DISPATCH(ShaderSourceARB, (shaderObj, count, string, length), (F, "glShaderSourceARB(%d, %d, %p, %p);\n", shaderObj, count, (const void *) string, (const void *) length)); + DISPATCH(GetUniformfvARB, (program, location, params), (F, "glGetUniformfvARB(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetUniformiv)(GLuint program, GLint location, GLint * params) +{ + DISPATCH(GetUniformivARB, (program, location, params), (F, "glGetUniformiv(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetUniformivARB)(GLhandleARB program, GLint location, GLint * params) +{ + DISPATCH(GetUniformivARB, (program, location, params), (F, "glGetUniformivARB(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(LinkProgram)(GLuint program) +{ + DISPATCH(LinkProgramARB, (program), (F, "glLinkProgram(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(LinkProgramARB)(GLhandleARB program) +{ + DISPATCH(LinkProgramARB, (program), (F, "glLinkProgramARB(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(ShaderSource)(GLuint shader, GLsizei count, const GLchar ** string, const GLint * length) +{ + DISPATCH(ShaderSourceARB, (shader, count, string, length), (F, "glShaderSource(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length)); +} + +KEYWORD1 void KEYWORD2 NAME(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length) +{ + DISPATCH(ShaderSourceARB, (shader, count, string, length), (F, "glShaderSourceARB(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1f)(GLint location, GLfloat v0) +{ + DISPATCH(Uniform1fARB, (location, v0), (F, "glUniform1f(%d, %f);\n", location, v0)); } KEYWORD1 void KEYWORD2 NAME(Uniform1fARB)(GLint location, GLfloat v0) @@ -3384,119 +3679,234 @@ KEYWORD1 void KEYWORD2 NAME(Uniform1fARB)(GLint location, GLfloat v0) DISPATCH(Uniform1fARB, (location, v0), (F, "glUniform1fARB(%d, %f);\n", location, v0)); } +KEYWORD1 void KEYWORD2 NAME(Uniform1fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform1fvARB, (location, count, value), (F, "glUniform1fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value) { DISPATCH(Uniform1fvARB, (location, count, value), (F, "glUniform1fvARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform1i)(GLint location, GLint v0) +{ + DISPATCH(Uniform1iARB, (location, v0), (F, "glUniform1i(%d, %d);\n", location, v0)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform1iARB)(GLint location, GLint v0) { DISPATCH(Uniform1iARB, (location, v0), (F, "glUniform1iARB(%d, %d);\n", location, v0)); } +KEYWORD1 void KEYWORD2 NAME(Uniform1iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform1ivARB, (location, count, value), (F, "glUniform1iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform1ivARB)(GLint location, GLsizei count, const GLint * value) { DISPATCH(Uniform1ivARB, (location, count, value), (F, "glUniform1ivARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform2f)(GLint location, GLfloat v0, GLfloat v1) +{ + DISPATCH(Uniform2fARB, (location, v0, v1), (F, "glUniform2f(%d, %f, %f);\n", location, v0, v1)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1) { DISPATCH(Uniform2fARB, (location, v0, v1), (F, "glUniform2fARB(%d, %f, %f);\n", location, v0, v1)); } +KEYWORD1 void KEYWORD2 NAME(Uniform2fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform2fvARB, (location, count, value), (F, "glUniform2fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value) { DISPATCH(Uniform2fvARB, (location, count, value), (F, "glUniform2fvARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform2i)(GLint location, GLint v0, GLint v1) +{ + DISPATCH(Uniform2iARB, (location, v0, v1), (F, "glUniform2i(%d, %d, %d);\n", location, v0, v1)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform2iARB)(GLint location, GLint v0, GLint v1) { DISPATCH(Uniform2iARB, (location, v0, v1), (F, "glUniform2iARB(%d, %d, %d);\n", location, v0, v1)); } +KEYWORD1 void KEYWORD2 NAME(Uniform2iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform2ivARB, (location, count, value), (F, "glUniform2iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform2ivARB)(GLint location, GLsizei count, const GLint * value) { DISPATCH(Uniform2ivARB, (location, count, value), (F, "glUniform2ivARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + DISPATCH(Uniform3fARB, (location, v0, v1, v2), (F, "glUniform3f(%d, %f, %f, %f);\n", location, v0, v1, v2)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { DISPATCH(Uniform3fARB, (location, v0, v1, v2), (F, "glUniform3fARB(%d, %f, %f, %f);\n", location, v0, v1, v2)); } +KEYWORD1 void KEYWORD2 NAME(Uniform3fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform3fvARB, (location, count, value), (F, "glUniform3fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value) { DISPATCH(Uniform3fvARB, (location, count, value), (F, "glUniform3fvARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2) +{ + DISPATCH(Uniform3iARB, (location, v0, v1, v2), (F, "glUniform3i(%d, %d, %d, %d);\n", location, v0, v1, v2)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2) { DISPATCH(Uniform3iARB, (location, v0, v1, v2), (F, "glUniform3iARB(%d, %d, %d, %d);\n", location, v0, v1, v2)); } +KEYWORD1 void KEYWORD2 NAME(Uniform3iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform3ivARB, (location, count, value), (F, "glUniform3iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform3ivARB)(GLint location, GLsizei count, const GLint * value) { DISPATCH(Uniform3ivARB, (location, count, value), (F, "glUniform3ivARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + DISPATCH(Uniform4fARB, (location, v0, v1, v2, v3), (F, "glUniform4f(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { DISPATCH(Uniform4fARB, (location, v0, v1, v2, v3), (F, "glUniform4fARB(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3)); } +KEYWORD1 void KEYWORD2 NAME(Uniform4fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform4fvARB, (location, count, value), (F, "glUniform4fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value) { DISPATCH(Uniform4fvARB, (location, count, value), (F, "glUniform4fvARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + DISPATCH(Uniform4iARB, (location, v0, v1, v2, v3), (F, "glUniform4i(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { DISPATCH(Uniform4iARB, (location, v0, v1, v2, v3), (F, "glUniform4iARB(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3)); } +KEYWORD1 void KEYWORD2 NAME(Uniform4iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform4ivARB, (location, count, value), (F, "glUniform4iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(Uniform4ivARB)(GLint location, GLsizei count, const GLint * value) { DISPATCH(Uniform4ivARB, (location, count, value), (F, "glUniform4ivARB(%d, %d, %p);\n", location, count, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2fvARB, (location, count, transpose, value), (F, "glUniformMatrix2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { DISPATCH(UniformMatrix2fvARB, (location, count, transpose, value), (F, "glUniformMatrix2fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3fvARB, (location, count, transpose, value), (F, "glUniformMatrix3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { DISPATCH(UniformMatrix3fvARB, (location, count, transpose, value), (F, "glUniformMatrix3fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); } +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4fvARB, (location, count, transpose, value), (F, "glUniformMatrix4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { DISPATCH(UniformMatrix4fvARB, (location, count, transpose, value), (F, "glUniformMatrix4fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); } -KEYWORD1 void KEYWORD2 NAME(UseProgramObjectARB)(GLhandleARB programObj) +KEYWORD1 void KEYWORD2 NAME(UseProgram)(GLuint program) { - DISPATCH(UseProgramObjectARB, (programObj), (F, "glUseProgramObjectARB(%d);\n", programObj)); + DISPATCH(UseProgramObjectARB, (program), (F, "glUseProgram(%d);\n", program)); } -KEYWORD1 void KEYWORD2 NAME(ValidateProgramARB)(GLhandleARB programObj) +KEYWORD1 void KEYWORD2 NAME(UseProgramObjectARB)(GLhandleARB program) { - DISPATCH(ValidateProgramARB, (programObj), (F, "glValidateProgramARB(%d);\n", programObj)); + DISPATCH(UseProgramObjectARB, (program), (F, "glUseProgramObjectARB(%d);\n", program)); } -KEYWORD1 void KEYWORD2 NAME(BindAttribLocationARB)(GLhandleARB programObj, GLuint index, const GLcharARB * name) +KEYWORD1 void KEYWORD2 NAME(ValidateProgram)(GLuint program) { - DISPATCH(BindAttribLocationARB, (programObj, index, name), (F, "glBindAttribLocationARB(%d, %d, %p);\n", programObj, index, (const void *) name)); + DISPATCH(ValidateProgramARB, (program), (F, "glValidateProgram(%d);\n", program)); } -KEYWORD1 void KEYWORD2 NAME(GetActiveAttribARB)(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) +KEYWORD1 void KEYWORD2 NAME(ValidateProgramARB)(GLhandleARB program) { - DISPATCH(GetActiveAttribARB, (programObj, index, maxLength, length, size, type, name), (F, "glGetActiveAttribARB(%d, %d, %d, %p, %p, %p, %p);\n", programObj, index, maxLength, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); + DISPATCH(ValidateProgramARB, (program), (F, "glValidateProgramARB(%d);\n", program)); } -KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocationARB)(GLhandleARB programObj, const GLcharARB * name) +KEYWORD1 void KEYWORD2 NAME(BindAttribLocation)(GLuint program, GLuint index, const GLchar * name) { - RETURN_DISPATCH(GetAttribLocationARB, (programObj, name), (F, "glGetAttribLocationARB(%d, %p);\n", programObj, (const void *) name)); + DISPATCH(BindAttribLocationARB, (program, index, name), (F, "glBindAttribLocation(%d, %d, %p);\n", program, index, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name) +{ + DISPATCH(BindAttribLocationARB, (program, index, name), (F, "glBindAttribLocationARB(%d, %d, %p);\n", program, index, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) +{ + DISPATCH(GetActiveAttribARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttrib(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) +{ + DISPATCH(GetActiveAttribARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttribARB(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocation)(GLuint program, const GLchar * name) +{ + RETURN_DISPATCH(GetAttribLocationARB, (program, name), (F, "glGetAttribLocation(%d, %p);\n", program, (const void *) name)); +} + +KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name) +{ + RETURN_DISPATCH(GetAttribLocationARB, (program, name), (F, "glGetAttribLocationARB(%d, %p);\n", program, (const void *) name)); } KEYWORD1 void KEYWORD2 NAME(DrawBuffers)(GLsizei n, const GLenum * bufs) @@ -3519,58 +3929,58 @@ KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias) DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_543)(GLenum pname, GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_556)(GLenum pname, GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_543)(GLenum pname, GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_556)(GLenum pname, GLfloat * params) { DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_544)(GLenum pname, GLint * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_557)(GLenum pname, GLint * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_544)(GLenum pname, GLint * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_557)(GLenum pname, GLint * params) { DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_545)(GLenum pname, GLfloat param); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_558)(GLenum pname, GLfloat param); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_545)(GLenum pname, GLfloat param) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_558)(GLenum pname, GLfloat param) { DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_546)(GLenum pname, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_559)(GLenum pname, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_546)(GLenum pname, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_559)(GLenum pname, const GLfloat * params) { DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_547)(GLenum pname, GLint param); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_560)(GLenum pname, GLint param); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_547)(GLenum pname, GLint param) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_560)(GLenum pname, GLint param) { DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_548)(GLenum pname, const GLint * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_561)(GLenum pname, const GLint * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_548)(GLenum pname, const GLint * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_561)(GLenum pname, const GLint * params) { DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_549)(GLclampf value, GLboolean invert); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLclampf value, GLboolean invert); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_549)(GLclampf value, GLboolean invert) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLclampf value, GLboolean invert) { DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_550)(GLenum pattern); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pattern); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_550)(GLenum pattern) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pattern) { DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern)); } @@ -3620,9 +4030,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param) DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_557)(GLenum pname, GLfloat param); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_570)(GLenum pname, GLfloat param); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_557)(GLenum pname, GLfloat param) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_570)(GLenum pname, GLfloat param) { DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param)); } @@ -3642,9 +4052,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * p DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_558)(GLenum pname, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_571)(GLenum pname, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_558)(GLenum pname, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_571)(GLenum pname, const GLfloat * params) { DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); } @@ -3659,16 +4069,16 @@ KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void) DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n")); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_561)(GLenum pname, GLdouble * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_574)(GLenum pname, GLdouble * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_561)(GLenum pname, GLdouble * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_574)(GLenum pname, GLdouble * params) { DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_575)(GLenum pname, GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_575)(GLenum pname, GLfloat * params) { DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); } @@ -3913,9 +4323,9 @@ KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord) DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_587)(GLenum mode); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_600)(GLenum mode); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_587)(GLenum mode) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_600)(GLenum mode) { DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode)); } @@ -3930,9 +4340,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfac DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_588)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_601)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_588)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_601)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); } @@ -4297,65 +4707,65 @@ KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v) DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_629)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_642)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_629)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_642)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) { DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_630)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_643)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_630)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_643)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride) { DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_631)(GLsizei n, const GLuint * fences); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_644)(GLsizei n, const GLuint * fences); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_631)(GLsizei n, const GLuint * fences) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_644)(GLsizei n, const GLuint * fences) { DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_632)(GLuint fence); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_645)(GLuint fence); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_632)(GLuint fence) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_645)(GLuint fence) { DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_633)(GLsizei n, GLuint * fences); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_646)(GLsizei n, GLuint * fences); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_633)(GLsizei n, GLuint * fences) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_646)(GLsizei n, GLuint * fences) { DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_634)(GLuint fence, GLenum pname, GLint * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_647)(GLuint fence, GLenum pname, GLint * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_634)(GLuint fence, GLenum pname, GLint * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_647)(GLuint fence, GLenum pname, GLint * params) { DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params)); } -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_635)(GLuint fence); +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_648)(GLuint fence); -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_635)(GLuint fence) +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_648)(GLuint fence) { RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_636)(GLuint fence, GLenum condition); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(GLuint fence, GLenum condition); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_636)(GLuint fence, GLenum condition) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(GLuint fence, GLenum condition) { DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition)); } -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_637)(GLuint fence); +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_650)(GLuint fence); -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_637)(GLuint fence) +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_650)(GLuint fence) { RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence)); } @@ -4795,37 +5205,37 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * para DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_718)(GLenum face); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_731)(GLenum face); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_718)(GLenum face) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_731)(GLenum face) { DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_719)(GLuint array); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_732)(GLuint array); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_719)(GLuint array) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_732)(GLuint array) { DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_720)(GLsizei n, const GLuint * arrays); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLsizei n, const GLuint * arrays); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_720)(GLsizei n, const GLuint * arrays) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLsizei n, const GLuint * arrays) { DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_721)(GLsizei n, GLuint * arrays); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLsizei n, GLuint * arrays); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_721)(GLsizei n, GLuint * arrays) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLsizei n, GLuint * arrays) { DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); } -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_722)(GLuint array); +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_735)(GLuint array); -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_722)(GLuint array) +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_735)(GLuint array) { RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array)); } @@ -4860,9 +5270,9 @@ KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_729)(GLclampd zmin, GLclampd zmax); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_742)(GLclampd zmin, GLclampd zmax); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_729)(GLclampd zmin, GLclampd zmax) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_742)(GLclampd zmin, GLclampd zmax) { DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax)); } @@ -4872,9 +5282,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA) DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_730)(GLenum modeRGB, GLenum modeA); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_743)(GLenum modeRGB, GLenum modeA); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_730)(GLenum modeRGB, GLenum modeA) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_743)(GLenum modeRGB, GLenum modeA) { DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA)); } @@ -4964,37 +5374,37 @@ KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageEXT)(GLenum target, GLenum intern DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorageEXT(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_748)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_761)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_748)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_761)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_749)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_762)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_749)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_762)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) { DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_750)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_750)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) { DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_751)(GLuint id, GLenum pname, GLint64EXT * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_764)(GLuint id, GLenum pname, GLint64EXT * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_751)(GLuint id, GLenum pname, GLint64EXT * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_764)(GLuint id, GLenum pname, GLint64EXT * params) { DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_752)(GLuint id, GLenum pname, GLuint64EXT * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLuint id, GLenum pname, GLuint64EXT * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_752)(GLuint id, GLenum pname, GLuint64EXT * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLuint id, GLenum pname, GLuint64EXT * params) { DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); } @@ -5421,6 +5831,19 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(MultiTexCoord4ivARB), TABLE_ENTRY(MultiTexCoord4sARB), TABLE_ENTRY(MultiTexCoord4svARB), + TABLE_ENTRY(AttachShader), + TABLE_ENTRY(CreateProgram), + TABLE_ENTRY(CreateShader), + TABLE_ENTRY(DeleteProgram), + TABLE_ENTRY(DeleteShader), + TABLE_ENTRY(DetachShader), + TABLE_ENTRY(GetAttachedShaders), + TABLE_ENTRY(GetProgramInfoLog), + TABLE_ENTRY(GetProgramiv), + TABLE_ENTRY(GetShaderInfoLog), + TABLE_ENTRY(GetShaderiv), + TABLE_ENTRY(IsProgram), + TABLE_ENTRY(IsShader), TABLE_ENTRY(StencilFuncSeparate), TABLE_ENTRY(StencilMaskSeparate), TABLE_ENTRY(StencilOpSeparate), @@ -5556,14 +5979,14 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(GetAttribLocationARB), TABLE_ENTRY(DrawBuffersARB), TABLE_ENTRY(PolygonOffsetEXT), - TABLE_ENTRY(_dispatch_stub_543), - TABLE_ENTRY(_dispatch_stub_544), - TABLE_ENTRY(_dispatch_stub_545), - TABLE_ENTRY(_dispatch_stub_546), - TABLE_ENTRY(_dispatch_stub_547), - TABLE_ENTRY(_dispatch_stub_548), - TABLE_ENTRY(_dispatch_stub_549), - TABLE_ENTRY(_dispatch_stub_550), + TABLE_ENTRY(_dispatch_stub_556), + TABLE_ENTRY(_dispatch_stub_557), + TABLE_ENTRY(_dispatch_stub_558), + TABLE_ENTRY(_dispatch_stub_559), + TABLE_ENTRY(_dispatch_stub_560), + TABLE_ENTRY(_dispatch_stub_561), + TABLE_ENTRY(_dispatch_stub_562), + TABLE_ENTRY(_dispatch_stub_563), TABLE_ENTRY(ColorPointerEXT), TABLE_ENTRY(EdgeFlagPointerEXT), TABLE_ENTRY(IndexPointerEXT), @@ -5574,8 +5997,8 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(PointParameterfvEXT), TABLE_ENTRY(LockArraysEXT), TABLE_ENTRY(UnlockArraysEXT), - TABLE_ENTRY(_dispatch_stub_561), - TABLE_ENTRY(_dispatch_stub_562), + TABLE_ENTRY(_dispatch_stub_574), + TABLE_ENTRY(_dispatch_stub_575), TABLE_ENTRY(SecondaryColor3bEXT), TABLE_ENTRY(SecondaryColor3bvEXT), TABLE_ENTRY(SecondaryColor3dEXT), @@ -5600,7 +6023,7 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(FogCoorddvEXT), TABLE_ENTRY(FogCoordfEXT), TABLE_ENTRY(FogCoordfvEXT), - TABLE_ENTRY(_dispatch_stub_587), + TABLE_ENTRY(_dispatch_stub_600), TABLE_ENTRY(BlendFuncSeparateEXT), TABLE_ENTRY(FlushVertexArrayRangeNV), TABLE_ENTRY(VertexArrayRangeNV), @@ -5642,15 +6065,15 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(WindowPos4ivMESA), TABLE_ENTRY(WindowPos4sMESA), TABLE_ENTRY(WindowPos4svMESA), - TABLE_ENTRY(_dispatch_stub_629), - TABLE_ENTRY(_dispatch_stub_630), - TABLE_ENTRY(_dispatch_stub_631), - TABLE_ENTRY(_dispatch_stub_632), - TABLE_ENTRY(_dispatch_stub_633), - TABLE_ENTRY(_dispatch_stub_634), - TABLE_ENTRY(_dispatch_stub_635), - TABLE_ENTRY(_dispatch_stub_636), - TABLE_ENTRY(_dispatch_stub_637), + TABLE_ENTRY(_dispatch_stub_642), + TABLE_ENTRY(_dispatch_stub_643), + TABLE_ENTRY(_dispatch_stub_644), + TABLE_ENTRY(_dispatch_stub_645), + TABLE_ENTRY(_dispatch_stub_646), + TABLE_ENTRY(_dispatch_stub_647), + TABLE_ENTRY(_dispatch_stub_648), + TABLE_ENTRY(_dispatch_stub_649), + TABLE_ENTRY(_dispatch_stub_650), TABLE_ENTRY(AreProgramsResidentNV), TABLE_ENTRY(BindProgramNV), TABLE_ENTRY(DeleteProgramsNV), @@ -5731,19 +6154,19 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(SetFragmentShaderConstantATI), TABLE_ENTRY(PointParameteriNV), TABLE_ENTRY(PointParameterivNV), - TABLE_ENTRY(_dispatch_stub_718), - TABLE_ENTRY(_dispatch_stub_719), - TABLE_ENTRY(_dispatch_stub_720), - TABLE_ENTRY(_dispatch_stub_721), - TABLE_ENTRY(_dispatch_stub_722), + TABLE_ENTRY(_dispatch_stub_731), + TABLE_ENTRY(_dispatch_stub_732), + TABLE_ENTRY(_dispatch_stub_733), + TABLE_ENTRY(_dispatch_stub_734), + TABLE_ENTRY(_dispatch_stub_735), TABLE_ENTRY(GetProgramNamedParameterdvNV), TABLE_ENTRY(GetProgramNamedParameterfvNV), TABLE_ENTRY(ProgramNamedParameter4dNV), TABLE_ENTRY(ProgramNamedParameter4dvNV), TABLE_ENTRY(ProgramNamedParameter4fNV), TABLE_ENTRY(ProgramNamedParameter4fvNV), - TABLE_ENTRY(_dispatch_stub_729), - TABLE_ENTRY(_dispatch_stub_730), + TABLE_ENTRY(_dispatch_stub_742), + TABLE_ENTRY(_dispatch_stub_743), TABLE_ENTRY(BindFramebufferEXT), TABLE_ENTRY(BindRenderbufferEXT), TABLE_ENTRY(CheckFramebufferStatusEXT), @@ -5761,11 +6184,11 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(IsFramebufferEXT), TABLE_ENTRY(IsRenderbufferEXT), TABLE_ENTRY(RenderbufferStorageEXT), - TABLE_ENTRY(_dispatch_stub_748), - TABLE_ENTRY(_dispatch_stub_749), - TABLE_ENTRY(_dispatch_stub_750), - TABLE_ENTRY(_dispatch_stub_751), - TABLE_ENTRY(_dispatch_stub_752), + TABLE_ENTRY(_dispatch_stub_761), + TABLE_ENTRY(_dispatch_stub_762), + TABLE_ENTRY(_dispatch_stub_763), + TABLE_ENTRY(_dispatch_stub_764), + TABLE_ENTRY(_dispatch_stub_765), /* A whole bunch of no-op functions. These might be called * when someone tries to call a dynamically-registered * extension function without a current rendering context. @@ -5964,6 +6387,43 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(CompressedTexSubImage2D), TABLE_ENTRY(CompressedTexSubImage3D), TABLE_ENTRY(GetCompressedTexImage), + TABLE_ENTRY(DisableVertexAttribArray), + TABLE_ENTRY(EnableVertexAttribArray), + TABLE_ENTRY(GetVertexAttribdv), + TABLE_ENTRY(GetVertexAttribfv), + TABLE_ENTRY(GetVertexAttribiv), + TABLE_ENTRY(VertexAttrib1d), + TABLE_ENTRY(VertexAttrib1dv), + TABLE_ENTRY(VertexAttrib1f), + TABLE_ENTRY(VertexAttrib1fv), + TABLE_ENTRY(VertexAttrib1s), + TABLE_ENTRY(VertexAttrib1sv), + TABLE_ENTRY(VertexAttrib2d), + TABLE_ENTRY(VertexAttrib2dv), + TABLE_ENTRY(VertexAttrib2f), + TABLE_ENTRY(VertexAttrib2fv), + TABLE_ENTRY(VertexAttrib2s), + TABLE_ENTRY(VertexAttrib2sv), + TABLE_ENTRY(VertexAttrib3d), + TABLE_ENTRY(VertexAttrib3dv), + TABLE_ENTRY(VertexAttrib3f), + TABLE_ENTRY(VertexAttrib3fv), + TABLE_ENTRY(VertexAttrib3s), + TABLE_ENTRY(VertexAttrib3sv), + TABLE_ENTRY(VertexAttrib4Nbv), + TABLE_ENTRY(VertexAttrib4Niv), + TABLE_ENTRY(VertexAttrib4Nsv), + TABLE_ENTRY(VertexAttrib4Nub), + TABLE_ENTRY(VertexAttrib4Nubv), + TABLE_ENTRY(VertexAttrib4Nuiv), + TABLE_ENTRY(VertexAttrib4Nusv), + TABLE_ENTRY(VertexAttrib4d), + TABLE_ENTRY(VertexAttrib4dv), + TABLE_ENTRY(VertexAttrib4f), + TABLE_ENTRY(VertexAttrib4fv), + TABLE_ENTRY(VertexAttrib4s), + TABLE_ENTRY(VertexAttrib4sv), + TABLE_ENTRY(VertexAttribPointer), TABLE_ENTRY(BindBuffer), TABLE_ENTRY(BufferData), TABLE_ENTRY(BufferSubData), @@ -5983,6 +6443,38 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(GetQueryObjectuiv), TABLE_ENTRY(GetQueryiv), TABLE_ENTRY(IsQuery), + TABLE_ENTRY(CompileShader), + TABLE_ENTRY(GetActiveUniform), + TABLE_ENTRY(GetShaderSource), + TABLE_ENTRY(GetUniformLocation), + TABLE_ENTRY(GetUniformfv), + TABLE_ENTRY(GetUniformiv), + TABLE_ENTRY(LinkProgram), + TABLE_ENTRY(ShaderSource), + TABLE_ENTRY(Uniform1f), + TABLE_ENTRY(Uniform1fv), + TABLE_ENTRY(Uniform1i), + TABLE_ENTRY(Uniform1iv), + TABLE_ENTRY(Uniform2f), + TABLE_ENTRY(Uniform2fv), + TABLE_ENTRY(Uniform2i), + TABLE_ENTRY(Uniform2iv), + TABLE_ENTRY(Uniform3f), + TABLE_ENTRY(Uniform3fv), + TABLE_ENTRY(Uniform3i), + TABLE_ENTRY(Uniform3iv), + TABLE_ENTRY(Uniform4f), + TABLE_ENTRY(Uniform4fv), + TABLE_ENTRY(Uniform4i), + TABLE_ENTRY(Uniform4iv), + TABLE_ENTRY(UniformMatrix2fv), + TABLE_ENTRY(UniformMatrix3fv), + TABLE_ENTRY(UniformMatrix4fv), + TABLE_ENTRY(UseProgram), + TABLE_ENTRY(ValidateProgram), + TABLE_ENTRY(BindAttribLocation), + TABLE_ENTRY(GetActiveAttrib), + TABLE_ENTRY(GetAttribLocation), TABLE_ENTRY(DrawBuffers), TABLE_ENTRY(DrawBuffersATI), TABLE_ENTRY(PointParameterf), diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h index cc35138ae8..32439811a5 100644 --- a/src/mesa/glapi/glprocs.h +++ b/src/mesa/glapi/glprocs.h @@ -460,6 +460,19 @@ static const char gl_string_table[] = "glMultiTexCoord4ivARB\0" "glMultiTexCoord4sARB\0" "glMultiTexCoord4svARB\0" + "glAttachShader\0" + "glCreateProgram\0" + "glCreateShader\0" + "glDeleteProgram\0" + "glDeleteShader\0" + "glDetachShader\0" + "glGetAttachedShaders\0" + "glGetProgramInfoLog\0" + "glGetProgramiv\0" + "glGetShaderInfoLog\0" + "glGetShaderiv\0" + "glIsProgram\0" + "glIsShader\0" "glStencilFuncSeparate\0" "glStencilMaskSeparate\0" "glStencilOpSeparate\0" @@ -908,6 +921,43 @@ static const char gl_string_table[] = "glCompressedTexSubImage2D\0" "glCompressedTexSubImage3D\0" "glGetCompressedTexImage\0" + "glDisableVertexAttribArray\0" + "glEnableVertexAttribArray\0" + "glGetVertexAttribdv\0" + "glGetVertexAttribfv\0" + "glGetVertexAttribiv\0" + "glVertexAttrib1d\0" + "glVertexAttrib1dv\0" + "glVertexAttrib1f\0" + "glVertexAttrib1fv\0" + "glVertexAttrib1s\0" + "glVertexAttrib1sv\0" + "glVertexAttrib2d\0" + "glVertexAttrib2dv\0" + "glVertexAttrib2f\0" + "glVertexAttrib2fv\0" + "glVertexAttrib2s\0" + "glVertexAttrib2sv\0" + "glVertexAttrib3d\0" + "glVertexAttrib3dv\0" + "glVertexAttrib3f\0" + "glVertexAttrib3fv\0" + "glVertexAttrib3s\0" + "glVertexAttrib3sv\0" + "glVertexAttrib4Nbv\0" + "glVertexAttrib4Niv\0" + "glVertexAttrib4Nsv\0" + "glVertexAttrib4Nub\0" + "glVertexAttrib4Nubv\0" + "glVertexAttrib4Nuiv\0" + "glVertexAttrib4Nusv\0" + "glVertexAttrib4d\0" + "glVertexAttrib4dv\0" + "glVertexAttrib4f\0" + "glVertexAttrib4fv\0" + "glVertexAttrib4s\0" + "glVertexAttrib4sv\0" + "glVertexAttribPointer\0" "glBindBuffer\0" "glBufferData\0" "glBufferSubData\0" @@ -927,6 +977,38 @@ static const char gl_string_table[] = "glGetQueryObjectuiv\0" "glGetQueryiv\0" "glIsQuery\0" + "glCompileShader\0" + "glGetActiveUniform\0" + "glGetShaderSource\0" + "glGetUniformLocation\0" + "glGetUniformfv\0" + "glGetUniformiv\0" + "glLinkProgram\0" + "glShaderSource\0" + "glUniform1f\0" + "glUniform1fv\0" + "glUniform1i\0" + "glUniform1iv\0" + "glUniform2f\0" + "glUniform2fv\0" + "glUniform2i\0" + "glUniform2iv\0" + "glUniform3f\0" + "glUniform3fv\0" + "glUniform3i\0" + "glUniform3iv\0" + "glUniform4f\0" + "glUniform4fv\0" + "glUniform4i\0" + "glUniform4iv\0" + "glUniformMatrix2fv\0" + "glUniformMatrix3fv\0" + "glUniformMatrix4fv\0" + "glUseProgram\0" + "glValidateProgram\0" + "glBindAttribLocation\0" + "glGetActiveAttrib\0" + "glGetAttribLocation\0" "glDrawBuffers\0" "glDrawBuffersATI\0" "glSampleMaskEXT\0" @@ -1021,38 +1103,38 @@ extern void gl_dispatch_stub_363(void); extern void gl_dispatch_stub_364(void); extern void gl_dispatch_stub_365(void); extern void gl_dispatch_stub_366(void); -extern void gl_dispatch_stub_543(void); -extern void gl_dispatch_stub_544(void); -extern void gl_dispatch_stub_545(void); -extern void gl_dispatch_stub_546(void); -extern void gl_dispatch_stub_547(void); -extern void gl_dispatch_stub_548(void); -extern void gl_dispatch_stub_549(void); -extern void gl_dispatch_stub_550(void); +extern void gl_dispatch_stub_556(void); +extern void gl_dispatch_stub_557(void); +extern void gl_dispatch_stub_558(void); +extern void gl_dispatch_stub_559(void); +extern void gl_dispatch_stub_560(void); extern void gl_dispatch_stub_561(void); extern void gl_dispatch_stub_562(void); -extern void gl_dispatch_stub_587(void); -extern void gl_dispatch_stub_629(void); -extern void gl_dispatch_stub_630(void); -extern void gl_dispatch_stub_631(void); -extern void gl_dispatch_stub_632(void); -extern void gl_dispatch_stub_633(void); -extern void gl_dispatch_stub_634(void); -extern void gl_dispatch_stub_635(void); -extern void gl_dispatch_stub_636(void); -extern void gl_dispatch_stub_637(void); -extern void gl_dispatch_stub_718(void); -extern void gl_dispatch_stub_719(void); -extern void gl_dispatch_stub_720(void); -extern void gl_dispatch_stub_721(void); -extern void gl_dispatch_stub_722(void); -extern void gl_dispatch_stub_729(void); -extern void gl_dispatch_stub_730(void); -extern void gl_dispatch_stub_748(void); -extern void gl_dispatch_stub_749(void); -extern void gl_dispatch_stub_750(void); -extern void gl_dispatch_stub_751(void); -extern void gl_dispatch_stub_752(void); +extern void gl_dispatch_stub_563(void); +extern void gl_dispatch_stub_574(void); +extern void gl_dispatch_stub_575(void); +extern void gl_dispatch_stub_600(void); +extern void gl_dispatch_stub_642(void); +extern void gl_dispatch_stub_643(void); +extern void gl_dispatch_stub_644(void); +extern void gl_dispatch_stub_645(void); +extern void gl_dispatch_stub_646(void); +extern void gl_dispatch_stub_647(void); +extern void gl_dispatch_stub_648(void); +extern void gl_dispatch_stub_649(void); +extern void gl_dispatch_stub_650(void); +extern void gl_dispatch_stub_731(void); +extern void gl_dispatch_stub_732(void); +extern void gl_dispatch_stub_733(void); +extern void gl_dispatch_stub_734(void); +extern void gl_dispatch_stub_735(void); +extern void gl_dispatch_stub_742(void); +extern void gl_dispatch_stub_743(void); +extern void gl_dispatch_stub_761(void); +extern void gl_dispatch_stub_762(void); +extern void gl_dispatch_stub_763(void); +extern void gl_dispatch_stub_764(void); +extern void gl_dispatch_stub_765(void); #endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */ static const glprocs_table_t static_functions[] = { @@ -1464,550 +1546,632 @@ static const glprocs_table_t static_functions[] = { NAME_FUNC_OFFSET( 5704, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), NAME_FUNC_OFFSET( 5726, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), NAME_FUNC_OFFSET( 5747, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), - NAME_FUNC_OFFSET( 5769, glStencilFuncSeparate, glStencilFuncSeparate, NULL, _gloffset_StencilFuncSeparate), - NAME_FUNC_OFFSET( 5791, glStencilMaskSeparate, glStencilMaskSeparate, NULL, _gloffset_StencilMaskSeparate), - NAME_FUNC_OFFSET( 5813, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), - NAME_FUNC_OFFSET( 5833, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), - NAME_FUNC_OFFSET( 5859, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), - NAME_FUNC_OFFSET( 5885, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), - NAME_FUNC_OFFSET( 5911, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), - NAME_FUNC_OFFSET( 5937, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), - NAME_FUNC_OFFSET( 5957, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), - NAME_FUNC_OFFSET( 5983, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), - NAME_FUNC_OFFSET( 6009, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), - NAME_FUNC_OFFSET( 6035, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), - NAME_FUNC_OFFSET( 6064, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), - NAME_FUNC_OFFSET( 6093, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), - NAME_FUNC_OFFSET( 6122, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), - NAME_FUNC_OFFSET( 6149, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), - NAME_FUNC_OFFSET( 6179, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), - NAME_FUNC_OFFSET( 6208, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, _gloffset_GetProgramEnvParameterdvARB), - NAME_FUNC_OFFSET( 6238, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, _gloffset_GetProgramEnvParameterfvARB), - NAME_FUNC_OFFSET( 6268, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, _gloffset_GetProgramLocalParameterdvARB), - NAME_FUNC_OFFSET( 6300, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, _gloffset_GetProgramLocalParameterfvARB), - NAME_FUNC_OFFSET( 6332, glGetProgramStringARB, glGetProgramStringARB, NULL, _gloffset_GetProgramStringARB), - NAME_FUNC_OFFSET( 6354, glGetProgramivARB, glGetProgramivARB, NULL, _gloffset_GetProgramivARB), - NAME_FUNC_OFFSET( 6372, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), - NAME_FUNC_OFFSET( 6395, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), - NAME_FUNC_OFFSET( 6418, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), - NAME_FUNC_OFFSET( 6441, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), - NAME_FUNC_OFFSET( 6468, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), - NAME_FUNC_OFFSET( 6496, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), - NAME_FUNC_OFFSET( 6523, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), - NAME_FUNC_OFFSET( 6551, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, _gloffset_ProgramLocalParameter4dARB), - NAME_FUNC_OFFSET( 6580, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, _gloffset_ProgramLocalParameter4dvARB), - NAME_FUNC_OFFSET( 6610, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, _gloffset_ProgramLocalParameter4fARB), - NAME_FUNC_OFFSET( 6639, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, _gloffset_ProgramLocalParameter4fvARB), - NAME_FUNC_OFFSET( 6669, glProgramStringARB, glProgramStringARB, NULL, _gloffset_ProgramStringARB), - NAME_FUNC_OFFSET( 6688, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), - NAME_FUNC_OFFSET( 6708, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), - NAME_FUNC_OFFSET( 6729, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), - NAME_FUNC_OFFSET( 6749, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), - NAME_FUNC_OFFSET( 6770, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), - NAME_FUNC_OFFSET( 6790, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), - NAME_FUNC_OFFSET( 6811, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), - NAME_FUNC_OFFSET( 6831, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), - NAME_FUNC_OFFSET( 6852, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), - NAME_FUNC_OFFSET( 6872, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), - NAME_FUNC_OFFSET( 6893, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), - NAME_FUNC_OFFSET( 6913, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), - NAME_FUNC_OFFSET( 6934, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), - NAME_FUNC_OFFSET( 6954, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), - NAME_FUNC_OFFSET( 6975, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), - NAME_FUNC_OFFSET( 6995, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), - NAME_FUNC_OFFSET( 7016, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), - NAME_FUNC_OFFSET( 7036, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), - NAME_FUNC_OFFSET( 7057, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), - NAME_FUNC_OFFSET( 7079, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), - NAME_FUNC_OFFSET( 7101, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), - NAME_FUNC_OFFSET( 7123, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), - NAME_FUNC_OFFSET( 7145, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), - NAME_FUNC_OFFSET( 7168, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), - NAME_FUNC_OFFSET( 7191, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), - NAME_FUNC_OFFSET( 7214, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), - NAME_FUNC_OFFSET( 7235, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), - NAME_FUNC_OFFSET( 7255, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), - NAME_FUNC_OFFSET( 7276, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), - NAME_FUNC_OFFSET( 7296, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), - NAME_FUNC_OFFSET( 7317, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), - NAME_FUNC_OFFSET( 7338, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), - NAME_FUNC_OFFSET( 7358, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), - NAME_FUNC_OFFSET( 7379, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), - NAME_FUNC_OFFSET( 7401, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), - NAME_FUNC_OFFSET( 7423, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), - NAME_FUNC_OFFSET( 7445, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), - NAME_FUNC_OFFSET( 7470, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), - NAME_FUNC_OFFSET( 7486, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), - NAME_FUNC_OFFSET( 7502, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), - NAME_FUNC_OFFSET( 7521, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), - NAME_FUNC_OFFSET( 7540, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), - NAME_FUNC_OFFSET( 7556, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), - NAME_FUNC_OFFSET( 7582, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), - NAME_FUNC_OFFSET( 7605, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), - NAME_FUNC_OFFSET( 7627, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), - NAME_FUNC_OFFSET( 7641, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), - NAME_FUNC_OFFSET( 7656, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), - NAME_FUNC_OFFSET( 7673, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), - NAME_FUNC_OFFSET( 7689, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), - NAME_FUNC_OFFSET( 7708, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), - NAME_FUNC_OFFSET( 7722, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), - NAME_FUNC_OFFSET( 7738, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), - NAME_FUNC_OFFSET( 7760, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), - NAME_FUNC_OFFSET( 7783, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), - NAME_FUNC_OFFSET( 7799, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), - NAME_FUNC_OFFSET( 7812, glAttachObjectARB, glAttachObjectARB, NULL, _gloffset_AttachObjectARB), - NAME_FUNC_OFFSET( 7830, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), - NAME_FUNC_OFFSET( 7849, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, _gloffset_CreateProgramObjectARB), - NAME_FUNC_OFFSET( 7874, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, _gloffset_CreateShaderObjectARB), - NAME_FUNC_OFFSET( 7898, glDeleteObjectARB, glDeleteObjectARB, NULL, _gloffset_DeleteObjectARB), - NAME_FUNC_OFFSET( 7916, glDetachObjectARB, glDetachObjectARB, NULL, _gloffset_DetachObjectARB), - NAME_FUNC_OFFSET( 7934, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), - NAME_FUNC_OFFSET( 7956, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, _gloffset_GetAttachedObjectsARB), - NAME_FUNC_OFFSET( 7980, glGetHandleARB, glGetHandleARB, NULL, _gloffset_GetHandleARB), - NAME_FUNC_OFFSET( 7995, glGetInfoLogARB, glGetInfoLogARB, NULL, _gloffset_GetInfoLogARB), - NAME_FUNC_OFFSET( 8011, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, _gloffset_GetObjectParameterfvARB), - NAME_FUNC_OFFSET( 8037, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, _gloffset_GetObjectParameterivARB), - NAME_FUNC_OFFSET( 8063, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), - NAME_FUNC_OFFSET( 8084, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), - NAME_FUNC_OFFSET( 8108, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), - NAME_FUNC_OFFSET( 8126, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), - NAME_FUNC_OFFSET( 8144, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), - NAME_FUNC_OFFSET( 8161, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), - NAME_FUNC_OFFSET( 8179, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), - NAME_FUNC_OFFSET( 8194, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), - NAME_FUNC_OFFSET( 8210, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), - NAME_FUNC_OFFSET( 8225, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), - NAME_FUNC_OFFSET( 8241, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), - NAME_FUNC_OFFSET( 8256, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), - NAME_FUNC_OFFSET( 8272, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), - NAME_FUNC_OFFSET( 8287, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), - NAME_FUNC_OFFSET( 8303, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), - NAME_FUNC_OFFSET( 8318, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), - NAME_FUNC_OFFSET( 8334, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), - NAME_FUNC_OFFSET( 8349, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), - NAME_FUNC_OFFSET( 8365, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), - NAME_FUNC_OFFSET( 8380, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), - NAME_FUNC_OFFSET( 8396, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), - NAME_FUNC_OFFSET( 8411, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), - NAME_FUNC_OFFSET( 8427, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), - NAME_FUNC_OFFSET( 8449, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), - NAME_FUNC_OFFSET( 8471, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), - NAME_FUNC_OFFSET( 8493, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), - NAME_FUNC_OFFSET( 8515, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), - NAME_FUNC_OFFSET( 8536, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), - NAME_FUNC_OFFSET( 8560, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), - NAME_FUNC_OFFSET( 8581, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), - NAME_FUNC_OFFSET( 8604, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET( 8621, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, _gloffset_PolygonOffsetEXT), - NAME_FUNC_OFFSET( 8640, gl_dispatch_stub_543, gl_dispatch_stub_543, NULL, _gloffset_GetPixelTexGenParameterfvSGIS), - NAME_FUNC_OFFSET( 8672, gl_dispatch_stub_544, gl_dispatch_stub_544, NULL, _gloffset_GetPixelTexGenParameterivSGIS), - NAME_FUNC_OFFSET( 8704, gl_dispatch_stub_545, gl_dispatch_stub_545, NULL, _gloffset_PixelTexGenParameterfSGIS), - NAME_FUNC_OFFSET( 8732, gl_dispatch_stub_546, gl_dispatch_stub_546, NULL, _gloffset_PixelTexGenParameterfvSGIS), - NAME_FUNC_OFFSET( 8761, gl_dispatch_stub_547, gl_dispatch_stub_547, NULL, _gloffset_PixelTexGenParameteriSGIS), - NAME_FUNC_OFFSET( 8789, gl_dispatch_stub_548, gl_dispatch_stub_548, NULL, _gloffset_PixelTexGenParameterivSGIS), - NAME_FUNC_OFFSET( 8818, gl_dispatch_stub_549, gl_dispatch_stub_549, NULL, _gloffset_SampleMaskSGIS), - NAME_FUNC_OFFSET( 8835, gl_dispatch_stub_550, gl_dispatch_stub_550, NULL, _gloffset_SamplePatternSGIS), - NAME_FUNC_OFFSET( 8855, glColorPointerEXT, glColorPointerEXT, NULL, _gloffset_ColorPointerEXT), - NAME_FUNC_OFFSET( 8873, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, _gloffset_EdgeFlagPointerEXT), - NAME_FUNC_OFFSET( 8894, glIndexPointerEXT, glIndexPointerEXT, NULL, _gloffset_IndexPointerEXT), - NAME_FUNC_OFFSET( 8912, glNormalPointerEXT, glNormalPointerEXT, NULL, _gloffset_NormalPointerEXT), - NAME_FUNC_OFFSET( 8931, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, _gloffset_TexCoordPointerEXT), - NAME_FUNC_OFFSET( 8952, glVertexPointerEXT, glVertexPointerEXT, NULL, _gloffset_VertexPointerEXT), - NAME_FUNC_OFFSET( 8971, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET( 8992, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET( 9014, glLockArraysEXT, glLockArraysEXT, NULL, _gloffset_LockArraysEXT), - NAME_FUNC_OFFSET( 9030, glUnlockArraysEXT, glUnlockArraysEXT, NULL, _gloffset_UnlockArraysEXT), - NAME_FUNC_OFFSET( 9048, gl_dispatch_stub_561, gl_dispatch_stub_561, NULL, _gloffset_CullParameterdvEXT), - NAME_FUNC_OFFSET( 9069, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_CullParameterfvEXT), - NAME_FUNC_OFFSET( 9090, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), - NAME_FUNC_OFFSET( 9112, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), - NAME_FUNC_OFFSET( 9135, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), - NAME_FUNC_OFFSET( 9157, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), - NAME_FUNC_OFFSET( 9180, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), - NAME_FUNC_OFFSET( 9202, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), - NAME_FUNC_OFFSET( 9225, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), - NAME_FUNC_OFFSET( 9247, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), - NAME_FUNC_OFFSET( 9270, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), - NAME_FUNC_OFFSET( 9292, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), - NAME_FUNC_OFFSET( 9315, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), - NAME_FUNC_OFFSET( 9338, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), - NAME_FUNC_OFFSET( 9362, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), - NAME_FUNC_OFFSET( 9385, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), - NAME_FUNC_OFFSET( 9409, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), - NAME_FUNC_OFFSET( 9432, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), - NAME_FUNC_OFFSET( 9456, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), - NAME_FUNC_OFFSET( 9483, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), - NAME_FUNC_OFFSET( 9504, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), - NAME_FUNC_OFFSET( 9527, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), - NAME_FUNC_OFFSET( 9548, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), - NAME_FUNC_OFFSET( 9563, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), - NAME_FUNC_OFFSET( 9579, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), - NAME_FUNC_OFFSET( 9594, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), - NAME_FUNC_OFFSET( 9610, gl_dispatch_stub_587, gl_dispatch_stub_587, NULL, _gloffset_PixelTexGenSGIX), - NAME_FUNC_OFFSET( 9628, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET( 9651, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, _gloffset_FlushVertexArrayRangeNV), - NAME_FUNC_OFFSET( 9677, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, _gloffset_VertexArrayRangeNV), - NAME_FUNC_OFFSET( 9698, glCombinerInputNV, glCombinerInputNV, NULL, _gloffset_CombinerInputNV), - NAME_FUNC_OFFSET( 9716, glCombinerOutputNV, glCombinerOutputNV, NULL, _gloffset_CombinerOutputNV), - NAME_FUNC_OFFSET( 9735, glCombinerParameterfNV, glCombinerParameterfNV, NULL, _gloffset_CombinerParameterfNV), - NAME_FUNC_OFFSET( 9758, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, _gloffset_CombinerParameterfvNV), - NAME_FUNC_OFFSET( 9782, glCombinerParameteriNV, glCombinerParameteriNV, NULL, _gloffset_CombinerParameteriNV), - NAME_FUNC_OFFSET( 9805, glCombinerParameterivNV, glCombinerParameterivNV, NULL, _gloffset_CombinerParameterivNV), - NAME_FUNC_OFFSET( 9829, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, _gloffset_FinalCombinerInputNV), - NAME_FUNC_OFFSET( 9852, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, _gloffset_GetCombinerInputParameterfvNV), - NAME_FUNC_OFFSET( 9884, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, _gloffset_GetCombinerInputParameterivNV), - NAME_FUNC_OFFSET( 9916, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, _gloffset_GetCombinerOutputParameterfvNV), - NAME_FUNC_OFFSET( 9949, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, _gloffset_GetCombinerOutputParameterivNV), - NAME_FUNC_OFFSET( 9982, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, _gloffset_GetFinalCombinerInputParameterfvNV), - NAME_FUNC_OFFSET(10019, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, _gloffset_GetFinalCombinerInputParameterivNV), - NAME_FUNC_OFFSET(10056, glResizeBuffersMESA, glResizeBuffersMESA, NULL, _gloffset_ResizeBuffersMESA), - NAME_FUNC_OFFSET(10076, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(10094, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(10113, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(10131, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(10150, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(10168, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(10187, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(10205, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(10224, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(10242, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(10261, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(10279, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(10298, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(10316, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(10335, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(10353, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(10372, glWindowPos4dMESA, glWindowPos4dMESA, NULL, _gloffset_WindowPos4dMESA), - NAME_FUNC_OFFSET(10390, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, _gloffset_WindowPos4dvMESA), - NAME_FUNC_OFFSET(10409, glWindowPos4fMESA, glWindowPos4fMESA, NULL, _gloffset_WindowPos4fMESA), - NAME_FUNC_OFFSET(10427, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, _gloffset_WindowPos4fvMESA), - NAME_FUNC_OFFSET(10446, glWindowPos4iMESA, glWindowPos4iMESA, NULL, _gloffset_WindowPos4iMESA), - NAME_FUNC_OFFSET(10464, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, _gloffset_WindowPos4ivMESA), - NAME_FUNC_OFFSET(10483, glWindowPos4sMESA, glWindowPos4sMESA, NULL, _gloffset_WindowPos4sMESA), - NAME_FUNC_OFFSET(10501, glWindowPos4svMESA, glWindowPos4svMESA, NULL, _gloffset_WindowPos4svMESA), - NAME_FUNC_OFFSET(10520, gl_dispatch_stub_629, gl_dispatch_stub_629, NULL, _gloffset_MultiModeDrawArraysIBM), - NAME_FUNC_OFFSET(10545, gl_dispatch_stub_630, gl_dispatch_stub_630, NULL, _gloffset_MultiModeDrawElementsIBM), - NAME_FUNC_OFFSET(10572, gl_dispatch_stub_631, gl_dispatch_stub_631, NULL, _gloffset_DeleteFencesNV), - NAME_FUNC_OFFSET(10589, gl_dispatch_stub_632, gl_dispatch_stub_632, NULL, _gloffset_FinishFenceNV), - NAME_FUNC_OFFSET(10605, gl_dispatch_stub_633, gl_dispatch_stub_633, NULL, _gloffset_GenFencesNV), - NAME_FUNC_OFFSET(10619, gl_dispatch_stub_634, gl_dispatch_stub_634, NULL, _gloffset_GetFenceivNV), - NAME_FUNC_OFFSET(10634, gl_dispatch_stub_635, gl_dispatch_stub_635, NULL, _gloffset_IsFenceNV), - NAME_FUNC_OFFSET(10646, gl_dispatch_stub_636, gl_dispatch_stub_636, NULL, _gloffset_SetFenceNV), - NAME_FUNC_OFFSET(10659, gl_dispatch_stub_637, gl_dispatch_stub_637, NULL, _gloffset_TestFenceNV), - NAME_FUNC_OFFSET(10673, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, _gloffset_AreProgramsResidentNV), - NAME_FUNC_OFFSET(10697, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), - NAME_FUNC_OFFSET(10713, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), - NAME_FUNC_OFFSET(10732, glExecuteProgramNV, glExecuteProgramNV, NULL, _gloffset_ExecuteProgramNV), - NAME_FUNC_OFFSET(10751, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), - NAME_FUNC_OFFSET(10767, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, _gloffset_GetProgramParameterdvNV), - NAME_FUNC_OFFSET(10793, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, _gloffset_GetProgramParameterfvNV), - NAME_FUNC_OFFSET(10819, glGetProgramStringNV, glGetProgramStringNV, NULL, _gloffset_GetProgramStringNV), - NAME_FUNC_OFFSET(10840, glGetProgramivNV, glGetProgramivNV, NULL, _gloffset_GetProgramivNV), - NAME_FUNC_OFFSET(10857, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, _gloffset_GetTrackMatrixivNV), - NAME_FUNC_OFFSET(10878, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(10906, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, _gloffset_GetVertexAttribdvNV), - NAME_FUNC_OFFSET(10928, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, _gloffset_GetVertexAttribfvNV), - NAME_FUNC_OFFSET(10950, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, _gloffset_GetVertexAttribivNV), - NAME_FUNC_OFFSET(10972, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), - NAME_FUNC_OFFSET(10986, glLoadProgramNV, glLoadProgramNV, NULL, _gloffset_LoadProgramNV), - NAME_FUNC_OFFSET(11002, glProgramParameter4dNV, glProgramParameter4dNV, NULL, _gloffset_ProgramParameter4dNV), - NAME_FUNC_OFFSET(11025, glProgramParameter4dvNV, glProgramParameter4dvNV, NULL, _gloffset_ProgramParameter4dvNV), - NAME_FUNC_OFFSET(11049, glProgramParameter4fNV, glProgramParameter4fNV, NULL, _gloffset_ProgramParameter4fNV), - NAME_FUNC_OFFSET(11072, glProgramParameter4fvNV, glProgramParameter4fvNV, NULL, _gloffset_ProgramParameter4fvNV), - NAME_FUNC_OFFSET(11096, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, _gloffset_ProgramParameters4dvNV), - NAME_FUNC_OFFSET(11121, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, _gloffset_ProgramParameters4fvNV), - NAME_FUNC_OFFSET(11146, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, _gloffset_RequestResidentProgramsNV), - NAME_FUNC_OFFSET(11174, glTrackMatrixNV, glTrackMatrixNV, NULL, _gloffset_TrackMatrixNV), - NAME_FUNC_OFFSET(11190, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, _gloffset_VertexAttrib1dNV), - NAME_FUNC_OFFSET(11209, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, _gloffset_VertexAttrib1dvNV), - NAME_FUNC_OFFSET(11229, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, _gloffset_VertexAttrib1fNV), - NAME_FUNC_OFFSET(11248, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, _gloffset_VertexAttrib1fvNV), - NAME_FUNC_OFFSET(11268, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, _gloffset_VertexAttrib1sNV), - NAME_FUNC_OFFSET(11287, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, _gloffset_VertexAttrib1svNV), - NAME_FUNC_OFFSET(11307, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, _gloffset_VertexAttrib2dNV), - NAME_FUNC_OFFSET(11326, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, _gloffset_VertexAttrib2dvNV), - NAME_FUNC_OFFSET(11346, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, _gloffset_VertexAttrib2fNV), - NAME_FUNC_OFFSET(11365, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, _gloffset_VertexAttrib2fvNV), - NAME_FUNC_OFFSET(11385, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, _gloffset_VertexAttrib2sNV), - NAME_FUNC_OFFSET(11404, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, _gloffset_VertexAttrib2svNV), - NAME_FUNC_OFFSET(11424, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, _gloffset_VertexAttrib3dNV), - NAME_FUNC_OFFSET(11443, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, _gloffset_VertexAttrib3dvNV), - NAME_FUNC_OFFSET(11463, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, _gloffset_VertexAttrib3fNV), - NAME_FUNC_OFFSET(11482, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, _gloffset_VertexAttrib3fvNV), - NAME_FUNC_OFFSET(11502, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, _gloffset_VertexAttrib3sNV), - NAME_FUNC_OFFSET(11521, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, _gloffset_VertexAttrib3svNV), - NAME_FUNC_OFFSET(11541, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, _gloffset_VertexAttrib4dNV), - NAME_FUNC_OFFSET(11560, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, _gloffset_VertexAttrib4dvNV), - NAME_FUNC_OFFSET(11580, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, _gloffset_VertexAttrib4fNV), - NAME_FUNC_OFFSET(11599, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, _gloffset_VertexAttrib4fvNV), - NAME_FUNC_OFFSET(11619, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, _gloffset_VertexAttrib4sNV), - NAME_FUNC_OFFSET(11638, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, _gloffset_VertexAttrib4svNV), - NAME_FUNC_OFFSET(11658, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, _gloffset_VertexAttrib4ubNV), - NAME_FUNC_OFFSET(11678, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, _gloffset_VertexAttrib4ubvNV), - NAME_FUNC_OFFSET(11699, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, _gloffset_VertexAttribPointerNV), - NAME_FUNC_OFFSET(11723, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, _gloffset_VertexAttribs1dvNV), - NAME_FUNC_OFFSET(11744, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, _gloffset_VertexAttribs1fvNV), - NAME_FUNC_OFFSET(11765, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, _gloffset_VertexAttribs1svNV), - NAME_FUNC_OFFSET(11786, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, _gloffset_VertexAttribs2dvNV), - NAME_FUNC_OFFSET(11807, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, _gloffset_VertexAttribs2fvNV), - NAME_FUNC_OFFSET(11828, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, _gloffset_VertexAttribs2svNV), - NAME_FUNC_OFFSET(11849, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, _gloffset_VertexAttribs3dvNV), - NAME_FUNC_OFFSET(11870, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, _gloffset_VertexAttribs3fvNV), - NAME_FUNC_OFFSET(11891, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, _gloffset_VertexAttribs3svNV), - NAME_FUNC_OFFSET(11912, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, _gloffset_VertexAttribs4dvNV), - NAME_FUNC_OFFSET(11933, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, _gloffset_VertexAttribs4fvNV), - NAME_FUNC_OFFSET(11954, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, _gloffset_VertexAttribs4svNV), - NAME_FUNC_OFFSET(11975, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, _gloffset_VertexAttribs4ubvNV), - NAME_FUNC_OFFSET(11997, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, _gloffset_AlphaFragmentOp1ATI), - NAME_FUNC_OFFSET(12019, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, _gloffset_AlphaFragmentOp2ATI), - NAME_FUNC_OFFSET(12041, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, _gloffset_AlphaFragmentOp3ATI), - NAME_FUNC_OFFSET(12063, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, _gloffset_BeginFragmentShaderATI), - NAME_FUNC_OFFSET(12088, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, _gloffset_BindFragmentShaderATI), - NAME_FUNC_OFFSET(12112, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, _gloffset_ColorFragmentOp1ATI), - NAME_FUNC_OFFSET(12134, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, _gloffset_ColorFragmentOp2ATI), - NAME_FUNC_OFFSET(12156, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, _gloffset_ColorFragmentOp3ATI), - NAME_FUNC_OFFSET(12178, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, _gloffset_DeleteFragmentShaderATI), - NAME_FUNC_OFFSET(12204, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, _gloffset_EndFragmentShaderATI), - NAME_FUNC_OFFSET(12227, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, _gloffset_GenFragmentShadersATI), - NAME_FUNC_OFFSET(12251, glPassTexCoordATI, glPassTexCoordATI, NULL, _gloffset_PassTexCoordATI), - NAME_FUNC_OFFSET(12269, glSampleMapATI, glSampleMapATI, NULL, _gloffset_SampleMapATI), - NAME_FUNC_OFFSET(12284, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, _gloffset_SetFragmentShaderConstantATI), - NAME_FUNC_OFFSET(12315, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), - NAME_FUNC_OFFSET(12335, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), - NAME_FUNC_OFFSET(12356, gl_dispatch_stub_718, gl_dispatch_stub_718, NULL, _gloffset_ActiveStencilFaceEXT), - NAME_FUNC_OFFSET(12379, gl_dispatch_stub_719, gl_dispatch_stub_719, NULL, _gloffset_BindVertexArrayAPPLE), - NAME_FUNC_OFFSET(12402, gl_dispatch_stub_720, gl_dispatch_stub_720, NULL, _gloffset_DeleteVertexArraysAPPLE), - NAME_FUNC_OFFSET(12428, gl_dispatch_stub_721, gl_dispatch_stub_721, NULL, _gloffset_GenVertexArraysAPPLE), - NAME_FUNC_OFFSET(12451, gl_dispatch_stub_722, gl_dispatch_stub_722, NULL, _gloffset_IsVertexArrayAPPLE), - NAME_FUNC_OFFSET(12472, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, _gloffset_GetProgramNamedParameterdvNV), - NAME_FUNC_OFFSET(12503, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, _gloffset_GetProgramNamedParameterfvNV), - NAME_FUNC_OFFSET(12534, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, _gloffset_ProgramNamedParameter4dNV), - NAME_FUNC_OFFSET(12562, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, _gloffset_ProgramNamedParameter4dvNV), - NAME_FUNC_OFFSET(12591, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, _gloffset_ProgramNamedParameter4fNV), - NAME_FUNC_OFFSET(12619, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, _gloffset_ProgramNamedParameter4fvNV), - NAME_FUNC_OFFSET(12648, gl_dispatch_stub_729, gl_dispatch_stub_729, NULL, _gloffset_DepthBoundsEXT), - NAME_FUNC_OFFSET(12665, gl_dispatch_stub_730, gl_dispatch_stub_730, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(12692, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), - NAME_FUNC_OFFSET(12713, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), - NAME_FUNC_OFFSET(12735, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), - NAME_FUNC_OFFSET(12763, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), - NAME_FUNC_OFFSET(12787, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), - NAME_FUNC_OFFSET(12812, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), - NAME_FUNC_OFFSET(12841, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), - NAME_FUNC_OFFSET(12867, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), - NAME_FUNC_OFFSET(12893, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), - NAME_FUNC_OFFSET(12919, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), - NAME_FUNC_OFFSET(12940, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), - NAME_FUNC_OFFSET(12962, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), - NAME_FUNC_OFFSET(12982, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), - NAME_FUNC_OFFSET(13023, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), - NAME_FUNC_OFFSET(13055, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), - NAME_FUNC_OFFSET(13074, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), - NAME_FUNC_OFFSET(13094, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), - NAME_FUNC_OFFSET(13119, gl_dispatch_stub_748, gl_dispatch_stub_748, NULL, _gloffset_BlitFramebufferEXT), - NAME_FUNC_OFFSET(13140, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_ProgramEnvParameters4fvEXT), - NAME_FUNC_OFFSET(13169, gl_dispatch_stub_750, gl_dispatch_stub_750, NULL, _gloffset_ProgramLocalParameters4fvEXT), - NAME_FUNC_OFFSET(13200, gl_dispatch_stub_751, gl_dispatch_stub_751, NULL, _gloffset_GetQueryObjecti64vEXT), - NAME_FUNC_OFFSET(13224, gl_dispatch_stub_752, gl_dispatch_stub_752, NULL, _gloffset_GetQueryObjectui64vEXT), - NAME_FUNC_OFFSET(13249, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), - NAME_FUNC_OFFSET(13267, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), - NAME_FUNC_OFFSET(13284, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), - NAME_FUNC_OFFSET(13300, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), - NAME_FUNC_OFFSET(13325, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), - NAME_FUNC_OFFSET(13345, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), - NAME_FUNC_OFFSET(13365, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), - NAME_FUNC_OFFSET(13388, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), - NAME_FUNC_OFFSET(13411, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), - NAME_FUNC_OFFSET(13431, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), - NAME_FUNC_OFFSET(13448, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), - NAME_FUNC_OFFSET(13465, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), - NAME_FUNC_OFFSET(13480, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), - NAME_FUNC_OFFSET(13504, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), - NAME_FUNC_OFFSET(13523, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), - NAME_FUNC_OFFSET(13542, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), - NAME_FUNC_OFFSET(13558, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), - NAME_FUNC_OFFSET(13577, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), - NAME_FUNC_OFFSET(13600, glColorTable, glColorTable, NULL, _gloffset_ColorTable), - NAME_FUNC_OFFSET(13616, glColorTable, glColorTable, NULL, _gloffset_ColorTable), - NAME_FUNC_OFFSET(13632, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), - NAME_FUNC_OFFSET(13659, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), - NAME_FUNC_OFFSET(13686, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), - NAME_FUNC_OFFSET(13706, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), - NAME_FUNC_OFFSET(13725, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), - NAME_FUNC_OFFSET(13744, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), - NAME_FUNC_OFFSET(13774, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), - NAME_FUNC_OFFSET(13804, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), - NAME_FUNC_OFFSET(13834, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), - NAME_FUNC_OFFSET(13864, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), - NAME_FUNC_OFFSET(13883, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), - NAME_FUNC_OFFSET(13906, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), - NAME_FUNC_OFFSET(13931, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), - NAME_FUNC_OFFSET(13956, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), - NAME_FUNC_OFFSET(13983, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), - NAME_FUNC_OFFSET(14011, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), - NAME_FUNC_OFFSET(14038, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), - NAME_FUNC_OFFSET(14066, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), - NAME_FUNC_OFFSET(14095, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), - NAME_FUNC_OFFSET(14124, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), - NAME_FUNC_OFFSET(14150, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), - NAME_FUNC_OFFSET(14181, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), - NAME_FUNC_OFFSET(14212, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), - NAME_FUNC_OFFSET(14236, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), - NAME_FUNC_OFFSET(14259, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), - NAME_FUNC_OFFSET(14277, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), - NAME_FUNC_OFFSET(14306, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), - NAME_FUNC_OFFSET(14335, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), - NAME_FUNC_OFFSET(14350, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), - NAME_FUNC_OFFSET(14376, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), - NAME_FUNC_OFFSET(14402, glHistogram, glHistogram, NULL, _gloffset_Histogram), - NAME_FUNC_OFFSET(14417, glMinmax, glMinmax, NULL, _gloffset_Minmax), - NAME_FUNC_OFFSET(14429, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), - NAME_FUNC_OFFSET(14449, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), - NAME_FUNC_OFFSET(14466, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), - NAME_FUNC_OFFSET(14482, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), - NAME_FUNC_OFFSET(14501, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), - NAME_FUNC_OFFSET(14524, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), - NAME_FUNC_OFFSET(14540, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), - NAME_FUNC_OFFSET(14562, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), - NAME_FUNC_OFFSET(14580, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), - NAME_FUNC_OFFSET(14599, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), - NAME_FUNC_OFFSET(14617, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), - NAME_FUNC_OFFSET(14636, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), - NAME_FUNC_OFFSET(14654, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), - NAME_FUNC_OFFSET(14673, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), - NAME_FUNC_OFFSET(14691, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), - NAME_FUNC_OFFSET(14710, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), - NAME_FUNC_OFFSET(14728, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), - NAME_FUNC_OFFSET(14747, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), - NAME_FUNC_OFFSET(14765, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), - NAME_FUNC_OFFSET(14784, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), - NAME_FUNC_OFFSET(14802, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), - NAME_FUNC_OFFSET(14821, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), - NAME_FUNC_OFFSET(14839, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), - NAME_FUNC_OFFSET(14858, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), - NAME_FUNC_OFFSET(14876, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), - NAME_FUNC_OFFSET(14895, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), - NAME_FUNC_OFFSET(14913, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), - NAME_FUNC_OFFSET(14932, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), - NAME_FUNC_OFFSET(14950, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), - NAME_FUNC_OFFSET(14969, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), - NAME_FUNC_OFFSET(14987, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), - NAME_FUNC_OFFSET(15006, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), - NAME_FUNC_OFFSET(15024, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), - NAME_FUNC_OFFSET(15043, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), - NAME_FUNC_OFFSET(15061, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), - NAME_FUNC_OFFSET(15080, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), - NAME_FUNC_OFFSET(15098, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), - NAME_FUNC_OFFSET(15117, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), - NAME_FUNC_OFFSET(15135, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), - NAME_FUNC_OFFSET(15154, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), - NAME_FUNC_OFFSET(15177, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), - NAME_FUNC_OFFSET(15200, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), - NAME_FUNC_OFFSET(15223, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), - NAME_FUNC_OFFSET(15246, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), - NAME_FUNC_OFFSET(15263, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), - NAME_FUNC_OFFSET(15286, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), - NAME_FUNC_OFFSET(15309, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), - NAME_FUNC_OFFSET(15332, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), - NAME_FUNC_OFFSET(15358, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), - NAME_FUNC_OFFSET(15384, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), - NAME_FUNC_OFFSET(15410, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), - NAME_FUNC_OFFSET(15434, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), - NAME_FUNC_OFFSET(15447, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), - NAME_FUNC_OFFSET(15460, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), - NAME_FUNC_OFFSET(15476, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), - NAME_FUNC_OFFSET(15492, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), - NAME_FUNC_OFFSET(15505, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), - NAME_FUNC_OFFSET(15528, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), - NAME_FUNC_OFFSET(15548, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), - NAME_FUNC_OFFSET(15567, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), - NAME_FUNC_OFFSET(15578, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), - NAME_FUNC_OFFSET(15590, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), - NAME_FUNC_OFFSET(15604, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), - NAME_FUNC_OFFSET(15617, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), - NAME_FUNC_OFFSET(15633, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), - NAME_FUNC_OFFSET(15644, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), - NAME_FUNC_OFFSET(15657, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), - NAME_FUNC_OFFSET(15676, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), - NAME_FUNC_OFFSET(15696, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), - NAME_FUNC_OFFSET(15709, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), - NAME_FUNC_OFFSET(15719, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET(15733, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET(15750, gl_dispatch_stub_549, gl_dispatch_stub_549, NULL, _gloffset_SampleMaskSGIS), - NAME_FUNC_OFFSET(15766, gl_dispatch_stub_550, gl_dispatch_stub_550, NULL, _gloffset_SamplePatternSGIS), - NAME_FUNC_OFFSET(15785, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(15803, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(15824, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(15846, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(15865, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(15887, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(15910, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), - NAME_FUNC_OFFSET(15929, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), - NAME_FUNC_OFFSET(15949, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), - NAME_FUNC_OFFSET(15968, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), - NAME_FUNC_OFFSET(15988, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), - NAME_FUNC_OFFSET(16007, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), - NAME_FUNC_OFFSET(16027, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), - NAME_FUNC_OFFSET(16046, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), - NAME_FUNC_OFFSET(16066, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), - NAME_FUNC_OFFSET(16085, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), - NAME_FUNC_OFFSET(16105, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), - NAME_FUNC_OFFSET(16125, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), - NAME_FUNC_OFFSET(16146, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), - NAME_FUNC_OFFSET(16166, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), - NAME_FUNC_OFFSET(16187, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), - NAME_FUNC_OFFSET(16207, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), - NAME_FUNC_OFFSET(16228, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), - NAME_FUNC_OFFSET(16252, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), - NAME_FUNC_OFFSET(16270, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), - NAME_FUNC_OFFSET(16290, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), - NAME_FUNC_OFFSET(16308, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), - NAME_FUNC_OFFSET(16320, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), - NAME_FUNC_OFFSET(16333, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), - NAME_FUNC_OFFSET(16345, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), - NAME_FUNC_OFFSET(16358, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET(16378, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET(16402, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(16416, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(16433, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(16448, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(16466, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(16480, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(16497, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(16512, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(16530, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(16544, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(16561, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(16576, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(16594, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(16608, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(16625, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(16640, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(16658, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(16672, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(16689, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(16704, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(16722, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(16736, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(16753, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(16768, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(16786, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(16800, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(16817, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(16832, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(16850, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(16864, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(16881, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(16896, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(16914, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), - NAME_FUNC_OFFSET(16931, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), - NAME_FUNC_OFFSET(16951, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), - NAME_FUNC_OFFSET(16968, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(16997, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), - NAME_FUNC_OFFSET(17012, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), - NAME_FUNC_OFFSET(17030, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), - NAME_FUNC_OFFSET(17049, gl_dispatch_stub_730, gl_dispatch_stub_730, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(17073, gl_dispatch_stub_730, gl_dispatch_stub_730, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET( 5769, glAttachShader, glAttachShader, NULL, _gloffset_AttachShader), + NAME_FUNC_OFFSET( 5784, glCreateProgram, glCreateProgram, NULL, _gloffset_CreateProgram), + NAME_FUNC_OFFSET( 5800, glCreateShader, glCreateShader, NULL, _gloffset_CreateShader), + NAME_FUNC_OFFSET( 5815, glDeleteProgram, glDeleteProgram, NULL, _gloffset_DeleteProgram), + NAME_FUNC_OFFSET( 5831, glDeleteShader, glDeleteShader, NULL, _gloffset_DeleteShader), + NAME_FUNC_OFFSET( 5846, glDetachShader, glDetachShader, NULL, _gloffset_DetachShader), + NAME_FUNC_OFFSET( 5861, glGetAttachedShaders, glGetAttachedShaders, NULL, _gloffset_GetAttachedShaders), + NAME_FUNC_OFFSET( 5882, glGetProgramInfoLog, glGetProgramInfoLog, NULL, _gloffset_GetProgramInfoLog), + NAME_FUNC_OFFSET( 5902, glGetProgramiv, glGetProgramiv, NULL, _gloffset_GetProgramiv), + NAME_FUNC_OFFSET( 5917, glGetShaderInfoLog, glGetShaderInfoLog, NULL, _gloffset_GetShaderInfoLog), + NAME_FUNC_OFFSET( 5936, glGetShaderiv, glGetShaderiv, NULL, _gloffset_GetShaderiv), + NAME_FUNC_OFFSET( 5950, glIsProgram, glIsProgram, NULL, _gloffset_IsProgram), + NAME_FUNC_OFFSET( 5962, glIsShader, glIsShader, NULL, _gloffset_IsShader), + NAME_FUNC_OFFSET( 5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, _gloffset_StencilFuncSeparate), + NAME_FUNC_OFFSET( 5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, _gloffset_StencilMaskSeparate), + NAME_FUNC_OFFSET( 6017, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), + NAME_FUNC_OFFSET( 6037, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET( 6063, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET( 6089, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET( 6115, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET( 6141, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET( 6161, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET( 6187, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET( 6213, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET( 6239, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET( 6268, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET( 6297, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET( 6326, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET( 6353, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET( 6383, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET( 6412, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, _gloffset_GetProgramEnvParameterdvARB), + NAME_FUNC_OFFSET( 6442, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, _gloffset_GetProgramEnvParameterfvARB), + NAME_FUNC_OFFSET( 6472, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, _gloffset_GetProgramLocalParameterdvARB), + NAME_FUNC_OFFSET( 6504, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, _gloffset_GetProgramLocalParameterfvARB), + NAME_FUNC_OFFSET( 6536, glGetProgramStringARB, glGetProgramStringARB, NULL, _gloffset_GetProgramStringARB), + NAME_FUNC_OFFSET( 6558, glGetProgramivARB, glGetProgramivARB, NULL, _gloffset_GetProgramivARB), + NAME_FUNC_OFFSET( 6576, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET( 6599, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET( 6622, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET( 6645, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), + NAME_FUNC_OFFSET( 6672, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), + NAME_FUNC_OFFSET( 6700, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), + NAME_FUNC_OFFSET( 6727, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), + NAME_FUNC_OFFSET( 6755, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, _gloffset_ProgramLocalParameter4dARB), + NAME_FUNC_OFFSET( 6784, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, _gloffset_ProgramLocalParameter4dvARB), + NAME_FUNC_OFFSET( 6814, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, _gloffset_ProgramLocalParameter4fARB), + NAME_FUNC_OFFSET( 6843, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, _gloffset_ProgramLocalParameter4fvARB), + NAME_FUNC_OFFSET( 6873, glProgramStringARB, glProgramStringARB, NULL, _gloffset_ProgramStringARB), + NAME_FUNC_OFFSET( 6892, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET( 6912, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET( 6933, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET( 6953, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET( 6974, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET( 6994, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET( 7015, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET( 7035, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET( 7056, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET( 7076, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET( 7097, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET( 7117, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET( 7138, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET( 7158, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET( 7179, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET( 7199, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET( 7220, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET( 7240, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET( 7261, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET( 7283, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET( 7305, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET( 7327, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET( 7349, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET( 7372, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET( 7395, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET( 7418, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), + NAME_FUNC_OFFSET( 7439, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET( 7459, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET( 7480, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET( 7500, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET( 7521, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), + NAME_FUNC_OFFSET( 7542, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET( 7562, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET( 7583, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), + NAME_FUNC_OFFSET( 7605, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), + NAME_FUNC_OFFSET( 7627, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), + NAME_FUNC_OFFSET( 7649, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET( 7674, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET( 7690, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET( 7706, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET( 7725, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET( 7744, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET( 7760, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET( 7786, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET( 7809, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET( 7831, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET( 7845, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET( 7860, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET( 7877, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET( 7893, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET( 7912, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET( 7926, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET( 7942, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET( 7964, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET( 7987, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET( 8003, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET( 8016, glAttachObjectARB, glAttachObjectARB, NULL, _gloffset_AttachObjectARB), + NAME_FUNC_OFFSET( 8034, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET( 8053, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, _gloffset_CreateProgramObjectARB), + NAME_FUNC_OFFSET( 8078, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, _gloffset_CreateShaderObjectARB), + NAME_FUNC_OFFSET( 8102, glDeleteObjectARB, glDeleteObjectARB, NULL, _gloffset_DeleteObjectARB), + NAME_FUNC_OFFSET( 8120, glDetachObjectARB, glDetachObjectARB, NULL, _gloffset_DetachObjectARB), + NAME_FUNC_OFFSET( 8138, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET( 8160, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, _gloffset_GetAttachedObjectsARB), + NAME_FUNC_OFFSET( 8184, glGetHandleARB, glGetHandleARB, NULL, _gloffset_GetHandleARB), + NAME_FUNC_OFFSET( 8199, glGetInfoLogARB, glGetInfoLogARB, NULL, _gloffset_GetInfoLogARB), + NAME_FUNC_OFFSET( 8215, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, _gloffset_GetObjectParameterfvARB), + NAME_FUNC_OFFSET( 8241, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, _gloffset_GetObjectParameterivARB), + NAME_FUNC_OFFSET( 8267, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET( 8288, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET( 8312, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET( 8330, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET( 8348, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET( 8365, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET( 8383, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET( 8398, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET( 8414, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET( 8429, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET( 8445, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET( 8460, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET( 8476, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET( 8491, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET( 8507, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET( 8522, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET( 8538, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET( 8553, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET( 8569, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET( 8584, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET( 8600, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET( 8615, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET( 8631, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET( 8653, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET( 8675, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET( 8697, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET( 8719, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET( 8740, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET( 8764, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET( 8785, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET( 8808, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET( 8825, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, _gloffset_PolygonOffsetEXT), + NAME_FUNC_OFFSET( 8844, gl_dispatch_stub_556, gl_dispatch_stub_556, NULL, _gloffset_GetPixelTexGenParameterfvSGIS), + NAME_FUNC_OFFSET( 8876, gl_dispatch_stub_557, gl_dispatch_stub_557, NULL, _gloffset_GetPixelTexGenParameterivSGIS), + NAME_FUNC_OFFSET( 8908, gl_dispatch_stub_558, gl_dispatch_stub_558, NULL, _gloffset_PixelTexGenParameterfSGIS), + NAME_FUNC_OFFSET( 8936, gl_dispatch_stub_559, gl_dispatch_stub_559, NULL, _gloffset_PixelTexGenParameterfvSGIS), + NAME_FUNC_OFFSET( 8965, gl_dispatch_stub_560, gl_dispatch_stub_560, NULL, _gloffset_PixelTexGenParameteriSGIS), + NAME_FUNC_OFFSET( 8993, gl_dispatch_stub_561, gl_dispatch_stub_561, NULL, _gloffset_PixelTexGenParameterivSGIS), + NAME_FUNC_OFFSET( 9022, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET( 9039, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET( 9059, glColorPointerEXT, glColorPointerEXT, NULL, _gloffset_ColorPointerEXT), + NAME_FUNC_OFFSET( 9077, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, _gloffset_EdgeFlagPointerEXT), + NAME_FUNC_OFFSET( 9098, glIndexPointerEXT, glIndexPointerEXT, NULL, _gloffset_IndexPointerEXT), + NAME_FUNC_OFFSET( 9116, glNormalPointerEXT, glNormalPointerEXT, NULL, _gloffset_NormalPointerEXT), + NAME_FUNC_OFFSET( 9135, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, _gloffset_TexCoordPointerEXT), + NAME_FUNC_OFFSET( 9156, glVertexPointerEXT, glVertexPointerEXT, NULL, _gloffset_VertexPointerEXT), + NAME_FUNC_OFFSET( 9175, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET( 9196, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET( 9218, glLockArraysEXT, glLockArraysEXT, NULL, _gloffset_LockArraysEXT), + NAME_FUNC_OFFSET( 9234, glUnlockArraysEXT, glUnlockArraysEXT, NULL, _gloffset_UnlockArraysEXT), + NAME_FUNC_OFFSET( 9252, gl_dispatch_stub_574, gl_dispatch_stub_574, NULL, _gloffset_CullParameterdvEXT), + NAME_FUNC_OFFSET( 9273, gl_dispatch_stub_575, gl_dispatch_stub_575, NULL, _gloffset_CullParameterfvEXT), + NAME_FUNC_OFFSET( 9294, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET( 9316, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET( 9339, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET( 9361, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET( 9384, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET( 9406, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET( 9429, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET( 9451, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET( 9474, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET( 9496, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET( 9519, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET( 9542, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET( 9566, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET( 9589, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET( 9613, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET( 9636, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET( 9660, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET( 9687, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET( 9708, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET( 9731, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET( 9752, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET( 9767, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET( 9783, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET( 9798, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET( 9814, gl_dispatch_stub_600, gl_dispatch_stub_600, NULL, _gloffset_PixelTexGenSGIX), + NAME_FUNC_OFFSET( 9832, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET( 9855, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, _gloffset_FlushVertexArrayRangeNV), + NAME_FUNC_OFFSET( 9881, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, _gloffset_VertexArrayRangeNV), + NAME_FUNC_OFFSET( 9902, glCombinerInputNV, glCombinerInputNV, NULL, _gloffset_CombinerInputNV), + NAME_FUNC_OFFSET( 9920, glCombinerOutputNV, glCombinerOutputNV, NULL, _gloffset_CombinerOutputNV), + NAME_FUNC_OFFSET( 9939, glCombinerParameterfNV, glCombinerParameterfNV, NULL, _gloffset_CombinerParameterfNV), + NAME_FUNC_OFFSET( 9962, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, _gloffset_CombinerParameterfvNV), + NAME_FUNC_OFFSET( 9986, glCombinerParameteriNV, glCombinerParameteriNV, NULL, _gloffset_CombinerParameteriNV), + NAME_FUNC_OFFSET(10009, glCombinerParameterivNV, glCombinerParameterivNV, NULL, _gloffset_CombinerParameterivNV), + NAME_FUNC_OFFSET(10033, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, _gloffset_FinalCombinerInputNV), + NAME_FUNC_OFFSET(10056, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, _gloffset_GetCombinerInputParameterfvNV), + NAME_FUNC_OFFSET(10088, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, _gloffset_GetCombinerInputParameterivNV), + NAME_FUNC_OFFSET(10120, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, _gloffset_GetCombinerOutputParameterfvNV), + NAME_FUNC_OFFSET(10153, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, _gloffset_GetCombinerOutputParameterivNV), + NAME_FUNC_OFFSET(10186, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, _gloffset_GetFinalCombinerInputParameterfvNV), + NAME_FUNC_OFFSET(10223, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, _gloffset_GetFinalCombinerInputParameterivNV), + NAME_FUNC_OFFSET(10260, glResizeBuffersMESA, glResizeBuffersMESA, NULL, _gloffset_ResizeBuffersMESA), + NAME_FUNC_OFFSET(10280, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(10298, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(10317, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(10335, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(10354, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(10372, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(10391, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(10409, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(10428, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(10446, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(10465, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(10483, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(10502, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(10520, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(10539, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(10557, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(10576, glWindowPos4dMESA, glWindowPos4dMESA, NULL, _gloffset_WindowPos4dMESA), + NAME_FUNC_OFFSET(10594, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, _gloffset_WindowPos4dvMESA), + NAME_FUNC_OFFSET(10613, glWindowPos4fMESA, glWindowPos4fMESA, NULL, _gloffset_WindowPos4fMESA), + NAME_FUNC_OFFSET(10631, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, _gloffset_WindowPos4fvMESA), + NAME_FUNC_OFFSET(10650, glWindowPos4iMESA, glWindowPos4iMESA, NULL, _gloffset_WindowPos4iMESA), + NAME_FUNC_OFFSET(10668, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, _gloffset_WindowPos4ivMESA), + NAME_FUNC_OFFSET(10687, glWindowPos4sMESA, glWindowPos4sMESA, NULL, _gloffset_WindowPos4sMESA), + NAME_FUNC_OFFSET(10705, glWindowPos4svMESA, glWindowPos4svMESA, NULL, _gloffset_WindowPos4svMESA), + NAME_FUNC_OFFSET(10724, gl_dispatch_stub_642, gl_dispatch_stub_642, NULL, _gloffset_MultiModeDrawArraysIBM), + NAME_FUNC_OFFSET(10749, gl_dispatch_stub_643, gl_dispatch_stub_643, NULL, _gloffset_MultiModeDrawElementsIBM), + NAME_FUNC_OFFSET(10776, gl_dispatch_stub_644, gl_dispatch_stub_644, NULL, _gloffset_DeleteFencesNV), + NAME_FUNC_OFFSET(10793, gl_dispatch_stub_645, gl_dispatch_stub_645, NULL, _gloffset_FinishFenceNV), + NAME_FUNC_OFFSET(10809, gl_dispatch_stub_646, gl_dispatch_stub_646, NULL, _gloffset_GenFencesNV), + NAME_FUNC_OFFSET(10823, gl_dispatch_stub_647, gl_dispatch_stub_647, NULL, _gloffset_GetFenceivNV), + NAME_FUNC_OFFSET(10838, gl_dispatch_stub_648, gl_dispatch_stub_648, NULL, _gloffset_IsFenceNV), + NAME_FUNC_OFFSET(10850, gl_dispatch_stub_649, gl_dispatch_stub_649, NULL, _gloffset_SetFenceNV), + NAME_FUNC_OFFSET(10863, gl_dispatch_stub_650, gl_dispatch_stub_650, NULL, _gloffset_TestFenceNV), + NAME_FUNC_OFFSET(10877, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, _gloffset_AreProgramsResidentNV), + NAME_FUNC_OFFSET(10901, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(10917, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(10936, glExecuteProgramNV, glExecuteProgramNV, NULL, _gloffset_ExecuteProgramNV), + NAME_FUNC_OFFSET(10955, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(10971, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, _gloffset_GetProgramParameterdvNV), + NAME_FUNC_OFFSET(10997, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, _gloffset_GetProgramParameterfvNV), + NAME_FUNC_OFFSET(11023, glGetProgramStringNV, glGetProgramStringNV, NULL, _gloffset_GetProgramStringNV), + NAME_FUNC_OFFSET(11044, glGetProgramivNV, glGetProgramivNV, NULL, _gloffset_GetProgramivNV), + NAME_FUNC_OFFSET(11061, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, _gloffset_GetTrackMatrixivNV), + NAME_FUNC_OFFSET(11082, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(11110, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, _gloffset_GetVertexAttribdvNV), + NAME_FUNC_OFFSET(11132, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, _gloffset_GetVertexAttribfvNV), + NAME_FUNC_OFFSET(11154, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, _gloffset_GetVertexAttribivNV), + NAME_FUNC_OFFSET(11176, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(11190, glLoadProgramNV, glLoadProgramNV, NULL, _gloffset_LoadProgramNV), + NAME_FUNC_OFFSET(11206, glProgramParameter4dNV, glProgramParameter4dNV, NULL, _gloffset_ProgramParameter4dNV), + NAME_FUNC_OFFSET(11229, glProgramParameter4dvNV, glProgramParameter4dvNV, NULL, _gloffset_ProgramParameter4dvNV), + NAME_FUNC_OFFSET(11253, glProgramParameter4fNV, glProgramParameter4fNV, NULL, _gloffset_ProgramParameter4fNV), + NAME_FUNC_OFFSET(11276, glProgramParameter4fvNV, glProgramParameter4fvNV, NULL, _gloffset_ProgramParameter4fvNV), + NAME_FUNC_OFFSET(11300, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, _gloffset_ProgramParameters4dvNV), + NAME_FUNC_OFFSET(11325, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, _gloffset_ProgramParameters4fvNV), + NAME_FUNC_OFFSET(11350, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, _gloffset_RequestResidentProgramsNV), + NAME_FUNC_OFFSET(11378, glTrackMatrixNV, glTrackMatrixNV, NULL, _gloffset_TrackMatrixNV), + NAME_FUNC_OFFSET(11394, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, _gloffset_VertexAttrib1dNV), + NAME_FUNC_OFFSET(11413, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, _gloffset_VertexAttrib1dvNV), + NAME_FUNC_OFFSET(11433, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, _gloffset_VertexAttrib1fNV), + NAME_FUNC_OFFSET(11452, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, _gloffset_VertexAttrib1fvNV), + NAME_FUNC_OFFSET(11472, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, _gloffset_VertexAttrib1sNV), + NAME_FUNC_OFFSET(11491, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, _gloffset_VertexAttrib1svNV), + NAME_FUNC_OFFSET(11511, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, _gloffset_VertexAttrib2dNV), + NAME_FUNC_OFFSET(11530, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, _gloffset_VertexAttrib2dvNV), + NAME_FUNC_OFFSET(11550, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, _gloffset_VertexAttrib2fNV), + NAME_FUNC_OFFSET(11569, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, _gloffset_VertexAttrib2fvNV), + NAME_FUNC_OFFSET(11589, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, _gloffset_VertexAttrib2sNV), + NAME_FUNC_OFFSET(11608, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, _gloffset_VertexAttrib2svNV), + NAME_FUNC_OFFSET(11628, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, _gloffset_VertexAttrib3dNV), + NAME_FUNC_OFFSET(11647, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, _gloffset_VertexAttrib3dvNV), + NAME_FUNC_OFFSET(11667, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, _gloffset_VertexAttrib3fNV), + NAME_FUNC_OFFSET(11686, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, _gloffset_VertexAttrib3fvNV), + NAME_FUNC_OFFSET(11706, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, _gloffset_VertexAttrib3sNV), + NAME_FUNC_OFFSET(11725, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, _gloffset_VertexAttrib3svNV), + NAME_FUNC_OFFSET(11745, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, _gloffset_VertexAttrib4dNV), + NAME_FUNC_OFFSET(11764, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, _gloffset_VertexAttrib4dvNV), + NAME_FUNC_OFFSET(11784, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, _gloffset_VertexAttrib4fNV), + NAME_FUNC_OFFSET(11803, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, _gloffset_VertexAttrib4fvNV), + NAME_FUNC_OFFSET(11823, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, _gloffset_VertexAttrib4sNV), + NAME_FUNC_OFFSET(11842, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, _gloffset_VertexAttrib4svNV), + NAME_FUNC_OFFSET(11862, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, _gloffset_VertexAttrib4ubNV), + NAME_FUNC_OFFSET(11882, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, _gloffset_VertexAttrib4ubvNV), + NAME_FUNC_OFFSET(11903, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, _gloffset_VertexAttribPointerNV), + NAME_FUNC_OFFSET(11927, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, _gloffset_VertexAttribs1dvNV), + NAME_FUNC_OFFSET(11948, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, _gloffset_VertexAttribs1fvNV), + NAME_FUNC_OFFSET(11969, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, _gloffset_VertexAttribs1svNV), + NAME_FUNC_OFFSET(11990, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, _gloffset_VertexAttribs2dvNV), + NAME_FUNC_OFFSET(12011, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, _gloffset_VertexAttribs2fvNV), + NAME_FUNC_OFFSET(12032, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, _gloffset_VertexAttribs2svNV), + NAME_FUNC_OFFSET(12053, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, _gloffset_VertexAttribs3dvNV), + NAME_FUNC_OFFSET(12074, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, _gloffset_VertexAttribs3fvNV), + NAME_FUNC_OFFSET(12095, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, _gloffset_VertexAttribs3svNV), + NAME_FUNC_OFFSET(12116, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, _gloffset_VertexAttribs4dvNV), + NAME_FUNC_OFFSET(12137, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, _gloffset_VertexAttribs4fvNV), + NAME_FUNC_OFFSET(12158, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, _gloffset_VertexAttribs4svNV), + NAME_FUNC_OFFSET(12179, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, _gloffset_VertexAttribs4ubvNV), + NAME_FUNC_OFFSET(12201, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, _gloffset_AlphaFragmentOp1ATI), + NAME_FUNC_OFFSET(12223, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, _gloffset_AlphaFragmentOp2ATI), + NAME_FUNC_OFFSET(12245, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, _gloffset_AlphaFragmentOp3ATI), + NAME_FUNC_OFFSET(12267, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, _gloffset_BeginFragmentShaderATI), + NAME_FUNC_OFFSET(12292, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, _gloffset_BindFragmentShaderATI), + NAME_FUNC_OFFSET(12316, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, _gloffset_ColorFragmentOp1ATI), + NAME_FUNC_OFFSET(12338, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, _gloffset_ColorFragmentOp2ATI), + NAME_FUNC_OFFSET(12360, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, _gloffset_ColorFragmentOp3ATI), + NAME_FUNC_OFFSET(12382, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, _gloffset_DeleteFragmentShaderATI), + NAME_FUNC_OFFSET(12408, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, _gloffset_EndFragmentShaderATI), + NAME_FUNC_OFFSET(12431, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, _gloffset_GenFragmentShadersATI), + NAME_FUNC_OFFSET(12455, glPassTexCoordATI, glPassTexCoordATI, NULL, _gloffset_PassTexCoordATI), + NAME_FUNC_OFFSET(12473, glSampleMapATI, glSampleMapATI, NULL, _gloffset_SampleMapATI), + NAME_FUNC_OFFSET(12488, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, _gloffset_SetFragmentShaderConstantATI), + NAME_FUNC_OFFSET(12519, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(12539, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(12560, gl_dispatch_stub_731, gl_dispatch_stub_731, NULL, _gloffset_ActiveStencilFaceEXT), + NAME_FUNC_OFFSET(12583, gl_dispatch_stub_732, gl_dispatch_stub_732, NULL, _gloffset_BindVertexArrayAPPLE), + NAME_FUNC_OFFSET(12606, gl_dispatch_stub_733, gl_dispatch_stub_733, NULL, _gloffset_DeleteVertexArraysAPPLE), + NAME_FUNC_OFFSET(12632, gl_dispatch_stub_734, gl_dispatch_stub_734, NULL, _gloffset_GenVertexArraysAPPLE), + NAME_FUNC_OFFSET(12655, gl_dispatch_stub_735, gl_dispatch_stub_735, NULL, _gloffset_IsVertexArrayAPPLE), + NAME_FUNC_OFFSET(12676, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, _gloffset_GetProgramNamedParameterdvNV), + NAME_FUNC_OFFSET(12707, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, _gloffset_GetProgramNamedParameterfvNV), + NAME_FUNC_OFFSET(12738, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, _gloffset_ProgramNamedParameter4dNV), + NAME_FUNC_OFFSET(12766, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, _gloffset_ProgramNamedParameter4dvNV), + NAME_FUNC_OFFSET(12795, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, _gloffset_ProgramNamedParameter4fNV), + NAME_FUNC_OFFSET(12823, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, _gloffset_ProgramNamedParameter4fvNV), + NAME_FUNC_OFFSET(12852, gl_dispatch_stub_742, gl_dispatch_stub_742, NULL, _gloffset_DepthBoundsEXT), + NAME_FUNC_OFFSET(12869, gl_dispatch_stub_743, gl_dispatch_stub_743, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(12896, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), + NAME_FUNC_OFFSET(12917, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), + NAME_FUNC_OFFSET(12939, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), + NAME_FUNC_OFFSET(12967, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), + NAME_FUNC_OFFSET(12991, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), + NAME_FUNC_OFFSET(13016, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), + NAME_FUNC_OFFSET(13045, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), + NAME_FUNC_OFFSET(13071, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), + NAME_FUNC_OFFSET(13097, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), + NAME_FUNC_OFFSET(13123, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), + NAME_FUNC_OFFSET(13144, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), + NAME_FUNC_OFFSET(13166, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), + NAME_FUNC_OFFSET(13186, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), + NAME_FUNC_OFFSET(13227, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), + NAME_FUNC_OFFSET(13259, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), + NAME_FUNC_OFFSET(13278, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), + NAME_FUNC_OFFSET(13298, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), + NAME_FUNC_OFFSET(13323, gl_dispatch_stub_761, gl_dispatch_stub_761, NULL, _gloffset_BlitFramebufferEXT), + NAME_FUNC_OFFSET(13344, gl_dispatch_stub_762, gl_dispatch_stub_762, NULL, _gloffset_ProgramEnvParameters4fvEXT), + NAME_FUNC_OFFSET(13373, gl_dispatch_stub_763, gl_dispatch_stub_763, NULL, _gloffset_ProgramLocalParameters4fvEXT), + NAME_FUNC_OFFSET(13404, gl_dispatch_stub_764, gl_dispatch_stub_764, NULL, _gloffset_GetQueryObjecti64vEXT), + NAME_FUNC_OFFSET(13428, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_GetQueryObjectui64vEXT), + NAME_FUNC_OFFSET(13453, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), + NAME_FUNC_OFFSET(13471, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), + NAME_FUNC_OFFSET(13488, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), + NAME_FUNC_OFFSET(13504, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), + NAME_FUNC_OFFSET(13529, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), + NAME_FUNC_OFFSET(13549, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), + NAME_FUNC_OFFSET(13569, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), + NAME_FUNC_OFFSET(13592, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), + NAME_FUNC_OFFSET(13615, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), + NAME_FUNC_OFFSET(13635, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), + NAME_FUNC_OFFSET(13652, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), + NAME_FUNC_OFFSET(13669, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), + NAME_FUNC_OFFSET(13684, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), + NAME_FUNC_OFFSET(13708, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), + NAME_FUNC_OFFSET(13727, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), + NAME_FUNC_OFFSET(13746, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), + NAME_FUNC_OFFSET(13762, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), + NAME_FUNC_OFFSET(13781, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), + NAME_FUNC_OFFSET(13804, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(13820, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(13836, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), + NAME_FUNC_OFFSET(13863, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), + NAME_FUNC_OFFSET(13890, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), + NAME_FUNC_OFFSET(13910, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(13929, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(13948, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(13978, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14008, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14038, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14068, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), + NAME_FUNC_OFFSET(14087, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), + NAME_FUNC_OFFSET(14110, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), + NAME_FUNC_OFFSET(14135, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), + NAME_FUNC_OFFSET(14160, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), + NAME_FUNC_OFFSET(14187, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), + NAME_FUNC_OFFSET(14215, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), + NAME_FUNC_OFFSET(14242, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), + NAME_FUNC_OFFSET(14270, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), + NAME_FUNC_OFFSET(14299, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), + NAME_FUNC_OFFSET(14328, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), + NAME_FUNC_OFFSET(14354, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), + NAME_FUNC_OFFSET(14385, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), + NAME_FUNC_OFFSET(14416, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), + NAME_FUNC_OFFSET(14440, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), + NAME_FUNC_OFFSET(14463, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), + NAME_FUNC_OFFSET(14481, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), + NAME_FUNC_OFFSET(14510, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), + NAME_FUNC_OFFSET(14539, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), + NAME_FUNC_OFFSET(14554, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), + NAME_FUNC_OFFSET(14580, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), + NAME_FUNC_OFFSET(14606, glHistogram, glHistogram, NULL, _gloffset_Histogram), + NAME_FUNC_OFFSET(14621, glMinmax, glMinmax, NULL, _gloffset_Minmax), + NAME_FUNC_OFFSET(14633, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), + NAME_FUNC_OFFSET(14653, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), + NAME_FUNC_OFFSET(14670, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), + NAME_FUNC_OFFSET(14686, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), + NAME_FUNC_OFFSET(14705, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), + NAME_FUNC_OFFSET(14728, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), + NAME_FUNC_OFFSET(14744, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), + NAME_FUNC_OFFSET(14766, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), + NAME_FUNC_OFFSET(14784, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), + NAME_FUNC_OFFSET(14803, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), + NAME_FUNC_OFFSET(14821, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), + NAME_FUNC_OFFSET(14840, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), + NAME_FUNC_OFFSET(14858, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), + NAME_FUNC_OFFSET(14877, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), + NAME_FUNC_OFFSET(14895, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), + NAME_FUNC_OFFSET(14914, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), + NAME_FUNC_OFFSET(14932, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), + NAME_FUNC_OFFSET(14951, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), + NAME_FUNC_OFFSET(14969, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), + NAME_FUNC_OFFSET(14988, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), + NAME_FUNC_OFFSET(15006, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), + NAME_FUNC_OFFSET(15025, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), + NAME_FUNC_OFFSET(15043, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), + NAME_FUNC_OFFSET(15062, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), + NAME_FUNC_OFFSET(15080, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), + NAME_FUNC_OFFSET(15099, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), + NAME_FUNC_OFFSET(15117, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), + NAME_FUNC_OFFSET(15136, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), + NAME_FUNC_OFFSET(15154, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), + NAME_FUNC_OFFSET(15173, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), + NAME_FUNC_OFFSET(15191, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), + NAME_FUNC_OFFSET(15210, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), + NAME_FUNC_OFFSET(15228, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), + NAME_FUNC_OFFSET(15247, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), + NAME_FUNC_OFFSET(15265, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), + NAME_FUNC_OFFSET(15284, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), + NAME_FUNC_OFFSET(15302, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), + NAME_FUNC_OFFSET(15321, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), + NAME_FUNC_OFFSET(15339, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), + NAME_FUNC_OFFSET(15358, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET(15381, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET(15404, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET(15427, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET(15450, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET(15467, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET(15490, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET(15513, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET(15536, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET(15562, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET(15588, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET(15614, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET(15638, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET(15665, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET(15691, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET(15711, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET(15731, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET(15751, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET(15768, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET(15786, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET(15803, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET(15821, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET(15838, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET(15856, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET(15873, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET(15891, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET(15908, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET(15926, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET(15943, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET(15961, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET(15978, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET(15996, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET(16013, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET(16031, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET(16048, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET(16066, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET(16085, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET(16104, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET(16123, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET(16142, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET(16162, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET(16182, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET(16202, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET(16219, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET(16237, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET(16254, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET(16272, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET(16289, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET(16307, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET(16329, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET(16342, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET(16355, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET(16371, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET(16387, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET(16400, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET(16423, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET(16443, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET(16462, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET(16473, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET(16485, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET(16499, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET(16512, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET(16528, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET(16539, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET(16552, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET(16571, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET(16591, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET(16604, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET(16614, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET(16630, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET(16649, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET(16667, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET(16688, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET(16703, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET(16718, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET(16732, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET(16747, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET(16759, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET(16772, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET(16784, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET(16797, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET(16809, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET(16822, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET(16834, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET(16847, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET(16859, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET(16872, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET(16884, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET(16897, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET(16909, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET(16922, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET(16934, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET(16947, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET(16966, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET(16985, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET(17004, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET(17017, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET(17035, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET(17056, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET(17074, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET(17094, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(17108, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(17125, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET(17141, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET(17160, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17178, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17199, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17221, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17240, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17262, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17285, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET(17304, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET(17324, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET(17343, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET(17363, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET(17382, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET(17402, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET(17421, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET(17441, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET(17460, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET(17480, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET(17500, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET(17521, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET(17541, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET(17562, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET(17582, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET(17603, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET(17627, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET(17645, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET(17665, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET(17683, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET(17695, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET(17708, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET(17720, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET(17733, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(17753, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(17777, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(17791, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(17808, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(17823, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(17841, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(17855, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(17872, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(17887, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(17905, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(17919, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(17936, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(17951, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(17969, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(17983, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(18000, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(18015, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(18033, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(18047, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(18064, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(18079, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(18097, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(18111, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(18128, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(18143, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(18161, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(18175, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(18192, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(18207, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(18225, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(18239, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(18256, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(18271, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(18289, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(18306, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(18326, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(18343, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(18372, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(18387, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(18405, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(18424, gl_dispatch_stub_743, gl_dispatch_stub_743, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(18448, gl_dispatch_stub_743, gl_dispatch_stub_743, NULL, _gloffset_BlendEquationSeparateEXT), NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) }; diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index b569d6ad6f..a2c2d29105 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -50,9 +50,13 @@ static const char enum_string_table[] = "GL_ACCUM_CLEAR_VALUE\0" "GL_ACCUM_GREEN_BITS\0" "GL_ACCUM_RED_BITS\0" + "GL_ACTIVE_ATTRIBUTES\0" + "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0" "GL_ACTIVE_STENCIL_FACE_EXT\0" "GL_ACTIVE_TEXTURE\0" "GL_ACTIVE_TEXTURE_ARB\0" + "GL_ACTIVE_UNIFORMS\0" + "GL_ACTIVE_UNIFORM_MAX_LENGTH\0" "GL_ACTIVE_VERTEX_UNITS_ARB\0" "GL_ADD\0" "GL_ADD_SIGNED\0" @@ -87,6 +91,7 @@ static const char enum_string_table[] = "GL_ARRAY_BUFFER_ARB\0" "GL_ARRAY_BUFFER_BINDING\0" "GL_ARRAY_BUFFER_BINDING_ARB\0" + "GL_ATTACHED_SHADERS\0" "GL_ATTRIB_ARRAY_POINTER_NV\0" "GL_ATTRIB_ARRAY_SIZE_NV\0" "GL_ATTRIB_ARRAY_STRIDE_NV\0" @@ -112,6 +117,7 @@ static const char enum_string_table[] = "GL_BLEND_DST_ALPHA\0" "GL_BLEND_DST_RGB\0" "GL_BLEND_EQUATION\0" + "GL_BLEND_EQUATION_ALPHA\0" "GL_BLEND_EQUATION_ALPHA_EXT\0" "GL_BLEND_EQUATION_EXT\0" "GL_BLEND_EQUATION_RGB_EXT\0" @@ -122,9 +128,13 @@ static const char enum_string_table[] = "GL_BLUE_BIAS\0" "GL_BLUE_BITS\0" "GL_BLUE_SCALE\0" + "GL_BOOL\0" "GL_BOOL_ARB\0" + "GL_BOOL_VEC2\0" "GL_BOOL_VEC2_ARB\0" + "GL_BOOL_VEC3\0" "GL_BOOL_VEC3_ARB\0" + "GL_BOOL_VEC4\0" "GL_BOOL_VEC4_ARB\0" "GL_BUFFER_ACCESS\0" "GL_BUFFER_ACCESS_ARB\0" @@ -245,6 +255,7 @@ static const char enum_string_table[] = "GL_COMPARE_R_TO_TEXTURE_ARB\0" "GL_COMPILE\0" "GL_COMPILE_AND_EXECUTE\0" + "GL_COMPILE_STATUS\0" "GL_COMPRESSED_ALPHA\0" "GL_COMPRESSED_ALPHA_ARB\0" "GL_COMPRESSED_INTENSITY\0" @@ -289,6 +300,7 @@ static const char enum_string_table[] = "GL_CONVOLUTION_HEIGHT_EXT\0" "GL_CONVOLUTION_WIDTH\0" "GL_CONVOLUTION_WIDTH_EXT\0" + "GL_COORD_REPLACE\0" "GL_COORD_REPLACE_ARB\0" "GL_COORD_REPLACE_NV\0" "GL_COPY\0" @@ -312,6 +324,7 @@ static const char enum_string_table[] = "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0" "GL_CURRENT_NORMAL\0" "GL_CURRENT_PALETTE_MATRIX_ARB\0" + "GL_CURRENT_PROGRAM\0" "GL_CURRENT_QUERY\0" "GL_CURRENT_QUERY_ARB\0" "GL_CURRENT_RASTER_COLOR\0" @@ -322,6 +335,7 @@ static const char enum_string_table[] = "GL_CURRENT_RASTER_TEXTURE_COORDS\0" "GL_CURRENT_SECONDARY_COLOR\0" "GL_CURRENT_TEXTURE_COORDS\0" + "GL_CURRENT_VERTEX_ATTRIB\0" "GL_CURRENT_VERTEX_ATTRIB_ARB\0" "GL_CURRENT_WEIGHT_ARB\0" "GL_CW\0" @@ -332,6 +346,7 @@ static const char enum_string_table[] = "GL_DECR\0" "GL_DECR_WRAP\0" "GL_DECR_WRAP_EXT\0" + "GL_DELETE_STATUS\0" "GL_DEPTH\0" "GL_DEPTH_ATTACHMENT_EXT\0" "GL_DEPTH_BIAS\0" @@ -374,36 +389,52 @@ static const char enum_string_table[] = "GL_DOUBLE\0" "GL_DOUBLEBUFFER\0" "GL_DRAW_BUFFER\0" + "GL_DRAW_BUFFER0\0" "GL_DRAW_BUFFER0_ARB\0" "GL_DRAW_BUFFER0_ATI\0" + "GL_DRAW_BUFFER1\0" + "GL_DRAW_BUFFER10\0" "GL_DRAW_BUFFER10_ARB\0" "GL_DRAW_BUFFER10_ATI\0" + "GL_DRAW_BUFFER11\0" "GL_DRAW_BUFFER11_ARB\0" "GL_DRAW_BUFFER11_ATI\0" + "GL_DRAW_BUFFER12\0" "GL_DRAW_BUFFER12_ARB\0" "GL_DRAW_BUFFER12_ATI\0" + "GL_DRAW_BUFFER13\0" "GL_DRAW_BUFFER13_ARB\0" "GL_DRAW_BUFFER13_ATI\0" + "GL_DRAW_BUFFER14\0" "GL_DRAW_BUFFER14_ARB\0" "GL_DRAW_BUFFER14_ATI\0" + "GL_DRAW_BUFFER15\0" "GL_DRAW_BUFFER15_ARB\0" "GL_DRAW_BUFFER15_ATI\0" "GL_DRAW_BUFFER1_ARB\0" "GL_DRAW_BUFFER1_ATI\0" + "GL_DRAW_BUFFER2\0" "GL_DRAW_BUFFER2_ARB\0" "GL_DRAW_BUFFER2_ATI\0" + "GL_DRAW_BUFFER3\0" "GL_DRAW_BUFFER3_ARB\0" "GL_DRAW_BUFFER3_ATI\0" + "GL_DRAW_BUFFER4\0" "GL_DRAW_BUFFER4_ARB\0" "GL_DRAW_BUFFER4_ATI\0" + "GL_DRAW_BUFFER5\0" "GL_DRAW_BUFFER5_ARB\0" "GL_DRAW_BUFFER5_ATI\0" + "GL_DRAW_BUFFER6\0" "GL_DRAW_BUFFER6_ARB\0" "GL_DRAW_BUFFER6_ATI\0" + "GL_DRAW_BUFFER7\0" "GL_DRAW_BUFFER7_ARB\0" "GL_DRAW_BUFFER7_ATI\0" + "GL_DRAW_BUFFER8\0" "GL_DRAW_BUFFER8_ARB\0" "GL_DRAW_BUFFER8_ATI\0" + "GL_DRAW_BUFFER9\0" "GL_DRAW_BUFFER9_ARB\0" "GL_DRAW_BUFFER9_ATI\0" "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0" @@ -448,11 +479,17 @@ static const char enum_string_table[] = "GL_FILL\0" "GL_FLAT\0" "GL_FLOAT\0" + "GL_FLOAT_MAT2\0" "GL_FLOAT_MAT2_ARB\0" + "GL_FLOAT_MAT3\0" "GL_FLOAT_MAT3_ARB\0" + "GL_FLOAT_MAT4\0" "GL_FLOAT_MAT4_ARB\0" + "GL_FLOAT_VEC2\0" "GL_FLOAT_VEC2_ARB\0" + "GL_FLOAT_VEC3\0" "GL_FLOAT_VEC3_ARB\0" + "GL_FLOAT_VEC4\0" "GL_FLOAT_VEC4_ARB\0" "GL_FOG\0" "GL_FOG_BIT\0" @@ -483,7 +520,9 @@ static const char enum_string_table[] = "GL_FOG_START\0" "GL_FRAGMENT_DEPTH\0" "GL_FRAGMENT_PROGRAM_ARB\0" + "GL_FRAGMENT_SHADER\0" "GL_FRAGMENT_SHADER_ARB\0" + "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0" "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0" "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0" "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0" @@ -517,6 +556,7 @@ static const char enum_string_table[] = "GL_GENERATE_MIPMAP_HINT_SGIS\0" "GL_GENERATE_MIPMAP_SGIS\0" "GL_GEQUAL\0" + "GL_GL_BLEND_EQUATION_RGB\0" "GL_GREATER\0" "GL_GREEN\0" "GL_GREEN_BIAS\0" @@ -561,6 +601,7 @@ static const char enum_string_table[] = "GL_INDEX_OFFSET\0" "GL_INDEX_SHIFT\0" "GL_INDEX_WRITEMASK\0" + "GL_INFO_LOG_LENGTH\0" "GL_INT\0" "GL_INTENSITY\0" "GL_INTENSITY12\0" @@ -575,8 +616,11 @@ static const char enum_string_table[] = "GL_INTERPOLATE\0" "GL_INTERPOLATE_ARB\0" "GL_INTERPOLATE_EXT\0" + "GL_INT_VEC2\0" "GL_INT_VEC2_ARB\0" + "GL_INT_VEC3\0" "GL_INT_VEC3_ARB\0" + "GL_INT_VEC4\0" "GL_INT_VEC4_ARB\0" "GL_INVALID_ENUM\0" "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0" @@ -625,6 +669,7 @@ static const char enum_string_table[] = "GL_LINE_WIDTH\0" "GL_LINE_WIDTH_GRANULARITY\0" "GL_LINE_WIDTH_RANGE\0" + "GL_LINK_STATUS\0" "GL_LIST_BASE\0" "GL_LIST_BIT\0" "GL_LIST_INDEX\0" @@ -632,6 +677,7 @@ static const char enum_string_table[] = "GL_LOAD\0" "GL_LOGIC_OP\0" "GL_LOGIC_OP_MODE\0" + "GL_LOWER_LEFT\0" "GL_LUMINANCE\0" "GL_LUMINANCE12\0" "GL_LUMINANCE12_ALPHA12\0" @@ -767,6 +813,7 @@ static const char enum_string_table[] = "GL_MAX_COLOR_ATTACHMENTS_EXT\0" "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0" "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0" + "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0" "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0" "GL_MAX_CONVOLUTION_HEIGHT\0" "GL_MAX_CONVOLUTION_HEIGHT_EXT\0" @@ -774,12 +821,14 @@ static const char enum_string_table[] = "GL_MAX_CONVOLUTION_WIDTH_EXT\0" "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0" "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0" + "GL_MAX_DRAW_BUFFERS\0" "GL_MAX_DRAW_BUFFERS_ARB\0" "GL_MAX_DRAW_BUFFERS_ATI\0" "GL_MAX_ELEMENTS_INDICES\0" "GL_MAX_ELEMENTS_VERTICES\0" "GL_MAX_EVAL_ORDER\0" "GL_MAX_EXT\0" + "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0" "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0" "GL_MAX_LIGHTS\0" "GL_MAX_LIST_NESTING\0" @@ -819,7 +868,9 @@ static const char enum_string_table[] = "GL_MAX_RENDERBUFFER_SIZE_EXT\0" "GL_MAX_SHININESS_NV\0" "GL_MAX_SPOT_EXPONENT_NV\0" + "GL_MAX_TEXTURE_COORDS\0" "GL_MAX_TEXTURE_COORDS_ARB\0" + "GL_MAX_TEXTURE_IMAGE_UNITS\0" "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0" "GL_MAX_TEXTURE_LOD_BIAS\0" "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0" @@ -829,9 +880,13 @@ static const char enum_string_table[] = "GL_MAX_TEXTURE_UNITS_ARB\0" "GL_MAX_TRACK_MATRICES_NV\0" "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0" + "GL_MAX_VARYING_FLOATS\0" "GL_MAX_VARYING_FLOATS_ARB\0" + "GL_MAX_VERTEX_ATTRIBS\0" "GL_MAX_VERTEX_ATTRIBS_ARB\0" + "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0" "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0" + "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0" "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0" "GL_MAX_VERTEX_UNITS_ARB\0" "GL_MAX_VIEWPORT_DIMS\0" @@ -1047,6 +1102,7 @@ static const char enum_string_table[] = "GL_POINT_SIZE_RANGE\0" "GL_POINT_SMOOTH\0" "GL_POINT_SMOOTH_HINT\0" + "GL_POINT_SPRITE\0" "GL_POINT_SPRITE_ARB\0" "GL_POINT_SPRITE_COORD_ORIGIN\0" "GL_POINT_SPRITE_NV\0" @@ -1246,6 +1302,12 @@ static const char enum_string_table[] = "GL_RGB_SCALE_EXT\0" "GL_RIGHT\0" "GL_S\0" + "GL_SAMPLER_1D\0" + "GL_SAMPLER_1D_SHADOW\0" + "GL_SAMPLER_2D\0" + "GL_SAMPLER_2D_SHADOW\0" + "GL_SAMPLER_3D\0" + "GL_SAMPLER_CUBE\0" "GL_SAMPLES\0" "GL_SAMPLES_3DFX\0" "GL_SAMPLES_ARB\0" @@ -1282,7 +1344,10 @@ static const char enum_string_table[] = "GL_SEPARATE_SPECULAR_COLOR_EXT\0" "GL_SET\0" "GL_SHADER_OBJECT_ARB\0" + "GL_SHADER_SOURCE_LENGTH\0" + "GL_SHADER_TYPE\0" "GL_SHADE_MODEL\0" + "GL_SHADING_LANGUAGE_VERSION\0" "GL_SHADOW_AMBIENT_SGIX\0" "GL_SHARED_TEXTURE_PALETTE_EXT\0" "GL_SHININESS\0" @@ -1339,6 +1404,13 @@ static const char enum_string_table[] = "GL_STATIC_READ_ARB\0" "GL_STENCIL\0" "GL_STENCIL_ATTACHMENT_EXT\0" + "GL_STENCIL_BACK_FAIL\0" + "GL_STENCIL_BACK_FUNC\0" + "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0" + "GL_STENCIL_BACK_PASS_DEPTH_PASS\0" + "GL_STENCIL_BACK_REF\0" + "GL_STENCIL_BACK_VALUE_MASK\0" + "GL_STENCIL_BACK_WRITEMASK\0" "GL_STENCIL_BITS\0" "GL_STENCIL_BUFFER_BIT\0" "GL_STENCIL_CLEAR_VALUE\0" @@ -1601,8 +1673,10 @@ static const char enum_string_table[] = "GL_UNSIGNED_SHORT_8_8_MESA\0" "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0" "GL_UNSIGNED_SHORT_8_8_REV_MESA\0" + "GL_UPPER_LEFT\0" "GL_V2F\0" "GL_V3F\0" + "GL_VALIDATE_STATUS\0" "GL_VENDOR\0" "GL_VERSION\0" "GL_VERTEX_ARRAY\0" @@ -1631,20 +1705,29 @@ static const char enum_string_table[] = "GL_VERTEX_ATTRIB_ARRAY9_NV\0" "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0" "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0" + "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0" "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0" + "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0" "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0" + "GL_VERTEX_ATTRIB_ARRAY_POINTER\0" "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0" + "GL_VERTEX_ATTRIB_ARRAY_SIZE\0" "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0" + "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0" "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0" + "GL_VERTEX_ATTRIB_ARRAY_TYPE\0" "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0" "GL_VERTEX_BLEND_ARB\0" "GL_VERTEX_PROGRAM_ARB\0" "GL_VERTEX_PROGRAM_BINDING_NV\0" "GL_VERTEX_PROGRAM_NV\0" + "GL_VERTEX_PROGRAM_POINT_SIZE\0" "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0" "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0" + "GL_VERTEX_PROGRAM_TWO_SIDE\0" "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0" "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0" + "GL_VERTEX_SHADER\0" "GL_VERTEX_SHADER_ARB\0" "GL_VERTEX_STATE_PROGRAM_NV\0" "GL_VIEWPORT\0" @@ -1668,7 +1751,7 @@ static const char enum_string_table[] = "GL_ZOOM_Y\0" ; -static const enum_elt all_enums[1631] = +static const enum_elt all_enums[1714] = { { 0, 0x00000600 }, /* GL_2D */ { 6, 0x00001407 }, /* GL_2_BYTES */ @@ -1685,2866 +1768,2967 @@ static const enum_elt all_enums[1631] = { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */ - { 224, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */ - { 251, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */ - { 269, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */ - { 291, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - { 318, 0x00000104 }, /* GL_ADD */ - { 325, 0x00008574 }, /* GL_ADD_SIGNED */ - { 339, 0x00008574 }, /* GL_ADD_SIGNED_ARB */ - { 357, 0x00008574 }, /* GL_ADD_SIGNED_EXT */ - { 375, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */ - { 403, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */ - { 431, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */ - { 450, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */ - { 476, 0x00001906 }, /* GL_ALPHA */ - { 485, 0x0000803D }, /* GL_ALPHA12 */ - { 496, 0x0000803D }, /* GL_ALPHA12_EXT */ - { 511, 0x0000803E }, /* GL_ALPHA16 */ - { 522, 0x0000803E }, /* GL_ALPHA16_EXT */ - { 537, 0x0000803B }, /* GL_ALPHA4 */ - { 547, 0x0000803B }, /* GL_ALPHA4_EXT */ - { 561, 0x0000803C }, /* GL_ALPHA8 */ - { 571, 0x0000803C }, /* GL_ALPHA8_EXT */ - { 585, 0x00000D1D }, /* GL_ALPHA_BIAS */ - { 599, 0x00000D55 }, /* GL_ALPHA_BITS */ - { 613, 0x00000D1C }, /* GL_ALPHA_SCALE */ - { 628, 0x00000BC0 }, /* GL_ALPHA_TEST */ - { 642, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */ - { 661, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */ - { 679, 0x00000207 }, /* GL_ALWAYS */ - { 689, 0x00001200 }, /* GL_AMBIENT */ - { 700, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */ - { 723, 0x00001501 }, /* GL_AND */ - { 730, 0x00001504 }, /* GL_AND_INVERTED */ - { 746, 0x00001502 }, /* GL_AND_REVERSE */ - { 761, 0x00008892 }, /* GL_ARRAY_BUFFER */ - { 777, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */ - { 797, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */ - { 821, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */ - { 849, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */ - { 876, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */ - { 900, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */ - { 926, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */ - { 950, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */ - { 972, 0x00000D80 }, /* GL_AUTO_NORMAL */ - { 987, 0x00000409 }, /* GL_AUX0 */ - { 995, 0x0000040A }, /* GL_AUX1 */ - { 1003, 0x0000040B }, /* GL_AUX2 */ - { 1011, 0x0000040C }, /* GL_AUX3 */ - { 1019, 0x00000C00 }, /* GL_AUX_BUFFERS */ - { 1034, 0x00000405 }, /* GL_BACK */ - { 1042, 0x00000402 }, /* GL_BACK_LEFT */ - { 1055, 0x00000403 }, /* GL_BACK_RIGHT */ - { 1069, 0x000080E0 }, /* GL_BGR */ - { 1076, 0x000080E1 }, /* GL_BGRA */ - { 1084, 0x00001A00 }, /* GL_BITMAP */ - { 1094, 0x00000704 }, /* GL_BITMAP_TOKEN */ - { 1110, 0x00000BE2 }, /* GL_BLEND */ - { 1119, 0x00008005 }, /* GL_BLEND_COLOR */ - { 1134, 0x00008005 }, /* GL_BLEND_COLOR_EXT */ - { 1153, 0x00000BE0 }, /* GL_BLEND_DST */ - { 1166, 0x000080CA }, /* GL_BLEND_DST_ALPHA */ - { 1185, 0x000080C8 }, /* GL_BLEND_DST_RGB */ - { 1202, 0x00008009 }, /* GL_BLEND_EQUATION */ - { 1220, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */ - { 1248, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */ - { 1270, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */ - { 1296, 0x00000BE1 }, /* GL_BLEND_SRC */ - { 1309, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */ - { 1328, 0x000080C9 }, /* GL_BLEND_SRC_RGB */ - { 1345, 0x00001905 }, /* GL_BLUE */ - { 1353, 0x00000D1B }, /* GL_BLUE_BIAS */ - { 1366, 0x00000D54 }, /* GL_BLUE_BITS */ - { 1379, 0x00000D1A }, /* GL_BLUE_SCALE */ - { 1393, 0x00008B56 }, /* GL_BOOL_ARB */ - { 1405, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */ - { 1422, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */ - { 1439, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */ - { 1456, 0x000088BB }, /* GL_BUFFER_ACCESS */ - { 1473, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */ - { 1494, 0x000088BC }, /* GL_BUFFER_MAPPED */ - { 1511, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */ - { 1532, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */ - { 1554, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */ - { 1580, 0x00008764 }, /* GL_BUFFER_SIZE */ - { 1595, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */ - { 1614, 0x00008765 }, /* GL_BUFFER_USAGE */ - { 1630, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */ - { 1650, 0x00001400 }, /* GL_BYTE */ - { 1658, 0x00002A24 }, /* GL_C3F_V3F */ - { 1669, 0x00002A26 }, /* GL_C4F_N3F_V3F */ - { 1684, 0x00002A22 }, /* GL_C4UB_V2F */ - { 1696, 0x00002A23 }, /* GL_C4UB_V3F */ - { 1708, 0x00000901 }, /* GL_CCW */ - { 1715, 0x00002900 }, /* GL_CLAMP */ - { 1724, 0x0000812D }, /* GL_CLAMP_TO_BORDER */ - { 1743, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */ - { 1766, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */ - { 1790, 0x0000812F }, /* GL_CLAMP_TO_EDGE */ - { 1807, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */ - { 1829, 0x00001500 }, /* GL_CLEAR */ - { 1838, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */ - { 1863, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */ - { 1892, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */ - { 1918, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ - { 1947, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */ - { 1973, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */ - { 2000, 0x00003000 }, /* GL_CLIP_PLANE0 */ - { 2015, 0x00003001 }, /* GL_CLIP_PLANE1 */ - { 2030, 0x00003002 }, /* GL_CLIP_PLANE2 */ - { 2045, 0x00003003 }, /* GL_CLIP_PLANE3 */ - { 2060, 0x00003004 }, /* GL_CLIP_PLANE4 */ - { 2075, 0x00003005 }, /* GL_CLIP_PLANE5 */ - { 2090, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - { 2123, 0x00000A00 }, /* GL_COEFF */ - { 2132, 0x00001800 }, /* GL_COLOR */ - { 2141, 0x00008076 }, /* GL_COLOR_ARRAY */ - { 2156, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - { 2186, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 2220, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */ - { 2243, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */ - { 2263, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */ - { 2285, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */ - { 2305, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */ - { 2330, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */ - { 2356, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */ - { 2382, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */ - { 2408, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */ - { 2434, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */ - { 2460, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */ - { 2486, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */ - { 2511, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */ - { 2536, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */ - { 2561, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */ - { 2586, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */ - { 2611, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */ - { 2636, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */ - { 2661, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */ - { 2686, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */ - { 2711, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */ - { 2731, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */ - { 2752, 0x00001900 }, /* GL_COLOR_INDEX */ - { 2767, 0x00001603 }, /* GL_COLOR_INDEXES */ - { 2784, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */ - { 2802, 0x00000B57 }, /* GL_COLOR_MATERIAL */ - { 2820, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */ - { 2843, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */ - { 2871, 0x000080B1 }, /* GL_COLOR_MATRIX */ - { 2887, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */ - { 2907, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */ - { 2935, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 2967, 0x00008458 }, /* GL_COLOR_SUM */ - { 2980, 0x00008458 }, /* GL_COLOR_SUM_ARB */ - { 2997, 0x000080D0 }, /* GL_COLOR_TABLE */ - { 3012, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */ - { 3038, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */ - { 3068, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */ - { 3098, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */ - { 3118, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */ - { 3142, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */ - { 3167, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */ - { 3196, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */ - { 3225, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */ - { 3247, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */ - { 3273, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */ - { 3299, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */ - { 3325, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */ - { 3355, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */ - { 3385, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */ - { 3415, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */ - { 3449, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */ - { 3483, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ - { 3513, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */ - { 3547, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */ - { 3581, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */ - { 3605, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */ - { 3633, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */ - { 3661, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */ - { 3682, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */ - { 3707, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */ - { 3728, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */ - { 3753, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */ - { 3778, 0x00000C23 }, /* GL_COLOR_WRITEMASK */ - { 3797, 0x00008570 }, /* GL_COMBINE */ - { 3808, 0x00008503 }, /* GL_COMBINE4 */ - { 3820, 0x00008572 }, /* GL_COMBINE_ALPHA */ - { 3837, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */ - { 3858, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */ - { 3879, 0x00008570 }, /* GL_COMBINE_ARB */ - { 3894, 0x00008570 }, /* GL_COMBINE_EXT */ - { 3909, 0x00008571 }, /* GL_COMBINE_RGB */ - { 3924, 0x00008571 }, /* GL_COMBINE_RGB_ARB */ - { 3943, 0x00008571 }, /* GL_COMBINE_RGB_EXT */ - { 3962, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */ - { 3986, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */ - { 4014, 0x00001300 }, /* GL_COMPILE */ - { 4025, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */ - { 4048, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */ - { 4068, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */ - { 4092, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */ - { 4116, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */ - { 4144, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */ - { 4168, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */ - { 4198, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */ - { 4232, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */ - { 4260, 0x000084ED }, /* GL_COMPRESSED_RGB */ - { 4278, 0x000084EE }, /* GL_COMPRESSED_RGBA */ - { 4297, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */ - { 4320, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - { 4349, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ - { 4382, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ - { 4415, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - { 4448, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */ - { 4470, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */ - { 4498, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ - { 4530, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */ - { 4560, 0x00008576 }, /* GL_CONSTANT */ - { 4572, 0x00008003 }, /* GL_CONSTANT_ALPHA */ - { 4590, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */ - { 4612, 0x00008576 }, /* GL_CONSTANT_ARB */ - { 4628, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */ - { 4652, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */ - { 4674, 0x00008001 }, /* GL_CONSTANT_COLOR */ - { 4692, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */ - { 4714, 0x00008576 }, /* GL_CONSTANT_EXT */ - { 4730, 0x00008010 }, /* GL_CONVOLUTION_1D */ - { 4748, 0x00008011 }, /* GL_CONVOLUTION_2D */ - { 4766, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */ - { 4794, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */ - { 4825, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */ - { 4852, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */ - { 4883, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */ - { 4910, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */ - { 4941, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */ - { 4969, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */ - { 5001, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */ - { 5023, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */ - { 5049, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */ - { 5071, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */ - { 5097, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */ - { 5118, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */ - { 5143, 0x00008862 }, /* GL_COORD_REPLACE_ARB */ - { 5164, 0x00008862 }, /* GL_COORD_REPLACE_NV */ - { 5184, 0x00001503 }, /* GL_COPY */ - { 5192, 0x0000150C }, /* GL_COPY_INVERTED */ - { 5209, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */ - { 5229, 0x00000B44 }, /* GL_CULL_FACE */ - { 5242, 0x00000B45 }, /* GL_CULL_FACE_MODE */ - { 5260, 0x000081AA }, /* GL_CULL_VERTEX_EXT */ - { 5279, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - { 5311, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ - { 5346, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */ - { 5367, 0x00000001 }, /* GL_CURRENT_BIT */ - { 5382, 0x00000B00 }, /* GL_CURRENT_COLOR */ - { 5399, 0x00008453 }, /* GL_CURRENT_FOG_COORD */ - { 5420, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */ - { 5446, 0x00000B01 }, /* GL_CURRENT_INDEX */ - { 5463, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */ - { 5485, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */ - { 5513, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */ - { 5534, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ - { 5568, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */ - { 5601, 0x00000B02 }, /* GL_CURRENT_NORMAL */ - { 5619, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - { 5649, 0x00008865 }, /* GL_CURRENT_QUERY */ - { 5666, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */ - { 5687, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */ - { 5711, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */ - { 5738, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */ - { 5762, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */ - { 5789, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */ - { 5822, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ - { 5855, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */ - { 5882, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */ - { 5908, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */ - { 5937, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */ - { 5959, 0x00000900 }, /* GL_CW */ - { 5965, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */ - { 5986, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */ - { 6007, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */ - { 6027, 0x00002101 }, /* GL_DECAL */ - { 6036, 0x00001E03 }, /* GL_DECR */ - { 6044, 0x00008508 }, /* GL_DECR_WRAP */ - { 6057, 0x00008508 }, /* GL_DECR_WRAP_EXT */ - { 6074, 0x00001801 }, /* GL_DEPTH */ - { 6083, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */ - { 6107, 0x00000D1F }, /* GL_DEPTH_BIAS */ - { 6121, 0x00000D56 }, /* GL_DEPTH_BITS */ - { 6135, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */ - { 6155, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */ - { 6180, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */ - { 6200, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */ - { 6218, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */ - { 6239, 0x00001902 }, /* GL_DEPTH_COMPONENT */ - { 6258, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */ - { 6279, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */ - { 6304, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */ - { 6330, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */ - { 6351, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */ - { 6376, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */ - { 6402, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */ - { 6423, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */ - { 6448, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */ - { 6474, 0x00000B74 }, /* GL_DEPTH_FUNC */ - { 6488, 0x00000B70 }, /* GL_DEPTH_RANGE */ - { 6503, 0x00000D1E }, /* GL_DEPTH_SCALE */ - { 6518, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */ - { 6538, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - { 6566, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ - { 6594, 0x00000B71 }, /* GL_DEPTH_TEST */ - { 6608, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */ - { 6630, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */ - { 6656, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */ - { 6675, 0x00001201 }, /* GL_DIFFUSE */ - { 6686, 0x00000BD0 }, /* GL_DITHER */ - { 6696, 0x00000A02 }, /* GL_DOMAIN */ - { 6706, 0x00001100 }, /* GL_DONT_CARE */ - { 6719, 0x000086AE }, /* GL_DOT3_RGB */ - { 6731, 0x000086AF }, /* GL_DOT3_RGBA */ - { 6744, 0x000086AF }, /* GL_DOT3_RGBA_ARB */ - { 6761, 0x00008741 }, /* GL_DOT3_RGBA_EXT */ - { 6778, 0x000086AE }, /* GL_DOT3_RGB_ARB */ - { 6794, 0x00008740 }, /* GL_DOT3_RGB_EXT */ - { 6810, 0x0000140A }, /* GL_DOUBLE */ - { 6820, 0x00000C32 }, /* GL_DOUBLEBUFFER */ - { 6836, 0x00000C01 }, /* GL_DRAW_BUFFER */ - { 6851, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */ - { 6871, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */ - { 6891, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */ - { 6912, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */ - { 6933, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */ - { 6954, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */ - { 6975, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */ - { 6996, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */ - { 7017, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */ - { 7038, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */ - { 7059, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */ - { 7080, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */ - { 7101, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */ - { 7122, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */ - { 7143, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */ - { 7163, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */ - { 7183, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */ - { 7203, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */ - { 7223, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */ - { 7243, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */ - { 7263, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */ - { 7283, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */ - { 7303, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */ - { 7323, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */ - { 7343, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */ - { 7363, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */ - { 7383, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */ - { 7403, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */ - { 7423, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */ - { 7443, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */ - { 7463, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */ - { 7483, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */ - { 7503, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ - { 7535, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */ - { 7559, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */ - { 7579, 0x00000304 }, /* GL_DST_ALPHA */ - { 7592, 0x00000306 }, /* GL_DST_COLOR */ - { 7605, 0x000088EA }, /* GL_DYNAMIC_COPY */ - { 7621, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */ - { 7641, 0x000088E8 }, /* GL_DYNAMIC_DRAW */ - { 7657, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */ - { 7677, 0x000088E9 }, /* GL_DYNAMIC_READ */ - { 7693, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */ - { 7713, 0x00000B43 }, /* GL_EDGE_FLAG */ - { 7726, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */ - { 7745, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - { 7779, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */ - { 7817, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */ - { 7844, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - { 7870, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */ - { 7894, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */ - { 7922, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - { 7954, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */ - { 7990, 0x00001600 }, /* GL_EMISSION */ - { 8002, 0x00002000 }, /* GL_ENABLE_BIT */ - { 8016, 0x00000202 }, /* GL_EQUAL */ - { 8025, 0x00001509 }, /* GL_EQUIV */ - { 8034, 0x00010000 }, /* GL_EVAL_BIT */ - { 8046, 0x00000800 }, /* GL_EXP */ - { 8053, 0x00000801 }, /* GL_EXP2 */ - { 8061, 0x00001F03 }, /* GL_EXTENSIONS */ - { 8075, 0x00002400 }, /* GL_EYE_LINEAR */ - { 8089, 0x00002502 }, /* GL_EYE_PLANE */ - { 8102, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */ - { 8127, 0x0000855B }, /* GL_EYE_RADIAL_NV */ - { 8144, 0x00000000 }, /* GL_FALSE */ - { 8153, 0x00001101 }, /* GL_FASTEST */ - { 8164, 0x00001C01 }, /* GL_FEEDBACK */ - { 8176, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */ - { 8203, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */ - { 8227, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */ - { 8251, 0x00001B02 }, /* GL_FILL */ - { 8259, 0x00001D00 }, /* GL_FLAT */ - { 8267, 0x00001406 }, /* GL_FLOAT */ - { 8276, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */ - { 8294, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */ - { 8312, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */ - { 8330, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */ - { 8348, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */ - { 8366, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */ - { 8384, 0x00000B60 }, /* GL_FOG */ - { 8391, 0x00000080 }, /* GL_FOG_BIT */ - { 8402, 0x00000B66 }, /* GL_FOG_COLOR */ - { 8415, 0x00008451 }, /* GL_FOG_COORD */ - { 8428, 0x00008451 }, /* GL_FOG_COORDINATE */ - { 8446, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */ - { 8470, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - { 8509, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */ - { 8552, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */ - { 8584, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ - { 8615, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */ - { 8644, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */ - { 8669, 0x00008457 }, /* GL_FOG_COORD_ARRAY */ - { 8688, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */ - { 8722, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */ - { 8749, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */ - { 8775, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */ - { 8799, 0x00008450 }, /* GL_FOG_COORD_SRC */ - { 8816, 0x00000B62 }, /* GL_FOG_DENSITY */ - { 8831, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */ - { 8855, 0x00000B64 }, /* GL_FOG_END */ - { 8866, 0x00000C54 }, /* GL_FOG_HINT */ - { 8878, 0x00000B61 }, /* GL_FOG_INDEX */ - { 8891, 0x00000B65 }, /* GL_FOG_MODE */ - { 8903, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */ - { 8922, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */ - { 8947, 0x00000B63 }, /* GL_FOG_START */ - { 8960, 0x00008452 }, /* GL_FRAGMENT_DEPTH */ - { 8978, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */ - { 9002, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */ - { 9025, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ - { 9067, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ - { 9109, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ - { 9158, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ - { 9210, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ - { 9254, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */ - { 9281, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */ - { 9309, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */ - { 9328, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ - { 9369, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ - { 9410, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ - { 9452, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ - { 9503, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ - { 9541, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ - { 9590, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ - { 9632, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - { 9664, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ - { 9695, 0x00000404 }, /* GL_FRONT */ - { 9704, 0x00000408 }, /* GL_FRONT_AND_BACK */ - { 9722, 0x00000B46 }, /* GL_FRONT_FACE */ - { 9736, 0x00000400 }, /* GL_FRONT_LEFT */ - { 9750, 0x00000401 }, /* GL_FRONT_RIGHT */ - { 9765, 0x00008006 }, /* GL_FUNC_ADD */ - { 9777, 0x00008006 }, /* GL_FUNC_ADD_EXT */ - { 9793, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */ - { 9818, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */ - { 9847, 0x0000800A }, /* GL_FUNC_SUBTRACT */ - { 9864, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */ - { 9885, 0x00008191 }, /* GL_GENERATE_MIPMAP */ - { 9904, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */ - { 9928, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */ - { 9957, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */ - { 9981, 0x00000206 }, /* GL_GEQUAL */ - { 9991, 0x00000204 }, /* GL_GREATER */ - { 10002, 0x00001904 }, /* GL_GREEN */ - { 10011, 0x00000D19 }, /* GL_GREEN_BIAS */ - { 10025, 0x00000D53 }, /* GL_GREEN_BITS */ - { 10039, 0x00000D18 }, /* GL_GREEN_SCALE */ - { 10054, 0x00008000 }, /* GL_HINT_BIT */ - { 10066, 0x00008024 }, /* GL_HISTOGRAM */ - { 10079, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ - { 10103, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ - { 10131, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ - { 10154, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ - { 10181, 0x00008024 }, /* GL_HISTOGRAM_EXT */ - { 10198, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ - { 10218, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ - { 10242, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ - { 10266, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ - { 10294, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - { 10322, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ - { 10354, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ - { 10376, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ - { 10402, 0x0000802D }, /* GL_HISTOGRAM_SINK */ - { 10420, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ - { 10442, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ - { 10461, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ - { 10484, 0x0000862A }, /* GL_IDENTITY_NV */ - { 10499, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ - { 10519, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - { 10559, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - { 10597, 0x00001E02 }, /* GL_INCR */ - { 10605, 0x00008507 }, /* GL_INCR_WRAP */ - { 10618, 0x00008507 }, /* GL_INCR_WRAP_EXT */ - { 10635, 0x00008077 }, /* GL_INDEX_ARRAY */ - { 10650, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - { 10680, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ - { 10714, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ - { 10737, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ - { 10759, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ - { 10779, 0x00000D51 }, /* GL_INDEX_BITS */ - { 10793, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ - { 10814, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ - { 10832, 0x00000C30 }, /* GL_INDEX_MODE */ - { 10846, 0x00000D13 }, /* GL_INDEX_OFFSET */ - { 10862, 0x00000D12 }, /* GL_INDEX_SHIFT */ - { 10877, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ - { 10896, 0x00001404 }, /* GL_INT */ - { 10903, 0x00008049 }, /* GL_INTENSITY */ - { 10916, 0x0000804C }, /* GL_INTENSITY12 */ - { 10931, 0x0000804C }, /* GL_INTENSITY12_EXT */ - { 10950, 0x0000804D }, /* GL_INTENSITY16 */ - { 10965, 0x0000804D }, /* GL_INTENSITY16_EXT */ - { 10984, 0x0000804A }, /* GL_INTENSITY4 */ - { 10998, 0x0000804A }, /* GL_INTENSITY4_EXT */ - { 11016, 0x0000804B }, /* GL_INTENSITY8 */ - { 11030, 0x0000804B }, /* GL_INTENSITY8_EXT */ - { 11048, 0x00008049 }, /* GL_INTENSITY_EXT */ - { 11065, 0x00008575 }, /* GL_INTERPOLATE */ - { 11080, 0x00008575 }, /* GL_INTERPOLATE_ARB */ - { 11099, 0x00008575 }, /* GL_INTERPOLATE_EXT */ - { 11118, 0x00008B53 }, /* GL_INT_VEC2_ARB */ - { 11134, 0x00008B54 }, /* GL_INT_VEC3_ARB */ - { 11150, 0x00008B55 }, /* GL_INT_VEC4_ARB */ - { 11166, 0x00000500 }, /* GL_INVALID_ENUM */ - { 11182, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ - { 11219, 0x00000502 }, /* GL_INVALID_OPERATION */ - { 11240, 0x00000501 }, /* GL_INVALID_VALUE */ - { 11257, 0x0000862B }, /* GL_INVERSE_NV */ - { 11271, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ - { 11295, 0x0000150A }, /* GL_INVERT */ - { 11305, 0x00001E00 }, /* GL_KEEP */ - { 11313, 0x00000406 }, /* GL_LEFT */ - { 11321, 0x00000203 }, /* GL_LEQUAL */ - { 11331, 0x00000201 }, /* GL_LESS */ - { 11339, 0x00004000 }, /* GL_LIGHT0 */ - { 11349, 0x00004001 }, /* GL_LIGHT1 */ - { 11359, 0x00004002 }, /* GL_LIGHT2 */ - { 11369, 0x00004003 }, /* GL_LIGHT3 */ - { 11379, 0x00004004 }, /* GL_LIGHT4 */ - { 11389, 0x00004005 }, /* GL_LIGHT5 */ - { 11399, 0x00004006 }, /* GL_LIGHT6 */ - { 11409, 0x00004007 }, /* GL_LIGHT7 */ - { 11419, 0x00000B50 }, /* GL_LIGHTING */ - { 11431, 0x00000040 }, /* GL_LIGHTING_BIT */ - { 11447, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ - { 11470, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - { 11499, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ - { 11532, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - { 11560, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ - { 11584, 0x00001B01 }, /* GL_LINE */ - { 11592, 0x00002601 }, /* GL_LINEAR */ - { 11602, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ - { 11624, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - { 11654, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - { 11685, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ - { 11709, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ - { 11734, 0x00000001 }, /* GL_LINES */ - { 11743, 0x00000004 }, /* GL_LINE_BIT */ - { 11755, 0x00000002 }, /* GL_LINE_LOOP */ - { 11768, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ - { 11788, 0x00000B20 }, /* GL_LINE_SMOOTH */ - { 11803, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ - { 11823, 0x00000B24 }, /* GL_LINE_STIPPLE */ - { 11839, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ - { 11863, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ - { 11886, 0x00000003 }, /* GL_LINE_STRIP */ - { 11900, 0x00000702 }, /* GL_LINE_TOKEN */ - { 11914, 0x00000B21 }, /* GL_LINE_WIDTH */ - { 11928, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ - { 11954, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ - { 11974, 0x00000B32 }, /* GL_LIST_BASE */ - { 11987, 0x00020000 }, /* GL_LIST_BIT */ - { 11999, 0x00000B33 }, /* GL_LIST_INDEX */ - { 12013, 0x00000B30 }, /* GL_LIST_MODE */ - { 12026, 0x00000101 }, /* GL_LOAD */ - { 12034, 0x00000BF1 }, /* GL_LOGIC_OP */ - { 12046, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ - { 12063, 0x00001909 }, /* GL_LUMINANCE */ - { 12076, 0x00008041 }, /* GL_LUMINANCE12 */ - { 12091, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ - { 12114, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ - { 12141, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ - { 12163, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ - { 12189, 0x00008041 }, /* GL_LUMINANCE12_EXT */ - { 12208, 0x00008042 }, /* GL_LUMINANCE16 */ - { 12223, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ - { 12246, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ - { 12273, 0x00008042 }, /* GL_LUMINANCE16_EXT */ - { 12292, 0x0000803F }, /* GL_LUMINANCE4 */ - { 12306, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ - { 12327, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ - { 12352, 0x0000803F }, /* GL_LUMINANCE4_EXT */ - { 12370, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ - { 12391, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ - { 12416, 0x00008040 }, /* GL_LUMINANCE8 */ - { 12430, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ - { 12451, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ - { 12476, 0x00008040 }, /* GL_LUMINANCE8_EXT */ - { 12494, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ - { 12513, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ - { 12529, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ - { 12549, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ - { 12571, 0x00000D91 }, /* GL_MAP1_INDEX */ - { 12585, 0x00000D92 }, /* GL_MAP1_NORMAL */ - { 12600, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ - { 12624, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ - { 12648, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ - { 12672, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ - { 12696, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ - { 12713, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ - { 12730, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - { 12758, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - { 12787, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - { 12816, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - { 12845, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - { 12874, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - { 12903, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - { 12932, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - { 12960, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - { 12988, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - { 13016, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - { 13044, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - { 13072, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - { 13100, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - { 13128, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - { 13156, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - { 13184, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ - { 13200, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ - { 13220, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ - { 13242, 0x00000DB1 }, /* GL_MAP2_INDEX */ - { 13256, 0x00000DB2 }, /* GL_MAP2_NORMAL */ - { 13271, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ - { 13295, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ - { 13319, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ - { 13343, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ - { 13367, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ - { 13384, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ - { 13401, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - { 13429, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - { 13458, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - { 13487, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - { 13516, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - { 13545, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - { 13574, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - { 13603, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - { 13631, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - { 13659, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - { 13687, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - { 13715, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - { 13743, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - { 13771, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ - { 13799, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - { 13827, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - { 13855, 0x00000D10 }, /* GL_MAP_COLOR */ - { 13868, 0x00000D11 }, /* GL_MAP_STENCIL */ - { 13883, 0x000088C0 }, /* GL_MATRIX0_ARB */ - { 13898, 0x00008630 }, /* GL_MATRIX0_NV */ - { 13912, 0x000088CA }, /* GL_MATRIX10_ARB */ - { 13928, 0x000088CB }, /* GL_MATRIX11_ARB */ - { 13944, 0x000088CC }, /* GL_MATRIX12_ARB */ - { 13960, 0x000088CD }, /* GL_MATRIX13_ARB */ - { 13976, 0x000088CE }, /* GL_MATRIX14_ARB */ - { 13992, 0x000088CF }, /* GL_MATRIX15_ARB */ - { 14008, 0x000088D0 }, /* GL_MATRIX16_ARB */ - { 14024, 0x000088D1 }, /* GL_MATRIX17_ARB */ - { 14040, 0x000088D2 }, /* GL_MATRIX18_ARB */ - { 14056, 0x000088D3 }, /* GL_MATRIX19_ARB */ - { 14072, 0x000088C1 }, /* GL_MATRIX1_ARB */ - { 14087, 0x00008631 }, /* GL_MATRIX1_NV */ - { 14101, 0x000088D4 }, /* GL_MATRIX20_ARB */ - { 14117, 0x000088D5 }, /* GL_MATRIX21_ARB */ - { 14133, 0x000088D6 }, /* GL_MATRIX22_ARB */ - { 14149, 0x000088D7 }, /* GL_MATRIX23_ARB */ - { 14165, 0x000088D8 }, /* GL_MATRIX24_ARB */ - { 14181, 0x000088D9 }, /* GL_MATRIX25_ARB */ - { 14197, 0x000088DA }, /* GL_MATRIX26_ARB */ - { 14213, 0x000088DB }, /* GL_MATRIX27_ARB */ - { 14229, 0x000088DC }, /* GL_MATRIX28_ARB */ - { 14245, 0x000088DD }, /* GL_MATRIX29_ARB */ - { 14261, 0x000088C2 }, /* GL_MATRIX2_ARB */ - { 14276, 0x00008632 }, /* GL_MATRIX2_NV */ - { 14290, 0x000088DE }, /* GL_MATRIX30_ARB */ - { 14306, 0x000088DF }, /* GL_MATRIX31_ARB */ - { 14322, 0x000088C3 }, /* GL_MATRIX3_ARB */ - { 14337, 0x00008633 }, /* GL_MATRIX3_NV */ - { 14351, 0x000088C4 }, /* GL_MATRIX4_ARB */ - { 14366, 0x00008634 }, /* GL_MATRIX4_NV */ - { 14380, 0x000088C5 }, /* GL_MATRIX5_ARB */ - { 14395, 0x00008635 }, /* GL_MATRIX5_NV */ - { 14409, 0x000088C6 }, /* GL_MATRIX6_ARB */ - { 14424, 0x00008636 }, /* GL_MATRIX6_NV */ - { 14438, 0x000088C7 }, /* GL_MATRIX7_ARB */ - { 14453, 0x00008637 }, /* GL_MATRIX7_NV */ - { 14467, 0x000088C8 }, /* GL_MATRIX8_ARB */ - { 14482, 0x000088C9 }, /* GL_MATRIX9_ARB */ - { 14497, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ - { 14523, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - { 14557, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - { 14588, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - { 14621, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - { 14652, 0x00000BA0 }, /* GL_MATRIX_MODE */ - { 14667, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ - { 14689, 0x00008008 }, /* GL_MAX */ - { 14696, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ - { 14719, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ - { 14745, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - { 14778, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - { 14804, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 14838, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ - { 14857, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ - { 14886, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - { 14918, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 14954, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ - { 14994, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ - { 15020, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ - { 15050, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ - { 15075, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ - { 15104, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - { 15133, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ - { 15166, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ - { 15190, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ - { 15214, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ - { 15238, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ - { 15263, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ - { 15281, 0x00008008 }, /* GL_MAX_EXT */ - { 15292, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ - { 15331, 0x00000D31 }, /* GL_MAX_LIGHTS */ - { 15345, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ - { 15365, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - { 15403, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - { 15432, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ - { 15456, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ - { 15484, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ - { 15507, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 15544, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 15580, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - { 15607, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - { 15636, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - { 15670, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ - { 15706, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - { 15733, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - { 15765, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - { 15801, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - { 15830, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - { 15859, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ - { 15887, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - { 15925, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 15969, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 16012, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 16046, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 16085, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 16122, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 16160, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 16203, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 16246, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - { 16276, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - { 16307, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 16343, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 16379, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ - { 16409, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ - { 16443, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ - { 16476, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ - { 16505, 0x00008504 }, /* GL_MAX_SHININESS_NV */ - { 16525, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ - { 16549, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ - { 16575, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ - { 16606, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ - { 16630, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - { 16664, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ - { 16684, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ - { 16711, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ - { 16732, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ - { 16757, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ - { 16782, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ - { 16817, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ - { 16843, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ - { 16869, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ - { 16907, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ - { 16944, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ - { 16968, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ - { 16989, 0x00008007 }, /* GL_MIN */ - { 16996, 0x0000802E }, /* GL_MINMAX */ - { 17006, 0x0000802E }, /* GL_MINMAX_EXT */ - { 17020, 0x0000802F }, /* GL_MINMAX_FORMAT */ - { 17037, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ - { 17058, 0x00008030 }, /* GL_MINMAX_SINK */ - { 17073, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ - { 17092, 0x00008007 }, /* GL_MIN_EXT */ - { 17103, 0x00008370 }, /* GL_MIRRORED_REPEAT */ - { 17122, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ - { 17145, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ - { 17168, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ - { 17188, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ - { 17208, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - { 17238, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ - { 17266, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - { 17294, 0x00001700 }, /* GL_MODELVIEW */ - { 17307, 0x00001700 }, /* GL_MODELVIEW0_ARB */ - { 17325, 0x0000872A }, /* GL_MODELVIEW10_ARB */ - { 17344, 0x0000872B }, /* GL_MODELVIEW11_ARB */ - { 17363, 0x0000872C }, /* GL_MODELVIEW12_ARB */ - { 17382, 0x0000872D }, /* GL_MODELVIEW13_ARB */ - { 17401, 0x0000872E }, /* GL_MODELVIEW14_ARB */ - { 17420, 0x0000872F }, /* GL_MODELVIEW15_ARB */ - { 17439, 0x00008730 }, /* GL_MODELVIEW16_ARB */ - { 17458, 0x00008731 }, /* GL_MODELVIEW17_ARB */ - { 17477, 0x00008732 }, /* GL_MODELVIEW18_ARB */ - { 17496, 0x00008733 }, /* GL_MODELVIEW19_ARB */ - { 17515, 0x0000850A }, /* GL_MODELVIEW1_ARB */ - { 17533, 0x00008734 }, /* GL_MODELVIEW20_ARB */ - { 17552, 0x00008735 }, /* GL_MODELVIEW21_ARB */ - { 17571, 0x00008736 }, /* GL_MODELVIEW22_ARB */ - { 17590, 0x00008737 }, /* GL_MODELVIEW23_ARB */ - { 17609, 0x00008738 }, /* GL_MODELVIEW24_ARB */ - { 17628, 0x00008739 }, /* GL_MODELVIEW25_ARB */ - { 17647, 0x0000873A }, /* GL_MODELVIEW26_ARB */ - { 17666, 0x0000873B }, /* GL_MODELVIEW27_ARB */ - { 17685, 0x0000873C }, /* GL_MODELVIEW28_ARB */ - { 17704, 0x0000873D }, /* GL_MODELVIEW29_ARB */ - { 17723, 0x00008722 }, /* GL_MODELVIEW2_ARB */ - { 17741, 0x0000873E }, /* GL_MODELVIEW30_ARB */ - { 17760, 0x0000873F }, /* GL_MODELVIEW31_ARB */ - { 17779, 0x00008723 }, /* GL_MODELVIEW3_ARB */ - { 17797, 0x00008724 }, /* GL_MODELVIEW4_ARB */ - { 17815, 0x00008725 }, /* GL_MODELVIEW5_ARB */ - { 17833, 0x00008726 }, /* GL_MODELVIEW6_ARB */ - { 17851, 0x00008727 }, /* GL_MODELVIEW7_ARB */ - { 17869, 0x00008728 }, /* GL_MODELVIEW8_ARB */ - { 17887, 0x00008729 }, /* GL_MODELVIEW9_ARB */ - { 17905, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ - { 17925, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ - { 17952, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ - { 17977, 0x00002100 }, /* GL_MODULATE */ - { 17989, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ - { 18009, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ - { 18036, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ - { 18061, 0x00000103 }, /* GL_MULT */ - { 18069, 0x0000809D }, /* GL_MULTISAMPLE */ - { 18084, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ - { 18104, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ - { 18123, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ - { 18142, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ - { 18166, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ - { 18189, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - { 18219, 0x00002A25 }, /* GL_N3F_V3F */ - { 18230, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ - { 18250, 0x0000150E }, /* GL_NAND */ - { 18258, 0x00002600 }, /* GL_NEAREST */ - { 18269, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - { 18300, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - { 18332, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ - { 18357, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ - { 18383, 0x00000200 }, /* GL_NEVER */ - { 18392, 0x00001102 }, /* GL_NICEST */ - { 18402, 0x00000000 }, /* GL_NONE */ - { 18410, 0x00001505 }, /* GL_NOOP */ - { 18418, 0x00001508 }, /* GL_NOR */ - { 18425, 0x00000BA1 }, /* GL_NORMALIZE */ - { 18438, 0x00008075 }, /* GL_NORMAL_ARRAY */ - { 18454, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - { 18485, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ - { 18520, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ - { 18544, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ - { 18567, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ - { 18588, 0x00008511 }, /* GL_NORMAL_MAP */ - { 18602, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ - { 18620, 0x00008511 }, /* GL_NORMAL_MAP_NV */ - { 18637, 0x00000205 }, /* GL_NOTEQUAL */ - { 18649, 0x00000000 }, /* GL_NO_ERROR */ - { 18661, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - { 18695, 0x000086A2 }, /* GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB */ - { 18733, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ - { 18765, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ - { 18807, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ - { 18837, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ - { 18877, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ - { 18908, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ - { 18937, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ - { 18965, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ - { 18995, 0x00002401 }, /* GL_OBJECT_LINEAR */ - { 19012, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ - { 19038, 0x00002501 }, /* GL_OBJECT_PLANE */ - { 19054, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ - { 19089, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ - { 19111, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ - { 19130, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ - { 19160, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ - { 19181, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ - { 19209, 0x00000001 }, /* GL_ONE */ - { 19216, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ - { 19244, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ - { 19276, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ - { 19304, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ - { 19336, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ - { 19359, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ - { 19382, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ - { 19405, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ - { 19428, 0x00008598 }, /* GL_OPERAND0_ALPHA */ - { 19446, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ - { 19468, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ - { 19490, 0x00008590 }, /* GL_OPERAND0_RGB */ - { 19506, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ - { 19526, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ - { 19546, 0x00008599 }, /* GL_OPERAND1_ALPHA */ - { 19564, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ - { 19586, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ - { 19608, 0x00008591 }, /* GL_OPERAND1_RGB */ - { 19624, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ - { 19644, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ - { 19664, 0x0000859A }, /* GL_OPERAND2_ALPHA */ - { 19682, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ - { 19704, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ - { 19726, 0x00008592 }, /* GL_OPERAND2_RGB */ - { 19742, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ - { 19762, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ - { 19782, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ - { 19803, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ - { 19822, 0x00001507 }, /* GL_OR */ - { 19828, 0x00000A01 }, /* GL_ORDER */ - { 19837, 0x0000150D }, /* GL_OR_INVERTED */ - { 19852, 0x0000150B }, /* GL_OR_REVERSE */ - { 19866, 0x00000505 }, /* GL_OUT_OF_MEMORY */ - { 19883, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ - { 19901, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ - { 19922, 0x00008758 }, /* GL_PACK_INVERT_MESA */ - { 19942, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ - { 19960, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ - { 19979, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ - { 19999, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ - { 20019, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ - { 20037, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ - { 20056, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ - { 20081, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ - { 20105, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ - { 20126, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ - { 20148, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ - { 20170, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ - { 20195, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ - { 20219, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ - { 20240, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ - { 20262, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ - { 20284, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ - { 20306, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ - { 20337, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ - { 20357, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - { 20382, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ - { 20402, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - { 20427, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ - { 20447, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - { 20472, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ - { 20492, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - { 20517, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ - { 20537, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - { 20562, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ - { 20582, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - { 20607, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ - { 20627, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - { 20652, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ - { 20672, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - { 20697, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ - { 20717, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - { 20742, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ - { 20762, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - { 20787, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ - { 20805, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ - { 20838, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ - { 20863, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ - { 20898, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ - { 20925, 0x00001B00 }, /* GL_POINT */ - { 20934, 0x00000000 }, /* GL_POINTS */ - { 20944, 0x00000002 }, /* GL_POINT_BIT */ - { 20957, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ - { 20987, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ - { 21021, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ - { 21055, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ - { 21090, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ - { 21119, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ - { 21152, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ - { 21185, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ - { 21219, 0x00000B11 }, /* GL_POINT_SIZE */ - { 21233, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ - { 21259, 0x00008127 }, /* GL_POINT_SIZE_MAX */ - { 21277, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ - { 21299, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ - { 21321, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ - { 21344, 0x00008126 }, /* GL_POINT_SIZE_MIN */ - { 21362, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ - { 21384, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ - { 21406, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ - { 21429, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ - { 21449, 0x00000B10 }, /* GL_POINT_SMOOTH */ - { 21465, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ - { 21486, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ - { 21506, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ - { 21535, 0x00008861 }, /* GL_POINT_SPRITE_NV */ - { 21554, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ - { 21580, 0x00000701 }, /* GL_POINT_TOKEN */ - { 21595, 0x00000009 }, /* GL_POLYGON */ - { 21606, 0x00000008 }, /* GL_POLYGON_BIT */ - { 21621, 0x00000B40 }, /* GL_POLYGON_MODE */ - { 21637, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ - { 21660, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ - { 21685, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ - { 21708, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ - { 21731, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ - { 21755, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ - { 21779, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ - { 21797, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ - { 21820, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ - { 21839, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ - { 21862, 0x00000703 }, /* GL_POLYGON_TOKEN */ - { 21879, 0x00001203 }, /* GL_POSITION */ - { 21891, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - { 21923, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ - { 21959, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - { 21992, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ - { 22029, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - { 22060, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ - { 22095, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - { 22127, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ - { 22163, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - { 22196, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - { 22228, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ - { 22264, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - { 22297, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ - { 22334, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - { 22364, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ - { 22398, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - { 22429, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ - { 22464, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - { 22495, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ - { 22530, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - { 22562, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ - { 22598, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - { 22628, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ - { 22662, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - { 22693, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ - { 22728, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - { 22760, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - { 22791, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ - { 22826, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - { 22858, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ - { 22894, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ - { 22923, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ - { 22956, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ - { 22986, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ - { 23020, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - { 23059, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - { 23092, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - { 23132, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - { 23166, 0x00008578 }, /* GL_PREVIOUS */ - { 23178, 0x00008578 }, /* GL_PREVIOUS_ARB */ - { 23194, 0x00008578 }, /* GL_PREVIOUS_EXT */ - { 23210, 0x00008577 }, /* GL_PRIMARY_COLOR */ - { 23227, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ - { 23248, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ - { 23269, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 23302, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 23334, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ - { 23357, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ - { 23380, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ - { 23410, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ - { 23439, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ - { 23467, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ - { 23489, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - { 23517, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - { 23545, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ - { 23567, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ - { 23588, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 23628, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 23667, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 23697, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 23732, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 23765, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 23799, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 23838, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 23877, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ - { 23899, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ - { 23925, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ - { 23949, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ - { 23972, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ - { 23994, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ - { 24015, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ - { 24036, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ - { 24063, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 24095, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 24127, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - { 24162, 0x00001701 }, /* GL_PROJECTION */ - { 24176, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ - { 24197, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ - { 24223, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ - { 24244, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ - { 24263, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ - { 24286, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - { 24325, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - { 24363, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ - { 24383, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ - { 24407, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ - { 24427, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ - { 24451, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ - { 24471, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - { 24504, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ - { 24530, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ - { 24560, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - { 24591, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ - { 24621, 0x00002003 }, /* GL_Q */ - { 24626, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ - { 24651, 0x00000007 }, /* GL_QUADS */ - { 24660, 0x00008614 }, /* GL_QUAD_MESH_SUN */ - { 24677, 0x00000008 }, /* GL_QUAD_STRIP */ - { 24691, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ - { 24713, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ - { 24739, 0x00008866 }, /* GL_QUERY_RESULT */ - { 24755, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ - { 24775, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ - { 24801, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ - { 24831, 0x00002002 }, /* GL_R */ - { 24836, 0x00002A10 }, /* GL_R3_G3_B2 */ - { 24848, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - { 24881, 0x00000C02 }, /* GL_READ_BUFFER */ - { 24896, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ - { 24928, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ - { 24952, 0x000088B8 }, /* GL_READ_ONLY */ - { 24965, 0x000088B8 }, /* GL_READ_ONLY_ARB */ - { 24982, 0x000088BA }, /* GL_READ_WRITE */ - { 24996, 0x000088BA }, /* GL_READ_WRITE_ARB */ - { 25014, 0x00001903 }, /* GL_RED */ - { 25021, 0x00008016 }, /* GL_REDUCE */ - { 25031, 0x00008016 }, /* GL_REDUCE_EXT */ - { 25045, 0x00000D15 }, /* GL_RED_BIAS */ - { 25057, 0x00000D52 }, /* GL_RED_BITS */ - { 25069, 0x00000D14 }, /* GL_RED_SCALE */ - { 25082, 0x00008512 }, /* GL_REFLECTION_MAP */ - { 25100, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ - { 25122, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ - { 25143, 0x00001C00 }, /* GL_RENDER */ - { 25153, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ - { 25181, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ - { 25201, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ - { 25228, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ - { 25264, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ - { 25290, 0x00001F01 }, /* GL_RENDERER */ - { 25302, 0x00000C40 }, /* GL_RENDER_MODE */ - { 25317, 0x00002901 }, /* GL_REPEAT */ - { 25327, 0x00001E01 }, /* GL_REPLACE */ - { 25338, 0x00008062 }, /* GL_REPLACE_EXT */ - { 25353, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ - { 25376, 0x0000803A }, /* GL_RESCALE_NORMAL */ - { 25394, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ - { 25416, 0x00000102 }, /* GL_RETURN */ - { 25426, 0x00001907 }, /* GL_RGB */ - { 25433, 0x00008052 }, /* GL_RGB10 */ - { 25442, 0x00008059 }, /* GL_RGB10_A2 */ - { 25454, 0x00008059 }, /* GL_RGB10_A2_EXT */ - { 25470, 0x00008052 }, /* GL_RGB10_EXT */ - { 25483, 0x00008053 }, /* GL_RGB12 */ - { 25492, 0x00008053 }, /* GL_RGB12_EXT */ - { 25505, 0x00008054 }, /* GL_RGB16 */ - { 25514, 0x00008054 }, /* GL_RGB16_EXT */ - { 25527, 0x0000804E }, /* GL_RGB2_EXT */ - { 25539, 0x0000804F }, /* GL_RGB4 */ - { 25547, 0x0000804F }, /* GL_RGB4_EXT */ - { 25559, 0x000083A1 }, /* GL_RGB4_S3TC */ - { 25572, 0x00008050 }, /* GL_RGB5 */ - { 25580, 0x00008057 }, /* GL_RGB5_A1 */ - { 25591, 0x00008057 }, /* GL_RGB5_A1_EXT */ - { 25606, 0x00008050 }, /* GL_RGB5_EXT */ - { 25618, 0x00008051 }, /* GL_RGB8 */ - { 25626, 0x00008051 }, /* GL_RGB8_EXT */ - { 25638, 0x00001908 }, /* GL_RGBA */ - { 25646, 0x0000805A }, /* GL_RGBA12 */ - { 25656, 0x0000805A }, /* GL_RGBA12_EXT */ - { 25670, 0x0000805B }, /* GL_RGBA16 */ - { 25680, 0x0000805B }, /* GL_RGBA16_EXT */ - { 25694, 0x00008055 }, /* GL_RGBA2 */ - { 25703, 0x00008055 }, /* GL_RGBA2_EXT */ - { 25716, 0x00008056 }, /* GL_RGBA4 */ - { 25725, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ - { 25744, 0x00008056 }, /* GL_RGBA4_EXT */ - { 25757, 0x000083A3 }, /* GL_RGBA4_S3TC */ - { 25771, 0x00008058 }, /* GL_RGBA8 */ - { 25780, 0x00008058 }, /* GL_RGBA8_EXT */ - { 25793, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ - { 25811, 0x00000C31 }, /* GL_RGBA_MODE */ - { 25824, 0x000083A2 }, /* GL_RGBA_S3TC */ - { 25837, 0x000083A0 }, /* GL_RGB_S3TC */ - { 25849, 0x00008573 }, /* GL_RGB_SCALE */ - { 25862, 0x00008573 }, /* GL_RGB_SCALE_ARB */ - { 25879, 0x00008573 }, /* GL_RGB_SCALE_EXT */ - { 25896, 0x00000407 }, /* GL_RIGHT */ - { 25905, 0x00002000 }, /* GL_S */ - { 25910, 0x000080A9 }, /* GL_SAMPLES */ - { 25921, 0x000086B4 }, /* GL_SAMPLES_3DFX */ - { 25937, 0x000080A9 }, /* GL_SAMPLES_ARB */ - { 25952, 0x00008914 }, /* GL_SAMPLES_PASSED */ - { 25970, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ - { 25992, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - { 26020, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ - { 26052, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ - { 26075, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ - { 26102, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ - { 26120, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ - { 26143, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ - { 26165, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ - { 26184, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ - { 26207, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ - { 26233, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ - { 26263, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ - { 26288, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ - { 26317, 0x00080000 }, /* GL_SCISSOR_BIT */ - { 26332, 0x00000C10 }, /* GL_SCISSOR_BOX */ - { 26347, 0x00000C11 }, /* GL_SCISSOR_TEST */ - { 26363, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ - { 26388, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - { 26428, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 26472, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - { 26505, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - { 26535, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - { 26567, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - { 26597, 0x00001C02 }, /* GL_SELECT */ - { 26607, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ - { 26635, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ - { 26660, 0x00008012 }, /* GL_SEPARABLE_2D */ - { 26676, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ - { 26703, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ - { 26734, 0x0000150F }, /* GL_SET */ - { 26741, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ - { 26762, 0x00000B54 }, /* GL_SHADE_MODEL */ - { 26777, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ - { 26800, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - { 26830, 0x00001601 }, /* GL_SHININESS */ - { 26843, 0x00001402 }, /* GL_SHORT */ - { 26852, 0x000081F9 }, /* GL_SINGLE_COLOR */ - { 26868, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ - { 26888, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ - { 26907, 0x00001D01 }, /* GL_SMOOTH */ - { 26917, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ - { 26950, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ - { 26977, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ - { 27010, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ - { 27037, 0x00008588 }, /* GL_SOURCE0_ALPHA */ - { 27054, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ - { 27075, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ - { 27096, 0x00008580 }, /* GL_SOURCE0_RGB */ - { 27111, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ - { 27130, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ - { 27149, 0x00008589 }, /* GL_SOURCE1_ALPHA */ - { 27166, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ - { 27187, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ - { 27208, 0x00008581 }, /* GL_SOURCE1_RGB */ - { 27223, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ - { 27242, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ - { 27261, 0x0000858A }, /* GL_SOURCE2_ALPHA */ - { 27278, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ - { 27299, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ - { 27320, 0x00008582 }, /* GL_SOURCE2_RGB */ - { 27335, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ - { 27354, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ - { 27373, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ - { 27393, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ - { 27411, 0x00001202 }, /* GL_SPECULAR */ - { 27423, 0x00002402 }, /* GL_SPHERE_MAP */ - { 27437, 0x00001206 }, /* GL_SPOT_CUTOFF */ - { 27452, 0x00001204 }, /* GL_SPOT_DIRECTION */ - { 27470, 0x00001205 }, /* GL_SPOT_EXPONENT */ - { 27487, 0x00008588 }, /* GL_SRC0_ALPHA */ - { 27501, 0x00008580 }, /* GL_SRC0_RGB */ - { 27513, 0x00008589 }, /* GL_SRC1_ALPHA */ - { 27527, 0x00008581 }, /* GL_SRC1_RGB */ - { 27539, 0x0000858A }, /* GL_SRC2_ALPHA */ - { 27553, 0x00008582 }, /* GL_SRC2_RGB */ - { 27565, 0x00000302 }, /* GL_SRC_ALPHA */ - { 27578, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ - { 27600, 0x00000300 }, /* GL_SRC_COLOR */ - { 27613, 0x00000503 }, /* GL_STACK_OVERFLOW */ - { 27631, 0x00000504 }, /* GL_STACK_UNDERFLOW */ - { 27650, 0x000088E6 }, /* GL_STATIC_COPY */ - { 27665, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ - { 27684, 0x000088E4 }, /* GL_STATIC_DRAW */ - { 27699, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ - { 27718, 0x000088E5 }, /* GL_STATIC_READ */ - { 27733, 0x000088E5 }, /* GL_STATIC_READ_ARB */ - { 27752, 0x00001802 }, /* GL_STENCIL */ - { 27763, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ - { 27789, 0x00000D57 }, /* GL_STENCIL_BITS */ - { 27805, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ - { 27827, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ - { 27850, 0x00000B94 }, /* GL_STENCIL_FAIL */ - { 27866, 0x00000B92 }, /* GL_STENCIL_FUNC */ - { 27882, 0x00001901 }, /* GL_STENCIL_INDEX */ - { 27899, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ - { 27922, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ - { 27944, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ - { 27966, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ - { 27988, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ - { 28009, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ - { 28036, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ - { 28063, 0x00000B97 }, /* GL_STENCIL_REF */ - { 28078, 0x00000B90 }, /* GL_STENCIL_TEST */ - { 28094, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ - { 28123, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ - { 28145, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ - { 28166, 0x00000C33 }, /* GL_STEREO */ - { 28176, 0x000088E2 }, /* GL_STREAM_COPY */ - { 28191, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ - { 28210, 0x000088E0 }, /* GL_STREAM_DRAW */ - { 28225, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ - { 28244, 0x000088E1 }, /* GL_STREAM_READ */ - { 28259, 0x000088E1 }, /* GL_STREAM_READ_ARB */ - { 28278, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ - { 28295, 0x000084E7 }, /* GL_SUBTRACT */ - { 28307, 0x000084E7 }, /* GL_SUBTRACT_ARB */ - { 28323, 0x00002001 }, /* GL_T */ - { 28328, 0x00002A2A }, /* GL_T2F_C3F_V3F */ - { 28343, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ - { 28362, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ - { 28378, 0x00002A2B }, /* GL_T2F_N3F_V3F */ - { 28393, 0x00002A27 }, /* GL_T2F_V3F */ - { 28404, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ - { 28423, 0x00002A28 }, /* GL_T4F_V4F */ - { 28434, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ - { 28457, 0x00001702 }, /* GL_TEXTURE */ - { 28468, 0x000084C0 }, /* GL_TEXTURE0 */ - { 28480, 0x000084C0 }, /* GL_TEXTURE0_ARB */ - { 28496, 0x000084C1 }, /* GL_TEXTURE1 */ - { 28508, 0x000084CA }, /* GL_TEXTURE10 */ - { 28521, 0x000084CA }, /* GL_TEXTURE10_ARB */ - { 28538, 0x000084CB }, /* GL_TEXTURE11 */ - { 28551, 0x000084CB }, /* GL_TEXTURE11_ARB */ - { 28568, 0x000084CC }, /* GL_TEXTURE12 */ - { 28581, 0x000084CC }, /* GL_TEXTURE12_ARB */ - { 28598, 0x000084CD }, /* GL_TEXTURE13 */ - { 28611, 0x000084CD }, /* GL_TEXTURE13_ARB */ - { 28628, 0x000084CE }, /* GL_TEXTURE14 */ - { 28641, 0x000084CE }, /* GL_TEXTURE14_ARB */ - { 28658, 0x000084CF }, /* GL_TEXTURE15 */ - { 28671, 0x000084CF }, /* GL_TEXTURE15_ARB */ - { 28688, 0x000084D0 }, /* GL_TEXTURE16 */ - { 28701, 0x000084D0 }, /* GL_TEXTURE16_ARB */ - { 28718, 0x000084D1 }, /* GL_TEXTURE17 */ - { 28731, 0x000084D1 }, /* GL_TEXTURE17_ARB */ - { 28748, 0x000084D2 }, /* GL_TEXTURE18 */ - { 28761, 0x000084D2 }, /* GL_TEXTURE18_ARB */ - { 28778, 0x000084D3 }, /* GL_TEXTURE19 */ - { 28791, 0x000084D3 }, /* GL_TEXTURE19_ARB */ - { 28808, 0x000084C1 }, /* GL_TEXTURE1_ARB */ - { 28824, 0x000084C2 }, /* GL_TEXTURE2 */ - { 28836, 0x000084D4 }, /* GL_TEXTURE20 */ - { 28849, 0x000084D4 }, /* GL_TEXTURE20_ARB */ - { 28866, 0x000084D5 }, /* GL_TEXTURE21 */ - { 28879, 0x000084D5 }, /* GL_TEXTURE21_ARB */ - { 28896, 0x000084D6 }, /* GL_TEXTURE22 */ - { 28909, 0x000084D6 }, /* GL_TEXTURE22_ARB */ - { 28926, 0x000084D7 }, /* GL_TEXTURE23 */ - { 28939, 0x000084D7 }, /* GL_TEXTURE23_ARB */ - { 28956, 0x000084D8 }, /* GL_TEXTURE24 */ - { 28969, 0x000084D8 }, /* GL_TEXTURE24_ARB */ - { 28986, 0x000084D9 }, /* GL_TEXTURE25 */ - { 28999, 0x000084D9 }, /* GL_TEXTURE25_ARB */ - { 29016, 0x000084DA }, /* GL_TEXTURE26 */ - { 29029, 0x000084DA }, /* GL_TEXTURE26_ARB */ - { 29046, 0x000084DB }, /* GL_TEXTURE27 */ - { 29059, 0x000084DB }, /* GL_TEXTURE27_ARB */ - { 29076, 0x000084DC }, /* GL_TEXTURE28 */ - { 29089, 0x000084DC }, /* GL_TEXTURE28_ARB */ - { 29106, 0x000084DD }, /* GL_TEXTURE29 */ - { 29119, 0x000084DD }, /* GL_TEXTURE29_ARB */ - { 29136, 0x000084C2 }, /* GL_TEXTURE2_ARB */ - { 29152, 0x000084C3 }, /* GL_TEXTURE3 */ - { 29164, 0x000084DE }, /* GL_TEXTURE30 */ - { 29177, 0x000084DE }, /* GL_TEXTURE30_ARB */ - { 29194, 0x000084DF }, /* GL_TEXTURE31 */ - { 29207, 0x000084DF }, /* GL_TEXTURE31_ARB */ - { 29224, 0x000084C3 }, /* GL_TEXTURE3_ARB */ - { 29240, 0x000084C4 }, /* GL_TEXTURE4 */ - { 29252, 0x000084C4 }, /* GL_TEXTURE4_ARB */ - { 29268, 0x000084C5 }, /* GL_TEXTURE5 */ - { 29280, 0x000084C5 }, /* GL_TEXTURE5_ARB */ - { 29296, 0x000084C6 }, /* GL_TEXTURE6 */ - { 29308, 0x000084C6 }, /* GL_TEXTURE6_ARB */ - { 29324, 0x000084C7 }, /* GL_TEXTURE7 */ - { 29336, 0x000084C7 }, /* GL_TEXTURE7_ARB */ - { 29352, 0x000084C8 }, /* GL_TEXTURE8 */ - { 29364, 0x000084C8 }, /* GL_TEXTURE8_ARB */ - { 29380, 0x000084C9 }, /* GL_TEXTURE9 */ - { 29392, 0x000084C9 }, /* GL_TEXTURE9_ARB */ - { 29408, 0x00000DE0 }, /* GL_TEXTURE_1D */ - { 29422, 0x00000DE1 }, /* GL_TEXTURE_2D */ - { 29436, 0x0000806F }, /* GL_TEXTURE_3D */ - { 29450, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ - { 29472, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ - { 29498, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ - { 29520, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ - { 29542, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ - { 29564, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ - { 29586, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ - { 29614, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ - { 29646, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - { 29679, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ - { 29711, 0x00040000 }, /* GL_TEXTURE_BIT */ - { 29726, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ - { 29747, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ - { 29772, 0x00001005 }, /* GL_TEXTURE_BORDER */ - { 29790, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ - { 29814, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - { 29845, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - { 29875, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - { 29905, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - { 29940, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - { 29971, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 30009, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ - { 30036, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - { 30068, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - { 30102, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ - { 30126, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ - { 30154, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ - { 30178, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ - { 30206, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - { 30239, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ - { 30263, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ - { 30285, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ - { 30307, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ - { 30333, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ - { 30367, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - { 30400, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ - { 30437, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ - { 30465, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ - { 30497, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ - { 30520, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - { 30558, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ - { 30600, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - { 30631, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - { 30659, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - { 30689, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - { 30717, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ - { 30737, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ - { 30761, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - { 30792, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ - { 30827, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - { 30858, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ - { 30893, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - { 30924, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ - { 30959, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - { 30990, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ - { 31025, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - { 31056, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ - { 31091, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - { 31122, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ - { 31157, 0x00008071 }, /* GL_TEXTURE_DEPTH */ - { 31174, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ - { 31196, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ - { 31222, 0x00002300 }, /* GL_TEXTURE_ENV */ - { 31237, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ - { 31258, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ - { 31278, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ - { 31304, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ - { 31324, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ - { 31341, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ - { 31358, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ - { 31375, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ - { 31392, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ - { 31417, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ - { 31439, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ - { 31465, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ - { 31483, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ - { 31509, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ - { 31535, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ - { 31565, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ - { 31592, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ - { 31617, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ - { 31637, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ - { 31661, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - { 31688, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - { 31715, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - { 31742, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ - { 31768, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ - { 31798, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ - { 31820, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ - { 31838, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - { 31868, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - { 31896, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - { 31924, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - { 31952, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ - { 31973, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ - { 31992, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ - { 32014, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ - { 32033, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ - { 32053, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ - { 32078, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ - { 32102, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ - { 32122, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ - { 32146, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ - { 32166, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ - { 32189, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ - { 32214, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - { 32248, 0x00001000 }, /* GL_TEXTURE_WIDTH */ - { 32265, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ - { 32283, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ - { 32301, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ - { 32319, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ - { 32339, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ - { 32358, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - { 32387, 0x00001000 }, /* GL_TRANSFORM_BIT */ - { 32404, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ - { 32430, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ - { 32460, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - { 32492, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - { 32522, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ - { 32556, 0x0000862C }, /* GL_TRANSPOSE_NV */ - { 32572, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - { 32603, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ - { 32638, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - { 32666, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ - { 32698, 0x00000004 }, /* GL_TRIANGLES */ - { 32711, 0x00000006 }, /* GL_TRIANGLE_FAN */ - { 32727, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ - { 32748, 0x00000005 }, /* GL_TRIANGLE_STRIP */ - { 32766, 0x00000001 }, /* GL_TRUE */ - { 32774, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ - { 32794, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ - { 32817, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ - { 32837, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ - { 32858, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ - { 32880, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ - { 32902, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ - { 32922, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ - { 32943, 0x00001401 }, /* GL_UNSIGNED_BYTE */ - { 32960, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - { 32987, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ - { 33010, 0x00001405 }, /* GL_UNSIGNED_INT */ - { 33026, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ - { 33053, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ - { 33077, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - { 33108, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ - { 33132, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - { 33160, 0x00001403 }, /* GL_UNSIGNED_SHORT */ - { 33178, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - { 33208, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - { 33234, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - { 33264, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - { 33290, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ - { 33314, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - { 33342, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - { 33370, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ - { 33397, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - { 33429, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ - { 33460, 0x00002A20 }, /* GL_V2F */ - { 33467, 0x00002A21 }, /* GL_V3F */ - { 33474, 0x00001F00 }, /* GL_VENDOR */ - { 33484, 0x00001F02 }, /* GL_VERSION */ - { 33495, 0x00008074 }, /* GL_VERTEX_ARRAY */ - { 33511, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - { 33541, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - { 33572, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ - { 33607, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ - { 33631, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ - { 33652, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ - { 33675, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ - { 33696, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - { 33723, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - { 33751, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - { 33779, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - { 33807, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - { 33835, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - { 33863, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - { 33891, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - { 33918, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - { 33945, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - { 33972, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - { 33999, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - { 34026, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - { 34053, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - { 34080, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - { 34107, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - { 34134, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - { 34172, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ - { 34214, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ - { 34249, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ - { 34287, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ - { 34322, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ - { 34354, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ - { 34388, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ - { 34420, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ - { 34440, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ - { 34462, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ - { 34491, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ - { 34512, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ - { 34545, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ - { 34577, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ - { 34608, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - { 34638, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ - { 34659, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ - { 34686, 0x00000BA2 }, /* GL_VIEWPORT */ - { 34698, 0x00000800 }, /* GL_VIEWPORT_BIT */ - { 34714, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ - { 34734, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - { 34765, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ - { 34800, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - { 34828, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - { 34853, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - { 34880, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - { 34905, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ - { 34929, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ - { 34948, 0x000088B9 }, /* GL_WRITE_ONLY */ - { 34962, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ - { 34980, 0x00001506 }, /* GL_XOR */ - { 34987, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ - { 35006, 0x00008757 }, /* GL_YCBCR_MESA */ - { 35020, 0x00000000 }, /* GL_ZERO */ - { 35028, 0x00000D16 }, /* GL_ZOOM_X */ - { 35038, 0x00000D17 }, /* GL_ZOOM_Y */ + { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */ + { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */ + { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */ + { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */ + { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */ + { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */ + { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */ + { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */ + { 418, 0x00000104 }, /* GL_ADD */ + { 425, 0x00008574 }, /* GL_ADD_SIGNED */ + { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */ + { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */ + { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */ + { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */ + { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */ + { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */ + { 576, 0x00001906 }, /* GL_ALPHA */ + { 585, 0x0000803D }, /* GL_ALPHA12 */ + { 596, 0x0000803D }, /* GL_ALPHA12_EXT */ + { 611, 0x0000803E }, /* GL_ALPHA16 */ + { 622, 0x0000803E }, /* GL_ALPHA16_EXT */ + { 637, 0x0000803B }, /* GL_ALPHA4 */ + { 647, 0x0000803B }, /* GL_ALPHA4_EXT */ + { 661, 0x0000803C }, /* GL_ALPHA8 */ + { 671, 0x0000803C }, /* GL_ALPHA8_EXT */ + { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */ + { 699, 0x00000D55 }, /* GL_ALPHA_BITS */ + { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */ + { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */ + { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */ + { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */ + { 779, 0x00000207 }, /* GL_ALWAYS */ + { 789, 0x00001200 }, /* GL_AMBIENT */ + { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */ + { 823, 0x00001501 }, /* GL_AND */ + { 830, 0x00001504 }, /* GL_AND_INVERTED */ + { 846, 0x00001502 }, /* GL_AND_REVERSE */ + { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */ + { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */ + { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */ + { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */ + { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */ + { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */ + { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */ + { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */ + { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */ + { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */ + { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */ + { 1107, 0x00000409 }, /* GL_AUX0 */ + { 1115, 0x0000040A }, /* GL_AUX1 */ + { 1123, 0x0000040B }, /* GL_AUX2 */ + { 1131, 0x0000040C }, /* GL_AUX3 */ + { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */ + { 1154, 0x00000405 }, /* GL_BACK */ + { 1162, 0x00000402 }, /* GL_BACK_LEFT */ + { 1175, 0x00000403 }, /* GL_BACK_RIGHT */ + { 1189, 0x000080E0 }, /* GL_BGR */ + { 1196, 0x000080E1 }, /* GL_BGRA */ + { 1204, 0x00001A00 }, /* GL_BITMAP */ + { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */ + { 1230, 0x00000BE2 }, /* GL_BLEND */ + { 1239, 0x00008005 }, /* GL_BLEND_COLOR */ + { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */ + { 1273, 0x00000BE0 }, /* GL_BLEND_DST */ + { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */ + { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */ + { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */ + { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */ + { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */ + { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */ + { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */ + { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */ + { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */ + { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */ + { 1489, 0x00001905 }, /* GL_BLUE */ + { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */ + { 1510, 0x00000D54 }, /* GL_BLUE_BITS */ + { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */ + { 1537, 0x00008B56 }, /* GL_BOOL */ + { 1545, 0x00008B56 }, /* GL_BOOL_ARB */ + { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */ + { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */ + { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */ + { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */ + { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */ + { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */ + { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */ + { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */ + { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */ + { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */ + { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */ + { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */ + { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */ + { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */ + { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */ + { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */ + { 1841, 0x00001400 }, /* GL_BYTE */ + { 1849, 0x00002A24 }, /* GL_C3F_V3F */ + { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */ + { 1875, 0x00002A22 }, /* GL_C4UB_V2F */ + { 1887, 0x00002A23 }, /* GL_C4UB_V3F */ + { 1899, 0x00000901 }, /* GL_CCW */ + { 1906, 0x00002900 }, /* GL_CLAMP */ + { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */ + { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */ + { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */ + { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */ + { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */ + { 2020, 0x00001500 }, /* GL_CLEAR */ + { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */ + { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */ + { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */ + { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ + { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */ + { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */ + { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */ + { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */ + { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */ + { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */ + { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */ + { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */ + { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ + { 2314, 0x00000A00 }, /* GL_COEFF */ + { 2323, 0x00001800 }, /* GL_COLOR */ + { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */ + { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */ + { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */ + { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */ + { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */ + { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */ + { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */ + { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */ + { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */ + { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */ + { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */ + { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */ + { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */ + { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */ + { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */ + { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */ + { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */ + { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */ + { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */ + { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */ + { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */ + { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */ + { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */ + { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */ + { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */ + { 2943, 0x00001900 }, /* GL_COLOR_INDEX */ + { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */ + { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */ + { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */ + { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */ + { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */ + { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */ + { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */ + { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */ + { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */ + { 3158, 0x00008458 }, /* GL_COLOR_SUM */ + { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */ + { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */ + { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */ + { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */ + { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */ + { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */ + { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */ + { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */ + { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */ + { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */ + { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */ + { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */ + { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */ + { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */ + { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */ + { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */ + { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */ + { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */ + { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */ + { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ + { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */ + { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */ + { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */ + { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */ + { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */ + { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */ + { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */ + { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */ + { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */ + { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */ + { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */ + { 3988, 0x00008570 }, /* GL_COMBINE */ + { 3999, 0x00008503 }, /* GL_COMBINE4 */ + { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */ + { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */ + { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */ + { 4070, 0x00008570 }, /* GL_COMBINE_ARB */ + { 4085, 0x00008570 }, /* GL_COMBINE_EXT */ + { 4100, 0x00008571 }, /* GL_COMBINE_RGB */ + { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */ + { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */ + { 4153, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */ + { 4177, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */ + { 4205, 0x00001300 }, /* GL_COMPILE */ + { 4216, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */ + { 4239, 0x00008B81 }, /* GL_COMPILE_STATUS */ + { 4257, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */ + { 4277, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */ + { 4301, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */ + { 4325, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */ + { 4353, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */ + { 4377, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */ + { 4407, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */ + { 4441, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */ + { 4469, 0x000084ED }, /* GL_COMPRESSED_RGB */ + { 4487, 0x000084EE }, /* GL_COMPRESSED_RGBA */ + { 4506, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */ + { 4529, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ + { 4558, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ + { 4591, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ + { 4624, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ + { 4657, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */ + { 4679, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */ + { 4707, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ + { 4739, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */ + { 4769, 0x00008576 }, /* GL_CONSTANT */ + { 4781, 0x00008003 }, /* GL_CONSTANT_ALPHA */ + { 4799, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */ + { 4821, 0x00008576 }, /* GL_CONSTANT_ARB */ + { 4837, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */ + { 4861, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */ + { 4883, 0x00008001 }, /* GL_CONSTANT_COLOR */ + { 4901, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */ + { 4923, 0x00008576 }, /* GL_CONSTANT_EXT */ + { 4939, 0x00008010 }, /* GL_CONVOLUTION_1D */ + { 4957, 0x00008011 }, /* GL_CONVOLUTION_2D */ + { 4975, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */ + { 5003, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */ + { 5034, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */ + { 5061, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */ + { 5092, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */ + { 5119, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */ + { 5150, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */ + { 5178, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */ + { 5210, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */ + { 5232, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */ + { 5258, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */ + { 5280, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */ + { 5306, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */ + { 5327, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */ + { 5352, 0x00008862 }, /* GL_COORD_REPLACE */ + { 5369, 0x00008862 }, /* GL_COORD_REPLACE_ARB */ + { 5390, 0x00008862 }, /* GL_COORD_REPLACE_NV */ + { 5410, 0x00001503 }, /* GL_COPY */ + { 5418, 0x0000150C }, /* GL_COPY_INVERTED */ + { 5435, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */ + { 5455, 0x00000B44 }, /* GL_CULL_FACE */ + { 5468, 0x00000B45 }, /* GL_CULL_FACE_MODE */ + { 5486, 0x000081AA }, /* GL_CULL_VERTEX_EXT */ + { 5505, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ + { 5537, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ + { 5572, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */ + { 5593, 0x00000001 }, /* GL_CURRENT_BIT */ + { 5608, 0x00000B00 }, /* GL_CURRENT_COLOR */ + { 5625, 0x00008453 }, /* GL_CURRENT_FOG_COORD */ + { 5646, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */ + { 5672, 0x00000B01 }, /* GL_CURRENT_INDEX */ + { 5689, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */ + { 5711, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */ + { 5739, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */ + { 5760, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ + { 5794, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */ + { 5827, 0x00000B02 }, /* GL_CURRENT_NORMAL */ + { 5845, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */ + { 5875, 0x00008B8D }, /* GL_CURRENT_PROGRAM */ + { 5894, 0x00008865 }, /* GL_CURRENT_QUERY */ + { 5911, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */ + { 5932, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */ + { 5956, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */ + { 5983, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */ + { 6007, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */ + { 6034, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */ + { 6067, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ + { 6100, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */ + { 6127, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */ + { 6153, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */ + { 6178, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */ + { 6207, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */ + { 6229, 0x00000900 }, /* GL_CW */ + { 6235, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */ + { 6256, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */ + { 6277, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */ + { 6297, 0x00002101 }, /* GL_DECAL */ + { 6306, 0x00001E03 }, /* GL_DECR */ + { 6314, 0x00008508 }, /* GL_DECR_WRAP */ + { 6327, 0x00008508 }, /* GL_DECR_WRAP_EXT */ + { 6344, 0x00008B80 }, /* GL_DELETE_STATUS */ + { 6361, 0x00001801 }, /* GL_DEPTH */ + { 6370, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */ + { 6394, 0x00000D1F }, /* GL_DEPTH_BIAS */ + { 6408, 0x00000D56 }, /* GL_DEPTH_BITS */ + { 6422, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */ + { 6442, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */ + { 6467, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */ + { 6487, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */ + { 6505, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */ + { 6526, 0x00001902 }, /* GL_DEPTH_COMPONENT */ + { 6545, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */ + { 6566, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */ + { 6591, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */ + { 6617, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */ + { 6638, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */ + { 6663, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */ + { 6689, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */ + { 6710, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */ + { 6735, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */ + { 6761, 0x00000B74 }, /* GL_DEPTH_FUNC */ + { 6775, 0x00000B70 }, /* GL_DEPTH_RANGE */ + { 6790, 0x00000D1E }, /* GL_DEPTH_SCALE */ + { 6805, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */ + { 6825, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ + { 6853, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ + { 6881, 0x00000B71 }, /* GL_DEPTH_TEST */ + { 6895, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */ + { 6917, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */ + { 6943, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */ + { 6962, 0x00001201 }, /* GL_DIFFUSE */ + { 6973, 0x00000BD0 }, /* GL_DITHER */ + { 6983, 0x00000A02 }, /* GL_DOMAIN */ + { 6993, 0x00001100 }, /* GL_DONT_CARE */ + { 7006, 0x000086AE }, /* GL_DOT3_RGB */ + { 7018, 0x000086AF }, /* GL_DOT3_RGBA */ + { 7031, 0x000086AF }, /* GL_DOT3_RGBA_ARB */ + { 7048, 0x00008741 }, /* GL_DOT3_RGBA_EXT */ + { 7065, 0x000086AE }, /* GL_DOT3_RGB_ARB */ + { 7081, 0x00008740 }, /* GL_DOT3_RGB_EXT */ + { 7097, 0x0000140A }, /* GL_DOUBLE */ + { 7107, 0x00000C32 }, /* GL_DOUBLEBUFFER */ + { 7123, 0x00000C01 }, /* GL_DRAW_BUFFER */ + { 7138, 0x00008825 }, /* GL_DRAW_BUFFER0 */ + { 7154, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */ + { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */ + { 7194, 0x00008826 }, /* GL_DRAW_BUFFER1 */ + { 7210, 0x0000882F }, /* GL_DRAW_BUFFER10 */ + { 7227, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */ + { 7248, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */ + { 7269, 0x00008830 }, /* GL_DRAW_BUFFER11 */ + { 7286, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */ + { 7307, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */ + { 7328, 0x00008831 }, /* GL_DRAW_BUFFER12 */ + { 7345, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */ + { 7366, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */ + { 7387, 0x00008832 }, /* GL_DRAW_BUFFER13 */ + { 7404, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */ + { 7425, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */ + { 7446, 0x00008833 }, /* GL_DRAW_BUFFER14 */ + { 7463, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */ + { 7484, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */ + { 7505, 0x00008834 }, /* GL_DRAW_BUFFER15 */ + { 7522, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */ + { 7543, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */ + { 7564, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */ + { 7584, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */ + { 7604, 0x00008827 }, /* GL_DRAW_BUFFER2 */ + { 7620, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */ + { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */ + { 7660, 0x00008828 }, /* GL_DRAW_BUFFER3 */ + { 7676, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */ + { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */ + { 7716, 0x00008829 }, /* GL_DRAW_BUFFER4 */ + { 7732, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */ + { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */ + { 7772, 0x0000882A }, /* GL_DRAW_BUFFER5 */ + { 7788, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */ + { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */ + { 7828, 0x0000882B }, /* GL_DRAW_BUFFER6 */ + { 7844, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */ + { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */ + { 7884, 0x0000882C }, /* GL_DRAW_BUFFER7 */ + { 7900, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */ + { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */ + { 7940, 0x0000882D }, /* GL_DRAW_BUFFER8 */ + { 7956, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */ + { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */ + { 7996, 0x0000882E }, /* GL_DRAW_BUFFER9 */ + { 8012, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */ + { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */ + { 8052, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ + { 8084, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */ + { 8108, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */ + { 8128, 0x00000304 }, /* GL_DST_ALPHA */ + { 8141, 0x00000306 }, /* GL_DST_COLOR */ + { 8154, 0x000088EA }, /* GL_DYNAMIC_COPY */ + { 8170, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */ + { 8190, 0x000088E8 }, /* GL_DYNAMIC_DRAW */ + { 8206, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */ + { 8226, 0x000088E9 }, /* GL_DYNAMIC_READ */ + { 8242, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */ + { 8262, 0x00000B43 }, /* GL_EDGE_FLAG */ + { 8275, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */ + { 8294, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ + { 8328, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */ + { 8366, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */ + { 8393, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */ + { 8419, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */ + { 8443, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */ + { 8471, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ + { 8503, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */ + { 8539, 0x00001600 }, /* GL_EMISSION */ + { 8551, 0x00002000 }, /* GL_ENABLE_BIT */ + { 8565, 0x00000202 }, /* GL_EQUAL */ + { 8574, 0x00001509 }, /* GL_EQUIV */ + { 8583, 0x00010000 }, /* GL_EVAL_BIT */ + { 8595, 0x00000800 }, /* GL_EXP */ + { 8602, 0x00000801 }, /* GL_EXP2 */ + { 8610, 0x00001F03 }, /* GL_EXTENSIONS */ + { 8624, 0x00002400 }, /* GL_EYE_LINEAR */ + { 8638, 0x00002502 }, /* GL_EYE_PLANE */ + { 8651, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */ + { 8676, 0x0000855B }, /* GL_EYE_RADIAL_NV */ + { 8693, 0x00000000 }, /* GL_FALSE */ + { 8702, 0x00001101 }, /* GL_FASTEST */ + { 8713, 0x00001C01 }, /* GL_FEEDBACK */ + { 8725, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */ + { 8752, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */ + { 8776, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */ + { 8800, 0x00001B02 }, /* GL_FILL */ + { 8808, 0x00001D00 }, /* GL_FLAT */ + { 8816, 0x00001406 }, /* GL_FLOAT */ + { 8825, 0x00008B5A }, /* GL_FLOAT_MAT2 */ + { 8839, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */ + { 8857, 0x00008B5B }, /* GL_FLOAT_MAT3 */ + { 8871, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */ + { 8889, 0x00008B5C }, /* GL_FLOAT_MAT4 */ + { 8903, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */ + { 8921, 0x00008B50 }, /* GL_FLOAT_VEC2 */ + { 8935, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */ + { 8953, 0x00008B51 }, /* GL_FLOAT_VEC3 */ + { 8967, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */ + { 8985, 0x00008B52 }, /* GL_FLOAT_VEC4 */ + { 8999, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */ + { 9017, 0x00000B60 }, /* GL_FOG */ + { 9024, 0x00000080 }, /* GL_FOG_BIT */ + { 9035, 0x00000B66 }, /* GL_FOG_COLOR */ + { 9048, 0x00008451 }, /* GL_FOG_COORD */ + { 9061, 0x00008451 }, /* GL_FOG_COORDINATE */ + { 9079, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */ + { 9103, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ + { 9142, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */ + { 9185, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */ + { 9217, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ + { 9248, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */ + { 9277, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */ + { 9302, 0x00008457 }, /* GL_FOG_COORD_ARRAY */ + { 9321, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */ + { 9355, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */ + { 9382, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */ + { 9408, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */ + { 9432, 0x00008450 }, /* GL_FOG_COORD_SRC */ + { 9449, 0x00000B62 }, /* GL_FOG_DENSITY */ + { 9464, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */ + { 9488, 0x00000B64 }, /* GL_FOG_END */ + { 9499, 0x00000C54 }, /* GL_FOG_HINT */ + { 9511, 0x00000B61 }, /* GL_FOG_INDEX */ + { 9524, 0x00000B65 }, /* GL_FOG_MODE */ + { 9536, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */ + { 9555, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */ + { 9580, 0x00000B63 }, /* GL_FOG_START */ + { 9593, 0x00008452 }, /* GL_FRAGMENT_DEPTH */ + { 9611, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */ + { 9635, 0x00008B30 }, /* GL_FRAGMENT_SHADER */ + { 9654, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */ + { 9677, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ + { 9712, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ + { 9754, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ + { 9796, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ + { 9845, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ + { 9897, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ + { 9941, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */ + { 9968, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */ + { 9996, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */ + { 10015, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ + { 10056, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ + { 10097, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ + { 10139, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ + { 10190, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ + { 10228, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ + { 10277, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ + { 10319, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ + { 10351, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ + { 10382, 0x00000404 }, /* GL_FRONT */ + { 10391, 0x00000408 }, /* GL_FRONT_AND_BACK */ + { 10409, 0x00000B46 }, /* GL_FRONT_FACE */ + { 10423, 0x00000400 }, /* GL_FRONT_LEFT */ + { 10437, 0x00000401 }, /* GL_FRONT_RIGHT */ + { 10452, 0x00008006 }, /* GL_FUNC_ADD */ + { 10464, 0x00008006 }, /* GL_FUNC_ADD_EXT */ + { 10480, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */ + { 10505, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */ + { 10534, 0x0000800A }, /* GL_FUNC_SUBTRACT */ + { 10551, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */ + { 10572, 0x00008191 }, /* GL_GENERATE_MIPMAP */ + { 10591, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */ + { 10615, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */ + { 10644, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */ + { 10668, 0x00000206 }, /* GL_GEQUAL */ + { 10678, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */ + { 10703, 0x00000204 }, /* GL_GREATER */ + { 10714, 0x00001904 }, /* GL_GREEN */ + { 10723, 0x00000D19 }, /* GL_GREEN_BIAS */ + { 10737, 0x00000D53 }, /* GL_GREEN_BITS */ + { 10751, 0x00000D18 }, /* GL_GREEN_SCALE */ + { 10766, 0x00008000 }, /* GL_HINT_BIT */ + { 10778, 0x00008024 }, /* GL_HISTOGRAM */ + { 10791, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ + { 10815, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ + { 10843, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ + { 10866, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ + { 10893, 0x00008024 }, /* GL_HISTOGRAM_EXT */ + { 10910, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ + { 10930, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ + { 10954, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ + { 10978, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ + { 11006, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ + { 11034, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ + { 11066, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ + { 11088, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ + { 11114, 0x0000802D }, /* GL_HISTOGRAM_SINK */ + { 11132, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ + { 11154, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ + { 11173, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ + { 11196, 0x0000862A }, /* GL_IDENTITY_NV */ + { 11211, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ + { 11231, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ + { 11271, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ + { 11309, 0x00001E02 }, /* GL_INCR */ + { 11317, 0x00008507 }, /* GL_INCR_WRAP */ + { 11330, 0x00008507 }, /* GL_INCR_WRAP_EXT */ + { 11347, 0x00008077 }, /* GL_INDEX_ARRAY */ + { 11362, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ + { 11392, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ + { 11426, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ + { 11449, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ + { 11471, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ + { 11491, 0x00000D51 }, /* GL_INDEX_BITS */ + { 11505, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ + { 11526, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ + { 11544, 0x00000C30 }, /* GL_INDEX_MODE */ + { 11558, 0x00000D13 }, /* GL_INDEX_OFFSET */ + { 11574, 0x00000D12 }, /* GL_INDEX_SHIFT */ + { 11589, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ + { 11608, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */ + { 11627, 0x00001404 }, /* GL_INT */ + { 11634, 0x00008049 }, /* GL_INTENSITY */ + { 11647, 0x0000804C }, /* GL_INTENSITY12 */ + { 11662, 0x0000804C }, /* GL_INTENSITY12_EXT */ + { 11681, 0x0000804D }, /* GL_INTENSITY16 */ + { 11696, 0x0000804D }, /* GL_INTENSITY16_EXT */ + { 11715, 0x0000804A }, /* GL_INTENSITY4 */ + { 11729, 0x0000804A }, /* GL_INTENSITY4_EXT */ + { 11747, 0x0000804B }, /* GL_INTENSITY8 */ + { 11761, 0x0000804B }, /* GL_INTENSITY8_EXT */ + { 11779, 0x00008049 }, /* GL_INTENSITY_EXT */ + { 11796, 0x00008575 }, /* GL_INTERPOLATE */ + { 11811, 0x00008575 }, /* GL_INTERPOLATE_ARB */ + { 11830, 0x00008575 }, /* GL_INTERPOLATE_EXT */ + { 11849, 0x00008B53 }, /* GL_INT_VEC2 */ + { 11861, 0x00008B53 }, /* GL_INT_VEC2_ARB */ + { 11877, 0x00008B54 }, /* GL_INT_VEC3 */ + { 11889, 0x00008B54 }, /* GL_INT_VEC3_ARB */ + { 11905, 0x00008B55 }, /* GL_INT_VEC4 */ + { 11917, 0x00008B55 }, /* GL_INT_VEC4_ARB */ + { 11933, 0x00000500 }, /* GL_INVALID_ENUM */ + { 11949, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ + { 11986, 0x00000502 }, /* GL_INVALID_OPERATION */ + { 12007, 0x00000501 }, /* GL_INVALID_VALUE */ + { 12024, 0x0000862B }, /* GL_INVERSE_NV */ + { 12038, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ + { 12062, 0x0000150A }, /* GL_INVERT */ + { 12072, 0x00001E00 }, /* GL_KEEP */ + { 12080, 0x00000406 }, /* GL_LEFT */ + { 12088, 0x00000203 }, /* GL_LEQUAL */ + { 12098, 0x00000201 }, /* GL_LESS */ + { 12106, 0x00004000 }, /* GL_LIGHT0 */ + { 12116, 0x00004001 }, /* GL_LIGHT1 */ + { 12126, 0x00004002 }, /* GL_LIGHT2 */ + { 12136, 0x00004003 }, /* GL_LIGHT3 */ + { 12146, 0x00004004 }, /* GL_LIGHT4 */ + { 12156, 0x00004005 }, /* GL_LIGHT5 */ + { 12166, 0x00004006 }, /* GL_LIGHT6 */ + { 12176, 0x00004007 }, /* GL_LIGHT7 */ + { 12186, 0x00000B50 }, /* GL_LIGHTING */ + { 12198, 0x00000040 }, /* GL_LIGHTING_BIT */ + { 12214, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ + { 12237, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ + { 12266, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ + { 12299, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ + { 12327, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ + { 12351, 0x00001B01 }, /* GL_LINE */ + { 12359, 0x00002601 }, /* GL_LINEAR */ + { 12369, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ + { 12391, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ + { 12421, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ + { 12452, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ + { 12476, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ + { 12501, 0x00000001 }, /* GL_LINES */ + { 12510, 0x00000004 }, /* GL_LINE_BIT */ + { 12522, 0x00000002 }, /* GL_LINE_LOOP */ + { 12535, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ + { 12555, 0x00000B20 }, /* GL_LINE_SMOOTH */ + { 12570, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ + { 12590, 0x00000B24 }, /* GL_LINE_STIPPLE */ + { 12606, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ + { 12630, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ + { 12653, 0x00000003 }, /* GL_LINE_STRIP */ + { 12667, 0x00000702 }, /* GL_LINE_TOKEN */ + { 12681, 0x00000B21 }, /* GL_LINE_WIDTH */ + { 12695, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ + { 12721, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ + { 12741, 0x00008B82 }, /* GL_LINK_STATUS */ + { 12756, 0x00000B32 }, /* GL_LIST_BASE */ + { 12769, 0x00020000 }, /* GL_LIST_BIT */ + { 12781, 0x00000B33 }, /* GL_LIST_INDEX */ + { 12795, 0x00000B30 }, /* GL_LIST_MODE */ + { 12808, 0x00000101 }, /* GL_LOAD */ + { 12816, 0x00000BF1 }, /* GL_LOGIC_OP */ + { 12828, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ + { 12845, 0x00008CA1 }, /* GL_LOWER_LEFT */ + { 12859, 0x00001909 }, /* GL_LUMINANCE */ + { 12872, 0x00008041 }, /* GL_LUMINANCE12 */ + { 12887, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ + { 12910, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ + { 12937, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ + { 12959, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ + { 12985, 0x00008041 }, /* GL_LUMINANCE12_EXT */ + { 13004, 0x00008042 }, /* GL_LUMINANCE16 */ + { 13019, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ + { 13042, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ + { 13069, 0x00008042 }, /* GL_LUMINANCE16_EXT */ + { 13088, 0x0000803F }, /* GL_LUMINANCE4 */ + { 13102, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ + { 13123, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ + { 13148, 0x0000803F }, /* GL_LUMINANCE4_EXT */ + { 13166, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ + { 13187, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ + { 13212, 0x00008040 }, /* GL_LUMINANCE8 */ + { 13226, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ + { 13247, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ + { 13272, 0x00008040 }, /* GL_LUMINANCE8_EXT */ + { 13290, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ + { 13309, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ + { 13325, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ + { 13345, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ + { 13367, 0x00000D91 }, /* GL_MAP1_INDEX */ + { 13381, 0x00000D92 }, /* GL_MAP1_NORMAL */ + { 13396, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ + { 13420, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ + { 13444, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ + { 13468, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ + { 13492, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ + { 13509, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ + { 13526, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ + { 13554, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ + { 13583, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ + { 13612, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ + { 13641, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ + { 13670, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ + { 13699, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ + { 13728, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ + { 13756, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ + { 13784, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ + { 13812, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ + { 13840, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ + { 13868, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ + { 13896, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ + { 13924, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ + { 13952, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ + { 13980, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ + { 13996, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ + { 14016, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ + { 14038, 0x00000DB1 }, /* GL_MAP2_INDEX */ + { 14052, 0x00000DB2 }, /* GL_MAP2_NORMAL */ + { 14067, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ + { 14091, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ + { 14115, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ + { 14139, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ + { 14163, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ + { 14180, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ + { 14197, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ + { 14225, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ + { 14254, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ + { 14283, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ + { 14312, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ + { 14341, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ + { 14370, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ + { 14399, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ + { 14427, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ + { 14455, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ + { 14483, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ + { 14511, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ + { 14539, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ + { 14567, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ + { 14595, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ + { 14623, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ + { 14651, 0x00000D10 }, /* GL_MAP_COLOR */ + { 14664, 0x00000D11 }, /* GL_MAP_STENCIL */ + { 14679, 0x000088C0 }, /* GL_MATRIX0_ARB */ + { 14694, 0x00008630 }, /* GL_MATRIX0_NV */ + { 14708, 0x000088CA }, /* GL_MATRIX10_ARB */ + { 14724, 0x000088CB }, /* GL_MATRIX11_ARB */ + { 14740, 0x000088CC }, /* GL_MATRIX12_ARB */ + { 14756, 0x000088CD }, /* GL_MATRIX13_ARB */ + { 14772, 0x000088CE }, /* GL_MATRIX14_ARB */ + { 14788, 0x000088CF }, /* GL_MATRIX15_ARB */ + { 14804, 0x000088D0 }, /* GL_MATRIX16_ARB */ + { 14820, 0x000088D1 }, /* GL_MATRIX17_ARB */ + { 14836, 0x000088D2 }, /* GL_MATRIX18_ARB */ + { 14852, 0x000088D3 }, /* GL_MATRIX19_ARB */ + { 14868, 0x000088C1 }, /* GL_MATRIX1_ARB */ + { 14883, 0x00008631 }, /* GL_MATRIX1_NV */ + { 14897, 0x000088D4 }, /* GL_MATRIX20_ARB */ + { 14913, 0x000088D5 }, /* GL_MATRIX21_ARB */ + { 14929, 0x000088D6 }, /* GL_MATRIX22_ARB */ + { 14945, 0x000088D7 }, /* GL_MATRIX23_ARB */ + { 14961, 0x000088D8 }, /* GL_MATRIX24_ARB */ + { 14977, 0x000088D9 }, /* GL_MATRIX25_ARB */ + { 14993, 0x000088DA }, /* GL_MATRIX26_ARB */ + { 15009, 0x000088DB }, /* GL_MATRIX27_ARB */ + { 15025, 0x000088DC }, /* GL_MATRIX28_ARB */ + { 15041, 0x000088DD }, /* GL_MATRIX29_ARB */ + { 15057, 0x000088C2 }, /* GL_MATRIX2_ARB */ + { 15072, 0x00008632 }, /* GL_MATRIX2_NV */ + { 15086, 0x000088DE }, /* GL_MATRIX30_ARB */ + { 15102, 0x000088DF }, /* GL_MATRIX31_ARB */ + { 15118, 0x000088C3 }, /* GL_MATRIX3_ARB */ + { 15133, 0x00008633 }, /* GL_MATRIX3_NV */ + { 15147, 0x000088C4 }, /* GL_MATRIX4_ARB */ + { 15162, 0x00008634 }, /* GL_MATRIX4_NV */ + { 15176, 0x000088C5 }, /* GL_MATRIX5_ARB */ + { 15191, 0x00008635 }, /* GL_MATRIX5_NV */ + { 15205, 0x000088C6 }, /* GL_MATRIX6_ARB */ + { 15220, 0x00008636 }, /* GL_MATRIX6_NV */ + { 15234, 0x000088C7 }, /* GL_MATRIX7_ARB */ + { 15249, 0x00008637 }, /* GL_MATRIX7_NV */ + { 15263, 0x000088C8 }, /* GL_MATRIX8_ARB */ + { 15278, 0x000088C9 }, /* GL_MATRIX9_ARB */ + { 15293, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ + { 15319, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ + { 15353, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ + { 15384, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ + { 15417, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ + { 15448, 0x00000BA0 }, /* GL_MATRIX_MODE */ + { 15463, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ + { 15485, 0x00008008 }, /* GL_MAX */ + { 15492, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ + { 15515, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ + { 15541, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ + { 15574, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ + { 15600, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + { 15634, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ + { 15653, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ + { 15682, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ + { 15714, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ + { 15750, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ + { 15786, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ + { 15826, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ + { 15852, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ + { 15882, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ + { 15907, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ + { 15936, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ + { 15965, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ + { 15998, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */ + { 16018, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ + { 16042, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ + { 16066, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ + { 16090, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ + { 16115, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ + { 16133, 0x00008008 }, /* GL_MAX_EXT */ + { 16144, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ + { 16179, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ + { 16218, 0x00000D31 }, /* GL_MAX_LIGHTS */ + { 16232, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ + { 16252, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ + { 16290, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ + { 16319, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ + { 16343, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ + { 16371, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ + { 16394, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ + { 16431, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ + { 16467, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ + { 16494, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ + { 16523, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ + { 16557, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ + { 16593, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ + { 16620, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ + { 16652, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ + { 16688, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ + { 16717, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ + { 16746, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ + { 16774, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ + { 16812, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + { 16856, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + { 16899, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ + { 16933, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + { 16972, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ + { 17009, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ + { 17047, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + { 17090, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + { 17133, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ + { 17163, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ + { 17194, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ + { 17230, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ + { 17266, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ + { 17296, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ + { 17330, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ + { 17363, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ + { 17392, 0x00008504 }, /* GL_MAX_SHININESS_NV */ + { 17412, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ + { 17436, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */ + { 17458, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ + { 17484, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */ + { 17511, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ + { 17542, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ + { 17566, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ + { 17600, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ + { 17620, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ + { 17647, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ + { 17668, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ + { 17693, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ + { 17718, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ + { 17753, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */ + { 17775, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ + { 17801, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */ + { 17823, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ + { 17849, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ + { 17883, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ + { 17921, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ + { 17954, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ + { 17991, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ + { 18015, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ + { 18036, 0x00008007 }, /* GL_MIN */ + { 18043, 0x0000802E }, /* GL_MINMAX */ + { 18053, 0x0000802E }, /* GL_MINMAX_EXT */ + { 18067, 0x0000802F }, /* GL_MINMAX_FORMAT */ + { 18084, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ + { 18105, 0x00008030 }, /* GL_MINMAX_SINK */ + { 18120, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ + { 18139, 0x00008007 }, /* GL_MIN_EXT */ + { 18150, 0x00008370 }, /* GL_MIRRORED_REPEAT */ + { 18169, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ + { 18192, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ + { 18215, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ + { 18235, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ + { 18255, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ + { 18285, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ + { 18313, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ + { 18341, 0x00001700 }, /* GL_MODELVIEW */ + { 18354, 0x00001700 }, /* GL_MODELVIEW0_ARB */ + { 18372, 0x0000872A }, /* GL_MODELVIEW10_ARB */ + { 18391, 0x0000872B }, /* GL_MODELVIEW11_ARB */ + { 18410, 0x0000872C }, /* GL_MODELVIEW12_ARB */ + { 18429, 0x0000872D }, /* GL_MODELVIEW13_ARB */ + { 18448, 0x0000872E }, /* GL_MODELVIEW14_ARB */ + { 18467, 0x0000872F }, /* GL_MODELVIEW15_ARB */ + { 18486, 0x00008730 }, /* GL_MODELVIEW16_ARB */ + { 18505, 0x00008731 }, /* GL_MODELVIEW17_ARB */ + { 18524, 0x00008732 }, /* GL_MODELVIEW18_ARB */ + { 18543, 0x00008733 }, /* GL_MODELVIEW19_ARB */ + { 18562, 0x0000850A }, /* GL_MODELVIEW1_ARB */ + { 18580, 0x00008734 }, /* GL_MODELVIEW20_ARB */ + { 18599, 0x00008735 }, /* GL_MODELVIEW21_ARB */ + { 18618, 0x00008736 }, /* GL_MODELVIEW22_ARB */ + { 18637, 0x00008737 }, /* GL_MODELVIEW23_ARB */ + { 18656, 0x00008738 }, /* GL_MODELVIEW24_ARB */ + { 18675, 0x00008739 }, /* GL_MODELVIEW25_ARB */ + { 18694, 0x0000873A }, /* GL_MODELVIEW26_ARB */ + { 18713, 0x0000873B }, /* GL_MODELVIEW27_ARB */ + { 18732, 0x0000873C }, /* GL_MODELVIEW28_ARB */ + { 18751, 0x0000873D }, /* GL_MODELVIEW29_ARB */ + { 18770, 0x00008722 }, /* GL_MODELVIEW2_ARB */ + { 18788, 0x0000873E }, /* GL_MODELVIEW30_ARB */ + { 18807, 0x0000873F }, /* GL_MODELVIEW31_ARB */ + { 18826, 0x00008723 }, /* GL_MODELVIEW3_ARB */ + { 18844, 0x00008724 }, /* GL_MODELVIEW4_ARB */ + { 18862, 0x00008725 }, /* GL_MODELVIEW5_ARB */ + { 18880, 0x00008726 }, /* GL_MODELVIEW6_ARB */ + { 18898, 0x00008727 }, /* GL_MODELVIEW7_ARB */ + { 18916, 0x00008728 }, /* GL_MODELVIEW8_ARB */ + { 18934, 0x00008729 }, /* GL_MODELVIEW9_ARB */ + { 18952, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ + { 18972, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ + { 18999, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ + { 19024, 0x00002100 }, /* GL_MODULATE */ + { 19036, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ + { 19056, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ + { 19083, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ + { 19108, 0x00000103 }, /* GL_MULT */ + { 19116, 0x0000809D }, /* GL_MULTISAMPLE */ + { 19131, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ + { 19151, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ + { 19170, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ + { 19189, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ + { 19213, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ + { 19236, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ + { 19266, 0x00002A25 }, /* GL_N3F_V3F */ + { 19277, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ + { 19297, 0x0000150E }, /* GL_NAND */ + { 19305, 0x00002600 }, /* GL_NEAREST */ + { 19316, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ + { 19347, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ + { 19379, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ + { 19404, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ + { 19430, 0x00000200 }, /* GL_NEVER */ + { 19439, 0x00001102 }, /* GL_NICEST */ + { 19449, 0x00000000 }, /* GL_NONE */ + { 19457, 0x00001505 }, /* GL_NOOP */ + { 19465, 0x00001508 }, /* GL_NOR */ + { 19472, 0x00000BA1 }, /* GL_NORMALIZE */ + { 19485, 0x00008075 }, /* GL_NORMAL_ARRAY */ + { 19501, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ + { 19532, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ + { 19567, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ + { 19591, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ + { 19614, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ + { 19635, 0x00008511 }, /* GL_NORMAL_MAP */ + { 19649, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ + { 19667, 0x00008511 }, /* GL_NORMAL_MAP_NV */ + { 19684, 0x00000205 }, /* GL_NOTEQUAL */ + { 19696, 0x00000000 }, /* GL_NO_ERROR */ + { 19708, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ + { 19742, 0x000086A2 }, /* GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB */ + { 19780, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ + { 19812, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ + { 19854, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ + { 19884, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ + { 19924, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ + { 19955, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ + { 19984, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ + { 20012, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ + { 20042, 0x00002401 }, /* GL_OBJECT_LINEAR */ + { 20059, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ + { 20085, 0x00002501 }, /* GL_OBJECT_PLANE */ + { 20101, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ + { 20136, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ + { 20158, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ + { 20177, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ + { 20207, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ + { 20228, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ + { 20256, 0x00000001 }, /* GL_ONE */ + { 20263, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ + { 20291, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ + { 20323, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ + { 20351, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ + { 20383, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ + { 20406, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ + { 20429, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ + { 20452, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ + { 20475, 0x00008598 }, /* GL_OPERAND0_ALPHA */ + { 20493, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ + { 20515, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ + { 20537, 0x00008590 }, /* GL_OPERAND0_RGB */ + { 20553, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ + { 20573, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ + { 20593, 0x00008599 }, /* GL_OPERAND1_ALPHA */ + { 20611, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ + { 20633, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ + { 20655, 0x00008591 }, /* GL_OPERAND1_RGB */ + { 20671, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ + { 20691, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ + { 20711, 0x0000859A }, /* GL_OPERAND2_ALPHA */ + { 20729, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ + { 20751, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ + { 20773, 0x00008592 }, /* GL_OPERAND2_RGB */ + { 20789, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ + { 20809, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ + { 20829, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ + { 20850, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ + { 20869, 0x00001507 }, /* GL_OR */ + { 20875, 0x00000A01 }, /* GL_ORDER */ + { 20884, 0x0000150D }, /* GL_OR_INVERTED */ + { 20899, 0x0000150B }, /* GL_OR_REVERSE */ + { 20913, 0x00000505 }, /* GL_OUT_OF_MEMORY */ + { 20930, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ + { 20948, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ + { 20969, 0x00008758 }, /* GL_PACK_INVERT_MESA */ + { 20989, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ + { 21007, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ + { 21026, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ + { 21046, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ + { 21066, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ + { 21084, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ + { 21103, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ + { 21128, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ + { 21152, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ + { 21173, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ + { 21195, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ + { 21217, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ + { 21242, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ + { 21266, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ + { 21287, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ + { 21309, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ + { 21331, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ + { 21353, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ + { 21384, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ + { 21404, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ + { 21429, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ + { 21449, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ + { 21474, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ + { 21494, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ + { 21519, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ + { 21539, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ + { 21564, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ + { 21584, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ + { 21609, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ + { 21629, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ + { 21654, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ + { 21674, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ + { 21699, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ + { 21719, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ + { 21744, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ + { 21764, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ + { 21789, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ + { 21809, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ + { 21834, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ + { 21852, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ + { 21885, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ + { 21910, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ + { 21945, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ + { 21972, 0x00001B00 }, /* GL_POINT */ + { 21981, 0x00000000 }, /* GL_POINTS */ + { 21991, 0x00000002 }, /* GL_POINT_BIT */ + { 22004, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ + { 22034, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ + { 22068, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ + { 22102, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ + { 22137, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ + { 22166, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ + { 22199, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ + { 22232, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ + { 22266, 0x00000B11 }, /* GL_POINT_SIZE */ + { 22280, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ + { 22306, 0x00008127 }, /* GL_POINT_SIZE_MAX */ + { 22324, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ + { 22346, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ + { 22368, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ + { 22391, 0x00008126 }, /* GL_POINT_SIZE_MIN */ + { 22409, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ + { 22431, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ + { 22453, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ + { 22476, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ + { 22496, 0x00000B10 }, /* GL_POINT_SMOOTH */ + { 22512, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ + { 22533, 0x00008861 }, /* GL_POINT_SPRITE */ + { 22549, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ + { 22569, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ + { 22598, 0x00008861 }, /* GL_POINT_SPRITE_NV */ + { 22617, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ + { 22643, 0x00000701 }, /* GL_POINT_TOKEN */ + { 22658, 0x00000009 }, /* GL_POLYGON */ + { 22669, 0x00000008 }, /* GL_POLYGON_BIT */ + { 22684, 0x00000B40 }, /* GL_POLYGON_MODE */ + { 22700, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ + { 22723, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ + { 22748, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ + { 22771, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ + { 22794, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ + { 22818, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ + { 22842, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ + { 22860, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ + { 22883, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ + { 22902, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ + { 22925, 0x00000703 }, /* GL_POLYGON_TOKEN */ + { 22942, 0x00001203 }, /* GL_POSITION */ + { 22954, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ + { 22986, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ + { 23022, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ + { 23055, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ + { 23092, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ + { 23123, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ + { 23158, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ + { 23190, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ + { 23226, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ + { 23259, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ + { 23291, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ + { 23327, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ + { 23360, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ + { 23397, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ + { 23427, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ + { 23461, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ + { 23492, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ + { 23527, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ + { 23558, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ + { 23593, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ + { 23625, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ + { 23661, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ + { 23691, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ + { 23725, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ + { 23756, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ + { 23791, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ + { 23823, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ + { 23854, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ + { 23889, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ + { 23921, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ + { 23957, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ + { 23986, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ + { 24019, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ + { 24049, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ + { 24083, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ + { 24122, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ + { 24155, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ + { 24195, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ + { 24229, 0x00008578 }, /* GL_PREVIOUS */ + { 24241, 0x00008578 }, /* GL_PREVIOUS_ARB */ + { 24257, 0x00008578 }, /* GL_PREVIOUS_EXT */ + { 24273, 0x00008577 }, /* GL_PRIMARY_COLOR */ + { 24290, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ + { 24311, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ + { 24332, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ + { 24365, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ + { 24397, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ + { 24420, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ + { 24443, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ + { 24473, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ + { 24502, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ + { 24530, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ + { 24552, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ + { 24580, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ + { 24608, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ + { 24630, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ + { 24651, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + { 24691, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + { 24730, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ + { 24760, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + { 24795, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ + { 24828, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ + { 24862, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + { 24901, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + { 24940, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ + { 24962, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ + { 24988, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ + { 25012, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ + { 25035, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ + { 25057, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ + { 25078, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ + { 25099, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ + { 25126, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ + { 25158, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ + { 25190, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ + { 25225, 0x00001701 }, /* GL_PROJECTION */ + { 25239, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ + { 25260, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ + { 25286, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ + { 25307, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ + { 25326, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ + { 25349, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ + { 25388, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ + { 25426, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ + { 25446, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ + { 25470, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ + { 25490, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ + { 25514, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ + { 25534, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ + { 25567, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ + { 25593, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ + { 25623, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ + { 25654, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ + { 25684, 0x00002003 }, /* GL_Q */ + { 25689, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ + { 25714, 0x00000007 }, /* GL_QUADS */ + { 25723, 0x00008614 }, /* GL_QUAD_MESH_SUN */ + { 25740, 0x00000008 }, /* GL_QUAD_STRIP */ + { 25754, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ + { 25776, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ + { 25802, 0x00008866 }, /* GL_QUERY_RESULT */ + { 25818, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ + { 25838, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ + { 25864, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ + { 25894, 0x00002002 }, /* GL_R */ + { 25899, 0x00002A10 }, /* GL_R3_G3_B2 */ + { 25911, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ + { 25944, 0x00000C02 }, /* GL_READ_BUFFER */ + { 25959, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ + { 25991, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ + { 26015, 0x000088B8 }, /* GL_READ_ONLY */ + { 26028, 0x000088B8 }, /* GL_READ_ONLY_ARB */ + { 26045, 0x000088BA }, /* GL_READ_WRITE */ + { 26059, 0x000088BA }, /* GL_READ_WRITE_ARB */ + { 26077, 0x00001903 }, /* GL_RED */ + { 26084, 0x00008016 }, /* GL_REDUCE */ + { 26094, 0x00008016 }, /* GL_REDUCE_EXT */ + { 26108, 0x00000D15 }, /* GL_RED_BIAS */ + { 26120, 0x00000D52 }, /* GL_RED_BITS */ + { 26132, 0x00000D14 }, /* GL_RED_SCALE */ + { 26145, 0x00008512 }, /* GL_REFLECTION_MAP */ + { 26163, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ + { 26185, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ + { 26206, 0x00001C00 }, /* GL_RENDER */ + { 26216, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ + { 26244, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ + { 26264, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ + { 26291, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ + { 26327, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ + { 26353, 0x00001F01 }, /* GL_RENDERER */ + { 26365, 0x00000C40 }, /* GL_RENDER_MODE */ + { 26380, 0x00002901 }, /* GL_REPEAT */ + { 26390, 0x00001E01 }, /* GL_REPLACE */ + { 26401, 0x00008062 }, /* GL_REPLACE_EXT */ + { 26416, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ + { 26439, 0x0000803A }, /* GL_RESCALE_NORMAL */ + { 26457, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ + { 26479, 0x00000102 }, /* GL_RETURN */ + { 26489, 0x00001907 }, /* GL_RGB */ + { 26496, 0x00008052 }, /* GL_RGB10 */ + { 26505, 0x00008059 }, /* GL_RGB10_A2 */ + { 26517, 0x00008059 }, /* GL_RGB10_A2_EXT */ + { 26533, 0x00008052 }, /* GL_RGB10_EXT */ + { 26546, 0x00008053 }, /* GL_RGB12 */ + { 26555, 0x00008053 }, /* GL_RGB12_EXT */ + { 26568, 0x00008054 }, /* GL_RGB16 */ + { 26577, 0x00008054 }, /* GL_RGB16_EXT */ + { 26590, 0x0000804E }, /* GL_RGB2_EXT */ + { 26602, 0x0000804F }, /* GL_RGB4 */ + { 26610, 0x0000804F }, /* GL_RGB4_EXT */ + { 26622, 0x000083A1 }, /* GL_RGB4_S3TC */ + { 26635, 0x00008050 }, /* GL_RGB5 */ + { 26643, 0x00008057 }, /* GL_RGB5_A1 */ + { 26654, 0x00008057 }, /* GL_RGB5_A1_EXT */ + { 26669, 0x00008050 }, /* GL_RGB5_EXT */ + { 26681, 0x00008051 }, /* GL_RGB8 */ + { 26689, 0x00008051 }, /* GL_RGB8_EXT */ + { 26701, 0x00001908 }, /* GL_RGBA */ + { 26709, 0x0000805A }, /* GL_RGBA12 */ + { 26719, 0x0000805A }, /* GL_RGBA12_EXT */ + { 26733, 0x0000805B }, /* GL_RGBA16 */ + { 26743, 0x0000805B }, /* GL_RGBA16_EXT */ + { 26757, 0x00008055 }, /* GL_RGBA2 */ + { 26766, 0x00008055 }, /* GL_RGBA2_EXT */ + { 26779, 0x00008056 }, /* GL_RGBA4 */ + { 26788, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ + { 26807, 0x00008056 }, /* GL_RGBA4_EXT */ + { 26820, 0x000083A3 }, /* GL_RGBA4_S3TC */ + { 26834, 0x00008058 }, /* GL_RGBA8 */ + { 26843, 0x00008058 }, /* GL_RGBA8_EXT */ + { 26856, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ + { 26874, 0x00000C31 }, /* GL_RGBA_MODE */ + { 26887, 0x000083A2 }, /* GL_RGBA_S3TC */ + { 26900, 0x000083A0 }, /* GL_RGB_S3TC */ + { 26912, 0x00008573 }, /* GL_RGB_SCALE */ + { 26925, 0x00008573 }, /* GL_RGB_SCALE_ARB */ + { 26942, 0x00008573 }, /* GL_RGB_SCALE_EXT */ + { 26959, 0x00000407 }, /* GL_RIGHT */ + { 26968, 0x00002000 }, /* GL_S */ + { 26973, 0x00008B5D }, /* GL_SAMPLER_1D */ + { 26987, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */ + { 27008, 0x00008B5E }, /* GL_SAMPLER_2D */ + { 27022, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */ + { 27043, 0x00008B5F }, /* GL_SAMPLER_3D */ + { 27057, 0x00008B60 }, /* GL_SAMPLER_CUBE */ + { 27073, 0x000080A9 }, /* GL_SAMPLES */ + { 27084, 0x000086B4 }, /* GL_SAMPLES_3DFX */ + { 27100, 0x000080A9 }, /* GL_SAMPLES_ARB */ + { 27115, 0x00008914 }, /* GL_SAMPLES_PASSED */ + { 27133, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ + { 27155, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ + { 27183, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ + { 27215, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ + { 27238, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ + { 27265, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ + { 27283, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ + { 27306, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ + { 27328, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ + { 27347, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ + { 27370, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ + { 27396, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ + { 27426, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ + { 27451, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ + { 27480, 0x00080000 }, /* GL_SCISSOR_BIT */ + { 27495, 0x00000C10 }, /* GL_SCISSOR_BOX */ + { 27510, 0x00000C11 }, /* GL_SCISSOR_TEST */ + { 27526, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ + { 27551, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ + { 27591, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ + { 27635, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ + { 27668, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ + { 27698, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ + { 27730, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ + { 27760, 0x00001C02 }, /* GL_SELECT */ + { 27770, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ + { 27798, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ + { 27823, 0x00008012 }, /* GL_SEPARABLE_2D */ + { 27839, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ + { 27866, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ + { 27897, 0x0000150F }, /* GL_SET */ + { 27904, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ + { 27925, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */ + { 27949, 0x00008B4F }, /* GL_SHADER_TYPE */ + { 27964, 0x00000B54 }, /* GL_SHADE_MODEL */ + { 27979, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */ + { 28007, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ + { 28030, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ + { 28060, 0x00001601 }, /* GL_SHININESS */ + { 28073, 0x00001402 }, /* GL_SHORT */ + { 28082, 0x000081F9 }, /* GL_SINGLE_COLOR */ + { 28098, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ + { 28118, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ + { 28137, 0x00001D01 }, /* GL_SMOOTH */ + { 28147, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ + { 28180, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ + { 28207, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ + { 28240, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ + { 28267, 0x00008588 }, /* GL_SOURCE0_ALPHA */ + { 28284, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ + { 28305, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ + { 28326, 0x00008580 }, /* GL_SOURCE0_RGB */ + { 28341, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ + { 28360, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ + { 28379, 0x00008589 }, /* GL_SOURCE1_ALPHA */ + { 28396, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ + { 28417, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ + { 28438, 0x00008581 }, /* GL_SOURCE1_RGB */ + { 28453, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ + { 28472, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ + { 28491, 0x0000858A }, /* GL_SOURCE2_ALPHA */ + { 28508, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ + { 28529, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ + { 28550, 0x00008582 }, /* GL_SOURCE2_RGB */ + { 28565, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ + { 28584, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ + { 28603, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ + { 28623, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ + { 28641, 0x00001202 }, /* GL_SPECULAR */ + { 28653, 0x00002402 }, /* GL_SPHERE_MAP */ + { 28667, 0x00001206 }, /* GL_SPOT_CUTOFF */ + { 28682, 0x00001204 }, /* GL_SPOT_DIRECTION */ + { 28700, 0x00001205 }, /* GL_SPOT_EXPONENT */ + { 28717, 0x00008588 }, /* GL_SRC0_ALPHA */ + { 28731, 0x00008580 }, /* GL_SRC0_RGB */ + { 28743, 0x00008589 }, /* GL_SRC1_ALPHA */ + { 28757, 0x00008581 }, /* GL_SRC1_RGB */ + { 28769, 0x0000858A }, /* GL_SRC2_ALPHA */ + { 28783, 0x00008582 }, /* GL_SRC2_RGB */ + { 28795, 0x00000302 }, /* GL_SRC_ALPHA */ + { 28808, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ + { 28830, 0x00000300 }, /* GL_SRC_COLOR */ + { 28843, 0x00000503 }, /* GL_STACK_OVERFLOW */ + { 28861, 0x00000504 }, /* GL_STACK_UNDERFLOW */ + { 28880, 0x000088E6 }, /* GL_STATIC_COPY */ + { 28895, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ + { 28914, 0x000088E4 }, /* GL_STATIC_DRAW */ + { 28929, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ + { 28948, 0x000088E5 }, /* GL_STATIC_READ */ + { 28963, 0x000088E5 }, /* GL_STATIC_READ_ARB */ + { 28982, 0x00001802 }, /* GL_STENCIL */ + { 28993, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ + { 29019, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */ + { 29040, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */ + { 29061, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ + { 29093, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ + { 29125, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */ + { 29145, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */ + { 29172, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */ + { 29198, 0x00000D57 }, /* GL_STENCIL_BITS */ + { 29214, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ + { 29236, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ + { 29259, 0x00000B94 }, /* GL_STENCIL_FAIL */ + { 29275, 0x00000B92 }, /* GL_STENCIL_FUNC */ + { 29291, 0x00001901 }, /* GL_STENCIL_INDEX */ + { 29308, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ + { 29331, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ + { 29353, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ + { 29375, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ + { 29397, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ + { 29418, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ + { 29445, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ + { 29472, 0x00000B97 }, /* GL_STENCIL_REF */ + { 29487, 0x00000B90 }, /* GL_STENCIL_TEST */ + { 29503, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ + { 29532, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ + { 29554, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ + { 29575, 0x00000C33 }, /* GL_STEREO */ + { 29585, 0x000088E2 }, /* GL_STREAM_COPY */ + { 29600, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ + { 29619, 0x000088E0 }, /* GL_STREAM_DRAW */ + { 29634, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ + { 29653, 0x000088E1 }, /* GL_STREAM_READ */ + { 29668, 0x000088E1 }, /* GL_STREAM_READ_ARB */ + { 29687, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ + { 29704, 0x000084E7 }, /* GL_SUBTRACT */ + { 29716, 0x000084E7 }, /* GL_SUBTRACT_ARB */ + { 29732, 0x00002001 }, /* GL_T */ + { 29737, 0x00002A2A }, /* GL_T2F_C3F_V3F */ + { 29752, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ + { 29771, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ + { 29787, 0x00002A2B }, /* GL_T2F_N3F_V3F */ + { 29802, 0x00002A27 }, /* GL_T2F_V3F */ + { 29813, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ + { 29832, 0x00002A28 }, /* GL_T4F_V4F */ + { 29843, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ + { 29866, 0x00001702 }, /* GL_TEXTURE */ + { 29877, 0x000084C0 }, /* GL_TEXTURE0 */ + { 29889, 0x000084C0 }, /* GL_TEXTURE0_ARB */ + { 29905, 0x000084C1 }, /* GL_TEXTURE1 */ + { 29917, 0x000084CA }, /* GL_TEXTURE10 */ + { 29930, 0x000084CA }, /* GL_TEXTURE10_ARB */ + { 29947, 0x000084CB }, /* GL_TEXTURE11 */ + { 29960, 0x000084CB }, /* GL_TEXTURE11_ARB */ + { 29977, 0x000084CC }, /* GL_TEXTURE12 */ + { 29990, 0x000084CC }, /* GL_TEXTURE12_ARB */ + { 30007, 0x000084CD }, /* GL_TEXTURE13 */ + { 30020, 0x000084CD }, /* GL_TEXTURE13_ARB */ + { 30037, 0x000084CE }, /* GL_TEXTURE14 */ + { 30050, 0x000084CE }, /* GL_TEXTURE14_ARB */ + { 30067, 0x000084CF }, /* GL_TEXTURE15 */ + { 30080, 0x000084CF }, /* GL_TEXTURE15_ARB */ + { 30097, 0x000084D0 }, /* GL_TEXTURE16 */ + { 30110, 0x000084D0 }, /* GL_TEXTURE16_ARB */ + { 30127, 0x000084D1 }, /* GL_TEXTURE17 */ + { 30140, 0x000084D1 }, /* GL_TEXTURE17_ARB */ + { 30157, 0x000084D2 }, /* GL_TEXTURE18 */ + { 30170, 0x000084D2 }, /* GL_TEXTURE18_ARB */ + { 30187, 0x000084D3 }, /* GL_TEXTURE19 */ + { 30200, 0x000084D3 }, /* GL_TEXTURE19_ARB */ + { 30217, 0x000084C1 }, /* GL_TEXTURE1_ARB */ + { 30233, 0x000084C2 }, /* GL_TEXTURE2 */ + { 30245, 0x000084D4 }, /* GL_TEXTURE20 */ + { 30258, 0x000084D4 }, /* GL_TEXTURE20_ARB */ + { 30275, 0x000084D5 }, /* GL_TEXTURE21 */ + { 30288, 0x000084D5 }, /* GL_TEXTURE21_ARB */ + { 30305, 0x000084D6 }, /* GL_TEXTURE22 */ + { 30318, 0x000084D6 }, /* GL_TEXTURE22_ARB */ + { 30335, 0x000084D7 }, /* GL_TEXTURE23 */ + { 30348, 0x000084D7 }, /* GL_TEXTURE23_ARB */ + { 30365, 0x000084D8 }, /* GL_TEXTURE24 */ + { 30378, 0x000084D8 }, /* GL_TEXTURE24_ARB */ + { 30395, 0x000084D9 }, /* GL_TEXTURE25 */ + { 30408, 0x000084D9 }, /* GL_TEXTURE25_ARB */ + { 30425, 0x000084DA }, /* GL_TEXTURE26 */ + { 30438, 0x000084DA }, /* GL_TEXTURE26_ARB */ + { 30455, 0x000084DB }, /* GL_TEXTURE27 */ + { 30468, 0x000084DB }, /* GL_TEXTURE27_ARB */ + { 30485, 0x000084DC }, /* GL_TEXTURE28 */ + { 30498, 0x000084DC }, /* GL_TEXTURE28_ARB */ + { 30515, 0x000084DD }, /* GL_TEXTURE29 */ + { 30528, 0x000084DD }, /* GL_TEXTURE29_ARB */ + { 30545, 0x000084C2 }, /* GL_TEXTURE2_ARB */ + { 30561, 0x000084C3 }, /* GL_TEXTURE3 */ + { 30573, 0x000084DE }, /* GL_TEXTURE30 */ + { 30586, 0x000084DE }, /* GL_TEXTURE30_ARB */ + { 30603, 0x000084DF }, /* GL_TEXTURE31 */ + { 30616, 0x000084DF }, /* GL_TEXTURE31_ARB */ + { 30633, 0x000084C3 }, /* GL_TEXTURE3_ARB */ + { 30649, 0x000084C4 }, /* GL_TEXTURE4 */ + { 30661, 0x000084C4 }, /* GL_TEXTURE4_ARB */ + { 30677, 0x000084C5 }, /* GL_TEXTURE5 */ + { 30689, 0x000084C5 }, /* GL_TEXTURE5_ARB */ + { 30705, 0x000084C6 }, /* GL_TEXTURE6 */ + { 30717, 0x000084C6 }, /* GL_TEXTURE6_ARB */ + { 30733, 0x000084C7 }, /* GL_TEXTURE7 */ + { 30745, 0x000084C7 }, /* GL_TEXTURE7_ARB */ + { 30761, 0x000084C8 }, /* GL_TEXTURE8 */ + { 30773, 0x000084C8 }, /* GL_TEXTURE8_ARB */ + { 30789, 0x000084C9 }, /* GL_TEXTURE9 */ + { 30801, 0x000084C9 }, /* GL_TEXTURE9_ARB */ + { 30817, 0x00000DE0 }, /* GL_TEXTURE_1D */ + { 30831, 0x00000DE1 }, /* GL_TEXTURE_2D */ + { 30845, 0x0000806F }, /* GL_TEXTURE_3D */ + { 30859, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ + { 30881, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ + { 30907, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ + { 30929, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ + { 30951, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ + { 30973, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ + { 30995, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ + { 31023, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ + { 31055, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ + { 31088, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ + { 31120, 0x00040000 }, /* GL_TEXTURE_BIT */ + { 31135, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ + { 31156, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ + { 31181, 0x00001005 }, /* GL_TEXTURE_BORDER */ + { 31199, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ + { 31223, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ + { 31254, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ + { 31284, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ + { 31314, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ + { 31349, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ + { 31380, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + { 31418, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ + { 31445, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ + { 31477, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ + { 31511, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ + { 31535, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ + { 31563, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ + { 31587, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ + { 31615, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ + { 31648, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ + { 31672, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ + { 31694, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ + { 31716, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ + { 31742, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ + { 31776, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ + { 31809, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ + { 31846, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ + { 31874, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ + { 31906, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ + { 31929, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ + { 31967, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ + { 32009, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ + { 32040, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ + { 32068, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ + { 32098, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ + { 32126, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ + { 32146, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ + { 32170, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ + { 32201, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ + { 32236, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ + { 32267, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ + { 32302, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ + { 32333, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ + { 32368, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ + { 32399, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ + { 32434, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ + { 32465, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ + { 32500, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ + { 32531, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ + { 32566, 0x00008071 }, /* GL_TEXTURE_DEPTH */ + { 32583, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ + { 32605, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ + { 32631, 0x00002300 }, /* GL_TEXTURE_ENV */ + { 32646, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ + { 32667, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ + { 32687, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ + { 32713, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ + { 32733, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ + { 32750, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ + { 32767, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ + { 32784, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ + { 32801, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ + { 32826, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ + { 32848, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ + { 32874, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ + { 32892, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ + { 32918, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ + { 32944, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ + { 32974, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ + { 33001, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ + { 33026, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ + { 33046, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ + { 33070, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ + { 33097, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ + { 33124, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ + { 33151, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ + { 33177, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ + { 33207, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ + { 33229, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ + { 33247, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ + { 33277, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ + { 33305, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ + { 33333, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ + { 33361, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ + { 33382, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ + { 33401, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ + { 33423, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ + { 33442, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ + { 33462, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ + { 33487, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ + { 33511, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ + { 33531, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ + { 33555, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ + { 33575, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ + { 33598, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ + { 33623, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ + { 33657, 0x00001000 }, /* GL_TEXTURE_WIDTH */ + { 33674, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ + { 33692, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ + { 33710, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ + { 33728, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ + { 33748, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ + { 33767, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + { 33796, 0x00001000 }, /* GL_TRANSFORM_BIT */ + { 33813, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ + { 33839, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ + { 33869, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + { 33901, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + { 33931, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ + { 33965, 0x0000862C }, /* GL_TRANSPOSE_NV */ + { 33981, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + { 34012, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ + { 34047, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + { 34075, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ + { 34107, 0x00000004 }, /* GL_TRIANGLES */ + { 34120, 0x00000006 }, /* GL_TRIANGLE_FAN */ + { 34136, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ + { 34157, 0x00000005 }, /* GL_TRIANGLE_STRIP */ + { 34175, 0x00000001 }, /* GL_TRUE */ + { 34183, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ + { 34203, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ + { 34226, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ + { 34246, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ + { 34267, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ + { 34289, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ + { 34311, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ + { 34331, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ + { 34352, 0x00001401 }, /* GL_UNSIGNED_BYTE */ + { 34369, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + { 34396, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ + { 34419, 0x00001405 }, /* GL_UNSIGNED_INT */ + { 34435, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ + { 34462, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ + { 34486, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + { 34517, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ + { 34541, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + { 34569, 0x00001403 }, /* GL_UNSIGNED_SHORT */ + { 34587, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + { 34617, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + { 34643, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + { 34673, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + { 34699, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ + { 34723, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + { 34751, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + { 34779, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ + { 34806, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + { 34838, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ + { 34869, 0x00008CA2 }, /* GL_UPPER_LEFT */ + { 34883, 0x00002A20 }, /* GL_V2F */ + { 34890, 0x00002A21 }, /* GL_V3F */ + { 34897, 0x00008B83 }, /* GL_VALIDATE_STATUS */ + { 34916, 0x00001F00 }, /* GL_VENDOR */ + { 34926, 0x00001F02 }, /* GL_VERSION */ + { 34937, 0x00008074 }, /* GL_VERTEX_ARRAY */ + { 34953, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ + { 34983, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + { 35014, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ + { 35049, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ + { 35073, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ + { 35094, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ + { 35117, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ + { 35138, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + { 35165, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + { 35193, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + { 35221, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + { 35249, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + { 35277, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + { 35305, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + { 35333, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + { 35360, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + { 35387, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + { 35414, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + { 35441, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + { 35468, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + { 35495, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + { 35522, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + { 35549, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + { 35576, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + { 35614, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ + { 35656, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + { 35687, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ + { 35722, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + { 35756, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ + { 35794, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + { 35825, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ + { 35860, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + { 35888, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ + { 35920, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + { 35950, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ + { 35984, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + { 36012, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ + { 36044, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ + { 36064, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ + { 36086, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ + { 36115, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ + { 36136, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + { 36165, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ + { 36198, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ + { 36230, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + { 36257, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ + { 36288, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ + { 36318, 0x00008B31 }, /* GL_VERTEX_SHADER */ + { 36335, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ + { 36356, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ + { 36383, 0x00000BA2 }, /* GL_VIEWPORT */ + { 36395, 0x00000800 }, /* GL_VIEWPORT_BIT */ + { 36411, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ + { 36431, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + { 36462, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ + { 36497, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + { 36525, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + { 36550, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + { 36577, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + { 36602, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ + { 36626, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ + { 36645, 0x000088B9 }, /* GL_WRITE_ONLY */ + { 36659, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ + { 36677, 0x00001506 }, /* GL_XOR */ + { 36684, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ + { 36703, 0x00008757 }, /* GL_YCBCR_MESA */ + { 36717, 0x00000000 }, /* GL_ZERO */ + { 36725, 0x00000D16 }, /* GL_ZOOM_X */ + { 36735, 0x00000D17 }, /* GL_ZOOM_Y */ }; -static const unsigned reduced_enums[1240] = +static const unsigned reduced_enums[1258] = { - 404, /* GL_FALSE */ - 576, /* GL_LINES */ - 578, /* GL_LINE_LOOP */ - 585, /* GL_LINE_STRIP */ - 1533, /* GL_TRIANGLES */ - 1536, /* GL_TRIANGLE_STRIP */ - 1534, /* GL_TRIANGLE_FAN */ - 1127, /* GL_QUADS */ - 1129, /* GL_QUAD_STRIP */ - 1017, /* GL_POLYGON */ - 1029, /* GL_POLYGON_STIPPLE_BIT */ - 983, /* GL_PIXEL_MODE_BIT */ - 563, /* GL_LIGHTING_BIT */ - 420, /* GL_FOG_BIT */ + 435, /* GL_FALSE */ + 620, /* GL_LINES */ + 622, /* GL_LINE_LOOP */ + 629, /* GL_LINE_STRIP */ + 1605, /* GL_TRIANGLES */ + 1608, /* GL_TRIANGLE_STRIP */ + 1606, /* GL_TRIANGLE_FAN */ + 1183, /* GL_QUADS */ + 1185, /* GL_QUAD_STRIP */ + 1073, /* GL_POLYGON */ + 1085, /* GL_POLYGON_STIPPLE_BIT */ + 1038, /* GL_PIXEL_MODE_BIT */ + 607, /* GL_LIGHTING_BIT */ + 457, /* GL_FOG_BIT */ 8, /* GL_ACCUM */ - 594, /* GL_LOAD */ - 1169, /* GL_RETURN */ - 856, /* GL_MULT */ - 19, /* GL_ADD */ - 872, /* GL_NEVER */ - 553, /* GL_LESS */ - 394, /* GL_EQUAL */ - 552, /* GL_LEQUAL */ - 482, /* GL_GREATER */ - 887, /* GL_NOTEQUAL */ - 481, /* GL_GEQUAL */ - 42, /* GL_ALWAYS */ - 1293, /* GL_SRC_COLOR */ - 916, /* GL_ONE_MINUS_SRC_COLOR */ - 1291, /* GL_SRC_ALPHA */ - 915, /* GL_ONE_MINUS_SRC_ALPHA */ - 374, /* GL_DST_ALPHA */ - 913, /* GL_ONE_MINUS_DST_ALPHA */ - 375, /* GL_DST_COLOR */ - 914, /* GL_ONE_MINUS_DST_COLOR */ - 1292, /* GL_SRC_ALPHA_SATURATE */ - 469, /* GL_FRONT_LEFT */ - 470, /* GL_FRONT_RIGHT */ - 64, /* GL_BACK_LEFT */ - 65, /* GL_BACK_RIGHT */ - 466, /* GL_FRONT */ - 63, /* GL_BACK */ - 551, /* GL_LEFT */ - 1209, /* GL_RIGHT */ - 467, /* GL_FRONT_AND_BACK */ - 58, /* GL_AUX0 */ - 59, /* GL_AUX1 */ - 60, /* GL_AUX2 */ - 61, /* GL_AUX3 */ - 543, /* GL_INVALID_ENUM */ - 546, /* GL_INVALID_VALUE */ - 545, /* GL_INVALID_OPERATION */ - 1294, /* GL_STACK_OVERFLOW */ - 1295, /* GL_STACK_UNDERFLOW */ - 941, /* GL_OUT_OF_MEMORY */ - 544, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ + 639, /* GL_LOAD */ + 1225, /* GL_RETURN */ + 911, /* GL_MULT */ + 23, /* GL_ADD */ + 927, /* GL_NEVER */ + 597, /* GL_LESS */ + 425, /* GL_EQUAL */ + 596, /* GL_LEQUAL */ + 522, /* GL_GREATER */ + 942, /* GL_NOTEQUAL */ + 520, /* GL_GEQUAL */ + 46, /* GL_ALWAYS */ + 1358, /* GL_SRC_COLOR */ + 971, /* GL_ONE_MINUS_SRC_COLOR */ + 1356, /* GL_SRC_ALPHA */ + 970, /* GL_ONE_MINUS_SRC_ALPHA */ + 405, /* GL_DST_ALPHA */ + 968, /* GL_ONE_MINUS_DST_ALPHA */ + 406, /* GL_DST_COLOR */ + 969, /* GL_ONE_MINUS_DST_COLOR */ + 1357, /* GL_SRC_ALPHA_SATURATE */ + 508, /* GL_FRONT_LEFT */ + 509, /* GL_FRONT_RIGHT */ + 69, /* GL_BACK_LEFT */ + 70, /* GL_BACK_RIGHT */ + 505, /* GL_FRONT */ + 68, /* GL_BACK */ + 595, /* GL_LEFT */ + 1265, /* GL_RIGHT */ + 506, /* GL_FRONT_AND_BACK */ + 63, /* GL_AUX0 */ + 64, /* GL_AUX1 */ + 65, /* GL_AUX2 */ + 66, /* GL_AUX3 */ + 587, /* GL_INVALID_ENUM */ + 590, /* GL_INVALID_VALUE */ + 589, /* GL_INVALID_OPERATION */ + 1359, /* GL_STACK_OVERFLOW */ + 1360, /* GL_STACK_UNDERFLOW */ + 996, /* GL_OUT_OF_MEMORY */ + 588, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ 0, /* GL_2D */ 2, /* GL_3D */ 3, /* GL_3D_COLOR */ 4, /* GL_3D_COLOR_TEXTURE */ 6, /* GL_4D_COLOR_TEXTURE */ - 961, /* GL_PASS_THROUGH_TOKEN */ - 1016, /* GL_POINT_TOKEN */ - 586, /* GL_LINE_TOKEN */ - 1030, /* GL_POLYGON_TOKEN */ - 69, /* GL_BITMAP_TOKEN */ - 373, /* GL_DRAW_PIXEL_TOKEN */ - 258, /* GL_COPY_PIXEL_TOKEN */ - 579, /* GL_LINE_RESET_TOKEN */ - 397, /* GL_EXP */ - 398, /* GL_EXP2 */ - 289, /* GL_CW */ - 106, /* GL_CCW */ - 127, /* GL_COEFF */ - 938, /* GL_ORDER */ - 328, /* GL_DOMAIN */ - 266, /* GL_CURRENT_COLOR */ - 269, /* GL_CURRENT_INDEX */ - 275, /* GL_CURRENT_NORMAL */ - 286, /* GL_CURRENT_TEXTURE_COORDS */ - 279, /* GL_CURRENT_RASTER_COLOR */ - 281, /* GL_CURRENT_RASTER_INDEX */ - 284, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ - 282, /* GL_CURRENT_RASTER_POSITION */ - 283, /* GL_CURRENT_RASTER_POSITION_VALID */ - 280, /* GL_CURRENT_RASTER_DISTANCE */ - 1010, /* GL_POINT_SMOOTH */ - 999, /* GL_POINT_SIZE */ - 1009, /* GL_POINT_SIZE_RANGE */ - 1000, /* GL_POINT_SIZE_GRANULARITY */ - 580, /* GL_LINE_SMOOTH */ - 587, /* GL_LINE_WIDTH */ - 589, /* GL_LINE_WIDTH_RANGE */ - 588, /* GL_LINE_WIDTH_GRANULARITY */ - 582, /* GL_LINE_STIPPLE */ - 583, /* GL_LINE_STIPPLE_PATTERN */ - 584, /* GL_LINE_STIPPLE_REPEAT */ - 593, /* GL_LIST_MODE */ - 747, /* GL_MAX_LIST_NESTING */ - 590, /* GL_LIST_BASE */ - 592, /* GL_LIST_INDEX */ - 1019, /* GL_POLYGON_MODE */ - 1026, /* GL_POLYGON_SMOOTH */ - 1028, /* GL_POLYGON_STIPPLE */ - 382, /* GL_EDGE_FLAG */ - 259, /* GL_CULL_FACE */ - 260, /* GL_CULL_FACE_MODE */ - 468, /* GL_FRONT_FACE */ - 562, /* GL_LIGHTING */ - 567, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - 568, /* GL_LIGHT_MODEL_TWO_SIDE */ - 564, /* GL_LIGHT_MODEL_AMBIENT */ - 1247, /* GL_SHADE_MODEL */ - 158, /* GL_COLOR_MATERIAL_FACE */ - 159, /* GL_COLOR_MATERIAL_PARAMETER */ - 157, /* GL_COLOR_MATERIAL */ - 419, /* GL_FOG */ - 441, /* GL_FOG_INDEX */ - 437, /* GL_FOG_DENSITY */ - 445, /* GL_FOG_START */ - 439, /* GL_FOG_END */ - 442, /* GL_FOG_MODE */ - 421, /* GL_FOG_COLOR */ - 317, /* GL_DEPTH_RANGE */ - 322, /* GL_DEPTH_TEST */ - 325, /* GL_DEPTH_WRITEMASK */ - 305, /* GL_DEPTH_CLEAR_VALUE */ - 316, /* GL_DEPTH_FUNC */ + 1016, /* GL_PASS_THROUGH_TOKEN */ + 1072, /* GL_POINT_TOKEN */ + 630, /* GL_LINE_TOKEN */ + 1086, /* GL_POLYGON_TOKEN */ + 74, /* GL_BITMAP_TOKEN */ + 404, /* GL_DRAW_PIXEL_TOKEN */ + 270, /* GL_COPY_PIXEL_TOKEN */ + 623, /* GL_LINE_RESET_TOKEN */ + 428, /* GL_EXP */ + 429, /* GL_EXP2 */ + 303, /* GL_CW */ + 116, /* GL_CCW */ + 137, /* GL_COEFF */ + 993, /* GL_ORDER */ + 343, /* GL_DOMAIN */ + 278, /* GL_CURRENT_COLOR */ + 281, /* GL_CURRENT_INDEX */ + 287, /* GL_CURRENT_NORMAL */ + 299, /* GL_CURRENT_TEXTURE_COORDS */ + 292, /* GL_CURRENT_RASTER_COLOR */ + 294, /* GL_CURRENT_RASTER_INDEX */ + 297, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ + 295, /* GL_CURRENT_RASTER_POSITION */ + 296, /* GL_CURRENT_RASTER_POSITION_VALID */ + 293, /* GL_CURRENT_RASTER_DISTANCE */ + 1065, /* GL_POINT_SMOOTH */ + 1054, /* GL_POINT_SIZE */ + 1064, /* GL_POINT_SIZE_RANGE */ + 1055, /* GL_POINT_SIZE_GRANULARITY */ + 624, /* GL_LINE_SMOOTH */ + 631, /* GL_LINE_WIDTH */ + 633, /* GL_LINE_WIDTH_RANGE */ + 632, /* GL_LINE_WIDTH_GRANULARITY */ + 626, /* GL_LINE_STIPPLE */ + 627, /* GL_LINE_STIPPLE_PATTERN */ + 628, /* GL_LINE_STIPPLE_REPEAT */ + 638, /* GL_LIST_MODE */ + 796, /* GL_MAX_LIST_NESTING */ + 635, /* GL_LIST_BASE */ + 637, /* GL_LIST_INDEX */ + 1075, /* GL_POLYGON_MODE */ + 1082, /* GL_POLYGON_SMOOTH */ + 1084, /* GL_POLYGON_STIPPLE */ + 413, /* GL_EDGE_FLAG */ + 271, /* GL_CULL_FACE */ + 272, /* GL_CULL_FACE_MODE */ + 507, /* GL_FRONT_FACE */ + 606, /* GL_LIGHTING */ + 611, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ + 612, /* GL_LIGHT_MODEL_TWO_SIDE */ + 608, /* GL_LIGHT_MODEL_AMBIENT */ + 1311, /* GL_SHADE_MODEL */ + 168, /* GL_COLOR_MATERIAL_FACE */ + 169, /* GL_COLOR_MATERIAL_PARAMETER */ + 167, /* GL_COLOR_MATERIAL */ + 456, /* GL_FOG */ + 478, /* GL_FOG_INDEX */ + 474, /* GL_FOG_DENSITY */ + 482, /* GL_FOG_START */ + 476, /* GL_FOG_END */ + 479, /* GL_FOG_MODE */ + 458, /* GL_FOG_COLOR */ + 332, /* GL_DEPTH_RANGE */ + 337, /* GL_DEPTH_TEST */ + 340, /* GL_DEPTH_WRITEMASK */ + 320, /* GL_DEPTH_CLEAR_VALUE */ + 331, /* GL_DEPTH_FUNC */ 12, /* GL_ACCUM_CLEAR_VALUE */ - 1318, /* GL_STENCIL_TEST */ - 1306, /* GL_STENCIL_CLEAR_VALUE */ - 1308, /* GL_STENCIL_FUNC */ - 1320, /* GL_STENCIL_VALUE_MASK */ - 1307, /* GL_STENCIL_FAIL */ - 1315, /* GL_STENCIL_PASS_DEPTH_FAIL */ - 1316, /* GL_STENCIL_PASS_DEPTH_PASS */ - 1317, /* GL_STENCIL_REF */ - 1321, /* GL_STENCIL_WRITEMASK */ - 720, /* GL_MATRIX_MODE */ - 877, /* GL_NORMALIZE */ - 1612, /* GL_VIEWPORT */ - 851, /* GL_MODELVIEW_STACK_DEPTH */ - 1109, /* GL_PROJECTION_STACK_DEPTH */ - 1512, /* GL_TEXTURE_STACK_DEPTH */ - 849, /* GL_MODELVIEW_MATRIX */ - 1108, /* GL_PROJECTION_MATRIX */ - 1497, /* GL_TEXTURE_MATRIX */ - 56, /* GL_ATTRIB_STACK_DEPTH */ - 117, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ - 39, /* GL_ALPHA_TEST */ - 40, /* GL_ALPHA_TEST_FUNC */ - 41, /* GL_ALPHA_TEST_REF */ - 327, /* GL_DITHER */ - 73, /* GL_BLEND_DST */ - 80, /* GL_BLEND_SRC */ - 70, /* GL_BLEND */ - 596, /* GL_LOGIC_OP_MODE */ - 521, /* GL_INDEX_LOGIC_OP */ - 156, /* GL_COLOR_LOGIC_OP */ - 62, /* GL_AUX_BUFFERS */ - 338, /* GL_DRAW_BUFFER */ - 1139, /* GL_READ_BUFFER */ - 1230, /* GL_SCISSOR_BOX */ - 1231, /* GL_SCISSOR_TEST */ - 520, /* GL_INDEX_CLEAR_VALUE */ - 525, /* GL_INDEX_WRITEMASK */ - 153, /* GL_COLOR_CLEAR_VALUE */ - 195, /* GL_COLOR_WRITEMASK */ - 522, /* GL_INDEX_MODE */ - 1203, /* GL_RGBA_MODE */ - 337, /* GL_DOUBLEBUFFER */ - 1322, /* GL_STEREO */ - 1162, /* GL_RENDER_MODE */ - 962, /* GL_PERSPECTIVE_CORRECTION_HINT */ - 1011, /* GL_POINT_SMOOTH_HINT */ - 581, /* GL_LINE_SMOOTH_HINT */ - 1027, /* GL_POLYGON_SMOOTH_HINT */ - 440, /* GL_FOG_HINT */ - 1478, /* GL_TEXTURE_GEN_S */ - 1479, /* GL_TEXTURE_GEN_T */ - 1477, /* GL_TEXTURE_GEN_R */ - 1476, /* GL_TEXTURE_GEN_Q */ - 975, /* GL_PIXEL_MAP_I_TO_I */ - 981, /* GL_PIXEL_MAP_S_TO_S */ - 977, /* GL_PIXEL_MAP_I_TO_R */ - 973, /* GL_PIXEL_MAP_I_TO_G */ - 971, /* GL_PIXEL_MAP_I_TO_B */ - 969, /* GL_PIXEL_MAP_I_TO_A */ - 979, /* GL_PIXEL_MAP_R_TO_R */ - 967, /* GL_PIXEL_MAP_G_TO_G */ - 965, /* GL_PIXEL_MAP_B_TO_B */ - 963, /* GL_PIXEL_MAP_A_TO_A */ - 976, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - 982, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - 978, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - 974, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - 972, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - 970, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - 980, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - 968, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - 966, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - 964, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - 1545, /* GL_UNPACK_SWAP_BYTES */ - 1540, /* GL_UNPACK_LSB_FIRST */ - 1541, /* GL_UNPACK_ROW_LENGTH */ - 1544, /* GL_UNPACK_SKIP_ROWS */ - 1543, /* GL_UNPACK_SKIP_PIXELS */ - 1538, /* GL_UNPACK_ALIGNMENT */ - 950, /* GL_PACK_SWAP_BYTES */ - 945, /* GL_PACK_LSB_FIRST */ - 946, /* GL_PACK_ROW_LENGTH */ - 949, /* GL_PACK_SKIP_ROWS */ - 948, /* GL_PACK_SKIP_PIXELS */ - 942, /* GL_PACK_ALIGNMENT */ - 673, /* GL_MAP_COLOR */ - 674, /* GL_MAP_STENCIL */ - 524, /* GL_INDEX_SHIFT */ - 523, /* GL_INDEX_OFFSET */ - 1151, /* GL_RED_SCALE */ - 1149, /* GL_RED_BIAS */ - 1629, /* GL_ZOOM_X */ - 1630, /* GL_ZOOM_Y */ - 486, /* GL_GREEN_SCALE */ - 484, /* GL_GREEN_BIAS */ - 86, /* GL_BLUE_SCALE */ - 84, /* GL_BLUE_BIAS */ - 38, /* GL_ALPHA_SCALE */ - 36, /* GL_ALPHA_BIAS */ - 318, /* GL_DEPTH_SCALE */ - 299, /* GL_DEPTH_BIAS */ - 743, /* GL_MAX_EVAL_ORDER */ - 746, /* GL_MAX_LIGHTS */ - 728, /* GL_MAX_CLIP_PLANES */ - 788, /* GL_MAX_TEXTURE_SIZE */ - 752, /* GL_MAX_PIXEL_MAP_TABLE */ - 724, /* GL_MAX_ATTRIB_STACK_DEPTH */ - 749, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - 750, /* GL_MAX_NAME_STACK_DEPTH */ - 778, /* GL_MAX_PROJECTION_STACK_DEPTH */ - 789, /* GL_MAX_TEXTURE_STACK_DEPTH */ - 799, /* GL_MAX_VIEWPORT_DIMS */ - 725, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - 1329, /* GL_SUBPIXEL_BITS */ - 519, /* GL_INDEX_BITS */ - 1150, /* GL_RED_BITS */ - 485, /* GL_GREEN_BITS */ - 85, /* GL_BLUE_BITS */ - 37, /* GL_ALPHA_BITS */ - 300, /* GL_DEPTH_BITS */ - 1304, /* GL_STENCIL_BITS */ + 1390, /* GL_STENCIL_TEST */ + 1378, /* GL_STENCIL_CLEAR_VALUE */ + 1380, /* GL_STENCIL_FUNC */ + 1392, /* GL_STENCIL_VALUE_MASK */ + 1379, /* GL_STENCIL_FAIL */ + 1387, /* GL_STENCIL_PASS_DEPTH_FAIL */ + 1388, /* GL_STENCIL_PASS_DEPTH_PASS */ + 1389, /* GL_STENCIL_REF */ + 1393, /* GL_STENCIL_WRITEMASK */ + 766, /* GL_MATRIX_MODE */ + 932, /* GL_NORMALIZE */ + 1695, /* GL_VIEWPORT */ + 906, /* GL_MODELVIEW_STACK_DEPTH */ + 1165, /* GL_PROJECTION_STACK_DEPTH */ + 1584, /* GL_TEXTURE_STACK_DEPTH */ + 904, /* GL_MODELVIEW_MATRIX */ + 1164, /* GL_PROJECTION_MATRIX */ + 1569, /* GL_TEXTURE_MATRIX */ + 61, /* GL_ATTRIB_STACK_DEPTH */ + 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ + 43, /* GL_ALPHA_TEST */ + 44, /* GL_ALPHA_TEST_FUNC */ + 45, /* GL_ALPHA_TEST_REF */ + 342, /* GL_DITHER */ + 78, /* GL_BLEND_DST */ + 86, /* GL_BLEND_SRC */ + 75, /* GL_BLEND */ + 641, /* GL_LOGIC_OP_MODE */ + 561, /* GL_INDEX_LOGIC_OP */ + 166, /* GL_COLOR_LOGIC_OP */ + 67, /* GL_AUX_BUFFERS */ + 353, /* GL_DRAW_BUFFER */ + 1195, /* GL_READ_BUFFER */ + 1292, /* GL_SCISSOR_BOX */ + 1293, /* GL_SCISSOR_TEST */ + 560, /* GL_INDEX_CLEAR_VALUE */ + 565, /* GL_INDEX_WRITEMASK */ + 163, /* GL_COLOR_CLEAR_VALUE */ + 205, /* GL_COLOR_WRITEMASK */ + 562, /* GL_INDEX_MODE */ + 1259, /* GL_RGBA_MODE */ + 352, /* GL_DOUBLEBUFFER */ + 1394, /* GL_STEREO */ + 1218, /* GL_RENDER_MODE */ + 1017, /* GL_PERSPECTIVE_CORRECTION_HINT */ + 1066, /* GL_POINT_SMOOTH_HINT */ + 625, /* GL_LINE_SMOOTH_HINT */ + 1083, /* GL_POLYGON_SMOOTH_HINT */ + 477, /* GL_FOG_HINT */ + 1550, /* GL_TEXTURE_GEN_S */ + 1551, /* GL_TEXTURE_GEN_T */ + 1549, /* GL_TEXTURE_GEN_R */ + 1548, /* GL_TEXTURE_GEN_Q */ + 1030, /* GL_PIXEL_MAP_I_TO_I */ + 1036, /* GL_PIXEL_MAP_S_TO_S */ + 1032, /* GL_PIXEL_MAP_I_TO_R */ + 1028, /* GL_PIXEL_MAP_I_TO_G */ + 1026, /* GL_PIXEL_MAP_I_TO_B */ + 1024, /* GL_PIXEL_MAP_I_TO_A */ + 1034, /* GL_PIXEL_MAP_R_TO_R */ + 1022, /* GL_PIXEL_MAP_G_TO_G */ + 1020, /* GL_PIXEL_MAP_B_TO_B */ + 1018, /* GL_PIXEL_MAP_A_TO_A */ + 1031, /* GL_PIXEL_MAP_I_TO_I_SIZE */ + 1037, /* GL_PIXEL_MAP_S_TO_S_SIZE */ + 1033, /* GL_PIXEL_MAP_I_TO_R_SIZE */ + 1029, /* GL_PIXEL_MAP_I_TO_G_SIZE */ + 1027, /* GL_PIXEL_MAP_I_TO_B_SIZE */ + 1025, /* GL_PIXEL_MAP_I_TO_A_SIZE */ + 1035, /* GL_PIXEL_MAP_R_TO_R_SIZE */ + 1023, /* GL_PIXEL_MAP_G_TO_G_SIZE */ + 1021, /* GL_PIXEL_MAP_B_TO_B_SIZE */ + 1019, /* GL_PIXEL_MAP_A_TO_A_SIZE */ + 1617, /* GL_UNPACK_SWAP_BYTES */ + 1612, /* GL_UNPACK_LSB_FIRST */ + 1613, /* GL_UNPACK_ROW_LENGTH */ + 1616, /* GL_UNPACK_SKIP_ROWS */ + 1615, /* GL_UNPACK_SKIP_PIXELS */ + 1610, /* GL_UNPACK_ALIGNMENT */ + 1005, /* GL_PACK_SWAP_BYTES */ + 1000, /* GL_PACK_LSB_FIRST */ + 1001, /* GL_PACK_ROW_LENGTH */ + 1004, /* GL_PACK_SKIP_ROWS */ + 1003, /* GL_PACK_SKIP_PIXELS */ + 997, /* GL_PACK_ALIGNMENT */ + 719, /* GL_MAP_COLOR */ + 720, /* GL_MAP_STENCIL */ + 564, /* GL_INDEX_SHIFT */ + 563, /* GL_INDEX_OFFSET */ + 1207, /* GL_RED_SCALE */ + 1205, /* GL_RED_BIAS */ + 1712, /* GL_ZOOM_X */ + 1713, /* GL_ZOOM_Y */ + 526, /* GL_GREEN_SCALE */ + 524, /* GL_GREEN_BIAS */ + 92, /* GL_BLUE_SCALE */ + 90, /* GL_BLUE_BIAS */ + 42, /* GL_ALPHA_SCALE */ + 40, /* GL_ALPHA_BIAS */ + 333, /* GL_DEPTH_SCALE */ + 314, /* GL_DEPTH_BIAS */ + 791, /* GL_MAX_EVAL_ORDER */ + 795, /* GL_MAX_LIGHTS */ + 774, /* GL_MAX_CLIP_PLANES */ + 839, /* GL_MAX_TEXTURE_SIZE */ + 801, /* GL_MAX_PIXEL_MAP_TABLE */ + 770, /* GL_MAX_ATTRIB_STACK_DEPTH */ + 798, /* GL_MAX_MODELVIEW_STACK_DEPTH */ + 799, /* GL_MAX_NAME_STACK_DEPTH */ + 827, /* GL_MAX_PROJECTION_STACK_DEPTH */ + 840, /* GL_MAX_TEXTURE_STACK_DEPTH */ + 854, /* GL_MAX_VIEWPORT_DIMS */ + 771, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ + 1401, /* GL_SUBPIXEL_BITS */ + 559, /* GL_INDEX_BITS */ + 1206, /* GL_RED_BITS */ + 525, /* GL_GREEN_BITS */ + 91, /* GL_BLUE_BITS */ + 41, /* GL_ALPHA_BITS */ + 315, /* GL_DEPTH_BITS */ + 1376, /* GL_STENCIL_BITS */ 14, /* GL_ACCUM_RED_BITS */ 13, /* GL_ACCUM_GREEN_BITS */ 10, /* GL_ACCUM_BLUE_BITS */ 9, /* GL_ACCUM_ALPHA_BITS */ - 865, /* GL_NAME_STACK_DEPTH */ - 57, /* GL_AUTO_NORMAL */ - 619, /* GL_MAP1_COLOR_4 */ - 622, /* GL_MAP1_INDEX */ - 623, /* GL_MAP1_NORMAL */ - 624, /* GL_MAP1_TEXTURE_COORD_1 */ - 625, /* GL_MAP1_TEXTURE_COORD_2 */ - 626, /* GL_MAP1_TEXTURE_COORD_3 */ - 627, /* GL_MAP1_TEXTURE_COORD_4 */ - 628, /* GL_MAP1_VERTEX_3 */ - 629, /* GL_MAP1_VERTEX_4 */ - 646, /* GL_MAP2_COLOR_4 */ - 649, /* GL_MAP2_INDEX */ - 650, /* GL_MAP2_NORMAL */ - 651, /* GL_MAP2_TEXTURE_COORD_1 */ - 652, /* GL_MAP2_TEXTURE_COORD_2 */ - 653, /* GL_MAP2_TEXTURE_COORD_3 */ - 654, /* GL_MAP2_TEXTURE_COORD_4 */ - 655, /* GL_MAP2_VERTEX_3 */ - 656, /* GL_MAP2_VERTEX_4 */ - 620, /* GL_MAP1_GRID_DOMAIN */ - 621, /* GL_MAP1_GRID_SEGMENTS */ - 647, /* GL_MAP2_GRID_DOMAIN */ - 648, /* GL_MAP2_GRID_SEGMENTS */ - 1406, /* GL_TEXTURE_1D */ - 1407, /* GL_TEXTURE_2D */ - 407, /* GL_FEEDBACK_BUFFER_POINTER */ - 408, /* GL_FEEDBACK_BUFFER_SIZE */ - 409, /* GL_FEEDBACK_BUFFER_TYPE */ - 1240, /* GL_SELECTION_BUFFER_POINTER */ - 1241, /* GL_SELECTION_BUFFER_SIZE */ - 1515, /* GL_TEXTURE_WIDTH */ - 1483, /* GL_TEXTURE_HEIGHT */ - 1439, /* GL_TEXTURE_COMPONENTS */ - 1423, /* GL_TEXTURE_BORDER_COLOR */ - 1422, /* GL_TEXTURE_BORDER */ - 329, /* GL_DONT_CARE */ - 405, /* GL_FASTEST */ - 873, /* GL_NICEST */ - 43, /* GL_AMBIENT */ - 326, /* GL_DIFFUSE */ - 1280, /* GL_SPECULAR */ - 1031, /* GL_POSITION */ - 1283, /* GL_SPOT_DIRECTION */ - 1284, /* GL_SPOT_EXPONENT */ - 1282, /* GL_SPOT_CUTOFF */ - 233, /* GL_CONSTANT_ATTENUATION */ - 571, /* GL_LINEAR_ATTENUATION */ - 1126, /* GL_QUADRATIC_ATTENUATION */ - 208, /* GL_COMPILE */ - 209, /* GL_COMPILE_AND_EXECUTE */ - 101, /* GL_BYTE */ - 1546, /* GL_UNSIGNED_BYTE */ - 1251, /* GL_SHORT */ - 1555, /* GL_UNSIGNED_SHORT */ - 526, /* GL_INT */ - 1549, /* GL_UNSIGNED_INT */ - 412, /* GL_FLOAT */ + 920, /* GL_NAME_STACK_DEPTH */ + 62, /* GL_AUTO_NORMAL */ + 665, /* GL_MAP1_COLOR_4 */ + 668, /* GL_MAP1_INDEX */ + 669, /* GL_MAP1_NORMAL */ + 670, /* GL_MAP1_TEXTURE_COORD_1 */ + 671, /* GL_MAP1_TEXTURE_COORD_2 */ + 672, /* GL_MAP1_TEXTURE_COORD_3 */ + 673, /* GL_MAP1_TEXTURE_COORD_4 */ + 674, /* GL_MAP1_VERTEX_3 */ + 675, /* GL_MAP1_VERTEX_4 */ + 692, /* GL_MAP2_COLOR_4 */ + 695, /* GL_MAP2_INDEX */ + 696, /* GL_MAP2_NORMAL */ + 697, /* GL_MAP2_TEXTURE_COORD_1 */ + 698, /* GL_MAP2_TEXTURE_COORD_2 */ + 699, /* GL_MAP2_TEXTURE_COORD_3 */ + 700, /* GL_MAP2_TEXTURE_COORD_4 */ + 701, /* GL_MAP2_VERTEX_3 */ + 702, /* GL_MAP2_VERTEX_4 */ + 666, /* GL_MAP1_GRID_DOMAIN */ + 667, /* GL_MAP1_GRID_SEGMENTS */ + 693, /* GL_MAP2_GRID_DOMAIN */ + 694, /* GL_MAP2_GRID_SEGMENTS */ + 1478, /* GL_TEXTURE_1D */ + 1479, /* GL_TEXTURE_2D */ + 438, /* GL_FEEDBACK_BUFFER_POINTER */ + 439, /* GL_FEEDBACK_BUFFER_SIZE */ + 440, /* GL_FEEDBACK_BUFFER_TYPE */ + 1302, /* GL_SELECTION_BUFFER_POINTER */ + 1303, /* GL_SELECTION_BUFFER_SIZE */ + 1587, /* GL_TEXTURE_WIDTH */ + 1555, /* GL_TEXTURE_HEIGHT */ + 1511, /* GL_TEXTURE_COMPONENTS */ + 1495, /* GL_TEXTURE_BORDER_COLOR */ + 1494, /* GL_TEXTURE_BORDER */ + 344, /* GL_DONT_CARE */ + 436, /* GL_FASTEST */ + 928, /* GL_NICEST */ + 47, /* GL_AMBIENT */ + 341, /* GL_DIFFUSE */ + 1345, /* GL_SPECULAR */ + 1087, /* GL_POSITION */ + 1348, /* GL_SPOT_DIRECTION */ + 1349, /* GL_SPOT_EXPONENT */ + 1347, /* GL_SPOT_CUTOFF */ + 244, /* GL_CONSTANT_ATTENUATION */ + 615, /* GL_LINEAR_ATTENUATION */ + 1182, /* GL_QUADRATIC_ATTENUATION */ + 218, /* GL_COMPILE */ + 219, /* GL_COMPILE_AND_EXECUTE */ + 111, /* GL_BYTE */ + 1618, /* GL_UNSIGNED_BYTE */ + 1316, /* GL_SHORT */ + 1627, /* GL_UNSIGNED_SHORT */ + 567, /* GL_INT */ + 1621, /* GL_UNSIGNED_INT */ + 443, /* GL_FLOAT */ 1, /* GL_2_BYTES */ 5, /* GL_3_BYTES */ 7, /* GL_4_BYTES */ - 336, /* GL_DOUBLE */ - 113, /* GL_CLEAR */ - 45, /* GL_AND */ - 47, /* GL_AND_REVERSE */ - 256, /* GL_COPY */ - 46, /* GL_AND_INVERTED */ - 875, /* GL_NOOP */ - 1625, /* GL_XOR */ - 937, /* GL_OR */ - 876, /* GL_NOR */ - 395, /* GL_EQUIV */ - 549, /* GL_INVERT */ - 940, /* GL_OR_REVERSE */ - 257, /* GL_COPY_INVERTED */ - 939, /* GL_OR_INVERTED */ - 866, /* GL_NAND */ - 1245, /* GL_SET */ - 392, /* GL_EMISSION */ - 1250, /* GL_SHININESS */ - 44, /* GL_AMBIENT_AND_DIFFUSE */ - 155, /* GL_COLOR_INDEXES */ - 816, /* GL_MODELVIEW */ - 1107, /* GL_PROJECTION */ - 1341, /* GL_TEXTURE */ - 128, /* GL_COLOR */ - 297, /* GL_DEPTH */ - 1302, /* GL_STENCIL */ - 154, /* GL_COLOR_INDEX */ - 1309, /* GL_STENCIL_INDEX */ - 306, /* GL_DEPTH_COMPONENT */ - 1146, /* GL_RED */ - 483, /* GL_GREEN */ - 83, /* GL_BLUE */ - 27, /* GL_ALPHA */ - 1170, /* GL_RGB */ - 1189, /* GL_RGBA */ - 597, /* GL_LUMINANCE */ - 618, /* GL_LUMINANCE_ALPHA */ - 68, /* GL_BITMAP */ - 988, /* GL_POINT */ - 569, /* GL_LINE */ - 410, /* GL_FILL */ - 1155, /* GL_RENDER */ - 406, /* GL_FEEDBACK */ - 1239, /* GL_SELECT */ - 411, /* GL_FLAT */ - 1255, /* GL_SMOOTH */ - 550, /* GL_KEEP */ - 1164, /* GL_REPLACE */ - 510, /* GL_INCR */ - 294, /* GL_DECR */ - 1568, /* GL_VENDOR */ - 1161, /* GL_RENDERER */ - 1569, /* GL_VERSION */ - 399, /* GL_EXTENSIONS */ - 1210, /* GL_S */ - 1332, /* GL_T */ - 1136, /* GL_R */ - 1125, /* GL_Q */ - 852, /* GL_MODULATE */ - 293, /* GL_DECAL */ - 1473, /* GL_TEXTURE_ENV_MODE */ - 1472, /* GL_TEXTURE_ENV_COLOR */ - 1471, /* GL_TEXTURE_ENV */ - 400, /* GL_EYE_LINEAR */ - 899, /* GL_OBJECT_LINEAR */ - 1281, /* GL_SPHERE_MAP */ - 1475, /* GL_TEXTURE_GEN_MODE */ - 901, /* GL_OBJECT_PLANE */ - 401, /* GL_EYE_PLANE */ - 867, /* GL_NEAREST */ - 570, /* GL_LINEAR */ - 871, /* GL_NEAREST_MIPMAP_NEAREST */ - 575, /* GL_LINEAR_MIPMAP_NEAREST */ - 870, /* GL_NEAREST_MIPMAP_LINEAR */ - 574, /* GL_LINEAR_MIPMAP_LINEAR */ - 1496, /* GL_TEXTURE_MAG_FILTER */ - 1504, /* GL_TEXTURE_MIN_FILTER */ - 1517, /* GL_TEXTURE_WRAP_S */ - 1518, /* GL_TEXTURE_WRAP_T */ - 107, /* GL_CLAMP */ - 1163, /* GL_REPEAT */ - 1025, /* GL_POLYGON_OFFSET_UNITS */ - 1024, /* GL_POLYGON_OFFSET_POINT */ - 1023, /* GL_POLYGON_OFFSET_LINE */ - 1137, /* GL_R3_G3_B2 */ - 1566, /* GL_V2F */ - 1567, /* GL_V3F */ - 104, /* GL_C4UB_V2F */ - 105, /* GL_C4UB_V3F */ - 102, /* GL_C3F_V3F */ - 864, /* GL_N3F_V3F */ - 103, /* GL_C4F_N3F_V3F */ - 1337, /* GL_T2F_V3F */ - 1339, /* GL_T4F_V4F */ - 1335, /* GL_T2F_C4UB_V3F */ - 1333, /* GL_T2F_C3F_V3F */ - 1336, /* GL_T2F_N3F_V3F */ - 1334, /* GL_T2F_C4F_N3F_V3F */ - 1338, /* GL_T4F_C4F_N3F_V4F */ - 120, /* GL_CLIP_PLANE0 */ - 121, /* GL_CLIP_PLANE1 */ - 122, /* GL_CLIP_PLANE2 */ - 123, /* GL_CLIP_PLANE3 */ - 124, /* GL_CLIP_PLANE4 */ - 125, /* GL_CLIP_PLANE5 */ - 554, /* GL_LIGHT0 */ - 555, /* GL_LIGHT1 */ - 556, /* GL_LIGHT2 */ - 557, /* GL_LIGHT3 */ - 558, /* GL_LIGHT4 */ - 559, /* GL_LIGHT5 */ - 560, /* GL_LIGHT6 */ - 561, /* GL_LIGHT7 */ - 487, /* GL_HINT_BIT */ - 235, /* GL_CONSTANT_COLOR */ - 911, /* GL_ONE_MINUS_CONSTANT_COLOR */ - 230, /* GL_CONSTANT_ALPHA */ - 909, /* GL_ONE_MINUS_CONSTANT_ALPHA */ - 71, /* GL_BLEND_COLOR */ - 471, /* GL_FUNC_ADD */ - 800, /* GL_MIN */ - 722, /* GL_MAX */ - 76, /* GL_BLEND_EQUATION */ - 475, /* GL_FUNC_SUBTRACT */ - 473, /* GL_FUNC_REVERSE_SUBTRACT */ - 238, /* GL_CONVOLUTION_1D */ - 239, /* GL_CONVOLUTION_2D */ - 1242, /* GL_SEPARABLE_2D */ - 242, /* GL_CONVOLUTION_BORDER_MODE */ - 246, /* GL_CONVOLUTION_FILTER_SCALE */ - 244, /* GL_CONVOLUTION_FILTER_BIAS */ - 1147, /* GL_REDUCE */ - 248, /* GL_CONVOLUTION_FORMAT */ - 252, /* GL_CONVOLUTION_WIDTH */ - 250, /* GL_CONVOLUTION_HEIGHT */ - 735, /* GL_MAX_CONVOLUTION_WIDTH */ - 733, /* GL_MAX_CONVOLUTION_HEIGHT */ - 1064, /* GL_POST_CONVOLUTION_RED_SCALE */ - 1060, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - 1055, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - 1051, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - 1062, /* GL_POST_CONVOLUTION_RED_BIAS */ - 1058, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - 1053, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - 1049, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - 488, /* GL_HISTOGRAM */ - 1111, /* GL_PROXY_HISTOGRAM */ - 504, /* GL_HISTOGRAM_WIDTH */ - 494, /* GL_HISTOGRAM_FORMAT */ - 500, /* GL_HISTOGRAM_RED_SIZE */ - 496, /* GL_HISTOGRAM_GREEN_SIZE */ - 491, /* GL_HISTOGRAM_BLUE_SIZE */ - 489, /* GL_HISTOGRAM_ALPHA_SIZE */ - 498, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - 502, /* GL_HISTOGRAM_SINK */ - 801, /* GL_MINMAX */ - 803, /* GL_MINMAX_FORMAT */ - 805, /* GL_MINMAX_SINK */ - 1340, /* GL_TABLE_TOO_LARGE_EXT */ - 1548, /* GL_UNSIGNED_BYTE_3_3_2 */ - 1557, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - 1559, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - 1553, /* GL_UNSIGNED_INT_8_8_8_8 */ - 1550, /* GL_UNSIGNED_INT_10_10_10_2 */ - 1022, /* GL_POLYGON_OFFSET_FILL */ - 1021, /* GL_POLYGON_OFFSET_FACTOR */ - 1020, /* GL_POLYGON_OFFSET_BIAS */ - 1167, /* GL_RESCALE_NORMAL */ - 32, /* GL_ALPHA4 */ - 34, /* GL_ALPHA8 */ - 28, /* GL_ALPHA12 */ - 30, /* GL_ALPHA16 */ - 608, /* GL_LUMINANCE4 */ - 614, /* GL_LUMINANCE8 */ - 598, /* GL_LUMINANCE12 */ - 604, /* GL_LUMINANCE16 */ - 609, /* GL_LUMINANCE4_ALPHA4 */ - 612, /* GL_LUMINANCE6_ALPHA2 */ - 615, /* GL_LUMINANCE8_ALPHA8 */ - 601, /* GL_LUMINANCE12_ALPHA4 */ - 599, /* GL_LUMINANCE12_ALPHA12 */ - 605, /* GL_LUMINANCE16_ALPHA16 */ - 527, /* GL_INTENSITY */ - 532, /* GL_INTENSITY4 */ - 534, /* GL_INTENSITY8 */ - 528, /* GL_INTENSITY12 */ - 530, /* GL_INTENSITY16 */ - 1179, /* GL_RGB2_EXT */ - 1180, /* GL_RGB4 */ - 1183, /* GL_RGB5 */ - 1187, /* GL_RGB8 */ - 1171, /* GL_RGB10 */ - 1175, /* GL_RGB12 */ - 1177, /* GL_RGB16 */ - 1194, /* GL_RGBA2 */ - 1196, /* GL_RGBA4 */ - 1184, /* GL_RGB5_A1 */ - 1200, /* GL_RGBA8 */ - 1172, /* GL_RGB10_A2 */ - 1190, /* GL_RGBA12 */ - 1192, /* GL_RGBA16 */ - 1509, /* GL_TEXTURE_RED_SIZE */ - 1481, /* GL_TEXTURE_GREEN_SIZE */ - 1420, /* GL_TEXTURE_BLUE_SIZE */ - 1409, /* GL_TEXTURE_ALPHA_SIZE */ - 1494, /* GL_TEXTURE_LUMINANCE_SIZE */ - 1485, /* GL_TEXTURE_INTENSITY_SIZE */ - 1165, /* GL_REPLACE_EXT */ - 1115, /* GL_PROXY_TEXTURE_1D */ - 1117, /* GL_PROXY_TEXTURE_2D */ - 1513, /* GL_TEXTURE_TOO_LARGE_EXT */ - 1506, /* GL_TEXTURE_PRIORITY */ - 1511, /* GL_TEXTURE_RESIDENT */ - 1412, /* GL_TEXTURE_BINDING_1D */ - 1413, /* GL_TEXTURE_BINDING_2D */ - 1414, /* GL_TEXTURE_BINDING_3D */ - 947, /* GL_PACK_SKIP_IMAGES */ - 943, /* GL_PACK_IMAGE_HEIGHT */ - 1542, /* GL_UNPACK_SKIP_IMAGES */ - 1539, /* GL_UNPACK_IMAGE_HEIGHT */ - 1408, /* GL_TEXTURE_3D */ - 1119, /* GL_PROXY_TEXTURE_3D */ - 1468, /* GL_TEXTURE_DEPTH */ - 1516, /* GL_TEXTURE_WRAP_R */ - 723, /* GL_MAX_3D_TEXTURE_SIZE */ - 1570, /* GL_VERTEX_ARRAY */ - 878, /* GL_NORMAL_ARRAY */ - 129, /* GL_COLOR_ARRAY */ - 513, /* GL_INDEX_ARRAY */ - 1447, /* GL_TEXTURE_COORD_ARRAY */ - 383, /* GL_EDGE_FLAG_ARRAY */ - 1575, /* GL_VERTEX_ARRAY_SIZE */ - 1577, /* GL_VERTEX_ARRAY_TYPE */ - 1576, /* GL_VERTEX_ARRAY_STRIDE */ - 883, /* GL_NORMAL_ARRAY_TYPE */ - 882, /* GL_NORMAL_ARRAY_STRIDE */ - 133, /* GL_COLOR_ARRAY_SIZE */ - 135, /* GL_COLOR_ARRAY_TYPE */ - 134, /* GL_COLOR_ARRAY_STRIDE */ - 518, /* GL_INDEX_ARRAY_TYPE */ - 517, /* GL_INDEX_ARRAY_STRIDE */ - 1451, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - 1453, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - 1452, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - 387, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - 1574, /* GL_VERTEX_ARRAY_POINTER */ - 881, /* GL_NORMAL_ARRAY_POINTER */ - 132, /* GL_COLOR_ARRAY_POINTER */ - 516, /* GL_INDEX_ARRAY_POINTER */ - 1450, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - 386, /* GL_EDGE_FLAG_ARRAY_POINTER */ - 857, /* GL_MULTISAMPLE */ - 1216, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - 1218, /* GL_SAMPLE_ALPHA_TO_ONE */ - 1223, /* GL_SAMPLE_COVERAGE */ - 1220, /* GL_SAMPLE_BUFFERS */ - 1211, /* GL_SAMPLES */ - 1227, /* GL_SAMPLE_COVERAGE_VALUE */ - 1225, /* GL_SAMPLE_COVERAGE_INVERT */ - 160, /* GL_COLOR_MATRIX */ - 162, /* GL_COLOR_MATRIX_STACK_DEPTH */ - 730, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - 1047, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - 1043, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - 1038, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - 1034, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - 1045, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - 1041, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - 1036, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - 1032, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - 1430, /* GL_TEXTURE_COLOR_TABLE_SGI */ - 1120, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - 1432, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - 75, /* GL_BLEND_DST_RGB */ - 82, /* GL_BLEND_SRC_RGB */ - 74, /* GL_BLEND_DST_ALPHA */ - 81, /* GL_BLEND_SRC_ALPHA */ - 166, /* GL_COLOR_TABLE */ - 1057, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - 1040, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - 1110, /* GL_PROXY_COLOR_TABLE */ - 1114, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - 1113, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - 190, /* GL_COLOR_TABLE_SCALE */ - 170, /* GL_COLOR_TABLE_BIAS */ - 175, /* GL_COLOR_TABLE_FORMAT */ - 192, /* GL_COLOR_TABLE_WIDTH */ - 187, /* GL_COLOR_TABLE_RED_SIZE */ - 178, /* GL_COLOR_TABLE_GREEN_SIZE */ - 172, /* GL_COLOR_TABLE_BLUE_SIZE */ - 167, /* GL_COLOR_TABLE_ALPHA_SIZE */ - 184, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ - 181, /* GL_COLOR_TABLE_INTENSITY_SIZE */ - 66, /* GL_BGR */ - 67, /* GL_BGRA */ - 742, /* GL_MAX_ELEMENTS_VERTICES */ - 741, /* GL_MAX_ELEMENTS_INDICES */ - 1484, /* GL_TEXTURE_INDEX_SIZE_EXT */ - 126, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - 1005, /* GL_POINT_SIZE_MIN */ - 1001, /* GL_POINT_SIZE_MAX */ - 995, /* GL_POINT_FADE_THRESHOLD_SIZE */ - 991, /* GL_POINT_DISTANCE_ATTENUATION */ - 108, /* GL_CLAMP_TO_BORDER */ - 111, /* GL_CLAMP_TO_EDGE */ - 1505, /* GL_TEXTURE_MIN_LOD */ - 1503, /* GL_TEXTURE_MAX_LOD */ - 1411, /* GL_TEXTURE_BASE_LEVEL */ - 1502, /* GL_TEXTURE_MAX_LEVEL */ - 507, /* GL_IGNORE_BORDER_HP */ - 234, /* GL_CONSTANT_BORDER_HP */ - 1166, /* GL_REPLICATE_BORDER_HP */ - 240, /* GL_CONVOLUTION_BORDER_COLOR */ - 906, /* GL_OCCLUSION_TEST_HP */ - 907, /* GL_OCCLUSION_TEST_RESULT_HP */ - 572, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - 1424, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - 1426, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - 1428, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - 1429, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1427, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - 1425, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - 726, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - 727, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1067, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - 1069, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - 1066, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - 1068, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - 1492, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - 1493, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - 1491, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - 477, /* GL_GENERATE_MIPMAP */ - 478, /* GL_GENERATE_MIPMAP_HINT */ - 443, /* GL_FOG_OFFSET_SGIX */ - 444, /* GL_FOG_OFFSET_VALUE_SGIX */ - 1438, /* GL_TEXTURE_COMPARE_SGIX */ - 1437, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - 1488, /* GL_TEXTURE_LEQUAL_R_SGIX */ - 1480, /* GL_TEXTURE_GEQUAL_R_SGIX */ - 307, /* GL_DEPTH_COMPONENT16 */ - 310, /* GL_DEPTH_COMPONENT24 */ - 313, /* GL_DEPTH_COMPONENT32 */ - 261, /* GL_CULL_VERTEX_EXT */ - 263, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ - 262, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - 1622, /* GL_WRAP_BORDER_SUN */ - 1431, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - 565, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - 1252, /* GL_SINGLE_COLOR */ - 1243, /* GL_SEPARATE_SPECULAR_COLOR */ - 1249, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - 1547, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - 1560, /* GL_UNSIGNED_SHORT_5_6_5 */ - 1561, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - 1558, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - 1556, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - 1554, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - 1552, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - 1500, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - 1501, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - 1499, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - 808, /* GL_MIRRORED_REPEAT */ - 1205, /* GL_RGB_S3TC */ - 1182, /* GL_RGB4_S3TC */ - 1204, /* GL_RGBA_S3TC */ - 1199, /* GL_RGBA4_S3TC */ - 1202, /* GL_RGBA_DXT5_S3TC */ - 1197, /* GL_RGBA4_DXT5_S3TC */ - 227, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ - 222, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ - 223, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ - 224, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - 869, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - 868, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - 573, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - 430, /* GL_FOG_COORDINATE_SOURCE */ - 422, /* GL_FOG_COORD */ - 446, /* GL_FRAGMENT_DEPTH */ - 267, /* GL_CURRENT_FOG_COORD */ - 429, /* GL_FOG_COORDINATE_ARRAY_TYPE */ - 428, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ - 427, /* GL_FOG_COORDINATE_ARRAY_POINTER */ - 424, /* GL_FOG_COORDINATE_ARRAY */ - 164, /* GL_COLOR_SUM */ - 285, /* GL_CURRENT_SECONDARY_COLOR */ - 1236, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - 1238, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - 1237, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - 1235, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - 1232, /* GL_SECONDARY_COLOR_ARRAY */ - 24, /* GL_ALIASED_POINT_SIZE_RANGE */ - 23, /* GL_ALIASED_LINE_WIDTH_RANGE */ - 1342, /* GL_TEXTURE0 */ - 1344, /* GL_TEXTURE1 */ - 1366, /* GL_TEXTURE2 */ - 1388, /* GL_TEXTURE3 */ - 1394, /* GL_TEXTURE4 */ - 1396, /* GL_TEXTURE5 */ - 1398, /* GL_TEXTURE6 */ - 1400, /* GL_TEXTURE7 */ - 1402, /* GL_TEXTURE8 */ - 1404, /* GL_TEXTURE9 */ - 1345, /* GL_TEXTURE10 */ - 1347, /* GL_TEXTURE11 */ - 1349, /* GL_TEXTURE12 */ - 1351, /* GL_TEXTURE13 */ - 1353, /* GL_TEXTURE14 */ - 1355, /* GL_TEXTURE15 */ - 1357, /* GL_TEXTURE16 */ - 1359, /* GL_TEXTURE17 */ - 1361, /* GL_TEXTURE18 */ - 1363, /* GL_TEXTURE19 */ - 1367, /* GL_TEXTURE20 */ - 1369, /* GL_TEXTURE21 */ - 1371, /* GL_TEXTURE22 */ - 1373, /* GL_TEXTURE23 */ - 1375, /* GL_TEXTURE24 */ - 1377, /* GL_TEXTURE25 */ - 1379, /* GL_TEXTURE26 */ - 1381, /* GL_TEXTURE27 */ - 1383, /* GL_TEXTURE28 */ - 1385, /* GL_TEXTURE29 */ - 1389, /* GL_TEXTURE30 */ - 1391, /* GL_TEXTURE31 */ - 16, /* GL_ACTIVE_TEXTURE */ - 114, /* GL_CLIENT_ACTIVE_TEXTURE */ - 790, /* GL_MAX_TEXTURE_UNITS */ - 1526, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - 1529, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - 1531, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - 1523, /* GL_TRANSPOSE_COLOR_MATRIX */ - 1330, /* GL_SUBTRACT */ - 781, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ - 210, /* GL_COMPRESSED_ALPHA */ - 214, /* GL_COMPRESSED_LUMINANCE */ - 215, /* GL_COMPRESSED_LUMINANCE_ALPHA */ - 212, /* GL_COMPRESSED_INTENSITY */ - 218, /* GL_COMPRESSED_RGB */ - 219, /* GL_COMPRESSED_RGBA */ - 1445, /* GL_TEXTURE_COMPRESSION_HINT */ - 1507, /* GL_TEXTURE_RECTANGLE_ARB */ - 1417, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - 1123, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - 779, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ - 319, /* GL_DEPTH_STENCIL_NV */ - 1551, /* GL_UNSIGNED_INT_24_8_NV */ - 786, /* GL_MAX_TEXTURE_LOD_BIAS */ - 1498, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - 787, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - 1474, /* GL_TEXTURE_FILTER_CONTROL */ - 1489, /* GL_TEXTURE_LOD_BIAS */ - 197, /* GL_COMBINE4 */ - 782, /* GL_MAX_SHININESS_NV */ - 783, /* GL_MAX_SPOT_EXPONENT_NV */ - 511, /* GL_INCR_WRAP */ - 295, /* GL_DECR_WRAP */ - 828, /* GL_MODELVIEW1_ARB */ - 884, /* GL_NORMAL_MAP */ - 1152, /* GL_REFLECTION_MAP */ - 1454, /* GL_TEXTURE_CUBE_MAP */ - 1415, /* GL_TEXTURE_BINDING_CUBE_MAP */ - 1462, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - 1456, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - 1464, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - 1458, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - 1466, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - 1460, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - 1121, /* GL_PROXY_TEXTURE_CUBE_MAP */ - 737, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - 863, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - 438, /* GL_FOG_DISTANCE_MODE_NV */ - 403, /* GL_EYE_RADIAL_NV */ - 402, /* GL_EYE_PLANE_ABSOLUTE_NV */ - 196, /* GL_COMBINE */ - 203, /* GL_COMBINE_RGB */ - 198, /* GL_COMBINE_ALPHA */ - 1206, /* GL_RGB_SCALE */ - 20, /* GL_ADD_SIGNED */ - 537, /* GL_INTERPOLATE */ - 229, /* GL_CONSTANT */ - 1073, /* GL_PRIMARY_COLOR */ - 1070, /* GL_PREVIOUS */ - 1263, /* GL_SOURCE0_RGB */ - 1269, /* GL_SOURCE1_RGB */ - 1275, /* GL_SOURCE2_RGB */ - 1279, /* GL_SOURCE3_RGB_NV */ - 1260, /* GL_SOURCE0_ALPHA */ - 1266, /* GL_SOURCE1_ALPHA */ - 1272, /* GL_SOURCE2_ALPHA */ - 1278, /* GL_SOURCE3_ALPHA_NV */ - 920, /* GL_OPERAND0_RGB */ - 926, /* GL_OPERAND1_RGB */ - 932, /* GL_OPERAND2_RGB */ - 936, /* GL_OPERAND3_RGB_NV */ - 917, /* GL_OPERAND0_ALPHA */ - 923, /* GL_OPERAND1_ALPHA */ - 929, /* GL_OPERAND2_ALPHA */ - 935, /* GL_OPERAND3_ALPHA_NV */ - 1571, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - 1626, /* GL_YCBCR_422_APPLE */ - 1562, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - 1564, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - 1254, /* GL_SLICE_ACCUM_SUN */ - 1128, /* GL_QUAD_MESH_SUN */ - 1535, /* GL_TRIANGLE_MESH_SUN */ - 1603, /* GL_VERTEX_PROGRAM_ARB */ - 1611, /* GL_VERTEX_STATE_PROGRAM_NV */ - 1596, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ - 1599, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ - 1600, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ - 1601, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ - 287, /* GL_CURRENT_VERTEX_ATTRIB_ARB */ - 1086, /* GL_PROGRAM_LENGTH_ARB */ - 1100, /* GL_PROGRAM_STRING_ARB */ - 850, /* GL_MODELVIEW_PROJECTION_NV */ - 506, /* GL_IDENTITY_NV */ - 547, /* GL_INVERSE_NV */ - 1528, /* GL_TRANSPOSE_NV */ - 548, /* GL_INVERSE_TRANSPOSE_NV */ - 765, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - 764, /* GL_MAX_PROGRAM_MATRICES_ARB */ - 676, /* GL_MATRIX0_NV */ - 688, /* GL_MATRIX1_NV */ - 700, /* GL_MATRIX2_NV */ - 704, /* GL_MATRIX3_NV */ - 706, /* GL_MATRIX4_NV */ - 708, /* GL_MATRIX5_NV */ - 710, /* GL_MATRIX6_NV */ - 712, /* GL_MATRIX7_NV */ - 273, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ - 270, /* GL_CURRENT_MATRIX_ARB */ - 1606, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ - 1608, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ - 1098, /* GL_PROGRAM_PARAMETER_NV */ - 1598, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ - 1102, /* GL_PROGRAM_TARGET_NV */ - 1099, /* GL_PROGRAM_RESIDENT_NV */ - 1520, /* GL_TRACK_MATRIX_NV */ - 1521, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - 1604, /* GL_VERTEX_PROGRAM_BINDING_NV */ - 1080, /* GL_PROGRAM_ERROR_POSITION_ARB */ - 304, /* GL_DEPTH_CLAMP_NV */ - 1578, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - 1585, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - 1586, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - 1587, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - 1588, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - 1589, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - 1590, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - 1591, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - 1592, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - 1593, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - 1579, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - 1580, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - 1581, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - 1582, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - 1583, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - 1584, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - 630, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - 637, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - 638, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - 639, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - 640, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - 641, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - 642, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - 643, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - 644, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - 645, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - 631, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - 632, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - 633, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - 634, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - 635, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - 636, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - 657, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - 664, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - 665, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - 666, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - 667, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - 668, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - 669, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - 1079, /* GL_PROGRAM_BINDING_ARB */ - 671, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - 672, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - 658, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - 659, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - 660, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - 661, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - 662, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - 663, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - 1443, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - 1440, /* GL_TEXTURE_COMPRESSED */ - 889, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - 228, /* GL_COMPRESSED_TEXTURE_FORMATS */ - 798, /* GL_MAX_VERTEX_UNITS_ARB */ - 18, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - 1621, /* GL_WEIGHT_SUM_UNITY_ARB */ - 1602, /* GL_VERTEX_BLEND_ARB */ - 288, /* GL_CURRENT_WEIGHT_ARB */ - 1620, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - 1619, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - 1618, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - 1617, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - 1614, /* GL_WEIGHT_ARRAY_ARB */ - 330, /* GL_DOT3_RGB */ - 331, /* GL_DOT3_RGBA */ - 226, /* GL_COMPRESSED_RGB_FXT1_3DFX */ - 221, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - 858, /* GL_MULTISAMPLE_3DFX */ - 1221, /* GL_SAMPLE_BUFFERS_3DFX */ - 1212, /* GL_SAMPLES_3DFX */ - 839, /* GL_MODELVIEW2_ARB */ - 842, /* GL_MODELVIEW3_ARB */ - 843, /* GL_MODELVIEW4_ARB */ - 844, /* GL_MODELVIEW5_ARB */ - 845, /* GL_MODELVIEW6_ARB */ - 846, /* GL_MODELVIEW7_ARB */ - 847, /* GL_MODELVIEW8_ARB */ - 848, /* GL_MODELVIEW9_ARB */ - 818, /* GL_MODELVIEW10_ARB */ - 819, /* GL_MODELVIEW11_ARB */ - 820, /* GL_MODELVIEW12_ARB */ - 821, /* GL_MODELVIEW13_ARB */ - 822, /* GL_MODELVIEW14_ARB */ - 823, /* GL_MODELVIEW15_ARB */ - 824, /* GL_MODELVIEW16_ARB */ - 825, /* GL_MODELVIEW17_ARB */ - 826, /* GL_MODELVIEW18_ARB */ - 827, /* GL_MODELVIEW19_ARB */ - 829, /* GL_MODELVIEW20_ARB */ - 830, /* GL_MODELVIEW21_ARB */ - 831, /* GL_MODELVIEW22_ARB */ - 832, /* GL_MODELVIEW23_ARB */ - 833, /* GL_MODELVIEW24_ARB */ - 834, /* GL_MODELVIEW25_ARB */ - 835, /* GL_MODELVIEW26_ARB */ - 836, /* GL_MODELVIEW27_ARB */ - 837, /* GL_MODELVIEW28_ARB */ - 838, /* GL_MODELVIEW29_ARB */ - 840, /* GL_MODELVIEW30_ARB */ - 841, /* GL_MODELVIEW31_ARB */ - 335, /* GL_DOT3_RGB_EXT */ - 333, /* GL_DOT3_RGBA_EXT */ - 812, /* GL_MIRROR_CLAMP_EXT */ - 815, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - 853, /* GL_MODULATE_ADD_ATI */ - 854, /* GL_MODULATE_SIGNED_ADD_ATI */ - 855, /* GL_MODULATE_SUBTRACT_ATI */ - 1627, /* GL_YCBCR_MESA */ - 944, /* GL_PACK_INVERT_MESA */ - 291, /* GL_DEBUG_OBJECT_MESA */ - 292, /* GL_DEBUG_PRINT_MESA */ - 290, /* GL_DEBUG_ASSERT_MESA */ - 97, /* GL_BUFFER_SIZE */ - 99, /* GL_BUFFER_USAGE */ - 447, /* GL_FRAGMENT_PROGRAM_ARB */ - 1077, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 1105, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 1104, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - 1089, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 1095, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 1094, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 754, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 777, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 776, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - 767, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 773, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 772, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 739, /* GL_MAX_DRAW_BUFFERS_ARB */ - 339, /* GL_DRAW_BUFFER0_ARB */ - 353, /* GL_DRAW_BUFFER1_ARB */ - 355, /* GL_DRAW_BUFFER2_ARB */ - 357, /* GL_DRAW_BUFFER3_ARB */ - 359, /* GL_DRAW_BUFFER4_ARB */ - 361, /* GL_DRAW_BUFFER5_ARB */ - 363, /* GL_DRAW_BUFFER6_ARB */ - 365, /* GL_DRAW_BUFFER7_ARB */ - 367, /* GL_DRAW_BUFFER8_ARB */ - 369, /* GL_DRAW_BUFFER9_ARB */ - 341, /* GL_DRAW_BUFFER10_ARB */ - 343, /* GL_DRAW_BUFFER11_ARB */ - 345, /* GL_DRAW_BUFFER12_ARB */ - 347, /* GL_DRAW_BUFFER13_ARB */ - 349, /* GL_DRAW_BUFFER14_ARB */ - 351, /* GL_DRAW_BUFFER15_ARB */ - 77, /* GL_BLEND_EQUATION_ALPHA_EXT */ - 721, /* GL_MATRIX_PALETTE_ARB */ - 748, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - 751, /* GL_MAX_PALETTE_MATRICES_ARB */ - 276, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - 715, /* GL_MATRIX_INDEX_ARRAY_ARB */ - 271, /* GL_CURRENT_MATRIX_INDEX_ARB */ - 717, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - 719, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - 718, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - 716, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - 1469, /* GL_TEXTURE_DEPTH_SIZE */ - 323, /* GL_DEPTH_TEXTURE_MODE */ - 1435, /* GL_TEXTURE_COMPARE_MODE */ - 1433, /* GL_TEXTURE_COMPARE_FUNC */ - 206, /* GL_COMPARE_R_TO_TEXTURE */ - 1012, /* GL_POINT_SPRITE_ARB */ - 254, /* GL_COORD_REPLACE_ARB */ - 1015, /* GL_POINT_SPRITE_R_MODE_NV */ - 1130, /* GL_QUERY_COUNTER_BITS */ - 277, /* GL_CURRENT_QUERY */ - 1132, /* GL_QUERY_RESULT */ - 1134, /* GL_QUERY_RESULT_AVAILABLE */ - 795, /* GL_MAX_VERTEX_ATTRIBS_ARB */ - 1597, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ - 321, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ - 320, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - 784, /* GL_MAX_TEXTURE_COORDS_ARB */ - 785, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ - 1082, /* GL_PROGRAM_ERROR_STRING_ARB */ - 1084, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - 1083, /* GL_PROGRAM_FORMAT_ARB */ - 1514, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - 302, /* GL_DEPTH_BOUNDS_TEST_EXT */ - 301, /* GL_DEPTH_BOUNDS_EXT */ - 48, /* GL_ARRAY_BUFFER */ - 388, /* GL_ELEMENT_ARRAY_BUFFER */ - 50, /* GL_ARRAY_BUFFER_BINDING */ - 390, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - 1572, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - 879, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - 130, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - 514, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - 1448, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - 384, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - 1233, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - 425, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - 1615, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - 1594, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - 1085, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - 760, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - 1091, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 769, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 1103, /* GL_PROGRAM_TEMPORARIES_ARB */ - 775, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - 1093, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 771, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 1097, /* GL_PROGRAM_PARAMETERS_ARB */ - 774, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - 1092, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - 770, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - 1078, /* GL_PROGRAM_ATTRIBS_ARB */ - 755, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - 1090, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - 768, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - 1076, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - 753, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - 1088, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 766, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 761, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - 757, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - 1106, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - 1525, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - 1142, /* GL_READ_ONLY */ - 1623, /* GL_WRITE_ONLY */ - 1144, /* GL_READ_WRITE */ - 91, /* GL_BUFFER_ACCESS */ - 93, /* GL_BUFFER_MAPPED */ - 95, /* GL_BUFFER_MAP_POINTER */ - 1519, /* GL_TIME_ELAPSED_EXT */ - 675, /* GL_MATRIX0_ARB */ - 687, /* GL_MATRIX1_ARB */ - 699, /* GL_MATRIX2_ARB */ - 703, /* GL_MATRIX3_ARB */ - 705, /* GL_MATRIX4_ARB */ - 707, /* GL_MATRIX5_ARB */ - 709, /* GL_MATRIX6_ARB */ - 711, /* GL_MATRIX7_ARB */ - 713, /* GL_MATRIX8_ARB */ - 714, /* GL_MATRIX9_ARB */ - 677, /* GL_MATRIX10_ARB */ - 678, /* GL_MATRIX11_ARB */ - 679, /* GL_MATRIX12_ARB */ - 680, /* GL_MATRIX13_ARB */ - 681, /* GL_MATRIX14_ARB */ - 682, /* GL_MATRIX15_ARB */ - 683, /* GL_MATRIX16_ARB */ - 684, /* GL_MATRIX17_ARB */ - 685, /* GL_MATRIX18_ARB */ - 686, /* GL_MATRIX19_ARB */ - 689, /* GL_MATRIX20_ARB */ - 690, /* GL_MATRIX21_ARB */ - 691, /* GL_MATRIX22_ARB */ - 692, /* GL_MATRIX23_ARB */ - 693, /* GL_MATRIX24_ARB */ - 694, /* GL_MATRIX25_ARB */ - 695, /* GL_MATRIX26_ARB */ - 696, /* GL_MATRIX27_ARB */ - 697, /* GL_MATRIX28_ARB */ - 698, /* GL_MATRIX29_ARB */ - 701, /* GL_MATRIX30_ARB */ - 702, /* GL_MATRIX31_ARB */ - 1325, /* GL_STREAM_DRAW */ - 1327, /* GL_STREAM_READ */ - 1323, /* GL_STREAM_COPY */ - 1298, /* GL_STATIC_DRAW */ - 1300, /* GL_STATIC_READ */ - 1296, /* GL_STATIC_COPY */ - 378, /* GL_DYNAMIC_DRAW */ - 380, /* GL_DYNAMIC_READ */ - 376, /* GL_DYNAMIC_COPY */ - 985, /* GL_PIXEL_PACK_BUFFER_EXT */ - 987, /* GL_PIXEL_UNPACK_BUFFER_EXT */ - 984, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ - 986, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ - 758, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ - 756, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - 759, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - 763, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - 762, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - 1319, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ - 15, /* GL_ACTIVE_STENCIL_FACE_EXT */ - 813, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - 1214, /* GL_SAMPLES_PASSED */ - 448, /* GL_FRAGMENT_SHADER_ARB */ - 1610, /* GL_VERTEX_SHADER_ARB */ - 1096, /* GL_PROGRAM_OBJECT_ARB */ - 1246, /* GL_SHADER_OBJECT_ARB */ - 745, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ - 797, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ - 794, /* GL_MAX_VARYING_FLOATS_ARB */ - 796, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ - 732, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ - 904, /* GL_OBJECT_TYPE_ARB */ - 903, /* GL_OBJECT_SUBTYPE_ARB */ - 416, /* GL_FLOAT_VEC2_ARB */ - 417, /* GL_FLOAT_VEC3_ARB */ - 418, /* GL_FLOAT_VEC4_ARB */ - 540, /* GL_INT_VEC2_ARB */ - 541, /* GL_INT_VEC3_ARB */ - 542, /* GL_INT_VEC4_ARB */ - 87, /* GL_BOOL_ARB */ - 88, /* GL_BOOL_VEC2_ARB */ - 89, /* GL_BOOL_VEC3_ARB */ - 90, /* GL_BOOL_VEC4_ARB */ - 413, /* GL_FLOAT_MAT2_ARB */ - 414, /* GL_FLOAT_MAT3_ARB */ - 415, /* GL_FLOAT_MAT4_ARB */ - 897, /* GL_OBJECT_DELETE_STATUS_ARB */ - 896, /* GL_OBJECT_COMPILE_STATUS_ARB */ - 900, /* GL_OBJECT_LINK_STATUS_ARB */ - 905, /* GL_OBJECT_VALIDATE_STATUS_ARB */ - 898, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ - 895, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ - 893, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ - 894, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ - 902, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ - 891, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ - 892, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ - 953, /* GL_PALETTE4_RGB8_OES */ - 955, /* GL_PALETTE4_RGBA8_OES */ - 951, /* GL_PALETTE4_R5_G6_B5_OES */ - 954, /* GL_PALETTE4_RGBA4_OES */ - 952, /* GL_PALETTE4_RGB5_A1_OES */ - 958, /* GL_PALETTE8_RGB8_OES */ - 960, /* GL_PALETTE8_RGBA8_OES */ - 956, /* GL_PALETTE8_R5_G6_B5_OES */ - 959, /* GL_PALETTE8_RGBA4_OES */ - 957, /* GL_PALETTE8_RGB5_A1_OES */ - 509, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - 508, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - 1013, /* GL_POINT_SPRITE_COORD_ORIGIN */ - 371, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ - 1156, /* GL_RENDERBUFFER_BINDING_EXT */ - 1141, /* GL_READ_FRAMEBUFFER_EXT */ - 372, /* GL_DRAW_FRAMEBUFFER_EXT */ - 1140, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ - 450, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ - 449, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ - 453, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ - 452, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ - 451, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ - 455, /* GL_FRAMEBUFFER_COMPLETE_EXT */ - 457, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ - 462, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ - 460, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ - 458, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ - 461, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ - 459, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ - 463, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ - 465, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ - 464, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - 729, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ - 136, /* GL_COLOR_ATTACHMENT0_EXT */ - 143, /* GL_COLOR_ATTACHMENT1_EXT */ - 144, /* GL_COLOR_ATTACHMENT2_EXT */ - 145, /* GL_COLOR_ATTACHMENT3_EXT */ - 146, /* GL_COLOR_ATTACHMENT4_EXT */ - 147, /* GL_COLOR_ATTACHMENT5_EXT */ - 148, /* GL_COLOR_ATTACHMENT6_EXT */ - 149, /* GL_COLOR_ATTACHMENT7_EXT */ - 150, /* GL_COLOR_ATTACHMENT8_EXT */ - 151, /* GL_COLOR_ATTACHMENT9_EXT */ - 137, /* GL_COLOR_ATTACHMENT10_EXT */ - 138, /* GL_COLOR_ATTACHMENT11_EXT */ - 139, /* GL_COLOR_ATTACHMENT12_EXT */ - 140, /* GL_COLOR_ATTACHMENT13_EXT */ - 141, /* GL_COLOR_ATTACHMENT14_EXT */ - 142, /* GL_COLOR_ATTACHMENT15_EXT */ - 298, /* GL_DEPTH_ATTACHMENT_EXT */ - 1303, /* GL_STENCIL_ATTACHMENT_EXT */ - 456, /* GL_FRAMEBUFFER_EXT */ - 1157, /* GL_RENDERBUFFER_EXT */ - 1160, /* GL_RENDERBUFFER_WIDTH_EXT */ - 1158, /* GL_RENDERBUFFER_HEIGHT_EXT */ - 1159, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ - 1314, /* GL_STENCIL_INDEX_EXT */ - 1311, /* GL_STENCIL_INDEX1_EXT */ - 1312, /* GL_STENCIL_INDEX4_EXT */ - 1313, /* GL_STENCIL_INDEX8_EXT */ - 1310, /* GL_STENCIL_INDEX16_EXT */ - 396, /* GL_EVAL_BIT */ - 1138, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - 591, /* GL_LIST_BIT */ - 1419, /* GL_TEXTURE_BIT */ - 1229, /* GL_SCISSOR_BIT */ - 25, /* GL_ALL_ATTRIB_BITS */ - 860, /* GL_MULTISAMPLE_BIT */ - 26, /* GL_ALL_CLIENT_ATTRIB_BITS */ + 351, /* GL_DOUBLE */ + 123, /* GL_CLEAR */ + 49, /* GL_AND */ + 51, /* GL_AND_REVERSE */ + 268, /* GL_COPY */ + 50, /* GL_AND_INVERTED */ + 930, /* GL_NOOP */ + 1708, /* GL_XOR */ + 992, /* GL_OR */ + 931, /* GL_NOR */ + 426, /* GL_EQUIV */ + 593, /* GL_INVERT */ + 995, /* GL_OR_REVERSE */ + 269, /* GL_COPY_INVERTED */ + 994, /* GL_OR_INVERTED */ + 921, /* GL_NAND */ + 1307, /* GL_SET */ + 423, /* GL_EMISSION */ + 1315, /* GL_SHININESS */ + 48, /* GL_AMBIENT_AND_DIFFUSE */ + 165, /* GL_COLOR_INDEXES */ + 871, /* GL_MODELVIEW */ + 1163, /* GL_PROJECTION */ + 1413, /* GL_TEXTURE */ + 138, /* GL_COLOR */ + 312, /* GL_DEPTH */ + 1367, /* GL_STENCIL */ + 164, /* GL_COLOR_INDEX */ + 1381, /* GL_STENCIL_INDEX */ + 321, /* GL_DEPTH_COMPONENT */ + 1202, /* GL_RED */ + 523, /* GL_GREEN */ + 89, /* GL_BLUE */ + 31, /* GL_ALPHA */ + 1226, /* GL_RGB */ + 1245, /* GL_RGBA */ + 643, /* GL_LUMINANCE */ + 664, /* GL_LUMINANCE_ALPHA */ + 73, /* GL_BITMAP */ + 1043, /* GL_POINT */ + 613, /* GL_LINE */ + 441, /* GL_FILL */ + 1211, /* GL_RENDER */ + 437, /* GL_FEEDBACK */ + 1301, /* GL_SELECT */ + 442, /* GL_FLAT */ + 1320, /* GL_SMOOTH */ + 594, /* GL_KEEP */ + 1220, /* GL_REPLACE */ + 550, /* GL_INCR */ + 308, /* GL_DECR */ + 1642, /* GL_VENDOR */ + 1217, /* GL_RENDERER */ + 1643, /* GL_VERSION */ + 430, /* GL_EXTENSIONS */ + 1266, /* GL_S */ + 1404, /* GL_T */ + 1192, /* GL_R */ + 1181, /* GL_Q */ + 907, /* GL_MODULATE */ + 307, /* GL_DECAL */ + 1545, /* GL_TEXTURE_ENV_MODE */ + 1544, /* GL_TEXTURE_ENV_COLOR */ + 1543, /* GL_TEXTURE_ENV */ + 431, /* GL_EYE_LINEAR */ + 954, /* GL_OBJECT_LINEAR */ + 1346, /* GL_SPHERE_MAP */ + 1547, /* GL_TEXTURE_GEN_MODE */ + 956, /* GL_OBJECT_PLANE */ + 432, /* GL_EYE_PLANE */ + 922, /* GL_NEAREST */ + 614, /* GL_LINEAR */ + 926, /* GL_NEAREST_MIPMAP_NEAREST */ + 619, /* GL_LINEAR_MIPMAP_NEAREST */ + 925, /* GL_NEAREST_MIPMAP_LINEAR */ + 618, /* GL_LINEAR_MIPMAP_LINEAR */ + 1568, /* GL_TEXTURE_MAG_FILTER */ + 1576, /* GL_TEXTURE_MIN_FILTER */ + 1589, /* GL_TEXTURE_WRAP_S */ + 1590, /* GL_TEXTURE_WRAP_T */ + 117, /* GL_CLAMP */ + 1219, /* GL_REPEAT */ + 1081, /* GL_POLYGON_OFFSET_UNITS */ + 1080, /* GL_POLYGON_OFFSET_POINT */ + 1079, /* GL_POLYGON_OFFSET_LINE */ + 1193, /* GL_R3_G3_B2 */ + 1639, /* GL_V2F */ + 1640, /* GL_V3F */ + 114, /* GL_C4UB_V2F */ + 115, /* GL_C4UB_V3F */ + 112, /* GL_C3F_V3F */ + 919, /* GL_N3F_V3F */ + 113, /* GL_C4F_N3F_V3F */ + 1409, /* GL_T2F_V3F */ + 1411, /* GL_T4F_V4F */ + 1407, /* GL_T2F_C4UB_V3F */ + 1405, /* GL_T2F_C3F_V3F */ + 1408, /* GL_T2F_N3F_V3F */ + 1406, /* GL_T2F_C4F_N3F_V3F */ + 1410, /* GL_T4F_C4F_N3F_V4F */ + 130, /* GL_CLIP_PLANE0 */ + 131, /* GL_CLIP_PLANE1 */ + 132, /* GL_CLIP_PLANE2 */ + 133, /* GL_CLIP_PLANE3 */ + 134, /* GL_CLIP_PLANE4 */ + 135, /* GL_CLIP_PLANE5 */ + 598, /* GL_LIGHT0 */ + 599, /* GL_LIGHT1 */ + 600, /* GL_LIGHT2 */ + 601, /* GL_LIGHT3 */ + 602, /* GL_LIGHT4 */ + 603, /* GL_LIGHT5 */ + 604, /* GL_LIGHT6 */ + 605, /* GL_LIGHT7 */ + 527, /* GL_HINT_BIT */ + 246, /* GL_CONSTANT_COLOR */ + 966, /* GL_ONE_MINUS_CONSTANT_COLOR */ + 241, /* GL_CONSTANT_ALPHA */ + 964, /* GL_ONE_MINUS_CONSTANT_ALPHA */ + 76, /* GL_BLEND_COLOR */ + 510, /* GL_FUNC_ADD */ + 855, /* GL_MIN */ + 768, /* GL_MAX */ + 81, /* GL_BLEND_EQUATION */ + 514, /* GL_FUNC_SUBTRACT */ + 512, /* GL_FUNC_REVERSE_SUBTRACT */ + 249, /* GL_CONVOLUTION_1D */ + 250, /* GL_CONVOLUTION_2D */ + 1304, /* GL_SEPARABLE_2D */ + 253, /* GL_CONVOLUTION_BORDER_MODE */ + 257, /* GL_CONVOLUTION_FILTER_SCALE */ + 255, /* GL_CONVOLUTION_FILTER_BIAS */ + 1203, /* GL_REDUCE */ + 259, /* GL_CONVOLUTION_FORMAT */ + 263, /* GL_CONVOLUTION_WIDTH */ + 261, /* GL_CONVOLUTION_HEIGHT */ + 782, /* GL_MAX_CONVOLUTION_WIDTH */ + 780, /* GL_MAX_CONVOLUTION_HEIGHT */ + 1120, /* GL_POST_CONVOLUTION_RED_SCALE */ + 1116, /* GL_POST_CONVOLUTION_GREEN_SCALE */ + 1111, /* GL_POST_CONVOLUTION_BLUE_SCALE */ + 1107, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ + 1118, /* GL_POST_CONVOLUTION_RED_BIAS */ + 1114, /* GL_POST_CONVOLUTION_GREEN_BIAS */ + 1109, /* GL_POST_CONVOLUTION_BLUE_BIAS */ + 1105, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ + 528, /* GL_HISTOGRAM */ + 1167, /* GL_PROXY_HISTOGRAM */ + 544, /* GL_HISTOGRAM_WIDTH */ + 534, /* GL_HISTOGRAM_FORMAT */ + 540, /* GL_HISTOGRAM_RED_SIZE */ + 536, /* GL_HISTOGRAM_GREEN_SIZE */ + 531, /* GL_HISTOGRAM_BLUE_SIZE */ + 529, /* GL_HISTOGRAM_ALPHA_SIZE */ + 538, /* GL_HISTOGRAM_LUMINANCE_SIZE */ + 542, /* GL_HISTOGRAM_SINK */ + 856, /* GL_MINMAX */ + 858, /* GL_MINMAX_FORMAT */ + 860, /* GL_MINMAX_SINK */ + 1412, /* GL_TABLE_TOO_LARGE_EXT */ + 1620, /* GL_UNSIGNED_BYTE_3_3_2 */ + 1629, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + 1631, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + 1625, /* GL_UNSIGNED_INT_8_8_8_8 */ + 1622, /* GL_UNSIGNED_INT_10_10_10_2 */ + 1078, /* GL_POLYGON_OFFSET_FILL */ + 1077, /* GL_POLYGON_OFFSET_FACTOR */ + 1076, /* GL_POLYGON_OFFSET_BIAS */ + 1223, /* GL_RESCALE_NORMAL */ + 36, /* GL_ALPHA4 */ + 38, /* GL_ALPHA8 */ + 32, /* GL_ALPHA12 */ + 34, /* GL_ALPHA16 */ + 654, /* GL_LUMINANCE4 */ + 660, /* GL_LUMINANCE8 */ + 644, /* GL_LUMINANCE12 */ + 650, /* GL_LUMINANCE16 */ + 655, /* GL_LUMINANCE4_ALPHA4 */ + 658, /* GL_LUMINANCE6_ALPHA2 */ + 661, /* GL_LUMINANCE8_ALPHA8 */ + 647, /* GL_LUMINANCE12_ALPHA4 */ + 645, /* GL_LUMINANCE12_ALPHA12 */ + 651, /* GL_LUMINANCE16_ALPHA16 */ + 568, /* GL_INTENSITY */ + 573, /* GL_INTENSITY4 */ + 575, /* GL_INTENSITY8 */ + 569, /* GL_INTENSITY12 */ + 571, /* GL_INTENSITY16 */ + 1235, /* GL_RGB2_EXT */ + 1236, /* GL_RGB4 */ + 1239, /* GL_RGB5 */ + 1243, /* GL_RGB8 */ + 1227, /* GL_RGB10 */ + 1231, /* GL_RGB12 */ + 1233, /* GL_RGB16 */ + 1250, /* GL_RGBA2 */ + 1252, /* GL_RGBA4 */ + 1240, /* GL_RGB5_A1 */ + 1256, /* GL_RGBA8 */ + 1228, /* GL_RGB10_A2 */ + 1246, /* GL_RGBA12 */ + 1248, /* GL_RGBA16 */ + 1581, /* GL_TEXTURE_RED_SIZE */ + 1553, /* GL_TEXTURE_GREEN_SIZE */ + 1492, /* GL_TEXTURE_BLUE_SIZE */ + 1481, /* GL_TEXTURE_ALPHA_SIZE */ + 1566, /* GL_TEXTURE_LUMINANCE_SIZE */ + 1557, /* GL_TEXTURE_INTENSITY_SIZE */ + 1221, /* GL_REPLACE_EXT */ + 1171, /* GL_PROXY_TEXTURE_1D */ + 1173, /* GL_PROXY_TEXTURE_2D */ + 1585, /* GL_TEXTURE_TOO_LARGE_EXT */ + 1578, /* GL_TEXTURE_PRIORITY */ + 1583, /* GL_TEXTURE_RESIDENT */ + 1484, /* GL_TEXTURE_BINDING_1D */ + 1485, /* GL_TEXTURE_BINDING_2D */ + 1486, /* GL_TEXTURE_BINDING_3D */ + 1002, /* GL_PACK_SKIP_IMAGES */ + 998, /* GL_PACK_IMAGE_HEIGHT */ + 1614, /* GL_UNPACK_SKIP_IMAGES */ + 1611, /* GL_UNPACK_IMAGE_HEIGHT */ + 1480, /* GL_TEXTURE_3D */ + 1175, /* GL_PROXY_TEXTURE_3D */ + 1540, /* GL_TEXTURE_DEPTH */ + 1588, /* GL_TEXTURE_WRAP_R */ + 769, /* GL_MAX_3D_TEXTURE_SIZE */ + 1644, /* GL_VERTEX_ARRAY */ + 933, /* GL_NORMAL_ARRAY */ + 139, /* GL_COLOR_ARRAY */ + 553, /* GL_INDEX_ARRAY */ + 1519, /* GL_TEXTURE_COORD_ARRAY */ + 414, /* GL_EDGE_FLAG_ARRAY */ + 1649, /* GL_VERTEX_ARRAY_SIZE */ + 1651, /* GL_VERTEX_ARRAY_TYPE */ + 1650, /* GL_VERTEX_ARRAY_STRIDE */ + 938, /* GL_NORMAL_ARRAY_TYPE */ + 937, /* GL_NORMAL_ARRAY_STRIDE */ + 143, /* GL_COLOR_ARRAY_SIZE */ + 145, /* GL_COLOR_ARRAY_TYPE */ + 144, /* GL_COLOR_ARRAY_STRIDE */ + 558, /* GL_INDEX_ARRAY_TYPE */ + 557, /* GL_INDEX_ARRAY_STRIDE */ + 1523, /* GL_TEXTURE_COORD_ARRAY_SIZE */ + 1525, /* GL_TEXTURE_COORD_ARRAY_TYPE */ + 1524, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ + 418, /* GL_EDGE_FLAG_ARRAY_STRIDE */ + 1648, /* GL_VERTEX_ARRAY_POINTER */ + 936, /* GL_NORMAL_ARRAY_POINTER */ + 142, /* GL_COLOR_ARRAY_POINTER */ + 556, /* GL_INDEX_ARRAY_POINTER */ + 1522, /* GL_TEXTURE_COORD_ARRAY_POINTER */ + 417, /* GL_EDGE_FLAG_ARRAY_POINTER */ + 912, /* GL_MULTISAMPLE */ + 1278, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ + 1280, /* GL_SAMPLE_ALPHA_TO_ONE */ + 1285, /* GL_SAMPLE_COVERAGE */ + 1282, /* GL_SAMPLE_BUFFERS */ + 1273, /* GL_SAMPLES */ + 1289, /* GL_SAMPLE_COVERAGE_VALUE */ + 1287, /* GL_SAMPLE_COVERAGE_INVERT */ + 170, /* GL_COLOR_MATRIX */ + 172, /* GL_COLOR_MATRIX_STACK_DEPTH */ + 776, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ + 1103, /* GL_POST_COLOR_MATRIX_RED_SCALE */ + 1099, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ + 1094, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ + 1090, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ + 1101, /* GL_POST_COLOR_MATRIX_RED_BIAS */ + 1097, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ + 1092, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ + 1088, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ + 1502, /* GL_TEXTURE_COLOR_TABLE_SGI */ + 1176, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ + 1504, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ + 80, /* GL_BLEND_DST_RGB */ + 88, /* GL_BLEND_SRC_RGB */ + 79, /* GL_BLEND_DST_ALPHA */ + 87, /* GL_BLEND_SRC_ALPHA */ + 176, /* GL_COLOR_TABLE */ + 1113, /* GL_POST_CONVOLUTION_COLOR_TABLE */ + 1096, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ + 1166, /* GL_PROXY_COLOR_TABLE */ + 1170, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ + 1169, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ + 200, /* GL_COLOR_TABLE_SCALE */ + 180, /* GL_COLOR_TABLE_BIAS */ + 185, /* GL_COLOR_TABLE_FORMAT */ + 202, /* GL_COLOR_TABLE_WIDTH */ + 197, /* GL_COLOR_TABLE_RED_SIZE */ + 188, /* GL_COLOR_TABLE_GREEN_SIZE */ + 182, /* GL_COLOR_TABLE_BLUE_SIZE */ + 177, /* GL_COLOR_TABLE_ALPHA_SIZE */ + 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ + 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */ + 71, /* GL_BGR */ + 72, /* GL_BGRA */ + 790, /* GL_MAX_ELEMENTS_VERTICES */ + 789, /* GL_MAX_ELEMENTS_INDICES */ + 1556, /* GL_TEXTURE_INDEX_SIZE_EXT */ + 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ + 1060, /* GL_POINT_SIZE_MIN */ + 1056, /* GL_POINT_SIZE_MAX */ + 1050, /* GL_POINT_FADE_THRESHOLD_SIZE */ + 1046, /* GL_POINT_DISTANCE_ATTENUATION */ + 118, /* GL_CLAMP_TO_BORDER */ + 121, /* GL_CLAMP_TO_EDGE */ + 1577, /* GL_TEXTURE_MIN_LOD */ + 1575, /* GL_TEXTURE_MAX_LOD */ + 1483, /* GL_TEXTURE_BASE_LEVEL */ + 1574, /* GL_TEXTURE_MAX_LEVEL */ + 547, /* GL_IGNORE_BORDER_HP */ + 245, /* GL_CONSTANT_BORDER_HP */ + 1222, /* GL_REPLICATE_BORDER_HP */ + 251, /* GL_CONVOLUTION_BORDER_COLOR */ + 961, /* GL_OCCLUSION_TEST_HP */ + 962, /* GL_OCCLUSION_TEST_RESULT_HP */ + 616, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ + 1496, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ + 1498, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ + 1500, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ + 1501, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + 1499, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ + 1497, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ + 772, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ + 773, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + 1123, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ + 1125, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ + 1122, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ + 1124, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ + 1564, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ + 1565, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ + 1563, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ + 516, /* GL_GENERATE_MIPMAP */ + 517, /* GL_GENERATE_MIPMAP_HINT */ + 480, /* GL_FOG_OFFSET_SGIX */ + 481, /* GL_FOG_OFFSET_VALUE_SGIX */ + 1510, /* GL_TEXTURE_COMPARE_SGIX */ + 1509, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ + 1560, /* GL_TEXTURE_LEQUAL_R_SGIX */ + 1552, /* GL_TEXTURE_GEQUAL_R_SGIX */ + 322, /* GL_DEPTH_COMPONENT16 */ + 325, /* GL_DEPTH_COMPONENT24 */ + 328, /* GL_DEPTH_COMPONENT32 */ + 273, /* GL_CULL_VERTEX_EXT */ + 275, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ + 274, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ + 1705, /* GL_WRAP_BORDER_SUN */ + 1503, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ + 609, /* GL_LIGHT_MODEL_COLOR_CONTROL */ + 1317, /* GL_SINGLE_COLOR */ + 1305, /* GL_SEPARATE_SPECULAR_COLOR */ + 1314, /* GL_SHARED_TEXTURE_PALETTE_EXT */ + 1619, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + 1632, /* GL_UNSIGNED_SHORT_5_6_5 */ + 1633, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + 1630, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + 1628, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + 1626, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + 1624, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + 1572, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ + 1573, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ + 1571, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ + 863, /* GL_MIRRORED_REPEAT */ + 1261, /* GL_RGB_S3TC */ + 1238, /* GL_RGB4_S3TC */ + 1260, /* GL_RGBA_S3TC */ + 1255, /* GL_RGBA4_S3TC */ + 1258, /* GL_RGBA_DXT5_S3TC */ + 1253, /* GL_RGBA4_DXT5_S3TC */ + 238, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ + 233, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ + 234, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ + 235, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ + 924, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ + 923, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ + 617, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ + 467, /* GL_FOG_COORDINATE_SOURCE */ + 459, /* GL_FOG_COORD */ + 483, /* GL_FRAGMENT_DEPTH */ + 279, /* GL_CURRENT_FOG_COORD */ + 466, /* GL_FOG_COORDINATE_ARRAY_TYPE */ + 465, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ + 464, /* GL_FOG_COORDINATE_ARRAY_POINTER */ + 461, /* GL_FOG_COORDINATE_ARRAY */ + 174, /* GL_COLOR_SUM */ + 298, /* GL_CURRENT_SECONDARY_COLOR */ + 1298, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ + 1300, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ + 1299, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ + 1297, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ + 1294, /* GL_SECONDARY_COLOR_ARRAY */ + 28, /* GL_ALIASED_POINT_SIZE_RANGE */ + 27, /* GL_ALIASED_LINE_WIDTH_RANGE */ + 1414, /* GL_TEXTURE0 */ + 1416, /* GL_TEXTURE1 */ + 1438, /* GL_TEXTURE2 */ + 1460, /* GL_TEXTURE3 */ + 1466, /* GL_TEXTURE4 */ + 1468, /* GL_TEXTURE5 */ + 1470, /* GL_TEXTURE6 */ + 1472, /* GL_TEXTURE7 */ + 1474, /* GL_TEXTURE8 */ + 1476, /* GL_TEXTURE9 */ + 1417, /* GL_TEXTURE10 */ + 1419, /* GL_TEXTURE11 */ + 1421, /* GL_TEXTURE12 */ + 1423, /* GL_TEXTURE13 */ + 1425, /* GL_TEXTURE14 */ + 1427, /* GL_TEXTURE15 */ + 1429, /* GL_TEXTURE16 */ + 1431, /* GL_TEXTURE17 */ + 1433, /* GL_TEXTURE18 */ + 1435, /* GL_TEXTURE19 */ + 1439, /* GL_TEXTURE20 */ + 1441, /* GL_TEXTURE21 */ + 1443, /* GL_TEXTURE22 */ + 1445, /* GL_TEXTURE23 */ + 1447, /* GL_TEXTURE24 */ + 1449, /* GL_TEXTURE25 */ + 1451, /* GL_TEXTURE26 */ + 1453, /* GL_TEXTURE27 */ + 1455, /* GL_TEXTURE28 */ + 1457, /* GL_TEXTURE29 */ + 1461, /* GL_TEXTURE30 */ + 1463, /* GL_TEXTURE31 */ + 18, /* GL_ACTIVE_TEXTURE */ + 124, /* GL_CLIENT_ACTIVE_TEXTURE */ + 841, /* GL_MAX_TEXTURE_UNITS */ + 1598, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + 1601, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + 1603, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + 1595, /* GL_TRANSPOSE_COLOR_MATRIX */ + 1402, /* GL_SUBTRACT */ + 830, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ + 221, /* GL_COMPRESSED_ALPHA */ + 225, /* GL_COMPRESSED_LUMINANCE */ + 226, /* GL_COMPRESSED_LUMINANCE_ALPHA */ + 223, /* GL_COMPRESSED_INTENSITY */ + 229, /* GL_COMPRESSED_RGB */ + 230, /* GL_COMPRESSED_RGBA */ + 1517, /* GL_TEXTURE_COMPRESSION_HINT */ + 1579, /* GL_TEXTURE_RECTANGLE_ARB */ + 1489, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ + 1179, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ + 828, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ + 334, /* GL_DEPTH_STENCIL_NV */ + 1623, /* GL_UNSIGNED_INT_24_8_NV */ + 837, /* GL_MAX_TEXTURE_LOD_BIAS */ + 1570, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ + 838, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ + 1546, /* GL_TEXTURE_FILTER_CONTROL */ + 1561, /* GL_TEXTURE_LOD_BIAS */ + 207, /* GL_COMBINE4 */ + 831, /* GL_MAX_SHININESS_NV */ + 832, /* GL_MAX_SPOT_EXPONENT_NV */ + 551, /* GL_INCR_WRAP */ + 309, /* GL_DECR_WRAP */ + 883, /* GL_MODELVIEW1_ARB */ + 939, /* GL_NORMAL_MAP */ + 1208, /* GL_REFLECTION_MAP */ + 1526, /* GL_TEXTURE_CUBE_MAP */ + 1487, /* GL_TEXTURE_BINDING_CUBE_MAP */ + 1534, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ + 1528, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ + 1536, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ + 1530, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ + 1538, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ + 1532, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ + 1177, /* GL_PROXY_TEXTURE_CUBE_MAP */ + 784, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ + 918, /* GL_MULTISAMPLE_FILTER_HINT_NV */ + 475, /* GL_FOG_DISTANCE_MODE_NV */ + 434, /* GL_EYE_RADIAL_NV */ + 433, /* GL_EYE_PLANE_ABSOLUTE_NV */ + 206, /* GL_COMBINE */ + 213, /* GL_COMBINE_RGB */ + 208, /* GL_COMBINE_ALPHA */ + 1262, /* GL_RGB_SCALE */ + 24, /* GL_ADD_SIGNED */ + 578, /* GL_INTERPOLATE */ + 240, /* GL_CONSTANT */ + 1129, /* GL_PRIMARY_COLOR */ + 1126, /* GL_PREVIOUS */ + 1328, /* GL_SOURCE0_RGB */ + 1334, /* GL_SOURCE1_RGB */ + 1340, /* GL_SOURCE2_RGB */ + 1344, /* GL_SOURCE3_RGB_NV */ + 1325, /* GL_SOURCE0_ALPHA */ + 1331, /* GL_SOURCE1_ALPHA */ + 1337, /* GL_SOURCE2_ALPHA */ + 1343, /* GL_SOURCE3_ALPHA_NV */ + 975, /* GL_OPERAND0_RGB */ + 981, /* GL_OPERAND1_RGB */ + 987, /* GL_OPERAND2_RGB */ + 991, /* GL_OPERAND3_RGB_NV */ + 972, /* GL_OPERAND0_ALPHA */ + 978, /* GL_OPERAND1_ALPHA */ + 984, /* GL_OPERAND2_ALPHA */ + 990, /* GL_OPERAND3_ALPHA_NV */ + 1645, /* GL_VERTEX_ARRAY_BINDING_APPLE */ + 1709, /* GL_YCBCR_422_APPLE */ + 1634, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + 1636, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + 1319, /* GL_SLICE_ACCUM_SUN */ + 1184, /* GL_QUAD_MESH_SUN */ + 1607, /* GL_TRIANGLE_MESH_SUN */ + 1683, /* GL_VERTEX_PROGRAM_ARB */ + 1694, /* GL_VERTEX_STATE_PROGRAM_NV */ + 1670, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + 1676, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + 1678, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + 1680, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + 300, /* GL_CURRENT_VERTEX_ATTRIB */ + 1142, /* GL_PROGRAM_LENGTH_ARB */ + 1156, /* GL_PROGRAM_STRING_ARB */ + 905, /* GL_MODELVIEW_PROJECTION_NV */ + 546, /* GL_IDENTITY_NV */ + 591, /* GL_INVERSE_NV */ + 1600, /* GL_TRANSPOSE_NV */ + 592, /* GL_INVERSE_TRANSPOSE_NV */ + 814, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ + 813, /* GL_MAX_PROGRAM_MATRICES_ARB */ + 722, /* GL_MATRIX0_NV */ + 734, /* GL_MATRIX1_NV */ + 746, /* GL_MATRIX2_NV */ + 750, /* GL_MATRIX3_NV */ + 752, /* GL_MATRIX4_NV */ + 754, /* GL_MATRIX5_NV */ + 756, /* GL_MATRIX6_NV */ + 758, /* GL_MATRIX7_NV */ + 285, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ + 282, /* GL_CURRENT_MATRIX_ARB */ + 1686, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + 1689, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + 1154, /* GL_PROGRAM_PARAMETER_NV */ + 1674, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + 1158, /* GL_PROGRAM_TARGET_NV */ + 1155, /* GL_PROGRAM_RESIDENT_NV */ + 1592, /* GL_TRACK_MATRIX_NV */ + 1593, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + 1684, /* GL_VERTEX_PROGRAM_BINDING_NV */ + 1136, /* GL_PROGRAM_ERROR_POSITION_ARB */ + 319, /* GL_DEPTH_CLAMP_NV */ + 1652, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + 1659, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + 1660, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + 1661, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + 1662, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + 1663, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + 1664, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + 1665, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + 1666, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + 1667, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + 1653, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + 1654, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + 1655, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + 1656, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + 1657, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + 1658, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + 676, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ + 683, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ + 684, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ + 685, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ + 686, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ + 687, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ + 688, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ + 689, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ + 690, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ + 691, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ + 677, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ + 678, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ + 679, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ + 680, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ + 681, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ + 682, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ + 703, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ + 710, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ + 711, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ + 712, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ + 713, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ + 714, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ + 715, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ + 1135, /* GL_PROGRAM_BINDING_ARB */ + 717, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ + 718, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ + 704, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ + 705, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ + 706, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ + 707, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ + 708, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ + 709, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ + 1515, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ + 1512, /* GL_TEXTURE_COMPRESSED */ + 944, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ + 239, /* GL_COMPRESSED_TEXTURE_FORMATS */ + 853, /* GL_MAX_VERTEX_UNITS_ARB */ + 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */ + 1704, /* GL_WEIGHT_SUM_UNITY_ARB */ + 1682, /* GL_VERTEX_BLEND_ARB */ + 302, /* GL_CURRENT_WEIGHT_ARB */ + 1703, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + 1702, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + 1701, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + 1700, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + 1697, /* GL_WEIGHT_ARRAY_ARB */ + 345, /* GL_DOT3_RGB */ + 346, /* GL_DOT3_RGBA */ + 237, /* GL_COMPRESSED_RGB_FXT1_3DFX */ + 232, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ + 913, /* GL_MULTISAMPLE_3DFX */ + 1283, /* GL_SAMPLE_BUFFERS_3DFX */ + 1274, /* GL_SAMPLES_3DFX */ + 894, /* GL_MODELVIEW2_ARB */ + 897, /* GL_MODELVIEW3_ARB */ + 898, /* GL_MODELVIEW4_ARB */ + 899, /* GL_MODELVIEW5_ARB */ + 900, /* GL_MODELVIEW6_ARB */ + 901, /* GL_MODELVIEW7_ARB */ + 902, /* GL_MODELVIEW8_ARB */ + 903, /* GL_MODELVIEW9_ARB */ + 873, /* GL_MODELVIEW10_ARB */ + 874, /* GL_MODELVIEW11_ARB */ + 875, /* GL_MODELVIEW12_ARB */ + 876, /* GL_MODELVIEW13_ARB */ + 877, /* GL_MODELVIEW14_ARB */ + 878, /* GL_MODELVIEW15_ARB */ + 879, /* GL_MODELVIEW16_ARB */ + 880, /* GL_MODELVIEW17_ARB */ + 881, /* GL_MODELVIEW18_ARB */ + 882, /* GL_MODELVIEW19_ARB */ + 884, /* GL_MODELVIEW20_ARB */ + 885, /* GL_MODELVIEW21_ARB */ + 886, /* GL_MODELVIEW22_ARB */ + 887, /* GL_MODELVIEW23_ARB */ + 888, /* GL_MODELVIEW24_ARB */ + 889, /* GL_MODELVIEW25_ARB */ + 890, /* GL_MODELVIEW26_ARB */ + 891, /* GL_MODELVIEW27_ARB */ + 892, /* GL_MODELVIEW28_ARB */ + 893, /* GL_MODELVIEW29_ARB */ + 895, /* GL_MODELVIEW30_ARB */ + 896, /* GL_MODELVIEW31_ARB */ + 350, /* GL_DOT3_RGB_EXT */ + 348, /* GL_DOT3_RGBA_EXT */ + 867, /* GL_MIRROR_CLAMP_EXT */ + 870, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ + 908, /* GL_MODULATE_ADD_ATI */ + 909, /* GL_MODULATE_SIGNED_ADD_ATI */ + 910, /* GL_MODULATE_SUBTRACT_ATI */ + 1710, /* GL_YCBCR_MESA */ + 999, /* GL_PACK_INVERT_MESA */ + 305, /* GL_DEBUG_OBJECT_MESA */ + 306, /* GL_DEBUG_PRINT_MESA */ + 304, /* GL_DEBUG_ASSERT_MESA */ + 107, /* GL_BUFFER_SIZE */ + 109, /* GL_BUFFER_USAGE */ + 1370, /* GL_STENCIL_BACK_FUNC */ + 1369, /* GL_STENCIL_BACK_FAIL */ + 1371, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ + 1372, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ + 484, /* GL_FRAGMENT_PROGRAM_ARB */ + 1133, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ + 1161, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ + 1160, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ + 1145, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + 1151, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + 1150, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + 803, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ + 826, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ + 825, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ + 816, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + 822, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + 821, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + 786, /* GL_MAX_DRAW_BUFFERS */ + 354, /* GL_DRAW_BUFFER0 */ + 357, /* GL_DRAW_BUFFER1 */ + 378, /* GL_DRAW_BUFFER2 */ + 381, /* GL_DRAW_BUFFER3 */ + 384, /* GL_DRAW_BUFFER4 */ + 387, /* GL_DRAW_BUFFER5 */ + 390, /* GL_DRAW_BUFFER6 */ + 393, /* GL_DRAW_BUFFER7 */ + 396, /* GL_DRAW_BUFFER8 */ + 399, /* GL_DRAW_BUFFER9 */ + 358, /* GL_DRAW_BUFFER10 */ + 361, /* GL_DRAW_BUFFER11 */ + 364, /* GL_DRAW_BUFFER12 */ + 367, /* GL_DRAW_BUFFER13 */ + 370, /* GL_DRAW_BUFFER14 */ + 373, /* GL_DRAW_BUFFER15 */ + 82, /* GL_BLEND_EQUATION_ALPHA */ + 767, /* GL_MATRIX_PALETTE_ARB */ + 797, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ + 800, /* GL_MAX_PALETTE_MATRICES_ARB */ + 288, /* GL_CURRENT_PALETTE_MATRIX_ARB */ + 761, /* GL_MATRIX_INDEX_ARRAY_ARB */ + 283, /* GL_CURRENT_MATRIX_INDEX_ARB */ + 763, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ + 765, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ + 764, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ + 762, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ + 1541, /* GL_TEXTURE_DEPTH_SIZE */ + 338, /* GL_DEPTH_TEXTURE_MODE */ + 1507, /* GL_TEXTURE_COMPARE_MODE */ + 1505, /* GL_TEXTURE_COMPARE_FUNC */ + 216, /* GL_COMPARE_R_TO_TEXTURE */ + 1067, /* GL_POINT_SPRITE */ + 265, /* GL_COORD_REPLACE */ + 1071, /* GL_POINT_SPRITE_R_MODE_NV */ + 1186, /* GL_QUERY_COUNTER_BITS */ + 290, /* GL_CURRENT_QUERY */ + 1188, /* GL_QUERY_RESULT */ + 1190, /* GL_QUERY_RESULT_AVAILABLE */ + 847, /* GL_MAX_VERTEX_ATTRIBS */ + 1672, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + 336, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ + 335, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ + 833, /* GL_MAX_TEXTURE_COORDS */ + 835, /* GL_MAX_TEXTURE_IMAGE_UNITS */ + 1138, /* GL_PROGRAM_ERROR_STRING_ARB */ + 1140, /* GL_PROGRAM_FORMAT_ASCII_ARB */ + 1139, /* GL_PROGRAM_FORMAT_ARB */ + 1586, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ + 317, /* GL_DEPTH_BOUNDS_TEST_EXT */ + 316, /* GL_DEPTH_BOUNDS_EXT */ + 52, /* GL_ARRAY_BUFFER */ + 419, /* GL_ELEMENT_ARRAY_BUFFER */ + 54, /* GL_ARRAY_BUFFER_BINDING */ + 421, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ + 1646, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + 934, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ + 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */ + 554, /* GL_INDEX_ARRAY_BUFFER_BINDING */ + 1520, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ + 415, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ + 1295, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ + 462, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ + 1698, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + 1668, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + 1141, /* GL_PROGRAM_INSTRUCTIONS_ARB */ + 809, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ + 1147, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + 818, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + 1159, /* GL_PROGRAM_TEMPORARIES_ARB */ + 824, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ + 1149, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ + 820, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ + 1153, /* GL_PROGRAM_PARAMETERS_ARB */ + 823, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ + 1148, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ + 819, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ + 1134, /* GL_PROGRAM_ATTRIBS_ARB */ + 804, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ + 1146, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ + 817, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ + 1132, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ + 802, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ + 1144, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + 815, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + 810, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ + 806, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ + 1162, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ + 1597, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + 1198, /* GL_READ_ONLY */ + 1706, /* GL_WRITE_ONLY */ + 1200, /* GL_READ_WRITE */ + 101, /* GL_BUFFER_ACCESS */ + 103, /* GL_BUFFER_MAPPED */ + 105, /* GL_BUFFER_MAP_POINTER */ + 1591, /* GL_TIME_ELAPSED_EXT */ + 721, /* GL_MATRIX0_ARB */ + 733, /* GL_MATRIX1_ARB */ + 745, /* GL_MATRIX2_ARB */ + 749, /* GL_MATRIX3_ARB */ + 751, /* GL_MATRIX4_ARB */ + 753, /* GL_MATRIX5_ARB */ + 755, /* GL_MATRIX6_ARB */ + 757, /* GL_MATRIX7_ARB */ + 759, /* GL_MATRIX8_ARB */ + 760, /* GL_MATRIX9_ARB */ + 723, /* GL_MATRIX10_ARB */ + 724, /* GL_MATRIX11_ARB */ + 725, /* GL_MATRIX12_ARB */ + 726, /* GL_MATRIX13_ARB */ + 727, /* GL_MATRIX14_ARB */ + 728, /* GL_MATRIX15_ARB */ + 729, /* GL_MATRIX16_ARB */ + 730, /* GL_MATRIX17_ARB */ + 731, /* GL_MATRIX18_ARB */ + 732, /* GL_MATRIX19_ARB */ + 735, /* GL_MATRIX20_ARB */ + 736, /* GL_MATRIX21_ARB */ + 737, /* GL_MATRIX22_ARB */ + 738, /* GL_MATRIX23_ARB */ + 739, /* GL_MATRIX24_ARB */ + 740, /* GL_MATRIX25_ARB */ + 741, /* GL_MATRIX26_ARB */ + 742, /* GL_MATRIX27_ARB */ + 743, /* GL_MATRIX28_ARB */ + 744, /* GL_MATRIX29_ARB */ + 747, /* GL_MATRIX30_ARB */ + 748, /* GL_MATRIX31_ARB */ + 1397, /* GL_STREAM_DRAW */ + 1399, /* GL_STREAM_READ */ + 1395, /* GL_STREAM_COPY */ + 1363, /* GL_STATIC_DRAW */ + 1365, /* GL_STATIC_READ */ + 1361, /* GL_STATIC_COPY */ + 409, /* GL_DYNAMIC_DRAW */ + 411, /* GL_DYNAMIC_READ */ + 407, /* GL_DYNAMIC_COPY */ + 1040, /* GL_PIXEL_PACK_BUFFER_EXT */ + 1042, /* GL_PIXEL_UNPACK_BUFFER_EXT */ + 1039, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ + 1041, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ + 807, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ + 805, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ + 808, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ + 812, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ + 811, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ + 1391, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ + 17, /* GL_ACTIVE_STENCIL_FACE_EXT */ + 868, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ + 1276, /* GL_SAMPLES_PASSED */ + 485, /* GL_FRAGMENT_SHADER */ + 1692, /* GL_VERTEX_SHADER */ + 1152, /* GL_PROGRAM_OBJECT_ARB */ + 1308, /* GL_SHADER_OBJECT_ARB */ + 793, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ + 851, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ + 845, /* GL_MAX_VARYING_FLOATS */ + 849, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ + 778, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ + 959, /* GL_OBJECT_TYPE_ARB */ + 1310, /* GL_SHADER_TYPE */ + 450, /* GL_FLOAT_VEC2 */ + 452, /* GL_FLOAT_VEC3 */ + 454, /* GL_FLOAT_VEC4 */ + 581, /* GL_INT_VEC2 */ + 583, /* GL_INT_VEC3 */ + 585, /* GL_INT_VEC4 */ + 93, /* GL_BOOL */ + 95, /* GL_BOOL_VEC2 */ + 97, /* GL_BOOL_VEC3 */ + 99, /* GL_BOOL_VEC4 */ + 444, /* GL_FLOAT_MAT2 */ + 446, /* GL_FLOAT_MAT3 */ + 448, /* GL_FLOAT_MAT4 */ + 1267, /* GL_SAMPLER_1D */ + 1269, /* GL_SAMPLER_2D */ + 1271, /* GL_SAMPLER_3D */ + 1272, /* GL_SAMPLER_CUBE */ + 1268, /* GL_SAMPLER_1D_SHADOW */ + 1270, /* GL_SAMPLER_2D_SHADOW */ + 311, /* GL_DELETE_STATUS */ + 220, /* GL_COMPILE_STATUS */ + 634, /* GL_LINK_STATUS */ + 1641, /* GL_VALIDATE_STATUS */ + 566, /* GL_INFO_LOG_LENGTH */ + 56, /* GL_ATTACHED_SHADERS */ + 20, /* GL_ACTIVE_UNIFORMS */ + 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */ + 1309, /* GL_SHADER_SOURCE_LENGTH */ + 15, /* GL_ACTIVE_ATTRIBUTES */ + 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */ + 487, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ + 1312, /* GL_SHADING_LANGUAGE_VERSION */ + 289, /* GL_CURRENT_PROGRAM */ + 1008, /* GL_PALETTE4_RGB8_OES */ + 1010, /* GL_PALETTE4_RGBA8_OES */ + 1006, /* GL_PALETTE4_R5_G6_B5_OES */ + 1009, /* GL_PALETTE4_RGBA4_OES */ + 1007, /* GL_PALETTE4_RGB5_A1_OES */ + 1013, /* GL_PALETTE8_RGB8_OES */ + 1015, /* GL_PALETTE8_RGBA8_OES */ + 1011, /* GL_PALETTE8_R5_G6_B5_OES */ + 1014, /* GL_PALETTE8_RGBA4_OES */ + 1012, /* GL_PALETTE8_RGB5_A1_OES */ + 549, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ + 548, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ + 1069, /* GL_POINT_SPRITE_COORD_ORIGIN */ + 642, /* GL_LOWER_LEFT */ + 1638, /* GL_UPPER_LEFT */ + 1373, /* GL_STENCIL_BACK_REF */ + 1374, /* GL_STENCIL_BACK_VALUE_MASK */ + 1375, /* GL_STENCIL_BACK_WRITEMASK */ + 402, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ + 1212, /* GL_RENDERBUFFER_BINDING_EXT */ + 1197, /* GL_READ_FRAMEBUFFER_EXT */ + 403, /* GL_DRAW_FRAMEBUFFER_EXT */ + 1196, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ + 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ + 488, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ + 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ + 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ + 490, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ + 494, /* GL_FRAMEBUFFER_COMPLETE_EXT */ + 496, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ + 501, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ + 499, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ + 497, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ + 500, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ + 498, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ + 502, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ + 504, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ + 503, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ + 775, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ + 146, /* GL_COLOR_ATTACHMENT0_EXT */ + 153, /* GL_COLOR_ATTACHMENT1_EXT */ + 154, /* GL_COLOR_ATTACHMENT2_EXT */ + 155, /* GL_COLOR_ATTACHMENT3_EXT */ + 156, /* GL_COLOR_ATTACHMENT4_EXT */ + 157, /* GL_COLOR_ATTACHMENT5_EXT */ + 158, /* GL_COLOR_ATTACHMENT6_EXT */ + 159, /* GL_COLOR_ATTACHMENT7_EXT */ + 160, /* GL_COLOR_ATTACHMENT8_EXT */ + 161, /* GL_COLOR_ATTACHMENT9_EXT */ + 147, /* GL_COLOR_ATTACHMENT10_EXT */ + 148, /* GL_COLOR_ATTACHMENT11_EXT */ + 149, /* GL_COLOR_ATTACHMENT12_EXT */ + 150, /* GL_COLOR_ATTACHMENT13_EXT */ + 151, /* GL_COLOR_ATTACHMENT14_EXT */ + 152, /* GL_COLOR_ATTACHMENT15_EXT */ + 313, /* GL_DEPTH_ATTACHMENT_EXT */ + 1368, /* GL_STENCIL_ATTACHMENT_EXT */ + 495, /* GL_FRAMEBUFFER_EXT */ + 1213, /* GL_RENDERBUFFER_EXT */ + 1216, /* GL_RENDERBUFFER_WIDTH_EXT */ + 1214, /* GL_RENDERBUFFER_HEIGHT_EXT */ + 1215, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ + 1386, /* GL_STENCIL_INDEX_EXT */ + 1383, /* GL_STENCIL_INDEX1_EXT */ + 1384, /* GL_STENCIL_INDEX4_EXT */ + 1385, /* GL_STENCIL_INDEX8_EXT */ + 1382, /* GL_STENCIL_INDEX16_EXT */ + 427, /* GL_EVAL_BIT */ + 1194, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ + 636, /* GL_LIST_BIT */ + 1491, /* GL_TEXTURE_BIT */ + 1291, /* GL_SCISSOR_BIT */ + 29, /* GL_ALL_ATTRIB_BITS */ + 915, /* GL_MULTISAMPLE_BIT */ + 30, /* GL_ALL_CLIENT_ATTRIB_BITS */ }; #define Elements(x) sizeof(x)/sizeof(*x) diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S index b3fbb5bf72..cfaab37c41 100644 --- a/src/mesa/sparc/glapi_sparc.S +++ b/src/mesa/sparc/glapi_sparc.S @@ -473,6 +473,19 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glMultiTexCoord4ivARB ; .type glMultiTexCoord4ivARB,#function .globl glMultiTexCoord4sARB ; .type glMultiTexCoord4sARB,#function .globl glMultiTexCoord4svARB ; .type glMultiTexCoord4svARB,#function + .globl glAttachShader ; .type glAttachShader,#function + .globl glCreateProgram ; .type glCreateProgram,#function + .globl glCreateShader ; .type glCreateShader,#function + .globl glDeleteProgram ; .type glDeleteProgram,#function + .globl glDeleteShader ; .type glDeleteShader,#function + .globl glDetachShader ; .type glDetachShader,#function + .globl glGetAttachedShaders ; .type glGetAttachedShaders,#function + .globl glGetProgramInfoLog ; .type glGetProgramInfoLog,#function + .globl glGetProgramiv ; .type glGetProgramiv,#function + .globl glGetShaderInfoLog ; .type glGetShaderInfoLog,#function + .globl glGetShaderiv ; .type glGetShaderiv,#function + .globl glIsProgram ; .type glIsProgram,#function + .globl glIsShader ; .type glIsShader,#function .globl glStencilFuncSeparate ; .type glStencilFuncSeparate,#function .globl glStencilMaskSeparate ; .type glStencilMaskSeparate,#function .globl glStencilOpSeparate ; .type glStencilOpSeparate,#function @@ -608,14 +621,14 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glGetAttribLocationARB ; .type glGetAttribLocationARB,#function .globl glDrawBuffersARB ; .type glDrawBuffersARB,#function .globl glPolygonOffsetEXT ; .type glPolygonOffsetEXT,#function - .globl gl_dispatch_stub_543 ; .type gl_dispatch_stub_543,#function - .globl gl_dispatch_stub_544 ; .type gl_dispatch_stub_544,#function - .globl gl_dispatch_stub_545 ; .type gl_dispatch_stub_545,#function - .globl gl_dispatch_stub_546 ; .type gl_dispatch_stub_546,#function - .globl gl_dispatch_stub_547 ; .type gl_dispatch_stub_547,#function - .globl gl_dispatch_stub_548 ; .type gl_dispatch_stub_548,#function - .globl gl_dispatch_stub_549 ; .type gl_dispatch_stub_549,#function - .globl gl_dispatch_stub_550 ; .type gl_dispatch_stub_550,#function + .globl gl_dispatch_stub_556 ; .type gl_dispatch_stub_556,#function + .globl gl_dispatch_stub_557 ; .type gl_dispatch_stub_557,#function + .globl gl_dispatch_stub_558 ; .type gl_dispatch_stub_558,#function + .globl gl_dispatch_stub_559 ; .type gl_dispatch_stub_559,#function + .globl gl_dispatch_stub_560 ; .type gl_dispatch_stub_560,#function + .globl gl_dispatch_stub_561 ; .type gl_dispatch_stub_561,#function + .globl gl_dispatch_stub_562 ; .type gl_dispatch_stub_562,#function + .globl gl_dispatch_stub_563 ; .type gl_dispatch_stub_563,#function .globl glColorPointerEXT ; .type glColorPointerEXT,#function .globl glEdgeFlagPointerEXT ; .type glEdgeFlagPointerEXT,#function .globl glIndexPointerEXT ; .type glIndexPointerEXT,#function @@ -626,8 +639,8 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glPointParameterfvEXT ; .type glPointParameterfvEXT,#function .globl glLockArraysEXT ; .type glLockArraysEXT,#function .globl glUnlockArraysEXT ; .type glUnlockArraysEXT,#function - .globl gl_dispatch_stub_561 ; .type gl_dispatch_stub_561,#function - .globl gl_dispatch_stub_562 ; .type gl_dispatch_stub_562,#function + .globl gl_dispatch_stub_574 ; .type gl_dispatch_stub_574,#function + .globl gl_dispatch_stub_575 ; .type gl_dispatch_stub_575,#function .globl glSecondaryColor3bEXT ; .type glSecondaryColor3bEXT,#function .globl glSecondaryColor3bvEXT ; .type glSecondaryColor3bvEXT,#function .globl glSecondaryColor3dEXT ; .type glSecondaryColor3dEXT,#function @@ -652,7 +665,7 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glFogCoorddvEXT ; .type glFogCoorddvEXT,#function .globl glFogCoordfEXT ; .type glFogCoordfEXT,#function .globl glFogCoordfvEXT ; .type glFogCoordfvEXT,#function - .globl gl_dispatch_stub_587 ; .type gl_dispatch_stub_587,#function + .globl gl_dispatch_stub_600 ; .type gl_dispatch_stub_600,#function .globl glBlendFuncSeparateEXT ; .type glBlendFuncSeparateEXT,#function .globl glFlushVertexArrayRangeNV ; .type glFlushVertexArrayRangeNV,#function .globl glVertexArrayRangeNV ; .type glVertexArrayRangeNV,#function @@ -694,15 +707,15 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glWindowPos4ivMESA ; .type glWindowPos4ivMESA,#function .globl glWindowPos4sMESA ; .type glWindowPos4sMESA,#function .globl glWindowPos4svMESA ; .type glWindowPos4svMESA,#function - .globl gl_dispatch_stub_629 ; .type gl_dispatch_stub_629,#function - .globl gl_dispatch_stub_630 ; .type gl_dispatch_stub_630,#function - .globl gl_dispatch_stub_631 ; .type gl_dispatch_stub_631,#function - .globl gl_dispatch_stub_632 ; .type gl_dispatch_stub_632,#function - .globl gl_dispatch_stub_633 ; .type gl_dispatch_stub_633,#function - .globl gl_dispatch_stub_634 ; .type gl_dispatch_stub_634,#function - .globl gl_dispatch_stub_635 ; .type gl_dispatch_stub_635,#function - .globl gl_dispatch_stub_636 ; .type gl_dispatch_stub_636,#function - .globl gl_dispatch_stub_637 ; .type gl_dispatch_stub_637,#function + .globl gl_dispatch_stub_642 ; .type gl_dispatch_stub_642,#function + .globl gl_dispatch_stub_643 ; .type gl_dispatch_stub_643,#function + .globl gl_dispatch_stub_644 ; .type gl_dispatch_stub_644,#function + .globl gl_dispatch_stub_645 ; .type gl_dispatch_stub_645,#function + .globl gl_dispatch_stub_646 ; .type gl_dispatch_stub_646,#function + .globl gl_dispatch_stub_647 ; .type gl_dispatch_stub_647,#function + .globl gl_dispatch_stub_648 ; .type gl_dispatch_stub_648,#function + .globl gl_dispatch_stub_649 ; .type gl_dispatch_stub_649,#function + .globl gl_dispatch_stub_650 ; .type gl_dispatch_stub_650,#function .globl glAreProgramsResidentNV ; .type glAreProgramsResidentNV,#function .globl glBindProgramNV ; .type glBindProgramNV,#function .globl glDeleteProgramsNV ; .type glDeleteProgramsNV,#function @@ -783,19 +796,19 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glSetFragmentShaderConstantATI ; .type glSetFragmentShaderConstantATI,#function .globl glPointParameteriNV ; .type glPointParameteriNV,#function .globl glPointParameterivNV ; .type glPointParameterivNV,#function - .globl gl_dispatch_stub_718 ; .type gl_dispatch_stub_718,#function - .globl gl_dispatch_stub_719 ; .type gl_dispatch_stub_719,#function - .globl gl_dispatch_stub_720 ; .type gl_dispatch_stub_720,#function - .globl gl_dispatch_stub_721 ; .type gl_dispatch_stub_721,#function - .globl gl_dispatch_stub_722 ; .type gl_dispatch_stub_722,#function + .globl gl_dispatch_stub_731 ; .type gl_dispatch_stub_731,#function + .globl gl_dispatch_stub_732 ; .type gl_dispatch_stub_732,#function + .globl gl_dispatch_stub_733 ; .type gl_dispatch_stub_733,#function + .globl gl_dispatch_stub_734 ; .type gl_dispatch_stub_734,#function + .globl gl_dispatch_stub_735 ; .type gl_dispatch_stub_735,#function .globl glGetProgramNamedParameterdvNV ; .type glGetProgramNamedParameterdvNV,#function .globl glGetProgramNamedParameterfvNV ; .type glGetProgramNamedParameterfvNV,#function .globl glProgramNamedParameter4dNV ; .type glProgramNamedParameter4dNV,#function .globl glProgramNamedParameter4dvNV ; .type glProgramNamedParameter4dvNV,#function .globl glProgramNamedParameter4fNV ; .type glProgramNamedParameter4fNV,#function .globl glProgramNamedParameter4fvNV ; .type glProgramNamedParameter4fvNV,#function - .globl gl_dispatch_stub_729 ; .type gl_dispatch_stub_729,#function - .globl gl_dispatch_stub_730 ; .type gl_dispatch_stub_730,#function + .globl gl_dispatch_stub_742 ; .type gl_dispatch_stub_742,#function + .globl gl_dispatch_stub_743 ; .type gl_dispatch_stub_743,#function .globl glBindFramebufferEXT ; .type glBindFramebufferEXT,#function .globl glBindRenderbufferEXT ; .type glBindRenderbufferEXT,#function .globl glCheckFramebufferStatusEXT ; .type glCheckFramebufferStatusEXT,#function @@ -813,11 +826,11 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glIsFramebufferEXT ; .type glIsFramebufferEXT,#function .globl glIsRenderbufferEXT ; .type glIsRenderbufferEXT,#function .globl glRenderbufferStorageEXT ; .type glRenderbufferStorageEXT,#function - .globl gl_dispatch_stub_748 ; .type gl_dispatch_stub_748,#function - .globl gl_dispatch_stub_749 ; .type gl_dispatch_stub_749,#function - .globl gl_dispatch_stub_750 ; .type gl_dispatch_stub_750,#function - .globl gl_dispatch_stub_751 ; .type gl_dispatch_stub_751,#function - .globl gl_dispatch_stub_752 ; .type gl_dispatch_stub_752,#function + .globl gl_dispatch_stub_761 ; .type gl_dispatch_stub_761,#function + .globl gl_dispatch_stub_762 ; .type gl_dispatch_stub_762,#function + .globl gl_dispatch_stub_763 ; .type gl_dispatch_stub_763,#function + .globl gl_dispatch_stub_764 ; .type gl_dispatch_stub_764,#function + .globl gl_dispatch_stub_765 ; .type gl_dispatch_stub_765,#function .globl _mesa_sparc_glapi_begin ; .type _mesa_sparc_glapi_begin,#function _mesa_sparc_glapi_begin: @@ -1229,6 +1242,19 @@ _mesa_sparc_glapi_begin: GL_STUB(glMultiTexCoord4ivARB, _gloffset_MultiTexCoord4ivARB) GL_STUB(glMultiTexCoord4sARB, _gloffset_MultiTexCoord4sARB) GL_STUB(glMultiTexCoord4svARB, _gloffset_MultiTexCoord4svARB) + GL_STUB(glAttachShader, _gloffset_AttachShader) + GL_STUB(glCreateProgram, _gloffset_CreateProgram) + GL_STUB(glCreateShader, _gloffset_CreateShader) + GL_STUB(glDeleteProgram, _gloffset_DeleteProgram) + GL_STUB(glDeleteShader, _gloffset_DeleteShader) + GL_STUB(glDetachShader, _gloffset_DetachShader) + GL_STUB(glGetAttachedShaders, _gloffset_GetAttachedShaders) + GL_STUB(glGetProgramInfoLog, _gloffset_GetProgramInfoLog) + GL_STUB(glGetProgramiv, _gloffset_GetProgramiv) + GL_STUB(glGetShaderInfoLog, _gloffset_GetShaderInfoLog) + GL_STUB(glGetShaderiv, _gloffset_GetShaderiv) + GL_STUB(glIsProgram, _gloffset_IsProgram) + GL_STUB(glIsShader, _gloffset_IsShader) GL_STUB(glStencilFuncSeparate, _gloffset_StencilFuncSeparate) GL_STUB(glStencilMaskSeparate, _gloffset_StencilMaskSeparate) GL_STUB(glStencilOpSeparate, _gloffset_StencilOpSeparate) @@ -1364,14 +1390,14 @@ _mesa_sparc_glapi_begin: GL_STUB(glGetAttribLocationARB, _gloffset_GetAttribLocationARB) GL_STUB(glDrawBuffersARB, _gloffset_DrawBuffersARB) GL_STUB(glPolygonOffsetEXT, _gloffset_PolygonOffsetEXT) - GL_STUB(gl_dispatch_stub_543, _gloffset__dispatch_stub_543) - GL_STUB(gl_dispatch_stub_544, _gloffset__dispatch_stub_544) - GL_STUB(gl_dispatch_stub_545, _gloffset__dispatch_stub_545) - GL_STUB(gl_dispatch_stub_546, _gloffset__dispatch_stub_546) - GL_STUB(gl_dispatch_stub_547, _gloffset__dispatch_stub_547) - GL_STUB(gl_dispatch_stub_548, _gloffset__dispatch_stub_548) - GL_STUB(gl_dispatch_stub_549, _gloffset__dispatch_stub_549) - GL_STUB(gl_dispatch_stub_550, _gloffset__dispatch_stub_550) + GL_STUB(gl_dispatch_stub_556, _gloffset__dispatch_stub_556) + GL_STUB(gl_dispatch_stub_557, _gloffset__dispatch_stub_557) + GL_STUB(gl_dispatch_stub_558, _gloffset__dispatch_stub_558) + GL_STUB(gl_dispatch_stub_559, _gloffset__dispatch_stub_559) + GL_STUB(gl_dispatch_stub_560, _gloffset__dispatch_stub_560) + GL_STUB(gl_dispatch_stub_561, _gloffset__dispatch_stub_561) + GL_STUB(gl_dispatch_stub_562, _gloffset__dispatch_stub_562) + GL_STUB(gl_dispatch_stub_563, _gloffset__dispatch_stub_563) GL_STUB(glColorPointerEXT, _gloffset_ColorPointerEXT) GL_STUB(glEdgeFlagPointerEXT, _gloffset_EdgeFlagPointerEXT) GL_STUB(glIndexPointerEXT, _gloffset_IndexPointerEXT) @@ -1382,8 +1408,8 @@ _mesa_sparc_glapi_begin: GL_STUB(glPointParameterfvEXT, _gloffset_PointParameterfvEXT) GL_STUB(glLockArraysEXT, _gloffset_LockArraysEXT) GL_STUB(glUnlockArraysEXT, _gloffset_UnlockArraysEXT) - GL_STUB(gl_dispatch_stub_561, _gloffset__dispatch_stub_561) - GL_STUB(gl_dispatch_stub_562, _gloffset__dispatch_stub_562) + GL_STUB(gl_dispatch_stub_574, _gloffset__dispatch_stub_574) + GL_STUB(gl_dispatch_stub_575, _gloffset__dispatch_stub_575) GL_STUB(glSecondaryColor3bEXT, _gloffset_SecondaryColor3bEXT) GL_STUB(glSecondaryColor3bvEXT, _gloffset_SecondaryColor3bvEXT) GL_STUB(glSecondaryColor3dEXT, _gloffset_SecondaryColor3dEXT) @@ -1408,7 +1434,7 @@ _mesa_sparc_glapi_begin: GL_STUB(glFogCoorddvEXT, _gloffset_FogCoorddvEXT) GL_STUB(glFogCoordfEXT, _gloffset_FogCoordfEXT) GL_STUB(glFogCoordfvEXT, _gloffset_FogCoordfvEXT) - GL_STUB(gl_dispatch_stub_587, _gloffset__dispatch_stub_587) + GL_STUB(gl_dispatch_stub_600, _gloffset__dispatch_stub_600) GL_STUB(glBlendFuncSeparateEXT, _gloffset_BlendFuncSeparateEXT) GL_STUB(glFlushVertexArrayRangeNV, _gloffset_FlushVertexArrayRangeNV) GL_STUB(glVertexArrayRangeNV, _gloffset_VertexArrayRangeNV) @@ -1450,15 +1476,15 @@ _mesa_sparc_glapi_begin: GL_STUB(glWindowPos4ivMESA, _gloffset_WindowPos4ivMESA) GL_STUB(glWindowPos4sMESA, _gloffset_WindowPos4sMESA) GL_STUB(glWindowPos4svMESA, _gloffset_WindowPos4svMESA) - GL_STUB(gl_dispatch_stub_629, _gloffset__dispatch_stub_629) - GL_STUB(gl_dispatch_stub_630, _gloffset__dispatch_stub_630) - GL_STUB(gl_dispatch_stub_631, _gloffset__dispatch_stub_631) - GL_STUB(gl_dispatch_stub_632, _gloffset__dispatch_stub_632) - GL_STUB(gl_dispatch_stub_633, _gloffset__dispatch_stub_633) - GL_STUB(gl_dispatch_stub_634, _gloffset__dispatch_stub_634) - GL_STUB(gl_dispatch_stub_635, _gloffset__dispatch_stub_635) - GL_STUB(gl_dispatch_stub_636, _gloffset__dispatch_stub_636) - GL_STUB(gl_dispatch_stub_637, _gloffset__dispatch_stub_637) + GL_STUB(gl_dispatch_stub_642, _gloffset__dispatch_stub_642) + GL_STUB(gl_dispatch_stub_643, _gloffset__dispatch_stub_643) + GL_STUB(gl_dispatch_stub_644, _gloffset__dispatch_stub_644) + GL_STUB(gl_dispatch_stub_645, _gloffset__dispatch_stub_645) + GL_STUB(gl_dispatch_stub_646, _gloffset__dispatch_stub_646) + GL_STUB(gl_dispatch_stub_647, _gloffset__dispatch_stub_647) + GL_STUB(gl_dispatch_stub_648, _gloffset__dispatch_stub_648) + GL_STUB(gl_dispatch_stub_649, _gloffset__dispatch_stub_649) + GL_STUB(gl_dispatch_stub_650, _gloffset__dispatch_stub_650) GL_STUB(glAreProgramsResidentNV, _gloffset_AreProgramsResidentNV) GL_STUB(glBindProgramNV, _gloffset_BindProgramNV) GL_STUB(glDeleteProgramsNV, _gloffset_DeleteProgramsNV) @@ -1539,19 +1565,19 @@ _mesa_sparc_glapi_begin: GL_STUB(glSetFragmentShaderConstantATI, _gloffset_SetFragmentShaderConstantATI) GL_STUB(glPointParameteriNV, _gloffset_PointParameteriNV) GL_STUB(glPointParameterivNV, _gloffset_PointParameterivNV) - GL_STUB(gl_dispatch_stub_718, _gloffset__dispatch_stub_718) - GL_STUB(gl_dispatch_stub_719, _gloffset__dispatch_stub_719) - GL_STUB(gl_dispatch_stub_720, _gloffset__dispatch_stub_720) - GL_STUB(gl_dispatch_stub_721, _gloffset__dispatch_stub_721) - GL_STUB(gl_dispatch_stub_722, _gloffset__dispatch_stub_722) + GL_STUB(gl_dispatch_stub_731, _gloffset__dispatch_stub_731) + GL_STUB(gl_dispatch_stub_732, _gloffset__dispatch_stub_732) + GL_STUB(gl_dispatch_stub_733, _gloffset__dispatch_stub_733) + GL_STUB(gl_dispatch_stub_734, _gloffset__dispatch_stub_734) + GL_STUB(gl_dispatch_stub_735, _gloffset__dispatch_stub_735) GL_STUB(glGetProgramNamedParameterdvNV, _gloffset_GetProgramNamedParameterdvNV) GL_STUB(glGetProgramNamedParameterfvNV, _gloffset_GetProgramNamedParameterfvNV) GL_STUB(glProgramNamedParameter4dNV, _gloffset_ProgramNamedParameter4dNV) GL_STUB(glProgramNamedParameter4dvNV, _gloffset_ProgramNamedParameter4dvNV) GL_STUB(glProgramNamedParameter4fNV, _gloffset_ProgramNamedParameter4fNV) GL_STUB(glProgramNamedParameter4fvNV, _gloffset_ProgramNamedParameter4fvNV) - GL_STUB(gl_dispatch_stub_729, _gloffset__dispatch_stub_729) - GL_STUB(gl_dispatch_stub_730, _gloffset__dispatch_stub_730) + GL_STUB(gl_dispatch_stub_742, _gloffset__dispatch_stub_742) + GL_STUB(gl_dispatch_stub_743, _gloffset__dispatch_stub_743) GL_STUB(glBindFramebufferEXT, _gloffset_BindFramebufferEXT) GL_STUB(glBindRenderbufferEXT, _gloffset_BindRenderbufferEXT) GL_STUB(glCheckFramebufferStatusEXT, _gloffset_CheckFramebufferStatusEXT) @@ -1569,11 +1595,11 @@ _mesa_sparc_glapi_begin: GL_STUB(glIsFramebufferEXT, _gloffset_IsFramebufferEXT) GL_STUB(glIsRenderbufferEXT, _gloffset_IsRenderbufferEXT) GL_STUB(glRenderbufferStorageEXT, _gloffset_RenderbufferStorageEXT) - GL_STUB(gl_dispatch_stub_748, _gloffset__dispatch_stub_748) - GL_STUB(gl_dispatch_stub_749, _gloffset__dispatch_stub_749) - GL_STUB(gl_dispatch_stub_750, _gloffset__dispatch_stub_750) - GL_STUB(gl_dispatch_stub_751, _gloffset__dispatch_stub_751) - GL_STUB(gl_dispatch_stub_752, _gloffset__dispatch_stub_752) + GL_STUB(gl_dispatch_stub_761, _gloffset__dispatch_stub_761) + GL_STUB(gl_dispatch_stub_762, _gloffset__dispatch_stub_762) + GL_STUB(gl_dispatch_stub_763, _gloffset__dispatch_stub_763) + GL_STUB(gl_dispatch_stub_764, _gloffset__dispatch_stub_764) + GL_STUB(gl_dispatch_stub_765, _gloffset__dispatch_stub_765) .globl _mesa_sparc_glapi_end ; .type _mesa_sparc_glapi_end,#function _mesa_sparc_glapi_end: @@ -1663,6 +1689,43 @@ _mesa_sparc_glapi_end: .globl glCompressedTexSubImage2D ; .type glCompressedTexSubImage2D,#function ; glCompressedTexSubImage2D = glCompressedTexSubImage2DARB .globl glCompressedTexSubImage3D ; .type glCompressedTexSubImage3D,#function ; glCompressedTexSubImage3D = glCompressedTexSubImage3DARB .globl glGetCompressedTexImage ; .type glGetCompressedTexImage,#function ; glGetCompressedTexImage = glGetCompressedTexImageARB + .globl glDisableVertexAttribArray ; .type glDisableVertexAttribArray,#function ; glDisableVertexAttribArray = glDisableVertexAttribArrayARB + .globl glEnableVertexAttribArray ; .type glEnableVertexAttribArray,#function ; glEnableVertexAttribArray = glEnableVertexAttribArrayARB + .globl glGetVertexAttribdv ; .type glGetVertexAttribdv,#function ; glGetVertexAttribdv = glGetVertexAttribdvARB + .globl glGetVertexAttribfv ; .type glGetVertexAttribfv,#function ; glGetVertexAttribfv = glGetVertexAttribfvARB + .globl glGetVertexAttribiv ; .type glGetVertexAttribiv,#function ; glGetVertexAttribiv = glGetVertexAttribivARB + .globl glVertexAttrib1d ; .type glVertexAttrib1d,#function ; glVertexAttrib1d = glVertexAttrib1dARB + .globl glVertexAttrib1dv ; .type glVertexAttrib1dv,#function ; glVertexAttrib1dv = glVertexAttrib1dvARB + .globl glVertexAttrib1f ; .type glVertexAttrib1f,#function ; glVertexAttrib1f = glVertexAttrib1fARB + .globl glVertexAttrib1fv ; .type glVertexAttrib1fv,#function ; glVertexAttrib1fv = glVertexAttrib1fvARB + .globl glVertexAttrib1s ; .type glVertexAttrib1s,#function ; glVertexAttrib1s = glVertexAttrib1sARB + .globl glVertexAttrib1sv ; .type glVertexAttrib1sv,#function ; glVertexAttrib1sv = glVertexAttrib1svARB + .globl glVertexAttrib2d ; .type glVertexAttrib2d,#function ; glVertexAttrib2d = glVertexAttrib2dARB + .globl glVertexAttrib2dv ; .type glVertexAttrib2dv,#function ; glVertexAttrib2dv = glVertexAttrib2dvARB + .globl glVertexAttrib2f ; .type glVertexAttrib2f,#function ; glVertexAttrib2f = glVertexAttrib2fARB + .globl glVertexAttrib2fv ; .type glVertexAttrib2fv,#function ; glVertexAttrib2fv = glVertexAttrib2fvARB + .globl glVertexAttrib2s ; .type glVertexAttrib2s,#function ; glVertexAttrib2s = glVertexAttrib2sARB + .globl glVertexAttrib2sv ; .type glVertexAttrib2sv,#function ; glVertexAttrib2sv = glVertexAttrib2svARB + .globl glVertexAttrib3d ; .type glVertexAttrib3d,#function ; glVertexAttrib3d = glVertexAttrib3dARB + .globl glVertexAttrib3dv ; .type glVertexAttrib3dv,#function ; glVertexAttrib3dv = glVertexAttrib3dvARB + .globl glVertexAttrib3f ; .type glVertexAttrib3f,#function ; glVertexAttrib3f = glVertexAttrib3fARB + .globl glVertexAttrib3fv ; .type glVertexAttrib3fv,#function ; glVertexAttrib3fv = glVertexAttrib3fvARB + .globl glVertexAttrib3s ; .type glVertexAttrib3s,#function ; glVertexAttrib3s = glVertexAttrib3sARB + .globl glVertexAttrib3sv ; .type glVertexAttrib3sv,#function ; glVertexAttrib3sv = glVertexAttrib3svARB + .globl glVertexAttrib4Nbv ; .type glVertexAttrib4Nbv,#function ; glVertexAttrib4Nbv = glVertexAttrib4NbvARB + .globl glVertexAttrib4Niv ; .type glVertexAttrib4Niv,#function ; glVertexAttrib4Niv = glVertexAttrib4NivARB + .globl glVertexAttrib4Nsv ; .type glVertexAttrib4Nsv,#function ; glVertexAttrib4Nsv = glVertexAttrib4NsvARB + .globl glVertexAttrib4Nub ; .type glVertexAttrib4Nub,#function ; glVertexAttrib4Nub = glVertexAttrib4NubARB + .globl glVertexAttrib4Nubv ; .type glVertexAttrib4Nubv,#function ; glVertexAttrib4Nubv = glVertexAttrib4NubvARB + .globl glVertexAttrib4Nuiv ; .type glVertexAttrib4Nuiv,#function ; glVertexAttrib4Nuiv = glVertexAttrib4NuivARB + .globl glVertexAttrib4Nusv ; .type glVertexAttrib4Nusv,#function ; glVertexAttrib4Nusv = glVertexAttrib4NusvARB + .globl glVertexAttrib4d ; .type glVertexAttrib4d,#function ; glVertexAttrib4d = glVertexAttrib4dARB + .globl glVertexAttrib4dv ; .type glVertexAttrib4dv,#function ; glVertexAttrib4dv = glVertexAttrib4dvARB + .globl glVertexAttrib4f ; .type glVertexAttrib4f,#function ; glVertexAttrib4f = glVertexAttrib4fARB + .globl glVertexAttrib4fv ; .type glVertexAttrib4fv,#function ; glVertexAttrib4fv = glVertexAttrib4fvARB + .globl glVertexAttrib4s ; .type glVertexAttrib4s,#function ; glVertexAttrib4s = glVertexAttrib4sARB + .globl glVertexAttrib4sv ; .type glVertexAttrib4sv,#function ; glVertexAttrib4sv = glVertexAttrib4svARB + .globl glVertexAttribPointer ; .type glVertexAttribPointer,#function ; glVertexAttribPointer = glVertexAttribPointerARB .globl glBindBuffer ; .type glBindBuffer,#function ; glBindBuffer = glBindBufferARB .globl glBufferData ; .type glBufferData,#function ; glBufferData = glBufferDataARB .globl glBufferSubData ; .type glBufferSubData,#function ; glBufferSubData = glBufferSubDataARB @@ -1682,6 +1745,38 @@ _mesa_sparc_glapi_end: .globl glGetQueryObjectuiv ; .type glGetQueryObjectuiv,#function ; glGetQueryObjectuiv = glGetQueryObjectuivARB .globl glGetQueryiv ; .type glGetQueryiv,#function ; glGetQueryiv = glGetQueryivARB .globl glIsQuery ; .type glIsQuery,#function ; glIsQuery = glIsQueryARB + .globl glCompileShader ; .type glCompileShader,#function ; glCompileShader = glCompileShaderARB + .globl glGetActiveUniform ; .type glGetActiveUniform,#function ; glGetActiveUniform = glGetActiveUniformARB + .globl glGetShaderSource ; .type glGetShaderSource,#function ; glGetShaderSource = glGetShaderSourceARB + .globl glGetUniformLocation ; .type glGetUniformLocation,#function ; glGetUniformLocation = glGetUniformLocationARB + .globl glGetUniformfv ; .type glGetUniformfv,#function ; glGetUniformfv = glGetUniformfvARB + .globl glGetUniformiv ; .type glGetUniformiv,#function ; glGetUniformiv = glGetUniformivARB + .globl glLinkProgram ; .type glLinkProgram,#function ; glLinkProgram = glLinkProgramARB + .globl glShaderSource ; .type glShaderSource,#function ; glShaderSource = glShaderSourceARB + .globl glUniform1f ; .type glUniform1f,#function ; glUniform1f = glUniform1fARB + .globl glUniform1fv ; .type glUniform1fv,#function ; glUniform1fv = glUniform1fvARB + .globl glUniform1i ; .type glUniform1i,#function ; glUniform1i = glUniform1iARB + .globl glUniform1iv ; .type glUniform1iv,#function ; glUniform1iv = glUniform1ivARB + .globl glUniform2f ; .type glUniform2f,#function ; glUniform2f = glUniform2fARB + .globl glUniform2fv ; .type glUniform2fv,#function ; glUniform2fv = glUniform2fvARB + .globl glUniform2i ; .type glUniform2i,#function ; glUniform2i = glUniform2iARB + .globl glUniform2iv ; .type glUniform2iv,#function ; glUniform2iv = glUniform2ivARB + .globl glUniform3f ; .type glUniform3f,#function ; glUniform3f = glUniform3fARB + .globl glUniform3fv ; .type glUniform3fv,#function ; glUniform3fv = glUniform3fvARB + .globl glUniform3i ; .type glUniform3i,#function ; glUniform3i = glUniform3iARB + .globl glUniform3iv ; .type glUniform3iv,#function ; glUniform3iv = glUniform3ivARB + .globl glUniform4f ; .type glUniform4f,#function ; glUniform4f = glUniform4fARB + .globl glUniform4fv ; .type glUniform4fv,#function ; glUniform4fv = glUniform4fvARB + .globl glUniform4i ; .type glUniform4i,#function ; glUniform4i = glUniform4iARB + .globl glUniform4iv ; .type glUniform4iv,#function ; glUniform4iv = glUniform4ivARB + .globl glUniformMatrix2fv ; .type glUniformMatrix2fv,#function ; glUniformMatrix2fv = glUniformMatrix2fvARB + .globl glUniformMatrix3fv ; .type glUniformMatrix3fv,#function ; glUniformMatrix3fv = glUniformMatrix3fvARB + .globl glUniformMatrix4fv ; .type glUniformMatrix4fv,#function ; glUniformMatrix4fv = glUniformMatrix4fvARB + .globl glUseProgram ; .type glUseProgram,#function ; glUseProgram = glUseProgramObjectARB + .globl glValidateProgram ; .type glValidateProgram,#function ; glValidateProgram = glValidateProgramARB + .globl glBindAttribLocation ; .type glBindAttribLocation,#function ; glBindAttribLocation = glBindAttribLocationARB + .globl glGetActiveAttrib ; .type glGetActiveAttrib,#function ; glGetActiveAttrib = glGetActiveAttribARB + .globl glGetAttribLocation ; .type glGetAttribLocation,#function ; glGetAttribLocation = glGetAttribLocationARB .globl glDrawBuffers ; .type glDrawBuffers,#function ; glDrawBuffers = glDrawBuffersARB .globl glDrawBuffersATI ; .type glDrawBuffersATI,#function ; glDrawBuffersATI = glDrawBuffersARB .globl glPointParameterf ; .type glPointParameterf,#function ; glPointParameterf = glPointParameterfEXT diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S index 97d8ce7175..6aa0c14b63 100644 --- a/src/mesa/x86-64/glapi_x86-64.S +++ b/src/mesa/x86-64/glapi_x86-64.S @@ -15145,13 +15145,470 @@ GL_PREFIX(MultiTexCoord4svARB): #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultiTexCoord4svARB), .-GL_PREFIX(MultiTexCoord4svARB) + .p2align 4,,15 + .globl GL_PREFIX(AttachShader) + .type GL_PREFIX(AttachShader), @function +GL_PREFIX(AttachShader): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3264(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rsi + popq %rdi + movq 3264(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3264(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rsi + popq %rdi + movq 3264(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(AttachShader), .-GL_PREFIX(AttachShader) + + .p2align 4,,15 + .globl GL_PREFIX(CreateProgram) + .type GL_PREFIX(CreateProgram), @function +GL_PREFIX(CreateProgram): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3272(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + movq 3272(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3272(%rax), %r11 + jmp *%r11 +1: + pushq %rbp + call _glapi_get_dispatch + popq %rbp + movq 3272(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(CreateProgram), .-GL_PREFIX(CreateProgram) + + .p2align 4,,15 + .globl GL_PREFIX(CreateShader) + .type GL_PREFIX(CreateShader), @function +GL_PREFIX(CreateShader): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3280(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3280(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3280(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3280(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(CreateShader), .-GL_PREFIX(CreateShader) + + .p2align 4,,15 + .globl GL_PREFIX(DeleteProgram) + .type GL_PREFIX(DeleteProgram), @function +GL_PREFIX(DeleteProgram): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3288(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3288(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3288(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3288(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(DeleteProgram), .-GL_PREFIX(DeleteProgram) + + .p2align 4,,15 + .globl GL_PREFIX(DeleteShader) + .type GL_PREFIX(DeleteShader), @function +GL_PREFIX(DeleteShader): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3296(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3296(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3296(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3296(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(DeleteShader), .-GL_PREFIX(DeleteShader) + + .p2align 4,,15 + .globl GL_PREFIX(DetachShader) + .type GL_PREFIX(DetachShader), @function +GL_PREFIX(DetachShader): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3304(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rsi + popq %rdi + movq 3304(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3304(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rsi + popq %rdi + movq 3304(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(DetachShader), .-GL_PREFIX(DetachShader) + + .p2align 4,,15 + .globl GL_PREFIX(GetAttachedShaders) + .type GL_PREFIX(GetAttachedShaders), @function +GL_PREFIX(GetAttachedShaders): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3312(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3312(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3312(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3312(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(GetAttachedShaders), .-GL_PREFIX(GetAttachedShaders) + + .p2align 4,,15 + .globl GL_PREFIX(GetProgramInfoLog) + .type GL_PREFIX(GetProgramInfoLog), @function +GL_PREFIX(GetProgramInfoLog): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3320(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3320(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3320(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3320(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(GetProgramInfoLog), .-GL_PREFIX(GetProgramInfoLog) + + .p2align 4,,15 + .globl GL_PREFIX(GetProgramiv) + .type GL_PREFIX(GetProgramiv), @function +GL_PREFIX(GetProgramiv): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3328(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rdx + call _x86_64_get_dispatch@PLT + popq %rdx + popq %rsi + popq %rdi + movq 3328(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3328(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rdx + call _glapi_get_dispatch + popq %rdx + popq %rsi + popq %rdi + movq 3328(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(GetProgramiv), .-GL_PREFIX(GetProgramiv) + + .p2align 4,,15 + .globl GL_PREFIX(GetShaderInfoLog) + .type GL_PREFIX(GetShaderInfoLog), @function +GL_PREFIX(GetShaderInfoLog): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3336(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3336(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3336(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3336(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(GetShaderInfoLog), .-GL_PREFIX(GetShaderInfoLog) + + .p2align 4,,15 + .globl GL_PREFIX(GetShaderiv) + .type GL_PREFIX(GetShaderiv), @function +GL_PREFIX(GetShaderiv): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3344(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rdx + call _x86_64_get_dispatch@PLT + popq %rdx + popq %rsi + popq %rdi + movq 3344(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3344(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rdx + call _glapi_get_dispatch + popq %rdx + popq %rsi + popq %rdi + movq 3344(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(GetShaderiv), .-GL_PREFIX(GetShaderiv) + + .p2align 4,,15 + .globl GL_PREFIX(IsProgram) + .type GL_PREFIX(IsProgram), @function +GL_PREFIX(IsProgram): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3352(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3352(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3352(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3352(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(IsProgram), .-GL_PREFIX(IsProgram) + + .p2align 4,,15 + .globl GL_PREFIX(IsShader) + .type GL_PREFIX(IsShader), @function +GL_PREFIX(IsShader): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3360(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3360(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3360(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3360(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(IsShader), .-GL_PREFIX(IsShader) + .p2align 4,,15 .globl GL_PREFIX(StencilFuncSeparate) .type GL_PREFIX(StencilFuncSeparate), @function GL_PREFIX(StencilFuncSeparate): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3264(%rax), %r11 + movq 3368(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15165,13 +15622,13 @@ GL_PREFIX(StencilFuncSeparate): popq %rdx popq %rsi popq %rdi - movq 3264(%rax), %r11 + movq 3368(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3264(%rax), %r11 + movq 3368(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15185,7 +15642,7 @@ GL_PREFIX(StencilFuncSeparate): popq %rdx popq %rsi popq %rdi - movq 3264(%rax), %r11 + movq 3368(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(StencilFuncSeparate), .-GL_PREFIX(StencilFuncSeparate) @@ -15196,7 +15653,7 @@ GL_PREFIX(StencilFuncSeparate): GL_PREFIX(StencilMaskSeparate): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3272(%rax), %r11 + movq 3376(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15206,13 +15663,13 @@ GL_PREFIX(StencilMaskSeparate): popq %rbp popq %rsi popq %rdi - movq 3272(%rax), %r11 + movq 3376(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3272(%rax), %r11 + movq 3376(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15222,7 +15679,7 @@ GL_PREFIX(StencilMaskSeparate): popq %rbp popq %rsi popq %rdi - movq 3272(%rax), %r11 + movq 3376(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(StencilMaskSeparate), .-GL_PREFIX(StencilMaskSeparate) @@ -15233,7 +15690,7 @@ GL_PREFIX(StencilMaskSeparate): GL_PREFIX(StencilOpSeparate): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3280(%rax), %r11 + movq 3384(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15247,13 +15704,13 @@ GL_PREFIX(StencilOpSeparate): popq %rdx popq %rsi popq %rdi - movq 3280(%rax), %r11 + movq 3384(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3280(%rax), %r11 + movq 3384(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15267,7 +15724,7 @@ GL_PREFIX(StencilOpSeparate): popq %rdx popq %rsi popq %rdi - movq 3280(%rax), %r11 + movq 3384(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(StencilOpSeparate), .-GL_PREFIX(StencilOpSeparate) @@ -15278,25 +15735,25 @@ GL_PREFIX(StencilOpSeparate): GL_PREFIX(LoadTransposeMatrixdARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3288(%rax), %r11 + movq 3392(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3288(%rax), %r11 + movq 3392(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3288(%rax), %r11 + movq 3392(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3288(%rax), %r11 + movq 3392(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LoadTransposeMatrixdARB), .-GL_PREFIX(LoadTransposeMatrixdARB) @@ -15307,25 +15764,25 @@ GL_PREFIX(LoadTransposeMatrixdARB): GL_PREFIX(LoadTransposeMatrixfARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3296(%rax), %r11 + movq 3400(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3296(%rax), %r11 + movq 3400(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3296(%rax), %r11 + movq 3400(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3296(%rax), %r11 + movq 3400(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LoadTransposeMatrixfARB), .-GL_PREFIX(LoadTransposeMatrixfARB) @@ -15336,25 +15793,25 @@ GL_PREFIX(LoadTransposeMatrixfARB): GL_PREFIX(MultTransposeMatrixdARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3304(%rax), %r11 + movq 3408(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3304(%rax), %r11 + movq 3408(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3304(%rax), %r11 + movq 3408(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3304(%rax), %r11 + movq 3408(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultTransposeMatrixdARB), .-GL_PREFIX(MultTransposeMatrixdARB) @@ -15365,25 +15822,25 @@ GL_PREFIX(MultTransposeMatrixdARB): GL_PREFIX(MultTransposeMatrixfARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3312(%rax), %r11 + movq 3416(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3312(%rax), %r11 + movq 3416(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3312(%rax), %r11 + movq 3416(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3312(%rax), %r11 + movq 3416(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultTransposeMatrixfARB), .-GL_PREFIX(MultTransposeMatrixfARB) @@ -15394,7 +15851,7 @@ GL_PREFIX(MultTransposeMatrixfARB): GL_PREFIX(SampleCoverageARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3320(%rax), %r11 + movq 3424(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15404,13 +15861,13 @@ GL_PREFIX(SampleCoverageARB): popq %rbp popq %rsi popq %rdi - movq 3320(%rax), %r11 + movq 3424(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3320(%rax), %r11 + movq 3424(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15420,7 +15877,7 @@ GL_PREFIX(SampleCoverageARB): popq %rbp popq %rsi popq %rdi - movq 3320(%rax), %r11 + movq 3424(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SampleCoverageARB), .-GL_PREFIX(SampleCoverageARB) @@ -15431,7 +15888,7 @@ GL_PREFIX(SampleCoverageARB): GL_PREFIX(CompressedTexImage1DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3328(%rax), %r11 + movq 3432(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15449,13 +15906,13 @@ GL_PREFIX(CompressedTexImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3328(%rax), %r11 + movq 3432(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3328(%rax), %r11 + movq 3432(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15473,7 +15930,7 @@ GL_PREFIX(CompressedTexImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3328(%rax), %r11 + movq 3432(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexImage1DARB), .-GL_PREFIX(CompressedTexImage1DARB) @@ -15484,7 +15941,7 @@ GL_PREFIX(CompressedTexImage1DARB): GL_PREFIX(CompressedTexImage2DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3336(%rax), %r11 + movq 3440(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15502,13 +15959,13 @@ GL_PREFIX(CompressedTexImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3336(%rax), %r11 + movq 3440(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3336(%rax), %r11 + movq 3440(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15526,7 +15983,7 @@ GL_PREFIX(CompressedTexImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3336(%rax), %r11 + movq 3440(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexImage2DARB), .-GL_PREFIX(CompressedTexImage2DARB) @@ -15537,7 +15994,7 @@ GL_PREFIX(CompressedTexImage2DARB): GL_PREFIX(CompressedTexImage3DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3344(%rax), %r11 + movq 3448(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15555,13 +16012,13 @@ GL_PREFIX(CompressedTexImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3344(%rax), %r11 + movq 3448(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3344(%rax), %r11 + movq 3448(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15579,7 +16036,7 @@ GL_PREFIX(CompressedTexImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3344(%rax), %r11 + movq 3448(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexImage3DARB), .-GL_PREFIX(CompressedTexImage3DARB) @@ -15590,7 +16047,7 @@ GL_PREFIX(CompressedTexImage3DARB): GL_PREFIX(CompressedTexSubImage1DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3352(%rax), %r11 + movq 3456(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15608,13 +16065,13 @@ GL_PREFIX(CompressedTexSubImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3352(%rax), %r11 + movq 3456(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3352(%rax), %r11 + movq 3456(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15632,7 +16089,7 @@ GL_PREFIX(CompressedTexSubImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3352(%rax), %r11 + movq 3456(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexSubImage1DARB), .-GL_PREFIX(CompressedTexSubImage1DARB) @@ -15643,7 +16100,7 @@ GL_PREFIX(CompressedTexSubImage1DARB): GL_PREFIX(CompressedTexSubImage2DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3360(%rax), %r11 + movq 3464(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15661,13 +16118,13 @@ GL_PREFIX(CompressedTexSubImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3360(%rax), %r11 + movq 3464(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3360(%rax), %r11 + movq 3464(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15685,7 +16142,7 @@ GL_PREFIX(CompressedTexSubImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3360(%rax), %r11 + movq 3464(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexSubImage2DARB), .-GL_PREFIX(CompressedTexSubImage2DARB) @@ -15696,7 +16153,7 @@ GL_PREFIX(CompressedTexSubImage2DARB): GL_PREFIX(CompressedTexSubImage3DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3368(%rax), %r11 + movq 3472(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15714,13 +16171,13 @@ GL_PREFIX(CompressedTexSubImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3368(%rax), %r11 + movq 3472(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3368(%rax), %r11 + movq 3472(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15738,7 +16195,7 @@ GL_PREFIX(CompressedTexSubImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3368(%rax), %r11 + movq 3472(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexSubImage3DARB), .-GL_PREFIX(CompressedTexSubImage3DARB) @@ -15749,7 +16206,7 @@ GL_PREFIX(CompressedTexSubImage3DARB): GL_PREFIX(GetCompressedTexImageARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3376(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15759,13 +16216,13 @@ GL_PREFIX(GetCompressedTexImageARB): popq %rdx popq %rsi popq %rdi - movq 3376(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3376(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15775,7 +16232,7 @@ GL_PREFIX(GetCompressedTexImageARB): popq %rdx popq %rsi popq %rdi - movq 3376(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCompressedTexImageARB), .-GL_PREFIX(GetCompressedTexImageARB) @@ -15786,25 +16243,25 @@ GL_PREFIX(GetCompressedTexImageARB): GL_PREFIX(DisableVertexAttribArrayARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3384(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3384(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3384(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3384(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DisableVertexAttribArrayARB), .-GL_PREFIX(DisableVertexAttribArrayARB) @@ -15815,25 +16272,25 @@ GL_PREFIX(DisableVertexAttribArrayARB): GL_PREFIX(EnableVertexAttribArrayARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3392(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3392(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3392(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3392(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EnableVertexAttribArrayARB), .-GL_PREFIX(EnableVertexAttribArrayARB) @@ -15844,7 +16301,7 @@ GL_PREFIX(EnableVertexAttribArrayARB): GL_PREFIX(GetProgramEnvParameterdvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3400(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15854,13 +16311,13 @@ GL_PREFIX(GetProgramEnvParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3400(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3400(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15870,7 +16327,7 @@ GL_PREFIX(GetProgramEnvParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3400(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramEnvParameterdvARB), .-GL_PREFIX(GetProgramEnvParameterdvARB) @@ -15881,7 +16338,7 @@ GL_PREFIX(GetProgramEnvParameterdvARB): GL_PREFIX(GetProgramEnvParameterfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3408(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15891,13 +16348,13 @@ GL_PREFIX(GetProgramEnvParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3408(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3408(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15907,7 +16364,7 @@ GL_PREFIX(GetProgramEnvParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3408(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramEnvParameterfvARB), .-GL_PREFIX(GetProgramEnvParameterfvARB) @@ -15918,7 +16375,7 @@ GL_PREFIX(GetProgramEnvParameterfvARB): GL_PREFIX(GetProgramLocalParameterdvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3416(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15928,13 +16385,13 @@ GL_PREFIX(GetProgramLocalParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3416(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3416(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15944,7 +16401,7 @@ GL_PREFIX(GetProgramLocalParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3416(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramLocalParameterdvARB), .-GL_PREFIX(GetProgramLocalParameterdvARB) @@ -15955,7 +16412,7 @@ GL_PREFIX(GetProgramLocalParameterdvARB): GL_PREFIX(GetProgramLocalParameterfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3424(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15965,13 +16422,13 @@ GL_PREFIX(GetProgramLocalParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3424(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3424(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15981,7 +16438,7 @@ GL_PREFIX(GetProgramLocalParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3424(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramLocalParameterfvARB), .-GL_PREFIX(GetProgramLocalParameterfvARB) @@ -15992,7 +16449,7 @@ GL_PREFIX(GetProgramLocalParameterfvARB): GL_PREFIX(GetProgramStringARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3432(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16002,13 +16459,13 @@ GL_PREFIX(GetProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3432(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3432(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16018,7 +16475,7 @@ GL_PREFIX(GetProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3432(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramStringARB), .-GL_PREFIX(GetProgramStringARB) @@ -16029,7 +16486,7 @@ GL_PREFIX(GetProgramStringARB): GL_PREFIX(GetProgramivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3440(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16039,13 +16496,13 @@ GL_PREFIX(GetProgramivARB): popq %rdx popq %rsi popq %rdi - movq 3440(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3440(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16055,7 +16512,7 @@ GL_PREFIX(GetProgramivARB): popq %rdx popq %rsi popq %rdi - movq 3440(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramivARB), .-GL_PREFIX(GetProgramivARB) @@ -16066,7 +16523,7 @@ GL_PREFIX(GetProgramivARB): GL_PREFIX(GetVertexAttribdvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3448(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16076,13 +16533,13 @@ GL_PREFIX(GetVertexAttribdvARB): popq %rdx popq %rsi popq %rdi - movq 3448(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3448(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16092,7 +16549,7 @@ GL_PREFIX(GetVertexAttribdvARB): popq %rdx popq %rsi popq %rdi - movq 3448(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribdvARB), .-GL_PREFIX(GetVertexAttribdvARB) @@ -16103,7 +16560,7 @@ GL_PREFIX(GetVertexAttribdvARB): GL_PREFIX(GetVertexAttribfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3456(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16113,13 +16570,13 @@ GL_PREFIX(GetVertexAttribfvARB): popq %rdx popq %rsi popq %rdi - movq 3456(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3456(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16129,7 +16586,7 @@ GL_PREFIX(GetVertexAttribfvARB): popq %rdx popq %rsi popq %rdi - movq 3456(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribfvARB), .-GL_PREFIX(GetVertexAttribfvARB) @@ -16140,7 +16597,7 @@ GL_PREFIX(GetVertexAttribfvARB): GL_PREFIX(GetVertexAttribivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3464(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16150,13 +16607,13 @@ GL_PREFIX(GetVertexAttribivARB): popq %rdx popq %rsi popq %rdi - movq 3464(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3464(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16166,7 +16623,7 @@ GL_PREFIX(GetVertexAttribivARB): popq %rdx popq %rsi popq %rdi - movq 3464(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribivARB), .-GL_PREFIX(GetVertexAttribivARB) @@ -16177,7 +16634,7 @@ GL_PREFIX(GetVertexAttribivARB): GL_PREFIX(ProgramEnvParameter4dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3472(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16195,13 +16652,13 @@ GL_PREFIX(ProgramEnvParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3472(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3472(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16219,7 +16676,7 @@ GL_PREFIX(ProgramEnvParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3472(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4dARB), .-GL_PREFIX(ProgramEnvParameter4dARB) @@ -16230,7 +16687,7 @@ GL_PREFIX(ProgramEnvParameter4dARB): GL_PREFIX(ProgramEnvParameter4dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3480(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16240,13 +16697,13 @@ GL_PREFIX(ProgramEnvParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3480(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3480(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16256,7 +16713,7 @@ GL_PREFIX(ProgramEnvParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3480(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4dvARB), .-GL_PREFIX(ProgramEnvParameter4dvARB) @@ -16267,7 +16724,7 @@ GL_PREFIX(ProgramEnvParameter4dvARB): GL_PREFIX(ProgramEnvParameter4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3488(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16285,13 +16742,13 @@ GL_PREFIX(ProgramEnvParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3488(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3488(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16309,7 +16766,7 @@ GL_PREFIX(ProgramEnvParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3488(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4fARB), .-GL_PREFIX(ProgramEnvParameter4fARB) @@ -16320,7 +16777,7 @@ GL_PREFIX(ProgramEnvParameter4fARB): GL_PREFIX(ProgramEnvParameter4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3496(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16330,13 +16787,13 @@ GL_PREFIX(ProgramEnvParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3496(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3496(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16346,7 +16803,7 @@ GL_PREFIX(ProgramEnvParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3496(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4fvARB), .-GL_PREFIX(ProgramEnvParameter4fvARB) @@ -16357,7 +16814,7 @@ GL_PREFIX(ProgramEnvParameter4fvARB): GL_PREFIX(ProgramLocalParameter4dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3504(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16375,13 +16832,13 @@ GL_PREFIX(ProgramLocalParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3504(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3504(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16399,7 +16856,7 @@ GL_PREFIX(ProgramLocalParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3504(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4dARB), .-GL_PREFIX(ProgramLocalParameter4dARB) @@ -16410,7 +16867,7 @@ GL_PREFIX(ProgramLocalParameter4dARB): GL_PREFIX(ProgramLocalParameter4dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3512(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16420,13 +16877,13 @@ GL_PREFIX(ProgramLocalParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3512(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3512(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16436,7 +16893,7 @@ GL_PREFIX(ProgramLocalParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3512(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4dvARB), .-GL_PREFIX(ProgramLocalParameter4dvARB) @@ -16447,7 +16904,7 @@ GL_PREFIX(ProgramLocalParameter4dvARB): GL_PREFIX(ProgramLocalParameter4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3520(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16465,13 +16922,13 @@ GL_PREFIX(ProgramLocalParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3520(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3520(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16489,7 +16946,7 @@ GL_PREFIX(ProgramLocalParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3520(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4fARB), .-GL_PREFIX(ProgramLocalParameter4fARB) @@ -16500,7 +16957,7 @@ GL_PREFIX(ProgramLocalParameter4fARB): GL_PREFIX(ProgramLocalParameter4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3528(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16510,13 +16967,13 @@ GL_PREFIX(ProgramLocalParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3528(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3528(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16526,7 +16983,7 @@ GL_PREFIX(ProgramLocalParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3528(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4fvARB), .-GL_PREFIX(ProgramLocalParameter4fvARB) @@ -16537,7 +16994,7 @@ GL_PREFIX(ProgramLocalParameter4fvARB): GL_PREFIX(ProgramStringARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3536(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16551,13 +17008,13 @@ GL_PREFIX(ProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3536(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3536(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16571,7 +17028,7 @@ GL_PREFIX(ProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3536(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramStringARB), .-GL_PREFIX(ProgramStringARB) @@ -16582,7 +17039,7 @@ GL_PREFIX(ProgramStringARB): GL_PREFIX(VertexAttrib1dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3544(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -16592,13 +17049,13 @@ GL_PREFIX(VertexAttrib1dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3544(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3544(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -16608,7 +17065,7 @@ GL_PREFIX(VertexAttrib1dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3544(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dARB), .-GL_PREFIX(VertexAttrib1dARB) @@ -16619,7 +17076,7 @@ GL_PREFIX(VertexAttrib1dARB): GL_PREFIX(VertexAttrib1dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3552(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16629,13 +17086,13 @@ GL_PREFIX(VertexAttrib1dvARB): popq %rbp popq %rsi popq %rdi - movq 3552(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3552(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16645,7 +17102,7 @@ GL_PREFIX(VertexAttrib1dvARB): popq %rbp popq %rsi popq %rdi - movq 3552(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dvARB), .-GL_PREFIX(VertexAttrib1dvARB) @@ -16656,7 +17113,7 @@ GL_PREFIX(VertexAttrib1dvARB): GL_PREFIX(VertexAttrib1fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3560(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -16666,13 +17123,13 @@ GL_PREFIX(VertexAttrib1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3560(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3560(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -16682,7 +17139,7 @@ GL_PREFIX(VertexAttrib1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3560(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fARB), .-GL_PREFIX(VertexAttrib1fARB) @@ -16693,7 +17150,7 @@ GL_PREFIX(VertexAttrib1fARB): GL_PREFIX(VertexAttrib1fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3568(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16703,13 +17160,13 @@ GL_PREFIX(VertexAttrib1fvARB): popq %rbp popq %rsi popq %rdi - movq 3568(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3568(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16719,7 +17176,7 @@ GL_PREFIX(VertexAttrib1fvARB): popq %rbp popq %rsi popq %rdi - movq 3568(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fvARB), .-GL_PREFIX(VertexAttrib1fvARB) @@ -16730,7 +17187,7 @@ GL_PREFIX(VertexAttrib1fvARB): GL_PREFIX(VertexAttrib1sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3576(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16740,13 +17197,13 @@ GL_PREFIX(VertexAttrib1sARB): popq %rbp popq %rsi popq %rdi - movq 3576(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3576(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16756,7 +17213,7 @@ GL_PREFIX(VertexAttrib1sARB): popq %rbp popq %rsi popq %rdi - movq 3576(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1sARB), .-GL_PREFIX(VertexAttrib1sARB) @@ -16767,7 +17224,7 @@ GL_PREFIX(VertexAttrib1sARB): GL_PREFIX(VertexAttrib1svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3584(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16777,13 +17234,13 @@ GL_PREFIX(VertexAttrib1svARB): popq %rbp popq %rsi popq %rdi - movq 3584(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3584(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16793,7 +17250,7 @@ GL_PREFIX(VertexAttrib1svARB): popq %rbp popq %rsi popq %rdi - movq 3584(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1svARB), .-GL_PREFIX(VertexAttrib1svARB) @@ -16804,7 +17261,7 @@ GL_PREFIX(VertexAttrib1svARB): GL_PREFIX(VertexAttrib2dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3592(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -16816,13 +17273,13 @@ GL_PREFIX(VertexAttrib2dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3592(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3592(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -16834,7 +17291,7 @@ GL_PREFIX(VertexAttrib2dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3592(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dARB), .-GL_PREFIX(VertexAttrib2dARB) @@ -16845,7 +17302,7 @@ GL_PREFIX(VertexAttrib2dARB): GL_PREFIX(VertexAttrib2dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3600(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16855,13 +17312,13 @@ GL_PREFIX(VertexAttrib2dvARB): popq %rbp popq %rsi popq %rdi - movq 3600(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3600(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16871,7 +17328,7 @@ GL_PREFIX(VertexAttrib2dvARB): popq %rbp popq %rsi popq %rdi - movq 3600(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dvARB), .-GL_PREFIX(VertexAttrib2dvARB) @@ -16882,7 +17339,7 @@ GL_PREFIX(VertexAttrib2dvARB): GL_PREFIX(VertexAttrib2fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3608(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -16894,13 +17351,13 @@ GL_PREFIX(VertexAttrib2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3608(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3608(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -16912,7 +17369,7 @@ GL_PREFIX(VertexAttrib2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3608(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fARB), .-GL_PREFIX(VertexAttrib2fARB) @@ -16923,7 +17380,7 @@ GL_PREFIX(VertexAttrib2fARB): GL_PREFIX(VertexAttrib2fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3616(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16933,13 +17390,13 @@ GL_PREFIX(VertexAttrib2fvARB): popq %rbp popq %rsi popq %rdi - movq 3616(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3616(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16949,7 +17406,7 @@ GL_PREFIX(VertexAttrib2fvARB): popq %rbp popq %rsi popq %rdi - movq 3616(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fvARB), .-GL_PREFIX(VertexAttrib2fvARB) @@ -16960,7 +17417,7 @@ GL_PREFIX(VertexAttrib2fvARB): GL_PREFIX(VertexAttrib2sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3624(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16970,13 +17427,13 @@ GL_PREFIX(VertexAttrib2sARB): popq %rdx popq %rsi popq %rdi - movq 3624(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3624(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16986,7 +17443,7 @@ GL_PREFIX(VertexAttrib2sARB): popq %rdx popq %rsi popq %rdi - movq 3624(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2sARB), .-GL_PREFIX(VertexAttrib2sARB) @@ -16997,7 +17454,7 @@ GL_PREFIX(VertexAttrib2sARB): GL_PREFIX(VertexAttrib2svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3632(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17007,13 +17464,13 @@ GL_PREFIX(VertexAttrib2svARB): popq %rbp popq %rsi popq %rdi - movq 3632(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3632(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17023,7 +17480,7 @@ GL_PREFIX(VertexAttrib2svARB): popq %rbp popq %rsi popq %rdi - movq 3632(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2svARB), .-GL_PREFIX(VertexAttrib2svARB) @@ -17034,7 +17491,7 @@ GL_PREFIX(VertexAttrib2svARB): GL_PREFIX(VertexAttrib3dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3640(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -17048,13 +17505,13 @@ GL_PREFIX(VertexAttrib3dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3640(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3640(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -17068,7 +17525,7 @@ GL_PREFIX(VertexAttrib3dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3640(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dARB), .-GL_PREFIX(VertexAttrib3dARB) @@ -17079,7 +17536,7 @@ GL_PREFIX(VertexAttrib3dARB): GL_PREFIX(VertexAttrib3dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3648(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17089,13 +17546,13 @@ GL_PREFIX(VertexAttrib3dvARB): popq %rbp popq %rsi popq %rdi - movq 3648(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3648(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17105,7 +17562,7 @@ GL_PREFIX(VertexAttrib3dvARB): popq %rbp popq %rsi popq %rdi - movq 3648(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dvARB), .-GL_PREFIX(VertexAttrib3dvARB) @@ -17116,7 +17573,7 @@ GL_PREFIX(VertexAttrib3dvARB): GL_PREFIX(VertexAttrib3fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3656(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -17130,13 +17587,13 @@ GL_PREFIX(VertexAttrib3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3656(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3656(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -17150,7 +17607,7 @@ GL_PREFIX(VertexAttrib3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3656(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fARB), .-GL_PREFIX(VertexAttrib3fARB) @@ -17161,7 +17618,7 @@ GL_PREFIX(VertexAttrib3fARB): GL_PREFIX(VertexAttrib3fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3664(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17171,13 +17628,13 @@ GL_PREFIX(VertexAttrib3fvARB): popq %rbp popq %rsi popq %rdi - movq 3664(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3664(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17187,7 +17644,7 @@ GL_PREFIX(VertexAttrib3fvARB): popq %rbp popq %rsi popq %rdi - movq 3664(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fvARB), .-GL_PREFIX(VertexAttrib3fvARB) @@ -17198,7 +17655,7 @@ GL_PREFIX(VertexAttrib3fvARB): GL_PREFIX(VertexAttrib3sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3672(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17212,13 +17669,13 @@ GL_PREFIX(VertexAttrib3sARB): popq %rdx popq %rsi popq %rdi - movq 3672(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3672(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17232,7 +17689,7 @@ GL_PREFIX(VertexAttrib3sARB): popq %rdx popq %rsi popq %rdi - movq 3672(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3sARB), .-GL_PREFIX(VertexAttrib3sARB) @@ -17243,7 +17700,7 @@ GL_PREFIX(VertexAttrib3sARB): GL_PREFIX(VertexAttrib3svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3680(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17253,13 +17710,13 @@ GL_PREFIX(VertexAttrib3svARB): popq %rbp popq %rsi popq %rdi - movq 3680(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3680(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17269,7 +17726,7 @@ GL_PREFIX(VertexAttrib3svARB): popq %rbp popq %rsi popq %rdi - movq 3680(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3svARB), .-GL_PREFIX(VertexAttrib3svARB) @@ -17280,7 +17737,7 @@ GL_PREFIX(VertexAttrib3svARB): GL_PREFIX(VertexAttrib4NbvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3688(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17290,13 +17747,13 @@ GL_PREFIX(VertexAttrib4NbvARB): popq %rbp popq %rsi popq %rdi - movq 3688(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3688(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17306,7 +17763,7 @@ GL_PREFIX(VertexAttrib4NbvARB): popq %rbp popq %rsi popq %rdi - movq 3688(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NbvARB), .-GL_PREFIX(VertexAttrib4NbvARB) @@ -17317,7 +17774,7 @@ GL_PREFIX(VertexAttrib4NbvARB): GL_PREFIX(VertexAttrib4NivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3696(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17327,13 +17784,13 @@ GL_PREFIX(VertexAttrib4NivARB): popq %rbp popq %rsi popq %rdi - movq 3696(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3696(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17343,7 +17800,7 @@ GL_PREFIX(VertexAttrib4NivARB): popq %rbp popq %rsi popq %rdi - movq 3696(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NivARB), .-GL_PREFIX(VertexAttrib4NivARB) @@ -17354,7 +17811,7 @@ GL_PREFIX(VertexAttrib4NivARB): GL_PREFIX(VertexAttrib4NsvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3704(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17364,13 +17821,13 @@ GL_PREFIX(VertexAttrib4NsvARB): popq %rbp popq %rsi popq %rdi - movq 3704(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3704(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17380,7 +17837,7 @@ GL_PREFIX(VertexAttrib4NsvARB): popq %rbp popq %rsi popq %rdi - movq 3704(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NsvARB), .-GL_PREFIX(VertexAttrib4NsvARB) @@ -17391,7 +17848,7 @@ GL_PREFIX(VertexAttrib4NsvARB): GL_PREFIX(VertexAttrib4NubARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3712(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17405,13 +17862,13 @@ GL_PREFIX(VertexAttrib4NubARB): popq %rdx popq %rsi popq %rdi - movq 3712(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3712(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17425,7 +17882,7 @@ GL_PREFIX(VertexAttrib4NubARB): popq %rdx popq %rsi popq %rdi - movq 3712(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NubARB), .-GL_PREFIX(VertexAttrib4NubARB) @@ -17436,7 +17893,7 @@ GL_PREFIX(VertexAttrib4NubARB): GL_PREFIX(VertexAttrib4NubvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3720(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17446,13 +17903,13 @@ GL_PREFIX(VertexAttrib4NubvARB): popq %rbp popq %rsi popq %rdi - movq 3720(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3720(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17462,7 +17919,7 @@ GL_PREFIX(VertexAttrib4NubvARB): popq %rbp popq %rsi popq %rdi - movq 3720(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NubvARB), .-GL_PREFIX(VertexAttrib4NubvARB) @@ -17473,7 +17930,7 @@ GL_PREFIX(VertexAttrib4NubvARB): GL_PREFIX(VertexAttrib4NuivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3728(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17483,13 +17940,13 @@ GL_PREFIX(VertexAttrib4NuivARB): popq %rbp popq %rsi popq %rdi - movq 3728(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3728(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17499,7 +17956,7 @@ GL_PREFIX(VertexAttrib4NuivARB): popq %rbp popq %rsi popq %rdi - movq 3728(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NuivARB), .-GL_PREFIX(VertexAttrib4NuivARB) @@ -17510,7 +17967,7 @@ GL_PREFIX(VertexAttrib4NuivARB): GL_PREFIX(VertexAttrib4NusvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3736(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17520,13 +17977,13 @@ GL_PREFIX(VertexAttrib4NusvARB): popq %rbp popq %rsi popq %rdi - movq 3736(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3736(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17536,7 +17993,7 @@ GL_PREFIX(VertexAttrib4NusvARB): popq %rbp popq %rsi popq %rdi - movq 3736(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NusvARB), .-GL_PREFIX(VertexAttrib4NusvARB) @@ -17547,7 +18004,7 @@ GL_PREFIX(VertexAttrib4NusvARB): GL_PREFIX(VertexAttrib4bvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3744(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17557,13 +18014,13 @@ GL_PREFIX(VertexAttrib4bvARB): popq %rbp popq %rsi popq %rdi - movq 3744(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3744(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17573,7 +18030,7 @@ GL_PREFIX(VertexAttrib4bvARB): popq %rbp popq %rsi popq %rdi - movq 3744(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4bvARB), .-GL_PREFIX(VertexAttrib4bvARB) @@ -17584,7 +18041,7 @@ GL_PREFIX(VertexAttrib4bvARB): GL_PREFIX(VertexAttrib4dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3752(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -17600,13 +18057,13 @@ GL_PREFIX(VertexAttrib4dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3752(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3752(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -17622,7 +18079,7 @@ GL_PREFIX(VertexAttrib4dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3752(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dARB), .-GL_PREFIX(VertexAttrib4dARB) @@ -17633,7 +18090,7 @@ GL_PREFIX(VertexAttrib4dARB): GL_PREFIX(VertexAttrib4dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3760(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17643,13 +18100,13 @@ GL_PREFIX(VertexAttrib4dvARB): popq %rbp popq %rsi popq %rdi - movq 3760(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3760(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17659,7 +18116,7 @@ GL_PREFIX(VertexAttrib4dvARB): popq %rbp popq %rsi popq %rdi - movq 3760(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dvARB), .-GL_PREFIX(VertexAttrib4dvARB) @@ -17670,7 +18127,7 @@ GL_PREFIX(VertexAttrib4dvARB): GL_PREFIX(VertexAttrib4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3768(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -17686,13 +18143,13 @@ GL_PREFIX(VertexAttrib4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3768(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3768(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -17708,7 +18165,7 @@ GL_PREFIX(VertexAttrib4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3768(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fARB), .-GL_PREFIX(VertexAttrib4fARB) @@ -17719,7 +18176,7 @@ GL_PREFIX(VertexAttrib4fARB): GL_PREFIX(VertexAttrib4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3776(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17729,13 +18186,13 @@ GL_PREFIX(VertexAttrib4fvARB): popq %rbp popq %rsi popq %rdi - movq 3776(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3776(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17745,7 +18202,7 @@ GL_PREFIX(VertexAttrib4fvARB): popq %rbp popq %rsi popq %rdi - movq 3776(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fvARB), .-GL_PREFIX(VertexAttrib4fvARB) @@ -17756,7 +18213,7 @@ GL_PREFIX(VertexAttrib4fvARB): GL_PREFIX(VertexAttrib4ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3784(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17766,13 +18223,13 @@ GL_PREFIX(VertexAttrib4ivARB): popq %rbp popq %rsi popq %rdi - movq 3784(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3784(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17782,7 +18239,7 @@ GL_PREFIX(VertexAttrib4ivARB): popq %rbp popq %rsi popq %rdi - movq 3784(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ivARB), .-GL_PREFIX(VertexAttrib4ivARB) @@ -17793,7 +18250,7 @@ GL_PREFIX(VertexAttrib4ivARB): GL_PREFIX(VertexAttrib4sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3792(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17807,13 +18264,13 @@ GL_PREFIX(VertexAttrib4sARB): popq %rdx popq %rsi popq %rdi - movq 3792(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3792(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17827,7 +18284,7 @@ GL_PREFIX(VertexAttrib4sARB): popq %rdx popq %rsi popq %rdi - movq 3792(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4sARB), .-GL_PREFIX(VertexAttrib4sARB) @@ -17838,7 +18295,7 @@ GL_PREFIX(VertexAttrib4sARB): GL_PREFIX(VertexAttrib4svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3800(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17848,13 +18305,13 @@ GL_PREFIX(VertexAttrib4svARB): popq %rbp popq %rsi popq %rdi - movq 3800(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3800(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17864,7 +18321,7 @@ GL_PREFIX(VertexAttrib4svARB): popq %rbp popq %rsi popq %rdi - movq 3800(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4svARB), .-GL_PREFIX(VertexAttrib4svARB) @@ -17875,7 +18332,7 @@ GL_PREFIX(VertexAttrib4svARB): GL_PREFIX(VertexAttrib4ubvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3808(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17885,13 +18342,13 @@ GL_PREFIX(VertexAttrib4ubvARB): popq %rbp popq %rsi popq %rdi - movq 3808(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3808(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17901,7 +18358,7 @@ GL_PREFIX(VertexAttrib4ubvARB): popq %rbp popq %rsi popq %rdi - movq 3808(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ubvARB), .-GL_PREFIX(VertexAttrib4ubvARB) @@ -17912,7 +18369,7 @@ GL_PREFIX(VertexAttrib4ubvARB): GL_PREFIX(VertexAttrib4uivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3816(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17922,13 +18379,13 @@ GL_PREFIX(VertexAttrib4uivARB): popq %rbp popq %rsi popq %rdi - movq 3816(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3816(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17938,7 +18395,7 @@ GL_PREFIX(VertexAttrib4uivARB): popq %rbp popq %rsi popq %rdi - movq 3816(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4uivARB), .-GL_PREFIX(VertexAttrib4uivARB) @@ -17949,7 +18406,7 @@ GL_PREFIX(VertexAttrib4uivARB): GL_PREFIX(VertexAttrib4usvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3824(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17959,13 +18416,13 @@ GL_PREFIX(VertexAttrib4usvARB): popq %rbp popq %rsi popq %rdi - movq 3824(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3824(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17975,7 +18432,7 @@ GL_PREFIX(VertexAttrib4usvARB): popq %rbp popq %rsi popq %rdi - movq 3824(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4usvARB), .-GL_PREFIX(VertexAttrib4usvARB) @@ -17986,7 +18443,7 @@ GL_PREFIX(VertexAttrib4usvARB): GL_PREFIX(VertexAttribPointerARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3832(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18004,13 +18461,13 @@ GL_PREFIX(VertexAttribPointerARB): popq %rdx popq %rsi popq %rdi - movq 3832(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3832(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18028,7 +18485,7 @@ GL_PREFIX(VertexAttribPointerARB): popq %rdx popq %rsi popq %rdi - movq 3832(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribPointerARB), .-GL_PREFIX(VertexAttribPointerARB) @@ -18039,7 +18496,7 @@ GL_PREFIX(VertexAttribPointerARB): GL_PREFIX(BindBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3840(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18049,13 +18506,13 @@ GL_PREFIX(BindBufferARB): popq %rbp popq %rsi popq %rdi - movq 3840(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3840(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18065,7 +18522,7 @@ GL_PREFIX(BindBufferARB): popq %rbp popq %rsi popq %rdi - movq 3840(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindBufferARB), .-GL_PREFIX(BindBufferARB) @@ -18076,7 +18533,7 @@ GL_PREFIX(BindBufferARB): GL_PREFIX(BufferDataARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3848(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18090,13 +18547,13 @@ GL_PREFIX(BufferDataARB): popq %rdx popq %rsi popq %rdi - movq 3848(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3848(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18110,7 +18567,7 @@ GL_PREFIX(BufferDataARB): popq %rdx popq %rsi popq %rdi - movq 3848(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BufferDataARB), .-GL_PREFIX(BufferDataARB) @@ -18121,7 +18578,7 @@ GL_PREFIX(BufferDataARB): GL_PREFIX(BufferSubDataARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3856(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18135,13 +18592,13 @@ GL_PREFIX(BufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 3856(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3856(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18155,7 +18612,7 @@ GL_PREFIX(BufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 3856(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BufferSubDataARB), .-GL_PREFIX(BufferSubDataARB) @@ -18166,7 +18623,7 @@ GL_PREFIX(BufferSubDataARB): GL_PREFIX(DeleteBuffersARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3864(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18176,13 +18633,13 @@ GL_PREFIX(DeleteBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3864(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3864(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18192,7 +18649,7 @@ GL_PREFIX(DeleteBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3864(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteBuffersARB), .-GL_PREFIX(DeleteBuffersARB) @@ -18203,7 +18660,7 @@ GL_PREFIX(DeleteBuffersARB): GL_PREFIX(GenBuffersARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3872(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18213,13 +18670,13 @@ GL_PREFIX(GenBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3872(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3872(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18229,7 +18686,7 @@ GL_PREFIX(GenBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3872(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenBuffersARB), .-GL_PREFIX(GenBuffersARB) @@ -18240,7 +18697,7 @@ GL_PREFIX(GenBuffersARB): GL_PREFIX(GetBufferParameterivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3880(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18250,13 +18707,13 @@ GL_PREFIX(GetBufferParameterivARB): popq %rdx popq %rsi popq %rdi - movq 3880(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3880(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18266,7 +18723,7 @@ GL_PREFIX(GetBufferParameterivARB): popq %rdx popq %rsi popq %rdi - movq 3880(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetBufferParameterivARB), .-GL_PREFIX(GetBufferParameterivARB) @@ -18277,7 +18734,7 @@ GL_PREFIX(GetBufferParameterivARB): GL_PREFIX(GetBufferPointervARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3888(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18287,13 +18744,13 @@ GL_PREFIX(GetBufferPointervARB): popq %rdx popq %rsi popq %rdi - movq 3888(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3888(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18303,7 +18760,7 @@ GL_PREFIX(GetBufferPointervARB): popq %rdx popq %rsi popq %rdi - movq 3888(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetBufferPointervARB), .-GL_PREFIX(GetBufferPointervARB) @@ -18314,7 +18771,7 @@ GL_PREFIX(GetBufferPointervARB): GL_PREFIX(GetBufferSubDataARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3896(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18328,13 +18785,13 @@ GL_PREFIX(GetBufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 3896(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3896(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18348,7 +18805,7 @@ GL_PREFIX(GetBufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 3896(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetBufferSubDataARB), .-GL_PREFIX(GetBufferSubDataARB) @@ -18359,25 +18816,25 @@ GL_PREFIX(GetBufferSubDataARB): GL_PREFIX(IsBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3904(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3904(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3904(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3904(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsBufferARB), .-GL_PREFIX(IsBufferARB) @@ -18388,7 +18845,7 @@ GL_PREFIX(IsBufferARB): GL_PREFIX(MapBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3912(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18398,13 +18855,13 @@ GL_PREFIX(MapBufferARB): popq %rbp popq %rsi popq %rdi - movq 3912(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3912(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18414,7 +18871,7 @@ GL_PREFIX(MapBufferARB): popq %rbp popq %rsi popq %rdi - movq 3912(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MapBufferARB), .-GL_PREFIX(MapBufferARB) @@ -18425,25 +18882,25 @@ GL_PREFIX(MapBufferARB): GL_PREFIX(UnmapBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3920(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3920(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3920(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3920(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UnmapBufferARB), .-GL_PREFIX(UnmapBufferARB) @@ -18454,7 +18911,7 @@ GL_PREFIX(UnmapBufferARB): GL_PREFIX(BeginQueryARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3928(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18464,13 +18921,13 @@ GL_PREFIX(BeginQueryARB): popq %rbp popq %rsi popq %rdi - movq 3928(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3928(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18480,7 +18937,7 @@ GL_PREFIX(BeginQueryARB): popq %rbp popq %rsi popq %rdi - movq 3928(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BeginQueryARB), .-GL_PREFIX(BeginQueryARB) @@ -18491,7 +18948,7 @@ GL_PREFIX(BeginQueryARB): GL_PREFIX(DeleteQueriesARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3936(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18501,13 +18958,13 @@ GL_PREFIX(DeleteQueriesARB): popq %rbp popq %rsi popq %rdi - movq 3936(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3936(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18517,7 +18974,7 @@ GL_PREFIX(DeleteQueriesARB): popq %rbp popq %rsi popq %rdi - movq 3936(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteQueriesARB), .-GL_PREFIX(DeleteQueriesARB) @@ -18528,25 +18985,25 @@ GL_PREFIX(DeleteQueriesARB): GL_PREFIX(EndQueryARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3944(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3944(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3944(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3944(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EndQueryARB), .-GL_PREFIX(EndQueryARB) @@ -18557,7 +19014,7 @@ GL_PREFIX(EndQueryARB): GL_PREFIX(GenQueriesARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3952(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18567,13 +19024,13 @@ GL_PREFIX(GenQueriesARB): popq %rbp popq %rsi popq %rdi - movq 3952(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3952(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18583,7 +19040,7 @@ GL_PREFIX(GenQueriesARB): popq %rbp popq %rsi popq %rdi - movq 3952(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenQueriesARB), .-GL_PREFIX(GenQueriesARB) @@ -18594,7 +19051,7 @@ GL_PREFIX(GenQueriesARB): GL_PREFIX(GetQueryObjectivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3960(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18604,13 +19061,13 @@ GL_PREFIX(GetQueryObjectivARB): popq %rdx popq %rsi popq %rdi - movq 3960(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3960(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18620,7 +19077,7 @@ GL_PREFIX(GetQueryObjectivARB): popq %rdx popq %rsi popq %rdi - movq 3960(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetQueryObjectivARB), .-GL_PREFIX(GetQueryObjectivARB) @@ -18631,7 +19088,7 @@ GL_PREFIX(GetQueryObjectivARB): GL_PREFIX(GetQueryObjectuivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3968(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18641,13 +19098,13 @@ GL_PREFIX(GetQueryObjectuivARB): popq %rdx popq %rsi popq %rdi - movq 3968(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3968(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18657,7 +19114,7 @@ GL_PREFIX(GetQueryObjectuivARB): popq %rdx popq %rsi popq %rdi - movq 3968(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetQueryObjectuivARB), .-GL_PREFIX(GetQueryObjectuivARB) @@ -18668,7 +19125,7 @@ GL_PREFIX(GetQueryObjectuivARB): GL_PREFIX(GetQueryivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3976(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18678,13 +19135,13 @@ GL_PREFIX(GetQueryivARB): popq %rdx popq %rsi popq %rdi - movq 3976(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3976(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18694,7 +19151,7 @@ GL_PREFIX(GetQueryivARB): popq %rdx popq %rsi popq %rdi - movq 3976(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetQueryivARB), .-GL_PREFIX(GetQueryivARB) @@ -18705,25 +19162,25 @@ GL_PREFIX(GetQueryivARB): GL_PREFIX(IsQueryARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3984(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3984(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3984(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3984(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsQueryARB), .-GL_PREFIX(IsQueryARB) @@ -18734,7 +19191,7 @@ GL_PREFIX(IsQueryARB): GL_PREFIX(AttachObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3992(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18744,13 +19201,13 @@ GL_PREFIX(AttachObjectARB): popq %rbp popq %rsi popq %rdi - movq 3992(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3992(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18760,7 +19217,7 @@ GL_PREFIX(AttachObjectARB): popq %rbp popq %rsi popq %rdi - movq 3992(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AttachObjectARB), .-GL_PREFIX(AttachObjectARB) @@ -18771,25 +19228,25 @@ GL_PREFIX(AttachObjectARB): GL_PREFIX(CompileShaderARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4000(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4000(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4000(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4000(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompileShaderARB), .-GL_PREFIX(CompileShaderARB) @@ -18800,25 +19257,25 @@ GL_PREFIX(CompileShaderARB): GL_PREFIX(CreateProgramObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4008(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4008(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4008(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4008(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CreateProgramObjectARB), .-GL_PREFIX(CreateProgramObjectARB) @@ -18829,25 +19286,25 @@ GL_PREFIX(CreateProgramObjectARB): GL_PREFIX(CreateShaderObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4016(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4016(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4016(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4016(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CreateShaderObjectARB), .-GL_PREFIX(CreateShaderObjectARB) @@ -18858,25 +19315,25 @@ GL_PREFIX(CreateShaderObjectARB): GL_PREFIX(DeleteObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4024(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4024(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4024(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4024(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteObjectARB), .-GL_PREFIX(DeleteObjectARB) @@ -18887,7 +19344,7 @@ GL_PREFIX(DeleteObjectARB): GL_PREFIX(DetachObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4032(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18897,13 +19354,13 @@ GL_PREFIX(DetachObjectARB): popq %rbp popq %rsi popq %rdi - movq 4032(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4032(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18913,7 +19370,7 @@ GL_PREFIX(DetachObjectARB): popq %rbp popq %rsi popq %rdi - movq 4032(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DetachObjectARB), .-GL_PREFIX(DetachObjectARB) @@ -18924,7 +19381,7 @@ GL_PREFIX(DetachObjectARB): GL_PREFIX(GetActiveUniformARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4040(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18942,13 +19399,13 @@ GL_PREFIX(GetActiveUniformARB): popq %rdx popq %rsi popq %rdi - movq 4040(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4040(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18966,7 +19423,7 @@ GL_PREFIX(GetActiveUniformARB): popq %rdx popq %rsi popq %rdi - movq 4040(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetActiveUniformARB), .-GL_PREFIX(GetActiveUniformARB) @@ -18977,7 +19434,7 @@ GL_PREFIX(GetActiveUniformARB): GL_PREFIX(GetAttachedObjectsARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4048(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18991,13 +19448,13 @@ GL_PREFIX(GetAttachedObjectsARB): popq %rdx popq %rsi popq %rdi - movq 4048(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4048(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19011,7 +19468,7 @@ GL_PREFIX(GetAttachedObjectsARB): popq %rdx popq %rsi popq %rdi - movq 4048(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetAttachedObjectsARB), .-GL_PREFIX(GetAttachedObjectsARB) @@ -19022,25 +19479,25 @@ GL_PREFIX(GetAttachedObjectsARB): GL_PREFIX(GetHandleARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4056(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4056(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4056(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4056(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetHandleARB), .-GL_PREFIX(GetHandleARB) @@ -19051,7 +19508,7 @@ GL_PREFIX(GetHandleARB): GL_PREFIX(GetInfoLogARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4064(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19065,13 +19522,13 @@ GL_PREFIX(GetInfoLogARB): popq %rdx popq %rsi popq %rdi - movq 4064(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4064(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19085,7 +19542,7 @@ GL_PREFIX(GetInfoLogARB): popq %rdx popq %rsi popq %rdi - movq 4064(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetInfoLogARB), .-GL_PREFIX(GetInfoLogARB) @@ -19096,7 +19553,7 @@ GL_PREFIX(GetInfoLogARB): GL_PREFIX(GetObjectParameterfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4072(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19106,13 +19563,13 @@ GL_PREFIX(GetObjectParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 4072(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4072(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19122,7 +19579,7 @@ GL_PREFIX(GetObjectParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 4072(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetObjectParameterfvARB), .-GL_PREFIX(GetObjectParameterfvARB) @@ -19133,7 +19590,7 @@ GL_PREFIX(GetObjectParameterfvARB): GL_PREFIX(GetObjectParameterivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4080(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19143,13 +19600,13 @@ GL_PREFIX(GetObjectParameterivARB): popq %rdx popq %rsi popq %rdi - movq 4080(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4080(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19159,7 +19616,7 @@ GL_PREFIX(GetObjectParameterivARB): popq %rdx popq %rsi popq %rdi - movq 4080(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetObjectParameterivARB), .-GL_PREFIX(GetObjectParameterivARB) @@ -19170,7 +19627,7 @@ GL_PREFIX(GetObjectParameterivARB): GL_PREFIX(GetShaderSourceARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4088(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19184,13 +19641,13 @@ GL_PREFIX(GetShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4088(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4088(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19204,7 +19661,7 @@ GL_PREFIX(GetShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4088(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetShaderSourceARB), .-GL_PREFIX(GetShaderSourceARB) @@ -19215,7 +19672,7 @@ GL_PREFIX(GetShaderSourceARB): GL_PREFIX(GetUniformLocationARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4096(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19225,13 +19682,13 @@ GL_PREFIX(GetUniformLocationARB): popq %rbp popq %rsi popq %rdi - movq 4096(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4096(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19241,7 +19698,7 @@ GL_PREFIX(GetUniformLocationARB): popq %rbp popq %rsi popq %rdi - movq 4096(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetUniformLocationARB), .-GL_PREFIX(GetUniformLocationARB) @@ -19252,7 +19709,7 @@ GL_PREFIX(GetUniformLocationARB): GL_PREFIX(GetUniformfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4104(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19262,13 +19719,13 @@ GL_PREFIX(GetUniformfvARB): popq %rdx popq %rsi popq %rdi - movq 4104(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4104(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19278,7 +19735,7 @@ GL_PREFIX(GetUniformfvARB): popq %rdx popq %rsi popq %rdi - movq 4104(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetUniformfvARB), .-GL_PREFIX(GetUniformfvARB) @@ -19289,7 +19746,7 @@ GL_PREFIX(GetUniformfvARB): GL_PREFIX(GetUniformivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4112(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19299,13 +19756,13 @@ GL_PREFIX(GetUniformivARB): popq %rdx popq %rsi popq %rdi - movq 4112(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4112(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19315,7 +19772,7 @@ GL_PREFIX(GetUniformivARB): popq %rdx popq %rsi popq %rdi - movq 4112(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetUniformivARB), .-GL_PREFIX(GetUniformivARB) @@ -19326,25 +19783,25 @@ GL_PREFIX(GetUniformivARB): GL_PREFIX(LinkProgramARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4120(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4120(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4120(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4120(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LinkProgramARB), .-GL_PREFIX(LinkProgramARB) @@ -19355,7 +19812,7 @@ GL_PREFIX(LinkProgramARB): GL_PREFIX(ShaderSourceARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4128(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19369,13 +19826,13 @@ GL_PREFIX(ShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4128(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4128(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19389,7 +19846,7 @@ GL_PREFIX(ShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4128(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ShaderSourceARB), .-GL_PREFIX(ShaderSourceARB) @@ -19400,7 +19857,7 @@ GL_PREFIX(ShaderSourceARB): GL_PREFIX(Uniform1fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4136(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -19410,13 +19867,13 @@ GL_PREFIX(Uniform1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4136(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4136(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -19426,7 +19883,7 @@ GL_PREFIX(Uniform1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4136(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1fARB), .-GL_PREFIX(Uniform1fARB) @@ -19437,7 +19894,7 @@ GL_PREFIX(Uniform1fARB): GL_PREFIX(Uniform1fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4144(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19447,13 +19904,13 @@ GL_PREFIX(Uniform1fvARB): popq %rdx popq %rsi popq %rdi - movq 4144(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4144(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19463,7 +19920,7 @@ GL_PREFIX(Uniform1fvARB): popq %rdx popq %rsi popq %rdi - movq 4144(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1fvARB), .-GL_PREFIX(Uniform1fvARB) @@ -19474,7 +19931,7 @@ GL_PREFIX(Uniform1fvARB): GL_PREFIX(Uniform1iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4152(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19484,13 +19941,13 @@ GL_PREFIX(Uniform1iARB): popq %rbp popq %rsi popq %rdi - movq 4152(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4152(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19500,7 +19957,7 @@ GL_PREFIX(Uniform1iARB): popq %rbp popq %rsi popq %rdi - movq 4152(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1iARB), .-GL_PREFIX(Uniform1iARB) @@ -19511,7 +19968,7 @@ GL_PREFIX(Uniform1iARB): GL_PREFIX(Uniform1ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4160(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19521,13 +19978,13 @@ GL_PREFIX(Uniform1ivARB): popq %rdx popq %rsi popq %rdi - movq 4160(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4160(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19537,7 +19994,7 @@ GL_PREFIX(Uniform1ivARB): popq %rdx popq %rsi popq %rdi - movq 4160(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1ivARB), .-GL_PREFIX(Uniform1ivARB) @@ -19548,7 +20005,7 @@ GL_PREFIX(Uniform1ivARB): GL_PREFIX(Uniform2fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4168(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -19560,13 +20017,13 @@ GL_PREFIX(Uniform2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4168(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4168(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -19578,7 +20035,7 @@ GL_PREFIX(Uniform2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4168(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2fARB), .-GL_PREFIX(Uniform2fARB) @@ -19589,7 +20046,7 @@ GL_PREFIX(Uniform2fARB): GL_PREFIX(Uniform2fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4176(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19599,13 +20056,13 @@ GL_PREFIX(Uniform2fvARB): popq %rdx popq %rsi popq %rdi - movq 4176(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4176(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19615,7 +20072,7 @@ GL_PREFIX(Uniform2fvARB): popq %rdx popq %rsi popq %rdi - movq 4176(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2fvARB), .-GL_PREFIX(Uniform2fvARB) @@ -19626,7 +20083,7 @@ GL_PREFIX(Uniform2fvARB): GL_PREFIX(Uniform2iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4184(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19636,13 +20093,13 @@ GL_PREFIX(Uniform2iARB): popq %rdx popq %rsi popq %rdi - movq 4184(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4184(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19652,7 +20109,7 @@ GL_PREFIX(Uniform2iARB): popq %rdx popq %rsi popq %rdi - movq 4184(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2iARB), .-GL_PREFIX(Uniform2iARB) @@ -19663,7 +20120,7 @@ GL_PREFIX(Uniform2iARB): GL_PREFIX(Uniform2ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4192(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19673,13 +20130,13 @@ GL_PREFIX(Uniform2ivARB): popq %rdx popq %rsi popq %rdi - movq 4192(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4192(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19689,7 +20146,7 @@ GL_PREFIX(Uniform2ivARB): popq %rdx popq %rsi popq %rdi - movq 4192(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2ivARB), .-GL_PREFIX(Uniform2ivARB) @@ -19700,7 +20157,7 @@ GL_PREFIX(Uniform2ivARB): GL_PREFIX(Uniform3fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4200(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -19714,13 +20171,13 @@ GL_PREFIX(Uniform3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4200(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4200(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -19734,7 +20191,7 @@ GL_PREFIX(Uniform3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4200(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3fARB), .-GL_PREFIX(Uniform3fARB) @@ -19745,7 +20202,7 @@ GL_PREFIX(Uniform3fARB): GL_PREFIX(Uniform3fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4208(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19755,13 +20212,13 @@ GL_PREFIX(Uniform3fvARB): popq %rdx popq %rsi popq %rdi - movq 4208(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4208(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19771,7 +20228,7 @@ GL_PREFIX(Uniform3fvARB): popq %rdx popq %rsi popq %rdi - movq 4208(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3fvARB), .-GL_PREFIX(Uniform3fvARB) @@ -19782,7 +20239,7 @@ GL_PREFIX(Uniform3fvARB): GL_PREFIX(Uniform3iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4216(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19796,13 +20253,13 @@ GL_PREFIX(Uniform3iARB): popq %rdx popq %rsi popq %rdi - movq 4216(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4216(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19816,7 +20273,7 @@ GL_PREFIX(Uniform3iARB): popq %rdx popq %rsi popq %rdi - movq 4216(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3iARB), .-GL_PREFIX(Uniform3iARB) @@ -19827,7 +20284,7 @@ GL_PREFIX(Uniform3iARB): GL_PREFIX(Uniform3ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4224(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19837,13 +20294,13 @@ GL_PREFIX(Uniform3ivARB): popq %rdx popq %rsi popq %rdi - movq 4224(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4224(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19853,7 +20310,7 @@ GL_PREFIX(Uniform3ivARB): popq %rdx popq %rsi popq %rdi - movq 4224(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3ivARB), .-GL_PREFIX(Uniform3ivARB) @@ -19864,7 +20321,7 @@ GL_PREFIX(Uniform3ivARB): GL_PREFIX(Uniform4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4232(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -19880,13 +20337,13 @@ GL_PREFIX(Uniform4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4232(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4232(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -19902,7 +20359,7 @@ GL_PREFIX(Uniform4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4232(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4fARB), .-GL_PREFIX(Uniform4fARB) @@ -19913,7 +20370,7 @@ GL_PREFIX(Uniform4fARB): GL_PREFIX(Uniform4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4240(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19923,13 +20380,13 @@ GL_PREFIX(Uniform4fvARB): popq %rdx popq %rsi popq %rdi - movq 4240(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4240(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19939,7 +20396,7 @@ GL_PREFIX(Uniform4fvARB): popq %rdx popq %rsi popq %rdi - movq 4240(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4fvARB), .-GL_PREFIX(Uniform4fvARB) @@ -19950,7 +20407,7 @@ GL_PREFIX(Uniform4fvARB): GL_PREFIX(Uniform4iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4248(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19964,13 +20421,13 @@ GL_PREFIX(Uniform4iARB): popq %rdx popq %rsi popq %rdi - movq 4248(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4248(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19984,7 +20441,7 @@ GL_PREFIX(Uniform4iARB): popq %rdx popq %rsi popq %rdi - movq 4248(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4iARB), .-GL_PREFIX(Uniform4iARB) @@ -19995,7 +20452,7 @@ GL_PREFIX(Uniform4iARB): GL_PREFIX(Uniform4ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4256(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20005,13 +20462,13 @@ GL_PREFIX(Uniform4ivARB): popq %rdx popq %rsi popq %rdi - movq 4256(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4256(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20021,7 +20478,7 @@ GL_PREFIX(Uniform4ivARB): popq %rdx popq %rsi popq %rdi - movq 4256(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4ivARB), .-GL_PREFIX(Uniform4ivARB) @@ -20032,7 +20489,7 @@ GL_PREFIX(Uniform4ivARB): GL_PREFIX(UniformMatrix2fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4264(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20046,13 +20503,13 @@ GL_PREFIX(UniformMatrix2fvARB): popq %rdx popq %rsi popq %rdi - movq 4264(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4264(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20066,7 +20523,7 @@ GL_PREFIX(UniformMatrix2fvARB): popq %rdx popq %rsi popq %rdi - movq 4264(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UniformMatrix2fvARB), .-GL_PREFIX(UniformMatrix2fvARB) @@ -20077,7 +20534,7 @@ GL_PREFIX(UniformMatrix2fvARB): GL_PREFIX(UniformMatrix3fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4272(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20091,13 +20548,13 @@ GL_PREFIX(UniformMatrix3fvARB): popq %rdx popq %rsi popq %rdi - movq 4272(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4272(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20111,7 +20568,7 @@ GL_PREFIX(UniformMatrix3fvARB): popq %rdx popq %rsi popq %rdi - movq 4272(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UniformMatrix3fvARB), .-GL_PREFIX(UniformMatrix3fvARB) @@ -20122,7 +20579,7 @@ GL_PREFIX(UniformMatrix3fvARB): GL_PREFIX(UniformMatrix4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4280(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20136,13 +20593,13 @@ GL_PREFIX(UniformMatrix4fvARB): popq %rdx popq %rsi popq %rdi - movq 4280(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4280(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20156,7 +20613,7 @@ GL_PREFIX(UniformMatrix4fvARB): popq %rdx popq %rsi popq %rdi - movq 4280(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UniformMatrix4fvARB), .-GL_PREFIX(UniformMatrix4fvARB) @@ -20167,25 +20624,25 @@ GL_PREFIX(UniformMatrix4fvARB): GL_PREFIX(UseProgramObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4288(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4288(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4288(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4288(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UseProgramObjectARB), .-GL_PREFIX(UseProgramObjectARB) @@ -20196,25 +20653,25 @@ GL_PREFIX(UseProgramObjectARB): GL_PREFIX(ValidateProgramARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4296(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4296(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4296(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4296(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ValidateProgramARB), .-GL_PREFIX(ValidateProgramARB) @@ -20225,7 +20682,7 @@ GL_PREFIX(ValidateProgramARB): GL_PREFIX(BindAttribLocationARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4304(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20235,13 +20692,13 @@ GL_PREFIX(BindAttribLocationARB): popq %rdx popq %rsi popq %rdi - movq 4304(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4304(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20251,7 +20708,7 @@ GL_PREFIX(BindAttribLocationARB): popq %rdx popq %rsi popq %rdi - movq 4304(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindAttribLocationARB), .-GL_PREFIX(BindAttribLocationARB) @@ -20262,7 +20719,7 @@ GL_PREFIX(BindAttribLocationARB): GL_PREFIX(GetActiveAttribARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4312(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20280,13 +20737,13 @@ GL_PREFIX(GetActiveAttribARB): popq %rdx popq %rsi popq %rdi - movq 4312(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4312(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20304,7 +20761,7 @@ GL_PREFIX(GetActiveAttribARB): popq %rdx popq %rsi popq %rdi - movq 4312(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetActiveAttribARB), .-GL_PREFIX(GetActiveAttribARB) @@ -20315,7 +20772,7 @@ GL_PREFIX(GetActiveAttribARB): GL_PREFIX(GetAttribLocationARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4320(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20325,13 +20782,13 @@ GL_PREFIX(GetAttribLocationARB): popq %rbp popq %rsi popq %rdi - movq 4320(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4320(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20341,7 +20798,7 @@ GL_PREFIX(GetAttribLocationARB): popq %rbp popq %rsi popq %rdi - movq 4320(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetAttribLocationARB), .-GL_PREFIX(GetAttribLocationARB) @@ -20352,7 +20809,7 @@ GL_PREFIX(GetAttribLocationARB): GL_PREFIX(DrawBuffersARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4328(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20362,13 +20819,13 @@ GL_PREFIX(DrawBuffersARB): popq %rbp popq %rsi popq %rdi - movq 4328(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4328(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20378,7 +20835,7 @@ GL_PREFIX(DrawBuffersARB): popq %rbp popq %rsi popq %rdi - movq 4328(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DrawBuffersARB), .-GL_PREFIX(DrawBuffersARB) @@ -20389,7 +20846,7 @@ GL_PREFIX(DrawBuffersARB): GL_PREFIX(PolygonOffsetEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4336(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -20399,13 +20856,13 @@ GL_PREFIX(PolygonOffsetEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4336(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4336(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -20415,19 +20872,19 @@ GL_PREFIX(PolygonOffsetEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4336(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PolygonOffsetEXT), .-GL_PREFIX(PolygonOffsetEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_543) - .type GL_PREFIX(_dispatch_stub_543), @function - HIDDEN(GL_PREFIX(_dispatch_stub_543)) -GL_PREFIX(_dispatch_stub_543): + .globl GL_PREFIX(_dispatch_stub_556) + .type GL_PREFIX(_dispatch_stub_556), @function + HIDDEN(GL_PREFIX(_dispatch_stub_556)) +GL_PREFIX(_dispatch_stub_556): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4344(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20437,13 +20894,13 @@ GL_PREFIX(_dispatch_stub_543): popq %rbp popq %rsi popq %rdi - movq 4344(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4344(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20453,19 +20910,19 @@ GL_PREFIX(_dispatch_stub_543): popq %rbp popq %rsi popq %rdi - movq 4344(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_543), .-GL_PREFIX(_dispatch_stub_543) + .size GL_PREFIX(_dispatch_stub_556), .-GL_PREFIX(_dispatch_stub_556) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_544) - .type GL_PREFIX(_dispatch_stub_544), @function - HIDDEN(GL_PREFIX(_dispatch_stub_544)) -GL_PREFIX(_dispatch_stub_544): + .globl GL_PREFIX(_dispatch_stub_557) + .type GL_PREFIX(_dispatch_stub_557), @function + HIDDEN(GL_PREFIX(_dispatch_stub_557)) +GL_PREFIX(_dispatch_stub_557): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4352(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20475,13 +20932,13 @@ GL_PREFIX(_dispatch_stub_544): popq %rbp popq %rsi popq %rdi - movq 4352(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4352(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20491,19 +20948,19 @@ GL_PREFIX(_dispatch_stub_544): popq %rbp popq %rsi popq %rdi - movq 4352(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_544), .-GL_PREFIX(_dispatch_stub_544) + .size GL_PREFIX(_dispatch_stub_557), .-GL_PREFIX(_dispatch_stub_557) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_545) - .type GL_PREFIX(_dispatch_stub_545), @function - HIDDEN(GL_PREFIX(_dispatch_stub_545)) -GL_PREFIX(_dispatch_stub_545): + .globl GL_PREFIX(_dispatch_stub_558) + .type GL_PREFIX(_dispatch_stub_558), @function + HIDDEN(GL_PREFIX(_dispatch_stub_558)) +GL_PREFIX(_dispatch_stub_558): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4360(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -20513,13 +20970,13 @@ GL_PREFIX(_dispatch_stub_545): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4360(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4360(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -20529,19 +20986,19 @@ GL_PREFIX(_dispatch_stub_545): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4360(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_545), .-GL_PREFIX(_dispatch_stub_545) + .size GL_PREFIX(_dispatch_stub_558), .-GL_PREFIX(_dispatch_stub_558) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_546) - .type GL_PREFIX(_dispatch_stub_546), @function - HIDDEN(GL_PREFIX(_dispatch_stub_546)) -GL_PREFIX(_dispatch_stub_546): + .globl GL_PREFIX(_dispatch_stub_559) + .type GL_PREFIX(_dispatch_stub_559), @function + HIDDEN(GL_PREFIX(_dispatch_stub_559)) +GL_PREFIX(_dispatch_stub_559): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4368(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20551,13 +21008,13 @@ GL_PREFIX(_dispatch_stub_546): popq %rbp popq %rsi popq %rdi - movq 4368(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4368(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20567,19 +21024,19 @@ GL_PREFIX(_dispatch_stub_546): popq %rbp popq %rsi popq %rdi - movq 4368(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_546), .-GL_PREFIX(_dispatch_stub_546) + .size GL_PREFIX(_dispatch_stub_559), .-GL_PREFIX(_dispatch_stub_559) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_547) - .type GL_PREFIX(_dispatch_stub_547), @function - HIDDEN(GL_PREFIX(_dispatch_stub_547)) -GL_PREFIX(_dispatch_stub_547): + .globl GL_PREFIX(_dispatch_stub_560) + .type GL_PREFIX(_dispatch_stub_560), @function + HIDDEN(GL_PREFIX(_dispatch_stub_560)) +GL_PREFIX(_dispatch_stub_560): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4376(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20589,13 +21046,13 @@ GL_PREFIX(_dispatch_stub_547): popq %rbp popq %rsi popq %rdi - movq 4376(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4376(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20605,19 +21062,19 @@ GL_PREFIX(_dispatch_stub_547): popq %rbp popq %rsi popq %rdi - movq 4376(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_547), .-GL_PREFIX(_dispatch_stub_547) + .size GL_PREFIX(_dispatch_stub_560), .-GL_PREFIX(_dispatch_stub_560) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_548) - .type GL_PREFIX(_dispatch_stub_548), @function - HIDDEN(GL_PREFIX(_dispatch_stub_548)) -GL_PREFIX(_dispatch_stub_548): + .globl GL_PREFIX(_dispatch_stub_561) + .type GL_PREFIX(_dispatch_stub_561), @function + HIDDEN(GL_PREFIX(_dispatch_stub_561)) +GL_PREFIX(_dispatch_stub_561): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4384(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20627,13 +21084,13 @@ GL_PREFIX(_dispatch_stub_548): popq %rbp popq %rsi popq %rdi - movq 4384(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4384(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20643,19 +21100,19 @@ GL_PREFIX(_dispatch_stub_548): popq %rbp popq %rsi popq %rdi - movq 4384(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_548), .-GL_PREFIX(_dispatch_stub_548) + .size GL_PREFIX(_dispatch_stub_561), .-GL_PREFIX(_dispatch_stub_561) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_549) - .type GL_PREFIX(_dispatch_stub_549), @function - HIDDEN(GL_PREFIX(_dispatch_stub_549)) -GL_PREFIX(_dispatch_stub_549): + .globl GL_PREFIX(_dispatch_stub_562) + .type GL_PREFIX(_dispatch_stub_562), @function + HIDDEN(GL_PREFIX(_dispatch_stub_562)) +GL_PREFIX(_dispatch_stub_562): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4392(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20665,13 +21122,13 @@ GL_PREFIX(_dispatch_stub_549): popq %rbp popq %rsi popq %rdi - movq 4392(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4392(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20681,40 +21138,40 @@ GL_PREFIX(_dispatch_stub_549): popq %rbp popq %rsi popq %rdi - movq 4392(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_549), .-GL_PREFIX(_dispatch_stub_549) + .size GL_PREFIX(_dispatch_stub_562), .-GL_PREFIX(_dispatch_stub_562) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_550) - .type GL_PREFIX(_dispatch_stub_550), @function - HIDDEN(GL_PREFIX(_dispatch_stub_550)) -GL_PREFIX(_dispatch_stub_550): + .globl GL_PREFIX(_dispatch_stub_563) + .type GL_PREFIX(_dispatch_stub_563), @function + HIDDEN(GL_PREFIX(_dispatch_stub_563)) +GL_PREFIX(_dispatch_stub_563): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4400(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4400(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4400(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4400(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_550), .-GL_PREFIX(_dispatch_stub_550) + .size GL_PREFIX(_dispatch_stub_563), .-GL_PREFIX(_dispatch_stub_563) .p2align 4,,15 .globl GL_PREFIX(ColorPointerEXT) @@ -20722,7 +21179,7 @@ GL_PREFIX(_dispatch_stub_550): GL_PREFIX(ColorPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4408(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20736,13 +21193,13 @@ GL_PREFIX(ColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4408(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4408(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20756,7 +21213,7 @@ GL_PREFIX(ColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4408(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorPointerEXT), .-GL_PREFIX(ColorPointerEXT) @@ -20767,7 +21224,7 @@ GL_PREFIX(ColorPointerEXT): GL_PREFIX(EdgeFlagPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4416(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20777,13 +21234,13 @@ GL_PREFIX(EdgeFlagPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4416(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4416(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20793,7 +21250,7 @@ GL_PREFIX(EdgeFlagPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4416(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EdgeFlagPointerEXT), .-GL_PREFIX(EdgeFlagPointerEXT) @@ -20804,7 +21261,7 @@ GL_PREFIX(EdgeFlagPointerEXT): GL_PREFIX(IndexPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4424(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20818,13 +21275,13 @@ GL_PREFIX(IndexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4424(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4424(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20838,7 +21295,7 @@ GL_PREFIX(IndexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4424(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IndexPointerEXT), .-GL_PREFIX(IndexPointerEXT) @@ -20849,7 +21306,7 @@ GL_PREFIX(IndexPointerEXT): GL_PREFIX(NormalPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4432(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20863,13 +21320,13 @@ GL_PREFIX(NormalPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4432(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4432(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20883,7 +21340,7 @@ GL_PREFIX(NormalPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4432(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(NormalPointerEXT), .-GL_PREFIX(NormalPointerEXT) @@ -20894,7 +21351,7 @@ GL_PREFIX(NormalPointerEXT): GL_PREFIX(TexCoordPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4440(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20908,13 +21365,13 @@ GL_PREFIX(TexCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4440(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4440(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20928,7 +21385,7 @@ GL_PREFIX(TexCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4440(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(TexCoordPointerEXT), .-GL_PREFIX(TexCoordPointerEXT) @@ -20939,7 +21396,7 @@ GL_PREFIX(TexCoordPointerEXT): GL_PREFIX(VertexPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4448(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20953,13 +21410,13 @@ GL_PREFIX(VertexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4448(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4448(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20973,7 +21430,7 @@ GL_PREFIX(VertexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4448(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexPointerEXT), .-GL_PREFIX(VertexPointerEXT) @@ -20984,7 +21441,7 @@ GL_PREFIX(VertexPointerEXT): GL_PREFIX(PointParameterfEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4456(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -20994,13 +21451,13 @@ GL_PREFIX(PointParameterfEXT): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4456(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4456(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -21010,7 +21467,7 @@ GL_PREFIX(PointParameterfEXT): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4456(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameterfEXT), .-GL_PREFIX(PointParameterfEXT) @@ -21021,7 +21478,7 @@ GL_PREFIX(PointParameterfEXT): GL_PREFIX(PointParameterfvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4464(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21031,13 +21488,13 @@ GL_PREFIX(PointParameterfvEXT): popq %rbp popq %rsi popq %rdi - movq 4464(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4464(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21047,7 +21504,7 @@ GL_PREFIX(PointParameterfvEXT): popq %rbp popq %rsi popq %rdi - movq 4464(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameterfvEXT), .-GL_PREFIX(PointParameterfvEXT) @@ -21058,7 +21515,7 @@ GL_PREFIX(PointParameterfvEXT): GL_PREFIX(LockArraysEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4472(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21068,13 +21525,13 @@ GL_PREFIX(LockArraysEXT): popq %rbp popq %rsi popq %rdi - movq 4472(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4472(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21084,7 +21541,7 @@ GL_PREFIX(LockArraysEXT): popq %rbp popq %rsi popq %rdi - movq 4472(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LockArraysEXT), .-GL_PREFIX(LockArraysEXT) @@ -21095,37 +21552,37 @@ GL_PREFIX(LockArraysEXT): GL_PREFIX(UnlockArraysEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4480(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4480(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4480(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4480(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UnlockArraysEXT), .-GL_PREFIX(UnlockArraysEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_561) - .type GL_PREFIX(_dispatch_stub_561), @function - HIDDEN(GL_PREFIX(_dispatch_stub_561)) -GL_PREFIX(_dispatch_stub_561): + .globl GL_PREFIX(_dispatch_stub_574) + .type GL_PREFIX(_dispatch_stub_574), @function + HIDDEN(GL_PREFIX(_dispatch_stub_574)) +GL_PREFIX(_dispatch_stub_574): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4488(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21135,13 +21592,13 @@ GL_PREFIX(_dispatch_stub_561): popq %rbp popq %rsi popq %rdi - movq 4488(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4488(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21151,19 +21608,19 @@ GL_PREFIX(_dispatch_stub_561): popq %rbp popq %rsi popq %rdi - movq 4488(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_561), .-GL_PREFIX(_dispatch_stub_561) + .size GL_PREFIX(_dispatch_stub_574), .-GL_PREFIX(_dispatch_stub_574) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_562) - .type GL_PREFIX(_dispatch_stub_562), @function - HIDDEN(GL_PREFIX(_dispatch_stub_562)) -GL_PREFIX(_dispatch_stub_562): + .globl GL_PREFIX(_dispatch_stub_575) + .type GL_PREFIX(_dispatch_stub_575), @function + HIDDEN(GL_PREFIX(_dispatch_stub_575)) +GL_PREFIX(_dispatch_stub_575): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4496(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21173,13 +21630,13 @@ GL_PREFIX(_dispatch_stub_562): popq %rbp popq %rsi popq %rdi - movq 4496(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4496(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21189,10 +21646,10 @@ GL_PREFIX(_dispatch_stub_562): popq %rbp popq %rsi popq %rdi - movq 4496(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_562), .-GL_PREFIX(_dispatch_stub_562) + .size GL_PREFIX(_dispatch_stub_575), .-GL_PREFIX(_dispatch_stub_575) .p2align 4,,15 .globl GL_PREFIX(SecondaryColor3bEXT) @@ -21200,7 +21657,7 @@ GL_PREFIX(_dispatch_stub_562): GL_PREFIX(SecondaryColor3bEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4504(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21210,13 +21667,13 @@ GL_PREFIX(SecondaryColor3bEXT): popq %rdx popq %rsi popq %rdi - movq 4504(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4504(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21226,7 +21683,7 @@ GL_PREFIX(SecondaryColor3bEXT): popq %rdx popq %rsi popq %rdi - movq 4504(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3bEXT), .-GL_PREFIX(SecondaryColor3bEXT) @@ -21237,25 +21694,25 @@ GL_PREFIX(SecondaryColor3bEXT): GL_PREFIX(SecondaryColor3bvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4512(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4512(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4512(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4512(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3bvEXT), .-GL_PREFIX(SecondaryColor3bvEXT) @@ -21266,7 +21723,7 @@ GL_PREFIX(SecondaryColor3bvEXT): GL_PREFIX(SecondaryColor3dEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4520(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -21278,13 +21735,13 @@ GL_PREFIX(SecondaryColor3dEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4520(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4520(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -21296,7 +21753,7 @@ GL_PREFIX(SecondaryColor3dEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4520(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3dEXT), .-GL_PREFIX(SecondaryColor3dEXT) @@ -21307,25 +21764,25 @@ GL_PREFIX(SecondaryColor3dEXT): GL_PREFIX(SecondaryColor3dvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4528(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4528(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4528(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4528(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3dvEXT), .-GL_PREFIX(SecondaryColor3dvEXT) @@ -21336,7 +21793,7 @@ GL_PREFIX(SecondaryColor3dvEXT): GL_PREFIX(SecondaryColor3fEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4536(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -21348,13 +21805,13 @@ GL_PREFIX(SecondaryColor3fEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4536(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4536(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -21366,7 +21823,7 @@ GL_PREFIX(SecondaryColor3fEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4536(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3fEXT), .-GL_PREFIX(SecondaryColor3fEXT) @@ -21377,25 +21834,25 @@ GL_PREFIX(SecondaryColor3fEXT): GL_PREFIX(SecondaryColor3fvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4544(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4544(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4544(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4544(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3fvEXT), .-GL_PREFIX(SecondaryColor3fvEXT) @@ -21406,7 +21863,7 @@ GL_PREFIX(SecondaryColor3fvEXT): GL_PREFIX(SecondaryColor3iEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4552(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21416,13 +21873,13 @@ GL_PREFIX(SecondaryColor3iEXT): popq %rdx popq %rsi popq %rdi - movq 4552(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4552(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21432,7 +21889,7 @@ GL_PREFIX(SecondaryColor3iEXT): popq %rdx popq %rsi popq %rdi - movq 4552(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3iEXT), .-GL_PREFIX(SecondaryColor3iEXT) @@ -21443,25 +21900,25 @@ GL_PREFIX(SecondaryColor3iEXT): GL_PREFIX(SecondaryColor3ivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4560(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4560(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4560(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4560(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3ivEXT), .-GL_PREFIX(SecondaryColor3ivEXT) @@ -21472,7 +21929,7 @@ GL_PREFIX(SecondaryColor3ivEXT): GL_PREFIX(SecondaryColor3sEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4568(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21482,13 +21939,13 @@ GL_PREFIX(SecondaryColor3sEXT): popq %rdx popq %rsi popq %rdi - movq 4568(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4568(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21498,7 +21955,7 @@ GL_PREFIX(SecondaryColor3sEXT): popq %rdx popq %rsi popq %rdi - movq 4568(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3sEXT), .-GL_PREFIX(SecondaryColor3sEXT) @@ -21509,25 +21966,25 @@ GL_PREFIX(SecondaryColor3sEXT): GL_PREFIX(SecondaryColor3svEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4576(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4576(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4576(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4576(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3svEXT), .-GL_PREFIX(SecondaryColor3svEXT) @@ -21538,7 +21995,7 @@ GL_PREFIX(SecondaryColor3svEXT): GL_PREFIX(SecondaryColor3ubEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4584(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21548,13 +22005,13 @@ GL_PREFIX(SecondaryColor3ubEXT): popq %rdx popq %rsi popq %rdi - movq 4584(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4584(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21564,7 +22021,7 @@ GL_PREFIX(SecondaryColor3ubEXT): popq %rdx popq %rsi popq %rdi - movq 4584(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3ubEXT), .-GL_PREFIX(SecondaryColor3ubEXT) @@ -21575,25 +22032,25 @@ GL_PREFIX(SecondaryColor3ubEXT): GL_PREFIX(SecondaryColor3ubvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4592(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4592(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4592(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4592(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3ubvEXT), .-GL_PREFIX(SecondaryColor3ubvEXT) @@ -21604,7 +22061,7 @@ GL_PREFIX(SecondaryColor3ubvEXT): GL_PREFIX(SecondaryColor3uiEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4600(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21614,13 +22071,13 @@ GL_PREFIX(SecondaryColor3uiEXT): popq %rdx popq %rsi popq %rdi - movq 4600(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4600(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21630,7 +22087,7 @@ GL_PREFIX(SecondaryColor3uiEXT): popq %rdx popq %rsi popq %rdi - movq 4600(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3uiEXT), .-GL_PREFIX(SecondaryColor3uiEXT) @@ -21641,25 +22098,25 @@ GL_PREFIX(SecondaryColor3uiEXT): GL_PREFIX(SecondaryColor3uivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4608(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4608(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4608(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4608(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3uivEXT), .-GL_PREFIX(SecondaryColor3uivEXT) @@ -21670,7 +22127,7 @@ GL_PREFIX(SecondaryColor3uivEXT): GL_PREFIX(SecondaryColor3usEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4616(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21680,13 +22137,13 @@ GL_PREFIX(SecondaryColor3usEXT): popq %rdx popq %rsi popq %rdi - movq 4616(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4616(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21696,7 +22153,7 @@ GL_PREFIX(SecondaryColor3usEXT): popq %rdx popq %rsi popq %rdi - movq 4616(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3usEXT), .-GL_PREFIX(SecondaryColor3usEXT) @@ -21707,25 +22164,25 @@ GL_PREFIX(SecondaryColor3usEXT): GL_PREFIX(SecondaryColor3usvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4624(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4624(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4624(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4624(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3usvEXT), .-GL_PREFIX(SecondaryColor3usvEXT) @@ -21736,7 +22193,7 @@ GL_PREFIX(SecondaryColor3usvEXT): GL_PREFIX(SecondaryColorPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4632(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21750,13 +22207,13 @@ GL_PREFIX(SecondaryColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4632(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4632(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21770,7 +22227,7 @@ GL_PREFIX(SecondaryColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4632(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColorPointerEXT), .-GL_PREFIX(SecondaryColorPointerEXT) @@ -21781,7 +22238,7 @@ GL_PREFIX(SecondaryColorPointerEXT): GL_PREFIX(MultiDrawArraysEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4640(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21795,13 +22252,13 @@ GL_PREFIX(MultiDrawArraysEXT): popq %rdx popq %rsi popq %rdi - movq 4640(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4640(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21815,7 +22272,7 @@ GL_PREFIX(MultiDrawArraysEXT): popq %rdx popq %rsi popq %rdi - movq 4640(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultiDrawArraysEXT), .-GL_PREFIX(MultiDrawArraysEXT) @@ -21826,7 +22283,7 @@ GL_PREFIX(MultiDrawArraysEXT): GL_PREFIX(MultiDrawElementsEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4648(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21840,13 +22297,13 @@ GL_PREFIX(MultiDrawElementsEXT): popq %rdx popq %rsi popq %rdi - movq 4648(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4648(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21860,7 +22317,7 @@ GL_PREFIX(MultiDrawElementsEXT): popq %rdx popq %rsi popq %rdi - movq 4648(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultiDrawElementsEXT), .-GL_PREFIX(MultiDrawElementsEXT) @@ -21871,7 +22328,7 @@ GL_PREFIX(MultiDrawElementsEXT): GL_PREFIX(FogCoordPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4656(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21881,13 +22338,13 @@ GL_PREFIX(FogCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4656(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4656(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21897,7 +22354,7 @@ GL_PREFIX(FogCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4656(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoordPointerEXT), .-GL_PREFIX(FogCoordPointerEXT) @@ -21908,7 +22365,7 @@ GL_PREFIX(FogCoordPointerEXT): GL_PREFIX(FogCoorddEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4664(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $8, %rsp @@ -21916,13 +22373,13 @@ GL_PREFIX(FogCoorddEXT): call _x86_64_get_dispatch@PLT movq (%rsp), %xmm0 addq $8, %rsp - movq 4664(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4664(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 1: subq $8, %rsp @@ -21930,7 +22387,7 @@ GL_PREFIX(FogCoorddEXT): call _glapi_get_dispatch movq (%rsp), %xmm0 addq $8, %rsp - movq 4664(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoorddEXT), .-GL_PREFIX(FogCoorddEXT) @@ -21941,25 +22398,25 @@ GL_PREFIX(FogCoorddEXT): GL_PREFIX(FogCoorddvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4672(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4672(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4672(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4672(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoorddvEXT), .-GL_PREFIX(FogCoorddvEXT) @@ -21970,7 +22427,7 @@ GL_PREFIX(FogCoorddvEXT): GL_PREFIX(FogCoordfEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4680(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $8, %rsp @@ -21978,13 +22435,13 @@ GL_PREFIX(FogCoordfEXT): call _x86_64_get_dispatch@PLT movq (%rsp), %xmm0 addq $8, %rsp - movq 4680(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4680(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 1: subq $8, %rsp @@ -21992,7 +22449,7 @@ GL_PREFIX(FogCoordfEXT): call _glapi_get_dispatch movq (%rsp), %xmm0 addq $8, %rsp - movq 4680(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoordfEXT), .-GL_PREFIX(FogCoordfEXT) @@ -22003,58 +22460,58 @@ GL_PREFIX(FogCoordfEXT): GL_PREFIX(FogCoordfvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4688(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4688(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4688(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4688(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoordfvEXT), .-GL_PREFIX(FogCoordfvEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_587) - .type GL_PREFIX(_dispatch_stub_587), @function - HIDDEN(GL_PREFIX(_dispatch_stub_587)) -GL_PREFIX(_dispatch_stub_587): + .globl GL_PREFIX(_dispatch_stub_600) + .type GL_PREFIX(_dispatch_stub_600), @function + HIDDEN(GL_PREFIX(_dispatch_stub_600)) +GL_PREFIX(_dispatch_stub_600): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4696(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4696(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4696(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4696(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_587), .-GL_PREFIX(_dispatch_stub_587) + .size GL_PREFIX(_dispatch_stub_600), .-GL_PREFIX(_dispatch_stub_600) .p2align 4,,15 .globl GL_PREFIX(BlendFuncSeparateEXT) @@ -22062,7 +22519,7 @@ GL_PREFIX(_dispatch_stub_587): GL_PREFIX(BlendFuncSeparateEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4704(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22076,13 +22533,13 @@ GL_PREFIX(BlendFuncSeparateEXT): popq %rdx popq %rsi popq %rdi - movq 4704(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4704(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22096,7 +22553,7 @@ GL_PREFIX(BlendFuncSeparateEXT): popq %rdx popq %rsi popq %rdi - movq 4704(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BlendFuncSeparateEXT), .-GL_PREFIX(BlendFuncSeparateEXT) @@ -22107,25 +22564,25 @@ GL_PREFIX(BlendFuncSeparateEXT): GL_PREFIX(FlushVertexArrayRangeNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4712(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4712(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4712(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4712(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FlushVertexArrayRangeNV), .-GL_PREFIX(FlushVertexArrayRangeNV) @@ -22136,7 +22593,7 @@ GL_PREFIX(FlushVertexArrayRangeNV): GL_PREFIX(VertexArrayRangeNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4720(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22146,13 +22603,13 @@ GL_PREFIX(VertexArrayRangeNV): popq %rbp popq %rsi popq %rdi - movq 4720(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4720(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22162,7 +22619,7 @@ GL_PREFIX(VertexArrayRangeNV): popq %rbp popq %rsi popq %rdi - movq 4720(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexArrayRangeNV), .-GL_PREFIX(VertexArrayRangeNV) @@ -22173,7 +22630,7 @@ GL_PREFIX(VertexArrayRangeNV): GL_PREFIX(CombinerInputNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4728(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22191,13 +22648,13 @@ GL_PREFIX(CombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4728(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4728(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22215,7 +22672,7 @@ GL_PREFIX(CombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4728(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerInputNV), .-GL_PREFIX(CombinerInputNV) @@ -22226,7 +22683,7 @@ GL_PREFIX(CombinerInputNV): GL_PREFIX(CombinerOutputNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4736(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22244,13 +22701,13 @@ GL_PREFIX(CombinerOutputNV): popq %rdx popq %rsi popq %rdi - movq 4736(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4736(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22268,7 +22725,7 @@ GL_PREFIX(CombinerOutputNV): popq %rdx popq %rsi popq %rdi - movq 4736(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerOutputNV), .-GL_PREFIX(CombinerOutputNV) @@ -22279,7 +22736,7 @@ GL_PREFIX(CombinerOutputNV): GL_PREFIX(CombinerParameterfNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4744(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -22289,13 +22746,13 @@ GL_PREFIX(CombinerParameterfNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4744(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4744(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -22305,7 +22762,7 @@ GL_PREFIX(CombinerParameterfNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4744(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameterfNV), .-GL_PREFIX(CombinerParameterfNV) @@ -22316,7 +22773,7 @@ GL_PREFIX(CombinerParameterfNV): GL_PREFIX(CombinerParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4752(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22326,13 +22783,13 @@ GL_PREFIX(CombinerParameterfvNV): popq %rbp popq %rsi popq %rdi - movq 4752(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4752(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22342,7 +22799,7 @@ GL_PREFIX(CombinerParameterfvNV): popq %rbp popq %rsi popq %rdi - movq 4752(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameterfvNV), .-GL_PREFIX(CombinerParameterfvNV) @@ -22353,7 +22810,7 @@ GL_PREFIX(CombinerParameterfvNV): GL_PREFIX(CombinerParameteriNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4760(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22363,13 +22820,13 @@ GL_PREFIX(CombinerParameteriNV): popq %rbp popq %rsi popq %rdi - movq 4760(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4760(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22379,7 +22836,7 @@ GL_PREFIX(CombinerParameteriNV): popq %rbp popq %rsi popq %rdi - movq 4760(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameteriNV), .-GL_PREFIX(CombinerParameteriNV) @@ -22390,7 +22847,7 @@ GL_PREFIX(CombinerParameteriNV): GL_PREFIX(CombinerParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4768(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22400,13 +22857,13 @@ GL_PREFIX(CombinerParameterivNV): popq %rbp popq %rsi popq %rdi - movq 4768(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4768(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22416,7 +22873,7 @@ GL_PREFIX(CombinerParameterivNV): popq %rbp popq %rsi popq %rdi - movq 4768(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameterivNV), .-GL_PREFIX(CombinerParameterivNV) @@ -22427,7 +22884,7 @@ GL_PREFIX(CombinerParameterivNV): GL_PREFIX(FinalCombinerInputNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4776(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22441,13 +22898,13 @@ GL_PREFIX(FinalCombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4776(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4776(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22461,7 +22918,7 @@ GL_PREFIX(FinalCombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4776(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FinalCombinerInputNV), .-GL_PREFIX(FinalCombinerInputNV) @@ -22472,7 +22929,7 @@ GL_PREFIX(FinalCombinerInputNV): GL_PREFIX(GetCombinerInputParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4784(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22486,13 +22943,13 @@ GL_PREFIX(GetCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4784(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4784(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22506,7 +22963,7 @@ GL_PREFIX(GetCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4784(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerInputParameterfvNV), .-GL_PREFIX(GetCombinerInputParameterfvNV) @@ -22517,7 +22974,7 @@ GL_PREFIX(GetCombinerInputParameterfvNV): GL_PREFIX(GetCombinerInputParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4792(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22531,13 +22988,13 @@ GL_PREFIX(GetCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4792(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4792(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22551,7 +23008,7 @@ GL_PREFIX(GetCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4792(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerInputParameterivNV), .-GL_PREFIX(GetCombinerInputParameterivNV) @@ -22562,7 +23019,7 @@ GL_PREFIX(GetCombinerInputParameterivNV): GL_PREFIX(GetCombinerOutputParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4800(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22576,13 +23033,13 @@ GL_PREFIX(GetCombinerOutputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4800(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4800(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22596,7 +23053,7 @@ GL_PREFIX(GetCombinerOutputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4800(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerOutputParameterfvNV), .-GL_PREFIX(GetCombinerOutputParameterfvNV) @@ -22607,7 +23064,7 @@ GL_PREFIX(GetCombinerOutputParameterfvNV): GL_PREFIX(GetCombinerOutputParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4808(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22621,13 +23078,13 @@ GL_PREFIX(GetCombinerOutputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4808(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4808(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22641,7 +23098,7 @@ GL_PREFIX(GetCombinerOutputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4808(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerOutputParameterivNV), .-GL_PREFIX(GetCombinerOutputParameterivNV) @@ -22652,7 +23109,7 @@ GL_PREFIX(GetCombinerOutputParameterivNV): GL_PREFIX(GetFinalCombinerInputParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4816(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22662,13 +23119,13 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4816(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4816(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22678,7 +23135,7 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4816(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetFinalCombinerInputParameterfvNV), .-GL_PREFIX(GetFinalCombinerInputParameterfvNV) @@ -22689,7 +23146,7 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV): GL_PREFIX(GetFinalCombinerInputParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4824(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22699,13 +23156,13 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4824(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4824(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22715,7 +23172,7 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4824(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetFinalCombinerInputParameterivNV), .-GL_PREFIX(GetFinalCombinerInputParameterivNV) @@ -22726,25 +23183,25 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV): GL_PREFIX(ResizeBuffersMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4832(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4832(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4832(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4832(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ResizeBuffersMESA), .-GL_PREFIX(ResizeBuffersMESA) @@ -22755,7 +23212,7 @@ GL_PREFIX(ResizeBuffersMESA): GL_PREFIX(WindowPos2dMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4840(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -22765,13 +23222,13 @@ GL_PREFIX(WindowPos2dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4840(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4840(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -22781,7 +23238,7 @@ GL_PREFIX(WindowPos2dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4840(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2dMESA), .-GL_PREFIX(WindowPos2dMESA) @@ -22792,25 +23249,25 @@ GL_PREFIX(WindowPos2dMESA): GL_PREFIX(WindowPos2dvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4848(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4848(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4848(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4848(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2dvMESA), .-GL_PREFIX(WindowPos2dvMESA) @@ -22821,7 +23278,7 @@ GL_PREFIX(WindowPos2dvMESA): GL_PREFIX(WindowPos2fMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4856(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -22831,13 +23288,13 @@ GL_PREFIX(WindowPos2fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4856(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4856(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -22847,7 +23304,7 @@ GL_PREFIX(WindowPos2fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4856(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2fMESA), .-GL_PREFIX(WindowPos2fMESA) @@ -22858,25 +23315,25 @@ GL_PREFIX(WindowPos2fMESA): GL_PREFIX(WindowPos2fvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4864(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4864(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4864(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4864(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2fvMESA), .-GL_PREFIX(WindowPos2fvMESA) @@ -22887,7 +23344,7 @@ GL_PREFIX(WindowPos2fvMESA): GL_PREFIX(WindowPos2iMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4872(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22897,13 +23354,13 @@ GL_PREFIX(WindowPos2iMESA): popq %rbp popq %rsi popq %rdi - movq 4872(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4872(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22913,7 +23370,7 @@ GL_PREFIX(WindowPos2iMESA): popq %rbp popq %rsi popq %rdi - movq 4872(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2iMESA), .-GL_PREFIX(WindowPos2iMESA) @@ -22924,25 +23381,25 @@ GL_PREFIX(WindowPos2iMESA): GL_PREFIX(WindowPos2ivMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4880(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4880(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4880(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4880(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2ivMESA), .-GL_PREFIX(WindowPos2ivMESA) @@ -22953,7 +23410,7 @@ GL_PREFIX(WindowPos2ivMESA): GL_PREFIX(WindowPos2sMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4888(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22963,13 +23420,13 @@ GL_PREFIX(WindowPos2sMESA): popq %rbp popq %rsi popq %rdi - movq 4888(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4888(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22979,7 +23436,7 @@ GL_PREFIX(WindowPos2sMESA): popq %rbp popq %rsi popq %rdi - movq 4888(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2sMESA), .-GL_PREFIX(WindowPos2sMESA) @@ -22990,25 +23447,25 @@ GL_PREFIX(WindowPos2sMESA): GL_PREFIX(WindowPos2svMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4896(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4896(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4896(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4896(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2svMESA), .-GL_PREFIX(WindowPos2svMESA) @@ -23019,7 +23476,7 @@ GL_PREFIX(WindowPos2svMESA): GL_PREFIX(WindowPos3dMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4904(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -23031,13 +23488,13 @@ GL_PREFIX(WindowPos3dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4904(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4904(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -23049,7 +23506,7 @@ GL_PREFIX(WindowPos3dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4904(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3dMESA), .-GL_PREFIX(WindowPos3dMESA) @@ -23060,25 +23517,25 @@ GL_PREFIX(WindowPos3dMESA): GL_PREFIX(WindowPos3dvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4912(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4912(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4912(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4912(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3dvMESA), .-GL_PREFIX(WindowPos3dvMESA) @@ -23089,7 +23546,7 @@ GL_PREFIX(WindowPos3dvMESA): GL_PREFIX(WindowPos3fMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4920(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -23101,13 +23558,13 @@ GL_PREFIX(WindowPos3fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4920(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4920(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -23119,7 +23576,7 @@ GL_PREFIX(WindowPos3fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4920(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3fMESA), .-GL_PREFIX(WindowPos3fMESA) @@ -23130,25 +23587,25 @@ GL_PREFIX(WindowPos3fMESA): GL_PREFIX(WindowPos3fvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4928(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4928(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4928(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4928(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3fvMESA), .-GL_PREFIX(WindowPos3fvMESA) @@ -23159,7 +23616,7 @@ GL_PREFIX(WindowPos3fvMESA): GL_PREFIX(WindowPos3iMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4936(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23169,13 +23626,13 @@ GL_PREFIX(WindowPos3iMESA): popq %rdx popq %rsi popq %rdi - movq 4936(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4936(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23185,7 +23642,7 @@ GL_PREFIX(WindowPos3iMESA): popq %rdx popq %rsi popq %rdi - movq 4936(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3iMESA), .-GL_PREFIX(WindowPos3iMESA) @@ -23196,25 +23653,25 @@ GL_PREFIX(WindowPos3iMESA): GL_PREFIX(WindowPos3ivMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4944(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4944(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4944(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4944(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3ivMESA), .-GL_PREFIX(WindowPos3ivMESA) @@ -23225,7 +23682,7 @@ GL_PREFIX(WindowPos3ivMESA): GL_PREFIX(WindowPos3sMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4952(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23235,13 +23692,13 @@ GL_PREFIX(WindowPos3sMESA): popq %rdx popq %rsi popq %rdi - movq 4952(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4952(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23251,7 +23708,7 @@ GL_PREFIX(WindowPos3sMESA): popq %rdx popq %rsi popq %rdi - movq 4952(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3sMESA), .-GL_PREFIX(WindowPos3sMESA) @@ -23262,25 +23719,25 @@ GL_PREFIX(WindowPos3sMESA): GL_PREFIX(WindowPos3svMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4960(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4960(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4960(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4960(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3svMESA), .-GL_PREFIX(WindowPos3svMESA) @@ -23291,7 +23748,7 @@ GL_PREFIX(WindowPos3svMESA): GL_PREFIX(WindowPos4dMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4968(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -23305,13 +23762,13 @@ GL_PREFIX(WindowPos4dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 4968(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4968(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -23325,7 +23782,7 @@ GL_PREFIX(WindowPos4dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 4968(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4dMESA), .-GL_PREFIX(WindowPos4dMESA) @@ -23336,25 +23793,25 @@ GL_PREFIX(WindowPos4dMESA): GL_PREFIX(WindowPos4dvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4976(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4976(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4976(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4976(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4dvMESA), .-GL_PREFIX(WindowPos4dvMESA) @@ -23365,7 +23822,7 @@ GL_PREFIX(WindowPos4dvMESA): GL_PREFIX(WindowPos4fMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4984(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -23379,13 +23836,13 @@ GL_PREFIX(WindowPos4fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 4984(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4984(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -23399,7 +23856,7 @@ GL_PREFIX(WindowPos4fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 4984(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4fMESA), .-GL_PREFIX(WindowPos4fMESA) @@ -23410,25 +23867,25 @@ GL_PREFIX(WindowPos4fMESA): GL_PREFIX(WindowPos4fvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4992(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4992(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4992(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4992(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4fvMESA), .-GL_PREFIX(WindowPos4fvMESA) @@ -23439,7 +23896,7 @@ GL_PREFIX(WindowPos4fvMESA): GL_PREFIX(WindowPos4iMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5000(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23453,13 +23910,13 @@ GL_PREFIX(WindowPos4iMESA): popq %rdx popq %rsi popq %rdi - movq 5000(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5000(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23473,7 +23930,7 @@ GL_PREFIX(WindowPos4iMESA): popq %rdx popq %rsi popq %rdi - movq 5000(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4iMESA), .-GL_PREFIX(WindowPos4iMESA) @@ -23484,25 +23941,25 @@ GL_PREFIX(WindowPos4iMESA): GL_PREFIX(WindowPos4ivMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5008(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5008(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5008(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5008(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4ivMESA), .-GL_PREFIX(WindowPos4ivMESA) @@ -23513,7 +23970,7 @@ GL_PREFIX(WindowPos4ivMESA): GL_PREFIX(WindowPos4sMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5016(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23527,13 +23984,13 @@ GL_PREFIX(WindowPos4sMESA): popq %rdx popq %rsi popq %rdi - movq 5016(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5016(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23547,7 +24004,7 @@ GL_PREFIX(WindowPos4sMESA): popq %rdx popq %rsi popq %rdi - movq 5016(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4sMESA), .-GL_PREFIX(WindowPos4sMESA) @@ -23558,37 +24015,37 @@ GL_PREFIX(WindowPos4sMESA): GL_PREFIX(WindowPos4svMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5024(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5024(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5024(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5024(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4svMESA), .-GL_PREFIX(WindowPos4svMESA) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_629) - .type GL_PREFIX(_dispatch_stub_629), @function - HIDDEN(GL_PREFIX(_dispatch_stub_629)) -GL_PREFIX(_dispatch_stub_629): + .globl GL_PREFIX(_dispatch_stub_642) + .type GL_PREFIX(_dispatch_stub_642), @function + HIDDEN(GL_PREFIX(_dispatch_stub_642)) +GL_PREFIX(_dispatch_stub_642): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5032(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23602,13 +24059,13 @@ GL_PREFIX(_dispatch_stub_629): popq %rdx popq %rsi popq %rdi - movq 5032(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5032(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23622,19 +24079,19 @@ GL_PREFIX(_dispatch_stub_629): popq %rdx popq %rsi popq %rdi - movq 5032(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_629), .-GL_PREFIX(_dispatch_stub_629) + .size GL_PREFIX(_dispatch_stub_642), .-GL_PREFIX(_dispatch_stub_642) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_630) - .type GL_PREFIX(_dispatch_stub_630), @function - HIDDEN(GL_PREFIX(_dispatch_stub_630)) -GL_PREFIX(_dispatch_stub_630): + .globl GL_PREFIX(_dispatch_stub_643) + .type GL_PREFIX(_dispatch_stub_643), @function + HIDDEN(GL_PREFIX(_dispatch_stub_643)) +GL_PREFIX(_dispatch_stub_643): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5040(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23652,13 +24109,13 @@ GL_PREFIX(_dispatch_stub_630): popq %rdx popq %rsi popq %rdi - movq 5040(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5040(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23676,19 +24133,19 @@ GL_PREFIX(_dispatch_stub_630): popq %rdx popq %rsi popq %rdi - movq 5040(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_630), .-GL_PREFIX(_dispatch_stub_630) + .size GL_PREFIX(_dispatch_stub_643), .-GL_PREFIX(_dispatch_stub_643) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_631) - .type GL_PREFIX(_dispatch_stub_631), @function - HIDDEN(GL_PREFIX(_dispatch_stub_631)) -GL_PREFIX(_dispatch_stub_631): + .globl GL_PREFIX(_dispatch_stub_644) + .type GL_PREFIX(_dispatch_stub_644), @function + HIDDEN(GL_PREFIX(_dispatch_stub_644)) +GL_PREFIX(_dispatch_stub_644): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5048(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23698,13 +24155,13 @@ GL_PREFIX(_dispatch_stub_631): popq %rbp popq %rsi popq %rdi - movq 5048(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5048(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23714,49 +24171,49 @@ GL_PREFIX(_dispatch_stub_631): popq %rbp popq %rsi popq %rdi - movq 5048(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_631), .-GL_PREFIX(_dispatch_stub_631) + .size GL_PREFIX(_dispatch_stub_644), .-GL_PREFIX(_dispatch_stub_644) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_632) - .type GL_PREFIX(_dispatch_stub_632), @function - HIDDEN(GL_PREFIX(_dispatch_stub_632)) -GL_PREFIX(_dispatch_stub_632): + .globl GL_PREFIX(_dispatch_stub_645) + .type GL_PREFIX(_dispatch_stub_645), @function + HIDDEN(GL_PREFIX(_dispatch_stub_645)) +GL_PREFIX(_dispatch_stub_645): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5056(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5056(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5056(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5056(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_632), .-GL_PREFIX(_dispatch_stub_632) + .size GL_PREFIX(_dispatch_stub_645), .-GL_PREFIX(_dispatch_stub_645) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_633) - .type GL_PREFIX(_dispatch_stub_633), @function - HIDDEN(GL_PREFIX(_dispatch_stub_633)) -GL_PREFIX(_dispatch_stub_633): + .globl GL_PREFIX(_dispatch_stub_646) + .type GL_PREFIX(_dispatch_stub_646), @function + HIDDEN(GL_PREFIX(_dispatch_stub_646)) +GL_PREFIX(_dispatch_stub_646): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5064(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23766,13 +24223,13 @@ GL_PREFIX(_dispatch_stub_633): popq %rbp popq %rsi popq %rdi - movq 5064(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5064(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23782,19 +24239,19 @@ GL_PREFIX(_dispatch_stub_633): popq %rbp popq %rsi popq %rdi - movq 5064(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_633), .-GL_PREFIX(_dispatch_stub_633) + .size GL_PREFIX(_dispatch_stub_646), .-GL_PREFIX(_dispatch_stub_646) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_634) - .type GL_PREFIX(_dispatch_stub_634), @function - HIDDEN(GL_PREFIX(_dispatch_stub_634)) -GL_PREFIX(_dispatch_stub_634): + .globl GL_PREFIX(_dispatch_stub_647) + .type GL_PREFIX(_dispatch_stub_647), @function + HIDDEN(GL_PREFIX(_dispatch_stub_647)) +GL_PREFIX(_dispatch_stub_647): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5072(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23804,13 +24261,13 @@ GL_PREFIX(_dispatch_stub_634): popq %rdx popq %rsi popq %rdi - movq 5072(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5072(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23820,49 +24277,49 @@ GL_PREFIX(_dispatch_stub_634): popq %rdx popq %rsi popq %rdi - movq 5072(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_634), .-GL_PREFIX(_dispatch_stub_634) + .size GL_PREFIX(_dispatch_stub_647), .-GL_PREFIX(_dispatch_stub_647) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_635) - .type GL_PREFIX(_dispatch_stub_635), @function - HIDDEN(GL_PREFIX(_dispatch_stub_635)) -GL_PREFIX(_dispatch_stub_635): + .globl GL_PREFIX(_dispatch_stub_648) + .type GL_PREFIX(_dispatch_stub_648), @function + HIDDEN(GL_PREFIX(_dispatch_stub_648)) +GL_PREFIX(_dispatch_stub_648): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5080(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5080(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5080(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5080(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_635), .-GL_PREFIX(_dispatch_stub_635) + .size GL_PREFIX(_dispatch_stub_648), .-GL_PREFIX(_dispatch_stub_648) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_636) - .type GL_PREFIX(_dispatch_stub_636), @function - HIDDEN(GL_PREFIX(_dispatch_stub_636)) -GL_PREFIX(_dispatch_stub_636): + .globl GL_PREFIX(_dispatch_stub_649) + .type GL_PREFIX(_dispatch_stub_649), @function + HIDDEN(GL_PREFIX(_dispatch_stub_649)) +GL_PREFIX(_dispatch_stub_649): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5088(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23872,13 +24329,13 @@ GL_PREFIX(_dispatch_stub_636): popq %rbp popq %rsi popq %rdi - movq 5088(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5088(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23888,40 +24345,40 @@ GL_PREFIX(_dispatch_stub_636): popq %rbp popq %rsi popq %rdi - movq 5088(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_636), .-GL_PREFIX(_dispatch_stub_636) + .size GL_PREFIX(_dispatch_stub_649), .-GL_PREFIX(_dispatch_stub_649) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_637) - .type GL_PREFIX(_dispatch_stub_637), @function - HIDDEN(GL_PREFIX(_dispatch_stub_637)) -GL_PREFIX(_dispatch_stub_637): + .globl GL_PREFIX(_dispatch_stub_650) + .type GL_PREFIX(_dispatch_stub_650), @function + HIDDEN(GL_PREFIX(_dispatch_stub_650)) +GL_PREFIX(_dispatch_stub_650): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5096(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5096(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5096(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5096(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_637), .-GL_PREFIX(_dispatch_stub_637) + .size GL_PREFIX(_dispatch_stub_650), .-GL_PREFIX(_dispatch_stub_650) .p2align 4,,15 .globl GL_PREFIX(AreProgramsResidentNV) @@ -23929,7 +24386,7 @@ GL_PREFIX(_dispatch_stub_637): GL_PREFIX(AreProgramsResidentNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5104(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23939,13 +24396,13 @@ GL_PREFIX(AreProgramsResidentNV): popq %rdx popq %rsi popq %rdi - movq 5104(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5104(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23955,7 +24412,7 @@ GL_PREFIX(AreProgramsResidentNV): popq %rdx popq %rsi popq %rdi - movq 5104(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AreProgramsResidentNV), .-GL_PREFIX(AreProgramsResidentNV) @@ -23966,7 +24423,7 @@ GL_PREFIX(AreProgramsResidentNV): GL_PREFIX(BindProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5112(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23976,13 +24433,13 @@ GL_PREFIX(BindProgramNV): popq %rbp popq %rsi popq %rdi - movq 5112(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5112(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23992,7 +24449,7 @@ GL_PREFIX(BindProgramNV): popq %rbp popq %rsi popq %rdi - movq 5112(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindProgramNV), .-GL_PREFIX(BindProgramNV) @@ -24003,7 +24460,7 @@ GL_PREFIX(BindProgramNV): GL_PREFIX(DeleteProgramsNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5120(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24013,13 +24470,13 @@ GL_PREFIX(DeleteProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5120(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5120(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24029,7 +24486,7 @@ GL_PREFIX(DeleteProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5120(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteProgramsNV), .-GL_PREFIX(DeleteProgramsNV) @@ -24040,7 +24497,7 @@ GL_PREFIX(DeleteProgramsNV): GL_PREFIX(ExecuteProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5128(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24050,13 +24507,13 @@ GL_PREFIX(ExecuteProgramNV): popq %rdx popq %rsi popq %rdi - movq 5128(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5128(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24066,7 +24523,7 @@ GL_PREFIX(ExecuteProgramNV): popq %rdx popq %rsi popq %rdi - movq 5128(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ExecuteProgramNV), .-GL_PREFIX(ExecuteProgramNV) @@ -24077,7 +24534,7 @@ GL_PREFIX(ExecuteProgramNV): GL_PREFIX(GenProgramsNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5136(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24087,13 +24544,13 @@ GL_PREFIX(GenProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5136(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5136(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24103,7 +24560,7 @@ GL_PREFIX(GenProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5136(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenProgramsNV), .-GL_PREFIX(GenProgramsNV) @@ -24114,7 +24571,7 @@ GL_PREFIX(GenProgramsNV): GL_PREFIX(GetProgramParameterdvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5144(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24128,13 +24585,13 @@ GL_PREFIX(GetProgramParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5144(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5144(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24148,7 +24605,7 @@ GL_PREFIX(GetProgramParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5144(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramParameterdvNV), .-GL_PREFIX(GetProgramParameterdvNV) @@ -24159,7 +24616,7 @@ GL_PREFIX(GetProgramParameterdvNV): GL_PREFIX(GetProgramParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5152(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24173,13 +24630,13 @@ GL_PREFIX(GetProgramParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5152(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5152(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24193,7 +24650,7 @@ GL_PREFIX(GetProgramParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5152(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramParameterfvNV), .-GL_PREFIX(GetProgramParameterfvNV) @@ -24204,7 +24661,7 @@ GL_PREFIX(GetProgramParameterfvNV): GL_PREFIX(GetProgramStringNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5160(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24214,13 +24671,13 @@ GL_PREFIX(GetProgramStringNV): popq %rdx popq %rsi popq %rdi - movq 5160(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5160(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24230,7 +24687,7 @@ GL_PREFIX(GetProgramStringNV): popq %rdx popq %rsi popq %rdi - movq 5160(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramStringNV), .-GL_PREFIX(GetProgramStringNV) @@ -24241,7 +24698,7 @@ GL_PREFIX(GetProgramStringNV): GL_PREFIX(GetProgramivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5168(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24251,13 +24708,13 @@ GL_PREFIX(GetProgramivNV): popq %rdx popq %rsi popq %rdi - movq 5168(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5168(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24267,7 +24724,7 @@ GL_PREFIX(GetProgramivNV): popq %rdx popq %rsi popq %rdi - movq 5168(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramivNV), .-GL_PREFIX(GetProgramivNV) @@ -24278,7 +24735,7 @@ GL_PREFIX(GetProgramivNV): GL_PREFIX(GetTrackMatrixivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5176(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24292,13 +24749,13 @@ GL_PREFIX(GetTrackMatrixivNV): popq %rdx popq %rsi popq %rdi - movq 5176(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5176(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24312,7 +24769,7 @@ GL_PREFIX(GetTrackMatrixivNV): popq %rdx popq %rsi popq %rdi - movq 5176(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetTrackMatrixivNV), .-GL_PREFIX(GetTrackMatrixivNV) @@ -24323,7 +24780,7 @@ GL_PREFIX(GetTrackMatrixivNV): GL_PREFIX(GetVertexAttribPointervNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5184(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24333,13 +24790,13 @@ GL_PREFIX(GetVertexAttribPointervNV): popq %rdx popq %rsi popq %rdi - movq 5184(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5184(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24349,7 +24806,7 @@ GL_PREFIX(GetVertexAttribPointervNV): popq %rdx popq %rsi popq %rdi - movq 5184(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribPointervNV), .-GL_PREFIX(GetVertexAttribPointervNV) @@ -24360,7 +24817,7 @@ GL_PREFIX(GetVertexAttribPointervNV): GL_PREFIX(GetVertexAttribdvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5192(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24370,13 +24827,13 @@ GL_PREFIX(GetVertexAttribdvNV): popq %rdx popq %rsi popq %rdi - movq 5192(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5192(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24386,7 +24843,7 @@ GL_PREFIX(GetVertexAttribdvNV): popq %rdx popq %rsi popq %rdi - movq 5192(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribdvNV), .-GL_PREFIX(GetVertexAttribdvNV) @@ -24397,7 +24854,7 @@ GL_PREFIX(GetVertexAttribdvNV): GL_PREFIX(GetVertexAttribfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5200(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24407,13 +24864,13 @@ GL_PREFIX(GetVertexAttribfvNV): popq %rdx popq %rsi popq %rdi - movq 5200(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5200(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24423,7 +24880,7 @@ GL_PREFIX(GetVertexAttribfvNV): popq %rdx popq %rsi popq %rdi - movq 5200(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribfvNV), .-GL_PREFIX(GetVertexAttribfvNV) @@ -24434,7 +24891,7 @@ GL_PREFIX(GetVertexAttribfvNV): GL_PREFIX(GetVertexAttribivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5208(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24444,13 +24901,13 @@ GL_PREFIX(GetVertexAttribivNV): popq %rdx popq %rsi popq %rdi - movq 5208(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5208(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24460,7 +24917,7 @@ GL_PREFIX(GetVertexAttribivNV): popq %rdx popq %rsi popq %rdi - movq 5208(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribivNV), .-GL_PREFIX(GetVertexAttribivNV) @@ -24471,25 +24928,25 @@ GL_PREFIX(GetVertexAttribivNV): GL_PREFIX(IsProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5216(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5216(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5216(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5216(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsProgramNV), .-GL_PREFIX(IsProgramNV) @@ -24500,7 +24957,7 @@ GL_PREFIX(IsProgramNV): GL_PREFIX(LoadProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5224(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24514,13 +24971,13 @@ GL_PREFIX(LoadProgramNV): popq %rdx popq %rsi popq %rdi - movq 5224(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5224(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24534,7 +24991,7 @@ GL_PREFIX(LoadProgramNV): popq %rdx popq %rsi popq %rdi - movq 5224(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LoadProgramNV), .-GL_PREFIX(LoadProgramNV) @@ -24545,7 +25002,7 @@ GL_PREFIX(LoadProgramNV): GL_PREFIX(ProgramParameter4dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5232(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -24563,13 +25020,13 @@ GL_PREFIX(ProgramParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5232(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5232(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -24587,7 +25044,7 @@ GL_PREFIX(ProgramParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5232(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4dNV), .-GL_PREFIX(ProgramParameter4dNV) @@ -24598,7 +25055,7 @@ GL_PREFIX(ProgramParameter4dNV): GL_PREFIX(ProgramParameter4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5240(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24608,13 +25065,13 @@ GL_PREFIX(ProgramParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5240(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5240(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24624,7 +25081,7 @@ GL_PREFIX(ProgramParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5240(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4dvNV), .-GL_PREFIX(ProgramParameter4dvNV) @@ -24635,7 +25092,7 @@ GL_PREFIX(ProgramParameter4dvNV): GL_PREFIX(ProgramParameter4fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5248(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -24653,13 +25110,13 @@ GL_PREFIX(ProgramParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5248(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5248(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -24677,7 +25134,7 @@ GL_PREFIX(ProgramParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5248(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4fNV), .-GL_PREFIX(ProgramParameter4fNV) @@ -24688,7 +25145,7 @@ GL_PREFIX(ProgramParameter4fNV): GL_PREFIX(ProgramParameter4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5256(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24698,13 +25155,13 @@ GL_PREFIX(ProgramParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5256(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5256(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24714,7 +25171,7 @@ GL_PREFIX(ProgramParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5256(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4fvNV), .-GL_PREFIX(ProgramParameter4fvNV) @@ -24725,7 +25182,7 @@ GL_PREFIX(ProgramParameter4fvNV): GL_PREFIX(ProgramParameters4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5264(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24739,13 +25196,13 @@ GL_PREFIX(ProgramParameters4dvNV): popq %rdx popq %rsi popq %rdi - movq 5264(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5264(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24759,7 +25216,7 @@ GL_PREFIX(ProgramParameters4dvNV): popq %rdx popq %rsi popq %rdi - movq 5264(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameters4dvNV), .-GL_PREFIX(ProgramParameters4dvNV) @@ -24770,7 +25227,7 @@ GL_PREFIX(ProgramParameters4dvNV): GL_PREFIX(ProgramParameters4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5272(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24784,13 +25241,13 @@ GL_PREFIX(ProgramParameters4fvNV): popq %rdx popq %rsi popq %rdi - movq 5272(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5272(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24804,7 +25261,7 @@ GL_PREFIX(ProgramParameters4fvNV): popq %rdx popq %rsi popq %rdi - movq 5272(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameters4fvNV), .-GL_PREFIX(ProgramParameters4fvNV) @@ -24815,7 +25272,7 @@ GL_PREFIX(ProgramParameters4fvNV): GL_PREFIX(RequestResidentProgramsNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5280(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24825,13 +25282,13 @@ GL_PREFIX(RequestResidentProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5280(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5280(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24841,7 +25298,7 @@ GL_PREFIX(RequestResidentProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5280(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(RequestResidentProgramsNV), .-GL_PREFIX(RequestResidentProgramsNV) @@ -24852,7 +25309,7 @@ GL_PREFIX(RequestResidentProgramsNV): GL_PREFIX(TrackMatrixNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5288(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24866,13 +25323,13 @@ GL_PREFIX(TrackMatrixNV): popq %rdx popq %rsi popq %rdi - movq 5288(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5288(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24886,7 +25343,7 @@ GL_PREFIX(TrackMatrixNV): popq %rdx popq %rsi popq %rdi - movq 5288(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(TrackMatrixNV), .-GL_PREFIX(TrackMatrixNV) @@ -24897,7 +25354,7 @@ GL_PREFIX(TrackMatrixNV): GL_PREFIX(VertexAttrib1dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5296(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -24907,13 +25364,13 @@ GL_PREFIX(VertexAttrib1dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5296(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5296(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -24923,7 +25380,7 @@ GL_PREFIX(VertexAttrib1dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5296(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dNV), .-GL_PREFIX(VertexAttrib1dNV) @@ -24934,7 +25391,7 @@ GL_PREFIX(VertexAttrib1dNV): GL_PREFIX(VertexAttrib1dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5304(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24944,13 +25401,13 @@ GL_PREFIX(VertexAttrib1dvNV): popq %rbp popq %rsi popq %rdi - movq 5304(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5304(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24960,7 +25417,7 @@ GL_PREFIX(VertexAttrib1dvNV): popq %rbp popq %rsi popq %rdi - movq 5304(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dvNV), .-GL_PREFIX(VertexAttrib1dvNV) @@ -24971,7 +25428,7 @@ GL_PREFIX(VertexAttrib1dvNV): GL_PREFIX(VertexAttrib1fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5312(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -24981,13 +25438,13 @@ GL_PREFIX(VertexAttrib1fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5312(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5312(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -24997,7 +25454,7 @@ GL_PREFIX(VertexAttrib1fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5312(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fNV), .-GL_PREFIX(VertexAttrib1fNV) @@ -25008,7 +25465,7 @@ GL_PREFIX(VertexAttrib1fNV): GL_PREFIX(VertexAttrib1fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5320(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25018,13 +25475,13 @@ GL_PREFIX(VertexAttrib1fvNV): popq %rbp popq %rsi popq %rdi - movq 5320(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5320(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25034,7 +25491,7 @@ GL_PREFIX(VertexAttrib1fvNV): popq %rbp popq %rsi popq %rdi - movq 5320(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fvNV), .-GL_PREFIX(VertexAttrib1fvNV) @@ -25045,7 +25502,7 @@ GL_PREFIX(VertexAttrib1fvNV): GL_PREFIX(VertexAttrib1sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5328(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25055,13 +25512,13 @@ GL_PREFIX(VertexAttrib1sNV): popq %rbp popq %rsi popq %rdi - movq 5328(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5328(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25071,7 +25528,7 @@ GL_PREFIX(VertexAttrib1sNV): popq %rbp popq %rsi popq %rdi - movq 5328(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1sNV), .-GL_PREFIX(VertexAttrib1sNV) @@ -25082,7 +25539,7 @@ GL_PREFIX(VertexAttrib1sNV): GL_PREFIX(VertexAttrib1svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5336(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25092,13 +25549,13 @@ GL_PREFIX(VertexAttrib1svNV): popq %rbp popq %rsi popq %rdi - movq 5336(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5336(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25108,7 +25565,7 @@ GL_PREFIX(VertexAttrib1svNV): popq %rbp popq %rsi popq %rdi - movq 5336(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1svNV), .-GL_PREFIX(VertexAttrib1svNV) @@ -25119,7 +25576,7 @@ GL_PREFIX(VertexAttrib1svNV): GL_PREFIX(VertexAttrib2dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5344(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -25131,13 +25588,13 @@ GL_PREFIX(VertexAttrib2dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5344(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5344(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -25149,7 +25606,7 @@ GL_PREFIX(VertexAttrib2dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5344(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dNV), .-GL_PREFIX(VertexAttrib2dNV) @@ -25160,7 +25617,7 @@ GL_PREFIX(VertexAttrib2dNV): GL_PREFIX(VertexAttrib2dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5352(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25170,13 +25627,13 @@ GL_PREFIX(VertexAttrib2dvNV): popq %rbp popq %rsi popq %rdi - movq 5352(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5352(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25186,7 +25643,7 @@ GL_PREFIX(VertexAttrib2dvNV): popq %rbp popq %rsi popq %rdi - movq 5352(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dvNV), .-GL_PREFIX(VertexAttrib2dvNV) @@ -25197,7 +25654,7 @@ GL_PREFIX(VertexAttrib2dvNV): GL_PREFIX(VertexAttrib2fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5360(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -25209,13 +25666,13 @@ GL_PREFIX(VertexAttrib2fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5360(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5360(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -25227,7 +25684,7 @@ GL_PREFIX(VertexAttrib2fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5360(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fNV), .-GL_PREFIX(VertexAttrib2fNV) @@ -25238,7 +25695,7 @@ GL_PREFIX(VertexAttrib2fNV): GL_PREFIX(VertexAttrib2fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5368(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25248,13 +25705,13 @@ GL_PREFIX(VertexAttrib2fvNV): popq %rbp popq %rsi popq %rdi - movq 5368(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5368(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25264,7 +25721,7 @@ GL_PREFIX(VertexAttrib2fvNV): popq %rbp popq %rsi popq %rdi - movq 5368(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fvNV), .-GL_PREFIX(VertexAttrib2fvNV) @@ -25275,7 +25732,7 @@ GL_PREFIX(VertexAttrib2fvNV): GL_PREFIX(VertexAttrib2sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5376(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25285,13 +25742,13 @@ GL_PREFIX(VertexAttrib2sNV): popq %rdx popq %rsi popq %rdi - movq 5376(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5376(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25301,7 +25758,7 @@ GL_PREFIX(VertexAttrib2sNV): popq %rdx popq %rsi popq %rdi - movq 5376(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2sNV), .-GL_PREFIX(VertexAttrib2sNV) @@ -25312,7 +25769,7 @@ GL_PREFIX(VertexAttrib2sNV): GL_PREFIX(VertexAttrib2svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5384(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25322,13 +25779,13 @@ GL_PREFIX(VertexAttrib2svNV): popq %rbp popq %rsi popq %rdi - movq 5384(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5384(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25338,7 +25795,7 @@ GL_PREFIX(VertexAttrib2svNV): popq %rbp popq %rsi popq %rdi - movq 5384(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2svNV), .-GL_PREFIX(VertexAttrib2svNV) @@ -25349,7 +25806,7 @@ GL_PREFIX(VertexAttrib2svNV): GL_PREFIX(VertexAttrib3dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5392(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -25363,13 +25820,13 @@ GL_PREFIX(VertexAttrib3dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5392(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5392(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -25383,7 +25840,7 @@ GL_PREFIX(VertexAttrib3dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5392(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dNV), .-GL_PREFIX(VertexAttrib3dNV) @@ -25394,7 +25851,7 @@ GL_PREFIX(VertexAttrib3dNV): GL_PREFIX(VertexAttrib3dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5400(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25404,13 +25861,13 @@ GL_PREFIX(VertexAttrib3dvNV): popq %rbp popq %rsi popq %rdi - movq 5400(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5400(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25420,7 +25877,7 @@ GL_PREFIX(VertexAttrib3dvNV): popq %rbp popq %rsi popq %rdi - movq 5400(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dvNV), .-GL_PREFIX(VertexAttrib3dvNV) @@ -25431,7 +25888,7 @@ GL_PREFIX(VertexAttrib3dvNV): GL_PREFIX(VertexAttrib3fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5408(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -25445,13 +25902,13 @@ GL_PREFIX(VertexAttrib3fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5408(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5408(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -25465,7 +25922,7 @@ GL_PREFIX(VertexAttrib3fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5408(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fNV), .-GL_PREFIX(VertexAttrib3fNV) @@ -25476,7 +25933,7 @@ GL_PREFIX(VertexAttrib3fNV): GL_PREFIX(VertexAttrib3fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5416(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25486,13 +25943,13 @@ GL_PREFIX(VertexAttrib3fvNV): popq %rbp popq %rsi popq %rdi - movq 5416(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5416(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25502,7 +25959,7 @@ GL_PREFIX(VertexAttrib3fvNV): popq %rbp popq %rsi popq %rdi - movq 5416(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fvNV), .-GL_PREFIX(VertexAttrib3fvNV) @@ -25513,7 +25970,7 @@ GL_PREFIX(VertexAttrib3fvNV): GL_PREFIX(VertexAttrib3sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5424(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25527,13 +25984,13 @@ GL_PREFIX(VertexAttrib3sNV): popq %rdx popq %rsi popq %rdi - movq 5424(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5424(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25547,7 +26004,7 @@ GL_PREFIX(VertexAttrib3sNV): popq %rdx popq %rsi popq %rdi - movq 5424(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3sNV), .-GL_PREFIX(VertexAttrib3sNV) @@ -25558,7 +26015,7 @@ GL_PREFIX(VertexAttrib3sNV): GL_PREFIX(VertexAttrib3svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5432(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25568,13 +26025,13 @@ GL_PREFIX(VertexAttrib3svNV): popq %rbp popq %rsi popq %rdi - movq 5432(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5432(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25584,7 +26041,7 @@ GL_PREFIX(VertexAttrib3svNV): popq %rbp popq %rsi popq %rdi - movq 5432(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3svNV), .-GL_PREFIX(VertexAttrib3svNV) @@ -25595,7 +26052,7 @@ GL_PREFIX(VertexAttrib3svNV): GL_PREFIX(VertexAttrib4dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5440(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -25611,13 +26068,13 @@ GL_PREFIX(VertexAttrib4dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5440(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5440(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -25633,7 +26090,7 @@ GL_PREFIX(VertexAttrib4dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5440(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dNV), .-GL_PREFIX(VertexAttrib4dNV) @@ -25644,7 +26101,7 @@ GL_PREFIX(VertexAttrib4dNV): GL_PREFIX(VertexAttrib4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5448(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25654,13 +26111,13 @@ GL_PREFIX(VertexAttrib4dvNV): popq %rbp popq %rsi popq %rdi - movq 5448(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5448(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25670,7 +26127,7 @@ GL_PREFIX(VertexAttrib4dvNV): popq %rbp popq %rsi popq %rdi - movq 5448(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dvNV), .-GL_PREFIX(VertexAttrib4dvNV) @@ -25681,7 +26138,7 @@ GL_PREFIX(VertexAttrib4dvNV): GL_PREFIX(VertexAttrib4fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5456(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -25697,13 +26154,13 @@ GL_PREFIX(VertexAttrib4fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5456(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5456(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -25719,7 +26176,7 @@ GL_PREFIX(VertexAttrib4fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5456(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fNV), .-GL_PREFIX(VertexAttrib4fNV) @@ -25730,7 +26187,7 @@ GL_PREFIX(VertexAttrib4fNV): GL_PREFIX(VertexAttrib4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5464(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25740,13 +26197,13 @@ GL_PREFIX(VertexAttrib4fvNV): popq %rbp popq %rsi popq %rdi - movq 5464(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5464(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25756,7 +26213,7 @@ GL_PREFIX(VertexAttrib4fvNV): popq %rbp popq %rsi popq %rdi - movq 5464(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fvNV), .-GL_PREFIX(VertexAttrib4fvNV) @@ -25767,7 +26224,7 @@ GL_PREFIX(VertexAttrib4fvNV): GL_PREFIX(VertexAttrib4sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5472(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25781,13 +26238,13 @@ GL_PREFIX(VertexAttrib4sNV): popq %rdx popq %rsi popq %rdi - movq 5472(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5472(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25801,7 +26258,7 @@ GL_PREFIX(VertexAttrib4sNV): popq %rdx popq %rsi popq %rdi - movq 5472(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4sNV), .-GL_PREFIX(VertexAttrib4sNV) @@ -25812,7 +26269,7 @@ GL_PREFIX(VertexAttrib4sNV): GL_PREFIX(VertexAttrib4svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5480(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25822,13 +26279,13 @@ GL_PREFIX(VertexAttrib4svNV): popq %rbp popq %rsi popq %rdi - movq 5480(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5480(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25838,7 +26295,7 @@ GL_PREFIX(VertexAttrib4svNV): popq %rbp popq %rsi popq %rdi - movq 5480(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4svNV), .-GL_PREFIX(VertexAttrib4svNV) @@ -25849,7 +26306,7 @@ GL_PREFIX(VertexAttrib4svNV): GL_PREFIX(VertexAttrib4ubNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5488(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25863,13 +26320,13 @@ GL_PREFIX(VertexAttrib4ubNV): popq %rdx popq %rsi popq %rdi - movq 5488(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5488(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25883,7 +26340,7 @@ GL_PREFIX(VertexAttrib4ubNV): popq %rdx popq %rsi popq %rdi - movq 5488(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ubNV), .-GL_PREFIX(VertexAttrib4ubNV) @@ -25894,7 +26351,7 @@ GL_PREFIX(VertexAttrib4ubNV): GL_PREFIX(VertexAttrib4ubvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5496(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25904,13 +26361,13 @@ GL_PREFIX(VertexAttrib4ubvNV): popq %rbp popq %rsi popq %rdi - movq 5496(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5496(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25920,7 +26377,7 @@ GL_PREFIX(VertexAttrib4ubvNV): popq %rbp popq %rsi popq %rdi - movq 5496(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ubvNV), .-GL_PREFIX(VertexAttrib4ubvNV) @@ -25931,7 +26388,7 @@ GL_PREFIX(VertexAttrib4ubvNV): GL_PREFIX(VertexAttribPointerNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5504(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25945,13 +26402,13 @@ GL_PREFIX(VertexAttribPointerNV): popq %rdx popq %rsi popq %rdi - movq 5504(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5504(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25965,7 +26422,7 @@ GL_PREFIX(VertexAttribPointerNV): popq %rdx popq %rsi popq %rdi - movq 5504(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribPointerNV), .-GL_PREFIX(VertexAttribPointerNV) @@ -25976,7 +26433,7 @@ GL_PREFIX(VertexAttribPointerNV): GL_PREFIX(VertexAttribs1dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5512(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25986,13 +26443,13 @@ GL_PREFIX(VertexAttribs1dvNV): popq %rdx popq %rsi popq %rdi - movq 5512(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5512(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26002,7 +26459,7 @@ GL_PREFIX(VertexAttribs1dvNV): popq %rdx popq %rsi popq %rdi - movq 5512(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs1dvNV), .-GL_PREFIX(VertexAttribs1dvNV) @@ -26013,7 +26470,7 @@ GL_PREFIX(VertexAttribs1dvNV): GL_PREFIX(VertexAttribs1fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5520(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26023,13 +26480,13 @@ GL_PREFIX(VertexAttribs1fvNV): popq %rdx popq %rsi popq %rdi - movq 5520(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5520(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26039,7 +26496,7 @@ GL_PREFIX(VertexAttribs1fvNV): popq %rdx popq %rsi popq %rdi - movq 5520(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs1fvNV), .-GL_PREFIX(VertexAttribs1fvNV) @@ -26050,7 +26507,7 @@ GL_PREFIX(VertexAttribs1fvNV): GL_PREFIX(VertexAttribs1svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5528(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26060,13 +26517,13 @@ GL_PREFIX(VertexAttribs1svNV): popq %rdx popq %rsi popq %rdi - movq 5528(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5528(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26076,7 +26533,7 @@ GL_PREFIX(VertexAttribs1svNV): popq %rdx popq %rsi popq %rdi - movq 5528(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs1svNV), .-GL_PREFIX(VertexAttribs1svNV) @@ -26087,7 +26544,7 @@ GL_PREFIX(VertexAttribs1svNV): GL_PREFIX(VertexAttribs2dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5536(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26097,13 +26554,13 @@ GL_PREFIX(VertexAttribs2dvNV): popq %rdx popq %rsi popq %rdi - movq 5536(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5536(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26113,7 +26570,7 @@ GL_PREFIX(VertexAttribs2dvNV): popq %rdx popq %rsi popq %rdi - movq 5536(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs2dvNV), .-GL_PREFIX(VertexAttribs2dvNV) @@ -26124,7 +26581,7 @@ GL_PREFIX(VertexAttribs2dvNV): GL_PREFIX(VertexAttribs2fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5544(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26134,13 +26591,13 @@ GL_PREFIX(VertexAttribs2fvNV): popq %rdx popq %rsi popq %rdi - movq 5544(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5544(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26150,7 +26607,7 @@ GL_PREFIX(VertexAttribs2fvNV): popq %rdx popq %rsi popq %rdi - movq 5544(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs2fvNV), .-GL_PREFIX(VertexAttribs2fvNV) @@ -26161,7 +26618,7 @@ GL_PREFIX(VertexAttribs2fvNV): GL_PREFIX(VertexAttribs2svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5552(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26171,13 +26628,13 @@ GL_PREFIX(VertexAttribs2svNV): popq %rdx popq %rsi popq %rdi - movq 5552(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5552(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26187,7 +26644,7 @@ GL_PREFIX(VertexAttribs2svNV): popq %rdx popq %rsi popq %rdi - movq 5552(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs2svNV), .-GL_PREFIX(VertexAttribs2svNV) @@ -26198,7 +26655,7 @@ GL_PREFIX(VertexAttribs2svNV): GL_PREFIX(VertexAttribs3dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5560(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26208,13 +26665,13 @@ GL_PREFIX(VertexAttribs3dvNV): popq %rdx popq %rsi popq %rdi - movq 5560(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5560(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26224,7 +26681,7 @@ GL_PREFIX(VertexAttribs3dvNV): popq %rdx popq %rsi popq %rdi - movq 5560(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs3dvNV), .-GL_PREFIX(VertexAttribs3dvNV) @@ -26235,7 +26692,7 @@ GL_PREFIX(VertexAttribs3dvNV): GL_PREFIX(VertexAttribs3fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5568(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26245,13 +26702,13 @@ GL_PREFIX(VertexAttribs3fvNV): popq %rdx popq %rsi popq %rdi - movq 5568(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5568(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26261,7 +26718,7 @@ GL_PREFIX(VertexAttribs3fvNV): popq %rdx popq %rsi popq %rdi - movq 5568(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs3fvNV), .-GL_PREFIX(VertexAttribs3fvNV) @@ -26272,7 +26729,7 @@ GL_PREFIX(VertexAttribs3fvNV): GL_PREFIX(VertexAttribs3svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5576(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26282,13 +26739,13 @@ GL_PREFIX(VertexAttribs3svNV): popq %rdx popq %rsi popq %rdi - movq 5576(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5576(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26298,7 +26755,7 @@ GL_PREFIX(VertexAttribs3svNV): popq %rdx popq %rsi popq %rdi - movq 5576(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs3svNV), .-GL_PREFIX(VertexAttribs3svNV) @@ -26309,7 +26766,7 @@ GL_PREFIX(VertexAttribs3svNV): GL_PREFIX(VertexAttribs4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5584(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26319,13 +26776,13 @@ GL_PREFIX(VertexAttribs4dvNV): popq %rdx popq %rsi popq %rdi - movq 5584(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5584(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26335,7 +26792,7 @@ GL_PREFIX(VertexAttribs4dvNV): popq %rdx popq %rsi popq %rdi - movq 5584(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4dvNV), .-GL_PREFIX(VertexAttribs4dvNV) @@ -26346,7 +26803,7 @@ GL_PREFIX(VertexAttribs4dvNV): GL_PREFIX(VertexAttribs4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5592(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26356,13 +26813,13 @@ GL_PREFIX(VertexAttribs4fvNV): popq %rdx popq %rsi popq %rdi - movq 5592(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5592(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26372,7 +26829,7 @@ GL_PREFIX(VertexAttribs4fvNV): popq %rdx popq %rsi popq %rdi - movq 5592(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4fvNV), .-GL_PREFIX(VertexAttribs4fvNV) @@ -26383,7 +26840,7 @@ GL_PREFIX(VertexAttribs4fvNV): GL_PREFIX(VertexAttribs4svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5600(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26393,13 +26850,13 @@ GL_PREFIX(VertexAttribs4svNV): popq %rdx popq %rsi popq %rdi - movq 5600(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5600(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26409,7 +26866,7 @@ GL_PREFIX(VertexAttribs4svNV): popq %rdx popq %rsi popq %rdi - movq 5600(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4svNV), .-GL_PREFIX(VertexAttribs4svNV) @@ -26420,7 +26877,7 @@ GL_PREFIX(VertexAttribs4svNV): GL_PREFIX(VertexAttribs4ubvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5608(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26430,13 +26887,13 @@ GL_PREFIX(VertexAttribs4ubvNV): popq %rdx popq %rsi popq %rdi - movq 5608(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5608(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26446,7 +26903,7 @@ GL_PREFIX(VertexAttribs4ubvNV): popq %rdx popq %rsi popq %rdi - movq 5608(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4ubvNV), .-GL_PREFIX(VertexAttribs4ubvNV) @@ -26457,7 +26914,7 @@ GL_PREFIX(VertexAttribs4ubvNV): GL_PREFIX(AlphaFragmentOp1ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5616(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26475,13 +26932,13 @@ GL_PREFIX(AlphaFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5616(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5616(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26499,7 +26956,7 @@ GL_PREFIX(AlphaFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5616(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AlphaFragmentOp1ATI), .-GL_PREFIX(AlphaFragmentOp1ATI) @@ -26510,7 +26967,7 @@ GL_PREFIX(AlphaFragmentOp1ATI): GL_PREFIX(AlphaFragmentOp2ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5624(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26528,13 +26985,13 @@ GL_PREFIX(AlphaFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5624(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5624(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26552,7 +27009,7 @@ GL_PREFIX(AlphaFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5624(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AlphaFragmentOp2ATI), .-GL_PREFIX(AlphaFragmentOp2ATI) @@ -26563,7 +27020,7 @@ GL_PREFIX(AlphaFragmentOp2ATI): GL_PREFIX(AlphaFragmentOp3ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5632(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26581,13 +27038,13 @@ GL_PREFIX(AlphaFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5632(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5632(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26605,7 +27062,7 @@ GL_PREFIX(AlphaFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5632(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AlphaFragmentOp3ATI), .-GL_PREFIX(AlphaFragmentOp3ATI) @@ -26616,25 +27073,25 @@ GL_PREFIX(AlphaFragmentOp3ATI): GL_PREFIX(BeginFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5640(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 5640(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5640(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 5640(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BeginFragmentShaderATI), .-GL_PREFIX(BeginFragmentShaderATI) @@ -26645,25 +27102,25 @@ GL_PREFIX(BeginFragmentShaderATI): GL_PREFIX(BindFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5648(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5648(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5648(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5648(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindFragmentShaderATI), .-GL_PREFIX(BindFragmentShaderATI) @@ -26674,7 +27131,7 @@ GL_PREFIX(BindFragmentShaderATI): GL_PREFIX(ColorFragmentOp1ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5656(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26692,13 +27149,13 @@ GL_PREFIX(ColorFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5656(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5656(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26716,7 +27173,7 @@ GL_PREFIX(ColorFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5656(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorFragmentOp1ATI), .-GL_PREFIX(ColorFragmentOp1ATI) @@ -26727,7 +27184,7 @@ GL_PREFIX(ColorFragmentOp1ATI): GL_PREFIX(ColorFragmentOp2ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5664(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26745,13 +27202,13 @@ GL_PREFIX(ColorFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5664(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5664(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26769,7 +27226,7 @@ GL_PREFIX(ColorFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5664(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorFragmentOp2ATI), .-GL_PREFIX(ColorFragmentOp2ATI) @@ -26780,7 +27237,7 @@ GL_PREFIX(ColorFragmentOp2ATI): GL_PREFIX(ColorFragmentOp3ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5672(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26798,13 +27255,13 @@ GL_PREFIX(ColorFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5672(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5672(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26822,7 +27279,7 @@ GL_PREFIX(ColorFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5672(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorFragmentOp3ATI), .-GL_PREFIX(ColorFragmentOp3ATI) @@ -26833,25 +27290,25 @@ GL_PREFIX(ColorFragmentOp3ATI): GL_PREFIX(DeleteFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5680(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5680(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5680(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5680(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteFragmentShaderATI), .-GL_PREFIX(DeleteFragmentShaderATI) @@ -26862,25 +27319,25 @@ GL_PREFIX(DeleteFragmentShaderATI): GL_PREFIX(EndFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5688(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 5688(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5688(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 5688(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EndFragmentShaderATI), .-GL_PREFIX(EndFragmentShaderATI) @@ -26891,25 +27348,25 @@ GL_PREFIX(EndFragmentShaderATI): GL_PREFIX(GenFragmentShadersATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5696(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5696(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5696(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5696(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenFragmentShadersATI), .-GL_PREFIX(GenFragmentShadersATI) @@ -26920,7 +27377,7 @@ GL_PREFIX(GenFragmentShadersATI): GL_PREFIX(PassTexCoordATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5704(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26930,13 +27387,13 @@ GL_PREFIX(PassTexCoordATI): popq %rdx popq %rsi popq %rdi - movq 5704(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5704(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26946,7 +27403,7 @@ GL_PREFIX(PassTexCoordATI): popq %rdx popq %rsi popq %rdi - movq 5704(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PassTexCoordATI), .-GL_PREFIX(PassTexCoordATI) @@ -26957,7 +27414,7 @@ GL_PREFIX(PassTexCoordATI): GL_PREFIX(SampleMapATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5712(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26967,13 +27424,13 @@ GL_PREFIX(SampleMapATI): popq %rdx popq %rsi popq %rdi - movq 5712(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5712(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26983,7 +27440,7 @@ GL_PREFIX(SampleMapATI): popq %rdx popq %rsi popq %rdi - movq 5712(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SampleMapATI), .-GL_PREFIX(SampleMapATI) @@ -26994,7 +27451,7 @@ GL_PREFIX(SampleMapATI): GL_PREFIX(SetFragmentShaderConstantATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5720(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27004,13 +27461,13 @@ GL_PREFIX(SetFragmentShaderConstantATI): popq %rbp popq %rsi popq %rdi - movq 5720(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5720(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27020,7 +27477,7 @@ GL_PREFIX(SetFragmentShaderConstantATI): popq %rbp popq %rsi popq %rdi - movq 5720(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SetFragmentShaderConstantATI), .-GL_PREFIX(SetFragmentShaderConstantATI) @@ -27031,7 +27488,7 @@ GL_PREFIX(SetFragmentShaderConstantATI): GL_PREFIX(PointParameteriNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5728(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27041,13 +27498,13 @@ GL_PREFIX(PointParameteriNV): popq %rbp popq %rsi popq %rdi - movq 5728(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5728(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27057,7 +27514,7 @@ GL_PREFIX(PointParameteriNV): popq %rbp popq %rsi popq %rdi - movq 5728(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameteriNV), .-GL_PREFIX(PointParameteriNV) @@ -27068,7 +27525,7 @@ GL_PREFIX(PointParameteriNV): GL_PREFIX(PointParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5736(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27078,13 +27535,13 @@ GL_PREFIX(PointParameterivNV): popq %rbp popq %rsi popq %rdi - movq 5736(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5736(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27094,79 +27551,79 @@ GL_PREFIX(PointParameterivNV): popq %rbp popq %rsi popq %rdi - movq 5736(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameterivNV), .-GL_PREFIX(PointParameterivNV) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_718) - .type GL_PREFIX(_dispatch_stub_718), @function - HIDDEN(GL_PREFIX(_dispatch_stub_718)) -GL_PREFIX(_dispatch_stub_718): + .globl GL_PREFIX(_dispatch_stub_731) + .type GL_PREFIX(_dispatch_stub_731), @function + HIDDEN(GL_PREFIX(_dispatch_stub_731)) +GL_PREFIX(_dispatch_stub_731): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5744(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5744(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5744(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5744(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_718), .-GL_PREFIX(_dispatch_stub_718) + .size GL_PREFIX(_dispatch_stub_731), .-GL_PREFIX(_dispatch_stub_731) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_719) - .type GL_PREFIX(_dispatch_stub_719), @function - HIDDEN(GL_PREFIX(_dispatch_stub_719)) -GL_PREFIX(_dispatch_stub_719): + .globl GL_PREFIX(_dispatch_stub_732) + .type GL_PREFIX(_dispatch_stub_732), @function + HIDDEN(GL_PREFIX(_dispatch_stub_732)) +GL_PREFIX(_dispatch_stub_732): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5752(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5752(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5752(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5752(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_719), .-GL_PREFIX(_dispatch_stub_719) + .size GL_PREFIX(_dispatch_stub_732), .-GL_PREFIX(_dispatch_stub_732) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_720) - .type GL_PREFIX(_dispatch_stub_720), @function - HIDDEN(GL_PREFIX(_dispatch_stub_720)) -GL_PREFIX(_dispatch_stub_720): + .globl GL_PREFIX(_dispatch_stub_733) + .type GL_PREFIX(_dispatch_stub_733), @function + HIDDEN(GL_PREFIX(_dispatch_stub_733)) +GL_PREFIX(_dispatch_stub_733): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5760(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27176,13 +27633,13 @@ GL_PREFIX(_dispatch_stub_720): popq %rbp popq %rsi popq %rdi - movq 5760(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5760(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27192,19 +27649,19 @@ GL_PREFIX(_dispatch_stub_720): popq %rbp popq %rsi popq %rdi - movq 5760(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_720), .-GL_PREFIX(_dispatch_stub_720) + .size GL_PREFIX(_dispatch_stub_733), .-GL_PREFIX(_dispatch_stub_733) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_721) - .type GL_PREFIX(_dispatch_stub_721), @function - HIDDEN(GL_PREFIX(_dispatch_stub_721)) -GL_PREFIX(_dispatch_stub_721): + .globl GL_PREFIX(_dispatch_stub_734) + .type GL_PREFIX(_dispatch_stub_734), @function + HIDDEN(GL_PREFIX(_dispatch_stub_734)) +GL_PREFIX(_dispatch_stub_734): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5768(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27214,13 +27671,13 @@ GL_PREFIX(_dispatch_stub_721): popq %rbp popq %rsi popq %rdi - movq 5768(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5768(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27230,40 +27687,40 @@ GL_PREFIX(_dispatch_stub_721): popq %rbp popq %rsi popq %rdi - movq 5768(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_721), .-GL_PREFIX(_dispatch_stub_721) + .size GL_PREFIX(_dispatch_stub_734), .-GL_PREFIX(_dispatch_stub_734) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_722) - .type GL_PREFIX(_dispatch_stub_722), @function - HIDDEN(GL_PREFIX(_dispatch_stub_722)) -GL_PREFIX(_dispatch_stub_722): + .globl GL_PREFIX(_dispatch_stub_735) + .type GL_PREFIX(_dispatch_stub_735), @function + HIDDEN(GL_PREFIX(_dispatch_stub_735)) +GL_PREFIX(_dispatch_stub_735): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5776(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5776(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5776(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5776(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_722), .-GL_PREFIX(_dispatch_stub_722) + .size GL_PREFIX(_dispatch_stub_735), .-GL_PREFIX(_dispatch_stub_735) .p2align 4,,15 .globl GL_PREFIX(GetProgramNamedParameterdvNV) @@ -27271,7 +27728,7 @@ GL_PREFIX(_dispatch_stub_722): GL_PREFIX(GetProgramNamedParameterdvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5784(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27285,13 +27742,13 @@ GL_PREFIX(GetProgramNamedParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5784(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5784(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27305,7 +27762,7 @@ GL_PREFIX(GetProgramNamedParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5784(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramNamedParameterdvNV), .-GL_PREFIX(GetProgramNamedParameterdvNV) @@ -27316,7 +27773,7 @@ GL_PREFIX(GetProgramNamedParameterdvNV): GL_PREFIX(GetProgramNamedParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5792(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27330,13 +27787,13 @@ GL_PREFIX(GetProgramNamedParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5792(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5792(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27350,7 +27807,7 @@ GL_PREFIX(GetProgramNamedParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5792(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramNamedParameterfvNV), .-GL_PREFIX(GetProgramNamedParameterfvNV) @@ -27361,7 +27818,7 @@ GL_PREFIX(GetProgramNamedParameterfvNV): GL_PREFIX(ProgramNamedParameter4dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5800(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -27381,13 +27838,13 @@ GL_PREFIX(ProgramNamedParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5800(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5800(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -27407,7 +27864,7 @@ GL_PREFIX(ProgramNamedParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5800(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4dNV), .-GL_PREFIX(ProgramNamedParameter4dNV) @@ -27418,7 +27875,7 @@ GL_PREFIX(ProgramNamedParameter4dNV): GL_PREFIX(ProgramNamedParameter4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5808(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27432,13 +27889,13 @@ GL_PREFIX(ProgramNamedParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5808(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5808(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27452,7 +27909,7 @@ GL_PREFIX(ProgramNamedParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5808(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4dvNV), .-GL_PREFIX(ProgramNamedParameter4dvNV) @@ -27463,7 +27920,7 @@ GL_PREFIX(ProgramNamedParameter4dvNV): GL_PREFIX(ProgramNamedParameter4fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5816(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -27483,13 +27940,13 @@ GL_PREFIX(ProgramNamedParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5816(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5816(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -27509,7 +27966,7 @@ GL_PREFIX(ProgramNamedParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5816(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4fNV), .-GL_PREFIX(ProgramNamedParameter4fNV) @@ -27520,7 +27977,7 @@ GL_PREFIX(ProgramNamedParameter4fNV): GL_PREFIX(ProgramNamedParameter4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5824(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27534,13 +27991,13 @@ GL_PREFIX(ProgramNamedParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5824(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5824(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27554,19 +28011,19 @@ GL_PREFIX(ProgramNamedParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5824(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4fvNV), .-GL_PREFIX(ProgramNamedParameter4fvNV) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_729) - .type GL_PREFIX(_dispatch_stub_729), @function - HIDDEN(GL_PREFIX(_dispatch_stub_729)) -GL_PREFIX(_dispatch_stub_729): + .globl GL_PREFIX(_dispatch_stub_742) + .type GL_PREFIX(_dispatch_stub_742), @function + HIDDEN(GL_PREFIX(_dispatch_stub_742)) +GL_PREFIX(_dispatch_stub_742): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5832(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27576,13 +28033,13 @@ GL_PREFIX(_dispatch_stub_729): popq %rbp popq %rsi popq %rdi - movq 5832(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5832(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27592,19 +28049,19 @@ GL_PREFIX(_dispatch_stub_729): popq %rbp popq %rsi popq %rdi - movq 5832(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_729), .-GL_PREFIX(_dispatch_stub_729) + .size GL_PREFIX(_dispatch_stub_742), .-GL_PREFIX(_dispatch_stub_742) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_730) - .type GL_PREFIX(_dispatch_stub_730), @function - HIDDEN(GL_PREFIX(_dispatch_stub_730)) -GL_PREFIX(_dispatch_stub_730): + .globl GL_PREFIX(_dispatch_stub_743) + .type GL_PREFIX(_dispatch_stub_743), @function + HIDDEN(GL_PREFIX(_dispatch_stub_743)) +GL_PREFIX(_dispatch_stub_743): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5840(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27614,13 +28071,13 @@ GL_PREFIX(_dispatch_stub_730): popq %rbp popq %rsi popq %rdi - movq 5840(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5840(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27630,10 +28087,10 @@ GL_PREFIX(_dispatch_stub_730): popq %rbp popq %rsi popq %rdi - movq 5840(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_730), .-GL_PREFIX(_dispatch_stub_730) + .size GL_PREFIX(_dispatch_stub_743), .-GL_PREFIX(_dispatch_stub_743) .p2align 4,,15 .globl GL_PREFIX(BindFramebufferEXT) @@ -27641,7 +28098,7 @@ GL_PREFIX(_dispatch_stub_730): GL_PREFIX(BindFramebufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5848(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27651,13 +28108,13 @@ GL_PREFIX(BindFramebufferEXT): popq %rbp popq %rsi popq %rdi - movq 5848(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5848(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27667,7 +28124,7 @@ GL_PREFIX(BindFramebufferEXT): popq %rbp popq %rsi popq %rdi - movq 5848(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindFramebufferEXT), .-GL_PREFIX(BindFramebufferEXT) @@ -27678,7 +28135,7 @@ GL_PREFIX(BindFramebufferEXT): GL_PREFIX(BindRenderbufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5856(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27688,13 +28145,13 @@ GL_PREFIX(BindRenderbufferEXT): popq %rbp popq %rsi popq %rdi - movq 5856(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5856(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27704,7 +28161,7 @@ GL_PREFIX(BindRenderbufferEXT): popq %rbp popq %rsi popq %rdi - movq 5856(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindRenderbufferEXT), .-GL_PREFIX(BindRenderbufferEXT) @@ -27715,25 +28172,25 @@ GL_PREFIX(BindRenderbufferEXT): GL_PREFIX(CheckFramebufferStatusEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5864(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5864(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5864(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5864(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CheckFramebufferStatusEXT), .-GL_PREFIX(CheckFramebufferStatusEXT) @@ -27744,7 +28201,7 @@ GL_PREFIX(CheckFramebufferStatusEXT): GL_PREFIX(DeleteFramebuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5872(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27754,13 +28211,13 @@ GL_PREFIX(DeleteFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5872(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5872(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27770,7 +28227,7 @@ GL_PREFIX(DeleteFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5872(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteFramebuffersEXT), .-GL_PREFIX(DeleteFramebuffersEXT) @@ -27781,7 +28238,7 @@ GL_PREFIX(DeleteFramebuffersEXT): GL_PREFIX(DeleteRenderbuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5880(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27791,13 +28248,13 @@ GL_PREFIX(DeleteRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5880(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5880(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27807,7 +28264,7 @@ GL_PREFIX(DeleteRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5880(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteRenderbuffersEXT), .-GL_PREFIX(DeleteRenderbuffersEXT) @@ -27818,7 +28275,7 @@ GL_PREFIX(DeleteRenderbuffersEXT): GL_PREFIX(FramebufferRenderbufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5888(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27832,13 +28289,13 @@ GL_PREFIX(FramebufferRenderbufferEXT): popq %rdx popq %rsi popq %rdi - movq 5888(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5888(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27852,7 +28309,7 @@ GL_PREFIX(FramebufferRenderbufferEXT): popq %rdx popq %rsi popq %rdi - movq 5888(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferRenderbufferEXT), .-GL_PREFIX(FramebufferRenderbufferEXT) @@ -27863,7 +28320,7 @@ GL_PREFIX(FramebufferRenderbufferEXT): GL_PREFIX(FramebufferTexture1DEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5896(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27877,13 +28334,13 @@ GL_PREFIX(FramebufferTexture1DEXT): popq %rdx popq %rsi popq %rdi - movq 5896(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5896(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27897,7 +28354,7 @@ GL_PREFIX(FramebufferTexture1DEXT): popq %rdx popq %rsi popq %rdi - movq 5896(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferTexture1DEXT), .-GL_PREFIX(FramebufferTexture1DEXT) @@ -27908,7 +28365,7 @@ GL_PREFIX(FramebufferTexture1DEXT): GL_PREFIX(FramebufferTexture2DEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5904(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27922,13 +28379,13 @@ GL_PREFIX(FramebufferTexture2DEXT): popq %rdx popq %rsi popq %rdi - movq 5904(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5904(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27942,7 +28399,7 @@ GL_PREFIX(FramebufferTexture2DEXT): popq %rdx popq %rsi popq %rdi - movq 5904(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferTexture2DEXT), .-GL_PREFIX(FramebufferTexture2DEXT) @@ -27953,7 +28410,7 @@ GL_PREFIX(FramebufferTexture2DEXT): GL_PREFIX(FramebufferTexture3DEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5912(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27971,13 +28428,13 @@ GL_PREFIX(FramebufferTexture3DEXT): popq %rdx popq %rsi popq %rdi - movq 5912(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5912(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27995,7 +28452,7 @@ GL_PREFIX(FramebufferTexture3DEXT): popq %rdx popq %rsi popq %rdi - movq 5912(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferTexture3DEXT), .-GL_PREFIX(FramebufferTexture3DEXT) @@ -28006,7 +28463,7 @@ GL_PREFIX(FramebufferTexture3DEXT): GL_PREFIX(GenFramebuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5920(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28016,13 +28473,13 @@ GL_PREFIX(GenFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5920(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5920(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28032,7 +28489,7 @@ GL_PREFIX(GenFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5920(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenFramebuffersEXT), .-GL_PREFIX(GenFramebuffersEXT) @@ -28043,7 +28500,7 @@ GL_PREFIX(GenFramebuffersEXT): GL_PREFIX(GenRenderbuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5928(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28053,13 +28510,13 @@ GL_PREFIX(GenRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5928(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5928(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28069,7 +28526,7 @@ GL_PREFIX(GenRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5928(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenRenderbuffersEXT), .-GL_PREFIX(GenRenderbuffersEXT) @@ -28080,25 +28537,25 @@ GL_PREFIX(GenRenderbuffersEXT): GL_PREFIX(GenerateMipmapEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5936(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5936(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5936(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5936(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenerateMipmapEXT), .-GL_PREFIX(GenerateMipmapEXT) @@ -28109,7 +28566,7 @@ GL_PREFIX(GenerateMipmapEXT): GL_PREFIX(GetFramebufferAttachmentParameterivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5944(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28123,13 +28580,13 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 5944(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5944(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28143,7 +28600,7 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 5944(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetFramebufferAttachmentParameterivEXT), .-GL_PREFIX(GetFramebufferAttachmentParameterivEXT) @@ -28154,7 +28611,7 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT): GL_PREFIX(GetRenderbufferParameterivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5952(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28164,13 +28621,13 @@ GL_PREFIX(GetRenderbufferParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 5952(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5952(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28180,7 +28637,7 @@ GL_PREFIX(GetRenderbufferParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 5952(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetRenderbufferParameterivEXT), .-GL_PREFIX(GetRenderbufferParameterivEXT) @@ -28191,25 +28648,25 @@ GL_PREFIX(GetRenderbufferParameterivEXT): GL_PREFIX(IsFramebufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5960(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5960(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5960(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5960(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsFramebufferEXT), .-GL_PREFIX(IsFramebufferEXT) @@ -28220,25 +28677,25 @@ GL_PREFIX(IsFramebufferEXT): GL_PREFIX(IsRenderbufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5968(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5968(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5968(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5968(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsRenderbufferEXT), .-GL_PREFIX(IsRenderbufferEXT) @@ -28249,7 +28706,7 @@ GL_PREFIX(IsRenderbufferEXT): GL_PREFIX(RenderbufferStorageEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5976(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28263,13 +28720,13 @@ GL_PREFIX(RenderbufferStorageEXT): popq %rdx popq %rsi popq %rdi - movq 5976(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5976(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28283,19 +28740,19 @@ GL_PREFIX(RenderbufferStorageEXT): popq %rdx popq %rsi popq %rdi - movq 5976(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(RenderbufferStorageEXT), .-GL_PREFIX(RenderbufferStorageEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_748) - .type GL_PREFIX(_dispatch_stub_748), @function - HIDDEN(GL_PREFIX(_dispatch_stub_748)) -GL_PREFIX(_dispatch_stub_748): + .globl GL_PREFIX(_dispatch_stub_761) + .type GL_PREFIX(_dispatch_stub_761), @function + HIDDEN(GL_PREFIX(_dispatch_stub_761)) +GL_PREFIX(_dispatch_stub_761): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5984(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28313,13 +28770,13 @@ GL_PREFIX(_dispatch_stub_748): popq %rdx popq %rsi popq %rdi - movq 5984(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5984(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28337,19 +28794,19 @@ GL_PREFIX(_dispatch_stub_748): popq %rdx popq %rsi popq %rdi - movq 5984(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_748), .-GL_PREFIX(_dispatch_stub_748) + .size GL_PREFIX(_dispatch_stub_761), .-GL_PREFIX(_dispatch_stub_761) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_749) - .type GL_PREFIX(_dispatch_stub_749), @function - HIDDEN(GL_PREFIX(_dispatch_stub_749)) -GL_PREFIX(_dispatch_stub_749): + .globl GL_PREFIX(_dispatch_stub_762) + .type GL_PREFIX(_dispatch_stub_762), @function + HIDDEN(GL_PREFIX(_dispatch_stub_762)) +GL_PREFIX(_dispatch_stub_762): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5992(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28363,13 +28820,13 @@ GL_PREFIX(_dispatch_stub_749): popq %rdx popq %rsi popq %rdi - movq 5992(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5992(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28383,19 +28840,19 @@ GL_PREFIX(_dispatch_stub_749): popq %rdx popq %rsi popq %rdi - movq 5992(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_749), .-GL_PREFIX(_dispatch_stub_749) + .size GL_PREFIX(_dispatch_stub_762), .-GL_PREFIX(_dispatch_stub_762) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_750) - .type GL_PREFIX(_dispatch_stub_750), @function - HIDDEN(GL_PREFIX(_dispatch_stub_750)) -GL_PREFIX(_dispatch_stub_750): + .globl GL_PREFIX(_dispatch_stub_763) + .type GL_PREFIX(_dispatch_stub_763), @function + HIDDEN(GL_PREFIX(_dispatch_stub_763)) +GL_PREFIX(_dispatch_stub_763): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6000(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28409,13 +28866,13 @@ GL_PREFIX(_dispatch_stub_750): popq %rdx popq %rsi popq %rdi - movq 6000(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6000(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28429,19 +28886,19 @@ GL_PREFIX(_dispatch_stub_750): popq %rdx popq %rsi popq %rdi - movq 6000(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_750), .-GL_PREFIX(_dispatch_stub_750) + .size GL_PREFIX(_dispatch_stub_763), .-GL_PREFIX(_dispatch_stub_763) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_751) - .type GL_PREFIX(_dispatch_stub_751), @function - HIDDEN(GL_PREFIX(_dispatch_stub_751)) -GL_PREFIX(_dispatch_stub_751): + .globl GL_PREFIX(_dispatch_stub_764) + .type GL_PREFIX(_dispatch_stub_764), @function + HIDDEN(GL_PREFIX(_dispatch_stub_764)) +GL_PREFIX(_dispatch_stub_764): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6008(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28451,13 +28908,13 @@ GL_PREFIX(_dispatch_stub_751): popq %rdx popq %rsi popq %rdi - movq 6008(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6008(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28467,19 +28924,19 @@ GL_PREFIX(_dispatch_stub_751): popq %rdx popq %rsi popq %rdi - movq 6008(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_751), .-GL_PREFIX(_dispatch_stub_751) + .size GL_PREFIX(_dispatch_stub_764), .-GL_PREFIX(_dispatch_stub_764) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_752) - .type GL_PREFIX(_dispatch_stub_752), @function - HIDDEN(GL_PREFIX(_dispatch_stub_752)) -GL_PREFIX(_dispatch_stub_752): + .globl GL_PREFIX(_dispatch_stub_765) + .type GL_PREFIX(_dispatch_stub_765), @function + HIDDEN(GL_PREFIX(_dispatch_stub_765)) +GL_PREFIX(_dispatch_stub_765): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6016(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28489,13 +28946,13 @@ GL_PREFIX(_dispatch_stub_752): popq %rdx popq %rsi popq %rdi - movq 6016(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6016(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28505,10 +28962,10 @@ GL_PREFIX(_dispatch_stub_752): popq %rdx popq %rsi popq %rdi - movq 6016(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_752), .-GL_PREFIX(_dispatch_stub_752) + .size GL_PREFIX(_dispatch_stub_765), .-GL_PREFIX(_dispatch_stub_765) .globl GL_PREFIX(ArrayElementEXT) ; .set GL_PREFIX(ArrayElementEXT), GL_PREFIX(ArrayElement) .globl GL_PREFIX(BindTextureEXT) ; .set GL_PREFIX(BindTextureEXT), GL_PREFIX(BindTexture) @@ -28595,6 +29052,43 @@ GL_PREFIX(_dispatch_stub_752): .globl GL_PREFIX(CompressedTexSubImage2D) ; .set GL_PREFIX(CompressedTexSubImage2D), GL_PREFIX(CompressedTexSubImage2DARB) .globl GL_PREFIX(CompressedTexSubImage3D) ; .set GL_PREFIX(CompressedTexSubImage3D), GL_PREFIX(CompressedTexSubImage3DARB) .globl GL_PREFIX(GetCompressedTexImage) ; .set GL_PREFIX(GetCompressedTexImage), GL_PREFIX(GetCompressedTexImageARB) + .globl GL_PREFIX(DisableVertexAttribArray) ; .set GL_PREFIX(DisableVertexAttribArray), GL_PREFIX(DisableVertexAttribArrayARB) + .globl GL_PREFIX(EnableVertexAttribArray) ; .set GL_PREFIX(EnableVertexAttribArray), GL_PREFIX(EnableVertexAttribArrayARB) + .globl GL_PREFIX(GetVertexAttribdv) ; .set GL_PREFIX(GetVertexAttribdv), GL_PREFIX(GetVertexAttribdvARB) + .globl GL_PREFIX(GetVertexAttribfv) ; .set GL_PREFIX(GetVertexAttribfv), GL_PREFIX(GetVertexAttribfvARB) + .globl GL_PREFIX(GetVertexAttribiv) ; .set GL_PREFIX(GetVertexAttribiv), GL_PREFIX(GetVertexAttribivARB) + .globl GL_PREFIX(VertexAttrib1d) ; .set GL_PREFIX(VertexAttrib1d), GL_PREFIX(VertexAttrib1dARB) + .globl GL_PREFIX(VertexAttrib1dv) ; .set GL_PREFIX(VertexAttrib1dv), GL_PREFIX(VertexAttrib1dvARB) + .globl GL_PREFIX(VertexAttrib1f) ; .set GL_PREFIX(VertexAttrib1f), GL_PREFIX(VertexAttrib1fARB) + .globl GL_PREFIX(VertexAttrib1fv) ; .set GL_PREFIX(VertexAttrib1fv), GL_PREFIX(VertexAttrib1fvARB) + .globl GL_PREFIX(VertexAttrib1s) ; .set GL_PREFIX(VertexAttrib1s), GL_PREFIX(VertexAttrib1sARB) + .globl GL_PREFIX(VertexAttrib1sv) ; .set GL_PREFIX(VertexAttrib1sv), GL_PREFIX(VertexAttrib1svARB) + .globl GL_PREFIX(VertexAttrib2d) ; .set GL_PREFIX(VertexAttrib2d), GL_PREFIX(VertexAttrib2dARB) + .globl GL_PREFIX(VertexAttrib2dv) ; .set GL_PREFIX(VertexAttrib2dv), GL_PREFIX(VertexAttrib2dvARB) + .globl GL_PREFIX(VertexAttrib2f) ; .set GL_PREFIX(VertexAttrib2f), GL_PREFIX(VertexAttrib2fARB) + .globl GL_PREFIX(VertexAttrib2fv) ; .set GL_PREFIX(VertexAttrib2fv), GL_PREFIX(VertexAttrib2fvARB) + .globl GL_PREFIX(VertexAttrib2s) ; .set GL_PREFIX(VertexAttrib2s), GL_PREFIX(VertexAttrib2sARB) + .globl GL_PREFIX(VertexAttrib2sv) ; .set GL_PREFIX(VertexAttrib2sv), GL_PREFIX(VertexAttrib2svARB) + .globl GL_PREFIX(VertexAttrib3d) ; .set GL_PREFIX(VertexAttrib3d), GL_PREFIX(VertexAttrib3dARB) + .globl GL_PREFIX(VertexAttrib3dv) ; .set GL_PREFIX(VertexAttrib3dv), GL_PREFIX(VertexAttrib3dvARB) + .globl GL_PREFIX(VertexAttrib3f) ; .set GL_PREFIX(VertexAttrib3f), GL_PREFIX(VertexAttrib3fARB) + .globl GL_PREFIX(VertexAttrib3fv) ; .set GL_PREFIX(VertexAttrib3fv), GL_PREFIX(VertexAttrib3fvARB) + .globl GL_PREFIX(VertexAttrib3s) ; .set GL_PREFIX(VertexAttrib3s), GL_PREFIX(VertexAttrib3sARB) + .globl GL_PREFIX(VertexAttrib3sv) ; .set GL_PREFIX(VertexAttrib3sv), GL_PREFIX(VertexAttrib3svARB) + .globl GL_PREFIX(VertexAttrib4Nbv) ; .set GL_PREFIX(VertexAttrib4Nbv), GL_PREFIX(VertexAttrib4NbvARB) + .globl GL_PREFIX(VertexAttrib4Niv) ; .set GL_PREFIX(VertexAttrib4Niv), GL_PREFIX(VertexAttrib4NivARB) + .globl GL_PREFIX(VertexAttrib4Nsv) ; .set GL_PREFIX(VertexAttrib4Nsv), GL_PREFIX(VertexAttrib4NsvARB) + .globl GL_PREFIX(VertexAttrib4Nub) ; .set GL_PREFIX(VertexAttrib4Nub), GL_PREFIX(VertexAttrib4NubARB) + .globl GL_PREFIX(VertexAttrib4Nubv) ; .set GL_PREFIX(VertexAttrib4Nubv), GL_PREFIX(VertexAttrib4NubvARB) + .globl GL_PREFIX(VertexAttrib4Nuiv) ; .set GL_PREFIX(VertexAttrib4Nuiv), GL_PREFIX(VertexAttrib4NuivARB) + .globl GL_PREFIX(VertexAttrib4Nusv) ; .set GL_PREFIX(VertexAttrib4Nusv), GL_PREFIX(VertexAttrib4NusvARB) + .globl GL_PREFIX(VertexAttrib4d) ; .set GL_PREFIX(VertexAttrib4d), GL_PREFIX(VertexAttrib4dARB) + .globl GL_PREFIX(VertexAttrib4dv) ; .set GL_PREFIX(VertexAttrib4dv), GL_PREFIX(VertexAttrib4dvARB) + .globl GL_PREFIX(VertexAttrib4f) ; .set GL_PREFIX(VertexAttrib4f), GL_PREFIX(VertexAttrib4fARB) + .globl GL_PREFIX(VertexAttrib4fv) ; .set GL_PREFIX(VertexAttrib4fv), GL_PREFIX(VertexAttrib4fvARB) + .globl GL_PREFIX(VertexAttrib4s) ; .set GL_PREFIX(VertexAttrib4s), GL_PREFIX(VertexAttrib4sARB) + .globl GL_PREFIX(VertexAttrib4sv) ; .set GL_PREFIX(VertexAttrib4sv), GL_PREFIX(VertexAttrib4svARB) + .globl GL_PREFIX(VertexAttribPointer) ; .set GL_PREFIX(VertexAttribPointer), GL_PREFIX(VertexAttribPointerARB) .globl GL_PREFIX(BindBuffer) ; .set GL_PREFIX(BindBuffer), GL_PREFIX(BindBufferARB) .globl GL_PREFIX(BufferData) ; .set GL_PREFIX(BufferData), GL_PREFIX(BufferDataARB) .globl GL_PREFIX(BufferSubData) ; .set GL_PREFIX(BufferSubData), GL_PREFIX(BufferSubDataARB) @@ -28614,6 +29108,38 @@ GL_PREFIX(_dispatch_stub_752): .globl GL_PREFIX(GetQueryObjectuiv) ; .set GL_PREFIX(GetQueryObjectuiv), GL_PREFIX(GetQueryObjectuivARB) .globl GL_PREFIX(GetQueryiv) ; .set GL_PREFIX(GetQueryiv), GL_PREFIX(GetQueryivARB) .globl GL_PREFIX(IsQuery) ; .set GL_PREFIX(IsQuery), GL_PREFIX(IsQueryARB) + .globl GL_PREFIX(CompileShader) ; .set GL_PREFIX(CompileShader), GL_PREFIX(CompileShaderARB) + .globl GL_PREFIX(GetActiveUniform) ; .set GL_PREFIX(GetActiveUniform), GL_PREFIX(GetActiveUniformARB) + .globl GL_PREFIX(GetShaderSource) ; .set GL_PREFIX(GetShaderSource), GL_PREFIX(GetShaderSourceARB) + .globl GL_PREFIX(GetUniformLocation) ; .set GL_PREFIX(GetUniformLocation), GL_PREFIX(GetUniformLocationARB) + .globl GL_PREFIX(GetUniformfv) ; .set GL_PREFIX(GetUniformfv), GL_PREFIX(GetUniformfvARB) + .globl GL_PREFIX(GetUniformiv) ; .set GL_PREFIX(GetUniformiv), GL_PREFIX(GetUniformivARB) + .globl GL_PREFIX(LinkProgram) ; .set GL_PREFIX(LinkProgram), GL_PREFIX(LinkProgramARB) + .globl GL_PREFIX(ShaderSource) ; .set GL_PREFIX(ShaderSource), GL_PREFIX(ShaderSourceARB) + .globl GL_PREFIX(Uniform1f) ; .set GL_PREFIX(Uniform1f), GL_PREFIX(Uniform1fARB) + .globl GL_PREFIX(Uniform1fv) ; .set GL_PREFIX(Uniform1fv), GL_PREFIX(Uniform1fvARB) + .globl GL_PREFIX(Uniform1i) ; .set GL_PREFIX(Uniform1i), GL_PREFIX(Uniform1iARB) + .globl GL_PREFIX(Uniform1iv) ; .set GL_PREFIX(Uniform1iv), GL_PREFIX(Uniform1ivARB) + .globl GL_PREFIX(Uniform2f) ; .set GL_PREFIX(Uniform2f), GL_PREFIX(Uniform2fARB) + .globl GL_PREFIX(Uniform2fv) ; .set GL_PREFIX(Uniform2fv), GL_PREFIX(Uniform2fvARB) + .globl GL_PREFIX(Uniform2i) ; .set GL_PREFIX(Uniform2i), GL_PREFIX(Uniform2iARB) + .globl GL_PREFIX(Uniform2iv) ; .set GL_PREFIX(Uniform2iv), GL_PREFIX(Uniform2ivARB) + .globl GL_PREFIX(Uniform3f) ; .set GL_PREFIX(Uniform3f), GL_PREFIX(Uniform3fARB) + .globl GL_PREFIX(Uniform3fv) ; .set GL_PREFIX(Uniform3fv), GL_PREFIX(Uniform3fvARB) + .globl GL_PREFIX(Uniform3i) ; .set GL_PREFIX(Uniform3i), GL_PREFIX(Uniform3iARB) + .globl GL_PREFIX(Uniform3iv) ; .set GL_PREFIX(Uniform3iv), GL_PREFIX(Uniform3ivARB) + .globl GL_PREFIX(Uniform4f) ; .set GL_PREFIX(Uniform4f), GL_PREFIX(Uniform4fARB) + .globl GL_PREFIX(Uniform4fv) ; .set GL_PREFIX(Uniform4fv), GL_PREFIX(Uniform4fvARB) + .globl GL_PREFIX(Uniform4i) ; .set GL_PREFIX(Uniform4i), GL_PREFIX(Uniform4iARB) + .globl GL_PREFIX(Uniform4iv) ; .set GL_PREFIX(Uniform4iv), GL_PREFIX(Uniform4ivARB) + .globl GL_PREFIX(UniformMatrix2fv) ; .set GL_PREFIX(UniformMatrix2fv), GL_PREFIX(UniformMatrix2fvARB) + .globl GL_PREFIX(UniformMatrix3fv) ; .set GL_PREFIX(UniformMatrix3fv), GL_PREFIX(UniformMatrix3fvARB) + .globl GL_PREFIX(UniformMatrix4fv) ; .set GL_PREFIX(UniformMatrix4fv), GL_PREFIX(UniformMatrix4fvARB) + .globl GL_PREFIX(UseProgram) ; .set GL_PREFIX(UseProgram), GL_PREFIX(UseProgramObjectARB) + .globl GL_PREFIX(ValidateProgram) ; .set GL_PREFIX(ValidateProgram), GL_PREFIX(ValidateProgramARB) + .globl GL_PREFIX(BindAttribLocation) ; .set GL_PREFIX(BindAttribLocation), GL_PREFIX(BindAttribLocationARB) + .globl GL_PREFIX(GetActiveAttrib) ; .set GL_PREFIX(GetActiveAttrib), GL_PREFIX(GetActiveAttribARB) + .globl GL_PREFIX(GetAttribLocation) ; .set GL_PREFIX(GetAttribLocation), GL_PREFIX(GetAttribLocationARB) .globl GL_PREFIX(DrawBuffers) ; .set GL_PREFIX(DrawBuffers), GL_PREFIX(DrawBuffersARB) .globl GL_PREFIX(DrawBuffersATI) ; .set GL_PREFIX(DrawBuffersATI), GL_PREFIX(DrawBuffersARB) .globl GL_PREFIX(PointParameterf) ; .set GL_PREFIX(PointParameterf), GL_PREFIX(PointParameterfEXT) @@ -28684,7 +29210,7 @@ GL_PREFIX(_dispatch_stub_752): .globl GL_PREFIX(IsProgramARB) ; .set GL_PREFIX(IsProgramARB), GL_PREFIX(IsProgramNV) .globl GL_PREFIX(PointParameteri) ; .set GL_PREFIX(PointParameteri), GL_PREFIX(PointParameteriNV) .globl GL_PREFIX(PointParameteriv) ; .set GL_PREFIX(PointParameteriv), GL_PREFIX(PointParameterivNV) - .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_730) + .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_743) #if defined(GLX_USE_TLS) && defined(__linux__) .section ".note.ABI-tag", "a" diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index bd3b755e5c..ebd536d086 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -549,6 +549,19 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(MultiTexCoord4ivARB, _gloffset_MultiTexCoord4ivARB, MultiTexCoord4ivARB@8) GL_STUB(MultiTexCoord4sARB, _gloffset_MultiTexCoord4sARB, MultiTexCoord4sARB@20) GL_STUB(MultiTexCoord4svARB, _gloffset_MultiTexCoord4svARB, MultiTexCoord4svARB@8) + GL_STUB(AttachShader, _gloffset_AttachShader, AttachShader@8) + GL_STUB(CreateProgram, _gloffset_CreateProgram, CreateProgram@0) + GL_STUB(CreateShader, _gloffset_CreateShader, CreateShader@4) + GL_STUB(DeleteProgram, _gloffset_DeleteProgram, DeleteProgram@4) + GL_STUB(DeleteShader, _gloffset_DeleteShader, DeleteShader@4) + GL_STUB(DetachShader, _gloffset_DetachShader, DetachShader@8) + GL_STUB(GetAttachedShaders, _gloffset_GetAttachedShaders, GetAttachedShaders@16) + GL_STUB(GetProgramInfoLog, _gloffset_GetProgramInfoLog, GetProgramInfoLog@16) + GL_STUB(GetProgramiv, _gloffset_GetProgramiv, GetProgramiv@12) + GL_STUB(GetShaderInfoLog, _gloffset_GetShaderInfoLog, GetShaderInfoLog@16) + GL_STUB(GetShaderiv, _gloffset_GetShaderiv, GetShaderiv@12) + GL_STUB(IsProgram, _gloffset_IsProgram, IsProgram@4) + GL_STUB(IsShader, _gloffset_IsShader, IsShader@4) GL_STUB(StencilFuncSeparate, _gloffset_StencilFuncSeparate, StencilFuncSeparate@16) GL_STUB(StencilMaskSeparate, _gloffset_StencilMaskSeparate, StencilMaskSeparate@8) GL_STUB(StencilOpSeparate, _gloffset_StencilOpSeparate, StencilOpSeparate@16) @@ -684,22 +697,22 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(GetAttribLocationARB, _gloffset_GetAttribLocationARB, GetAttribLocationARB@8) GL_STUB(DrawBuffersARB, _gloffset_DrawBuffersARB, DrawBuffersARB@8) GL_STUB(PolygonOffsetEXT, _gloffset_PolygonOffsetEXT, PolygonOffsetEXT@8) - GL_STUB(_dispatch_stub_543, _gloffset_GetPixelTexGenParameterfvSGIS, _dispatch_stub_543@8) - HIDDEN(GL_PREFIX(_dispatch_stub_543, _dispatch_stub_543@8)) - GL_STUB(_dispatch_stub_544, _gloffset_GetPixelTexGenParameterivSGIS, _dispatch_stub_544@8) - HIDDEN(GL_PREFIX(_dispatch_stub_544, _dispatch_stub_544@8)) - GL_STUB(_dispatch_stub_545, _gloffset_PixelTexGenParameterfSGIS, _dispatch_stub_545@8) - HIDDEN(GL_PREFIX(_dispatch_stub_545, _dispatch_stub_545@8)) - GL_STUB(_dispatch_stub_546, _gloffset_PixelTexGenParameterfvSGIS, _dispatch_stub_546@8) - HIDDEN(GL_PREFIX(_dispatch_stub_546, _dispatch_stub_546@8)) - GL_STUB(_dispatch_stub_547, _gloffset_PixelTexGenParameteriSGIS, _dispatch_stub_547@8) - HIDDEN(GL_PREFIX(_dispatch_stub_547, _dispatch_stub_547@8)) - GL_STUB(_dispatch_stub_548, _gloffset_PixelTexGenParameterivSGIS, _dispatch_stub_548@8) - HIDDEN(GL_PREFIX(_dispatch_stub_548, _dispatch_stub_548@8)) - GL_STUB(_dispatch_stub_549, _gloffset_SampleMaskSGIS, _dispatch_stub_549@8) - HIDDEN(GL_PREFIX(_dispatch_stub_549, _dispatch_stub_549@8)) - GL_STUB(_dispatch_stub_550, _gloffset_SamplePatternSGIS, _dispatch_stub_550@4) - HIDDEN(GL_PREFIX(_dispatch_stub_550, _dispatch_stub_550@4)) + GL_STUB(_dispatch_stub_556, _gloffset_GetPixelTexGenParameterfvSGIS, _dispatch_stub_556@8) + HIDDEN(GL_PREFIX(_dispatch_stub_556, _dispatch_stub_556@8)) + GL_STUB(_dispatch_stub_557, _gloffset_GetPixelTexGenParameterivSGIS, _dispatch_stub_557@8) + HIDDEN(GL_PREFIX(_dispatch_stub_557, _dispatch_stub_557@8)) + GL_STUB(_dispatch_stub_558, _gloffset_PixelTexGenParameterfSGIS, _dispatch_stub_558@8) + HIDDEN(GL_PREFIX(_dispatch_stub_558, _dispatch_stub_558@8)) + GL_STUB(_dispatch_stub_559, _gloffset_PixelTexGenParameterfvSGIS, _dispatch_stub_559@8) + HIDDEN(GL_PREFIX(_dispatch_stub_559, _dispatch_stub_559@8)) + GL_STUB(_dispatch_stub_560, _gloffset_PixelTexGenParameteriSGIS, _dispatch_stub_560@8) + HIDDEN(GL_PREFIX(_dispatch_stub_560, _dispatch_stub_560@8)) + GL_STUB(_dispatch_stub_561, _gloffset_PixelTexGenParameterivSGIS, _dispatch_stub_561@8) + HIDDEN(GL_PREFIX(_dispatch_stub_561, _dispatch_stub_561@8)) + GL_STUB(_dispatch_stub_562, _gloffset_SampleMaskSGIS, _dispatch_stub_562@8) + HIDDEN(GL_PREFIX(_dispatch_stub_562, _dispatch_stub_562@8)) + GL_STUB(_dispatch_stub_563, _gloffset_SamplePatternSGIS, _dispatch_stub_563@4) + HIDDEN(GL_PREFIX(_dispatch_stub_563, _dispatch_stub_563@4)) GL_STUB(ColorPointerEXT, _gloffset_ColorPointerEXT, ColorPointerEXT@20) GL_STUB(EdgeFlagPointerEXT, _gloffset_EdgeFlagPointerEXT, EdgeFlagPointerEXT@12) GL_STUB(IndexPointerEXT, _gloffset_IndexPointerEXT, IndexPointerEXT@16) @@ -710,10 +723,10 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(PointParameterfvEXT, _gloffset_PointParameterfvEXT, PointParameterfvEXT@8) GL_STUB(LockArraysEXT, _gloffset_LockArraysEXT, LockArraysEXT@8) GL_STUB(UnlockArraysEXT, _gloffset_UnlockArraysEXT, UnlockArraysEXT@0) - GL_STUB(_dispatch_stub_561, _gloffset_CullParameterdvEXT, _dispatch_stub_561@8) - HIDDEN(GL_PREFIX(_dispatch_stub_561, _dispatch_stub_561@8)) - GL_STUB(_dispatch_stub_562, _gloffset_CullParameterfvEXT, _dispatch_stub_562@8) - HIDDEN(GL_PREFIX(_dispatch_stub_562, _dispatch_stub_562@8)) + GL_STUB(_dispatch_stub_574, _gloffset_CullParameterdvEXT, _dispatch_stub_574@8) + HIDDEN(GL_PREFIX(_dispatch_stub_574, _dispatch_stub_574@8)) + GL_STUB(_dispatch_stub_575, _gloffset_CullParameterfvEXT, _dispatch_stub_575@8) + HIDDEN(GL_PREFIX(_dispatch_stub_575, _dispatch_stub_575@8)) GL_STUB(SecondaryColor3bEXT, _gloffset_SecondaryColor3bEXT, SecondaryColor3bEXT@12) GL_STUB(SecondaryColor3bvEXT, _gloffset_SecondaryColor3bvEXT, SecondaryColor3bvEXT@4) GL_STUB(SecondaryColor3dEXT, _gloffset_SecondaryColor3dEXT, SecondaryColor3dEXT@24) @@ -738,8 +751,8 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(FogCoorddvEXT, _gloffset_FogCoorddvEXT, FogCoorddvEXT@4) GL_STUB(FogCoordfEXT, _gloffset_FogCoordfEXT, FogCoordfEXT@4) GL_STUB(FogCoordfvEXT, _gloffset_FogCoordfvEXT, FogCoordfvEXT@4) - GL_STUB(_dispatch_stub_587, _gloffset_PixelTexGenSGIX, _dispatch_stub_587@4) - HIDDEN(GL_PREFIX(_dispatch_stub_587, _dispatch_stub_587@4)) + GL_STUB(_dispatch_stub_600, _gloffset_PixelTexGenSGIX, _dispatch_stub_600@4) + HIDDEN(GL_PREFIX(_dispatch_stub_600, _dispatch_stub_600@4)) GL_STUB(BlendFuncSeparateEXT, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateEXT@16) GL_STUB(FlushVertexArrayRangeNV, _gloffset_FlushVertexArrayRangeNV, FlushVertexArrayRangeNV@0) GL_STUB(VertexArrayRangeNV, _gloffset_VertexArrayRangeNV, VertexArrayRangeNV@8) @@ -781,24 +794,24 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(WindowPos4ivMESA, _gloffset_WindowPos4ivMESA, WindowPos4ivMESA@4) GL_STUB(WindowPos4sMESA, _gloffset_WindowPos4sMESA, WindowPos4sMESA@16) GL_STUB(WindowPos4svMESA, _gloffset_WindowPos4svMESA, WindowPos4svMESA@4) - GL_STUB(_dispatch_stub_629, _gloffset_MultiModeDrawArraysIBM, _dispatch_stub_629@20) - HIDDEN(GL_PREFIX(_dispatch_stub_629, _dispatch_stub_629@20)) - GL_STUB(_dispatch_stub_630, _gloffset_MultiModeDrawElementsIBM, _dispatch_stub_630@24) - HIDDEN(GL_PREFIX(_dispatch_stub_630, _dispatch_stub_630@24)) - GL_STUB(_dispatch_stub_631, _gloffset_DeleteFencesNV, _dispatch_stub_631@8) - HIDDEN(GL_PREFIX(_dispatch_stub_631, _dispatch_stub_631@8)) - GL_STUB(_dispatch_stub_632, _gloffset_FinishFenceNV, _dispatch_stub_632@4) - HIDDEN(GL_PREFIX(_dispatch_stub_632, _dispatch_stub_632@4)) - GL_STUB(_dispatch_stub_633, _gloffset_GenFencesNV, _dispatch_stub_633@8) - HIDDEN(GL_PREFIX(_dispatch_stub_633, _dispatch_stub_633@8)) - GL_STUB(_dispatch_stub_634, _gloffset_GetFenceivNV, _dispatch_stub_634@12) - HIDDEN(GL_PREFIX(_dispatch_stub_634, _dispatch_stub_634@12)) - GL_STUB(_dispatch_stub_635, _gloffset_IsFenceNV, _dispatch_stub_635@4) - HIDDEN(GL_PREFIX(_dispatch_stub_635, _dispatch_stub_635@4)) - GL_STUB(_dispatch_stub_636, _gloffset_SetFenceNV, _dispatch_stub_636@8) - HIDDEN(GL_PREFIX(_dispatch_stub_636, _dispatch_stub_636@8)) - GL_STUB(_dispatch_stub_637, _gloffset_TestFenceNV, _dispatch_stub_637@4) - HIDDEN(GL_PREFIX(_dispatch_stub_637, _dispatch_stub_637@4)) + GL_STUB(_dispatch_stub_642, _gloffset_MultiModeDrawArraysIBM, _dispatch_stub_642@20) + HIDDEN(GL_PREFIX(_dispatch_stub_642, _dispatch_stub_642@20)) + GL_STUB(_dispatch_stub_643, _gloffset_MultiModeDrawElementsIBM, _dispatch_stub_643@24) + HIDDEN(GL_PREFIX(_dispatch_stub_643, _dispatch_stub_643@24)) + GL_STUB(_dispatch_stub_644, _gloffset_DeleteFencesNV, _dispatch_stub_644@8) + HIDDEN(GL_PREFIX(_dispatch_stub_644, _dispatch_stub_644@8)) + GL_STUB(_dispatch_stub_645, _gloffset_FinishFenceNV, _dispatch_stub_645@4) + HIDDEN(GL_PREFIX(_dispatch_stub_645, _dispatch_stub_645@4)) + GL_STUB(_dispatch_stub_646, _gloffset_GenFencesNV, _dispatch_stub_646@8) + HIDDEN(GL_PREFIX(_dispatch_stub_646, _dispatch_stub_646@8)) + GL_STUB(_dispatch_stub_647, _gloffset_GetFenceivNV, _dispatch_stub_647@12) + HIDDEN(GL_PREFIX(_dispatch_stub_647, _dispatch_stub_647@12)) + GL_STUB(_dispatch_stub_648, _gloffset_IsFenceNV, _dispatch_stub_648@4) + HIDDEN(GL_PREFIX(_dispatch_stub_648, _dispatch_stub_648@4)) + GL_STUB(_dispatch_stub_649, _gloffset_SetFenceNV, _dispatch_stub_649@8) + HIDDEN(GL_PREFIX(_dispatch_stub_649, _dispatch_stub_649@8)) + GL_STUB(_dispatch_stub_650, _gloffset_TestFenceNV, _dispatch_stub_650@4) + HIDDEN(GL_PREFIX(_dispatch_stub_650, _dispatch_stub_650@4)) GL_STUB(AreProgramsResidentNV, _gloffset_AreProgramsResidentNV, AreProgramsResidentNV@12) GL_STUB(BindProgramNV, _gloffset_BindProgramNV, BindProgramNV@8) GL_STUB(DeleteProgramsNV, _gloffset_DeleteProgramsNV, DeleteProgramsNV@8) @@ -879,26 +892,26 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(SetFragmentShaderConstantATI, _gloffset_SetFragmentShaderConstantATI, SetFragmentShaderConstantATI@8) GL_STUB(PointParameteriNV, _gloffset_PointParameteriNV, PointParameteriNV@8) GL_STUB(PointParameterivNV, _gloffset_PointParameterivNV, PointParameterivNV@8) - GL_STUB(_dispatch_stub_718, _gloffset_ActiveStencilFaceEXT, _dispatch_stub_718@4) - HIDDEN(GL_PREFIX(_dispatch_stub_718, _dispatch_stub_718@4)) - GL_STUB(_dispatch_stub_719, _gloffset_BindVertexArrayAPPLE, _dispatch_stub_719@4) - HIDDEN(GL_PREFIX(_dispatch_stub_719, _dispatch_stub_719@4)) - GL_STUB(_dispatch_stub_720, _gloffset_DeleteVertexArraysAPPLE, _dispatch_stub_720@8) - HIDDEN(GL_PREFIX(_dispatch_stub_720, _dispatch_stub_720@8)) - GL_STUB(_dispatch_stub_721, _gloffset_GenVertexArraysAPPLE, _dispatch_stub_721@8) - HIDDEN(GL_PREFIX(_dispatch_stub_721, _dispatch_stub_721@8)) - GL_STUB(_dispatch_stub_722, _gloffset_IsVertexArrayAPPLE, _dispatch_stub_722@4) - HIDDEN(GL_PREFIX(_dispatch_stub_722, _dispatch_stub_722@4)) + GL_STUB(_dispatch_stub_731, _gloffset_ActiveStencilFaceEXT, _dispatch_stub_731@4) + HIDDEN(GL_PREFIX(_dispatch_stub_731, _dispatch_stub_731@4)) + GL_STUB(_dispatch_stub_732, _gloffset_BindVertexArrayAPPLE, _dispatch_stub_732@4) + HIDDEN(GL_PREFIX(_dispatch_stub_732, _dispatch_stub_732@4)) + GL_STUB(_dispatch_stub_733, _gloffset_DeleteVertexArraysAPPLE, _dispatch_stub_733@8) + HIDDEN(GL_PREFIX(_dispatch_stub_733, _dispatch_stub_733@8)) + GL_STUB(_dispatch_stub_734, _gloffset_GenVertexArraysAPPLE, _dispatch_stub_734@8) + HIDDEN(GL_PREFIX(_dispatch_stub_734, _dispatch_stub_734@8)) + GL_STUB(_dispatch_stub_735, _gloffset_IsVertexArrayAPPLE, _dispatch_stub_735@4) + HIDDEN(GL_PREFIX(_dispatch_stub_735, _dispatch_stub_735@4)) GL_STUB(GetProgramNamedParameterdvNV, _gloffset_GetProgramNamedParameterdvNV, GetProgramNamedParameterdvNV@16) GL_STUB(GetProgramNamedParameterfvNV, _gloffset_GetProgramNamedParameterfvNV, GetProgramNamedParameterfvNV@16) GL_STUB(ProgramNamedParameter4dNV, _gloffset_ProgramNamedParameter4dNV, ProgramNamedParameter4dNV@44) GL_STUB(ProgramNamedParameter4dvNV, _gloffset_ProgramNamedParameter4dvNV, ProgramNamedParameter4dvNV@16) GL_STUB(ProgramNamedParameter4fNV, _gloffset_ProgramNamedParameter4fNV, ProgramNamedParameter4fNV@28) GL_STUB(ProgramNamedParameter4fvNV, _gloffset_ProgramNamedParameter4fvNV, ProgramNamedParameter4fvNV@16) - GL_STUB(_dispatch_stub_729, _gloffset_DepthBoundsEXT, _dispatch_stub_729@16) - HIDDEN(GL_PREFIX(_dispatch_stub_729, _dispatch_stub_729@16)) - GL_STUB(_dispatch_stub_730, _gloffset_BlendEquationSeparateEXT, _dispatch_stub_730@8) - HIDDEN(GL_PREFIX(_dispatch_stub_730, _dispatch_stub_730@8)) + GL_STUB(_dispatch_stub_742, _gloffset_DepthBoundsEXT, _dispatch_stub_742@16) + HIDDEN(GL_PREFIX(_dispatch_stub_742, _dispatch_stub_742@16)) + GL_STUB(_dispatch_stub_743, _gloffset_BlendEquationSeparateEXT, _dispatch_stub_743@8) + HIDDEN(GL_PREFIX(_dispatch_stub_743, _dispatch_stub_743@8)) GL_STUB(BindFramebufferEXT, _gloffset_BindFramebufferEXT, BindFramebufferEXT@8) GL_STUB(BindRenderbufferEXT, _gloffset_BindRenderbufferEXT, BindRenderbufferEXT@8) GL_STUB(CheckFramebufferStatusEXT, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4) @@ -916,16 +929,16 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(IsFramebufferEXT, _gloffset_IsFramebufferEXT, IsFramebufferEXT@4) GL_STUB(IsRenderbufferEXT, _gloffset_IsRenderbufferEXT, IsRenderbufferEXT@4) GL_STUB(RenderbufferStorageEXT, _gloffset_RenderbufferStorageEXT, RenderbufferStorageEXT@16) - GL_STUB(_dispatch_stub_748, _gloffset_BlitFramebufferEXT, _dispatch_stub_748@40) - HIDDEN(GL_PREFIX(_dispatch_stub_748, _dispatch_stub_748@40)) - GL_STUB(_dispatch_stub_749, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_749@16) - HIDDEN(GL_PREFIX(_dispatch_stub_749, _dispatch_stub_749@16)) - GL_STUB(_dispatch_stub_750, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_750@16) - HIDDEN(GL_PREFIX(_dispatch_stub_750, _dispatch_stub_750@16)) - GL_STUB(_dispatch_stub_751, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_751@12) - HIDDEN(GL_PREFIX(_dispatch_stub_751, _dispatch_stub_751@12)) - GL_STUB(_dispatch_stub_752, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_752@12) - HIDDEN(GL_PREFIX(_dispatch_stub_752, _dispatch_stub_752@12)) + GL_STUB(_dispatch_stub_761, _gloffset_BlitFramebufferEXT, _dispatch_stub_761@40) + HIDDEN(GL_PREFIX(_dispatch_stub_761, _dispatch_stub_761@40)) + GL_STUB(_dispatch_stub_762, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_762@16) + HIDDEN(GL_PREFIX(_dispatch_stub_762, _dispatch_stub_762@16)) + GL_STUB(_dispatch_stub_763, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_763@16) + HIDDEN(GL_PREFIX(_dispatch_stub_763, _dispatch_stub_763@16)) + GL_STUB(_dispatch_stub_764, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_764@12) + HIDDEN(GL_PREFIX(_dispatch_stub_764, _dispatch_stub_764@12)) + GL_STUB(_dispatch_stub_765, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_765@12) + HIDDEN(GL_PREFIX(_dispatch_stub_765, _dispatch_stub_765@12)) GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4) GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8) GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12) @@ -1069,6 +1082,43 @@ GLNAME(gl_dispatch_functions_start): GL_STUB_ALIAS(CompressedTexSubImage2D, _gloffset_CompressedTexSubImage2DARB, CompressedTexSubImage2D@36, CompressedTexSubImage2DARB, CompressedTexSubImage2DARB@36) GL_STUB_ALIAS(CompressedTexSubImage3D, _gloffset_CompressedTexSubImage3DARB, CompressedTexSubImage3D@44, CompressedTexSubImage3DARB, CompressedTexSubImage3DARB@44) GL_STUB_ALIAS(GetCompressedTexImage, _gloffset_GetCompressedTexImageARB, GetCompressedTexImage@12, GetCompressedTexImageARB, GetCompressedTexImageARB@12) + GL_STUB_ALIAS(DisableVertexAttribArray, _gloffset_DisableVertexAttribArrayARB, DisableVertexAttribArray@4, DisableVertexAttribArrayARB, DisableVertexAttribArrayARB@4) + GL_STUB_ALIAS(EnableVertexAttribArray, _gloffset_EnableVertexAttribArrayARB, EnableVertexAttribArray@4, EnableVertexAttribArrayARB, EnableVertexAttribArrayARB@4) + GL_STUB_ALIAS(GetVertexAttribdv, _gloffset_GetVertexAttribdvARB, GetVertexAttribdv@12, GetVertexAttribdvARB, GetVertexAttribdvARB@12) + GL_STUB_ALIAS(GetVertexAttribfv, _gloffset_GetVertexAttribfvARB, GetVertexAttribfv@12, GetVertexAttribfvARB, GetVertexAttribfvARB@12) + GL_STUB_ALIAS(GetVertexAttribiv, _gloffset_GetVertexAttribivARB, GetVertexAttribiv@12, GetVertexAttribivARB, GetVertexAttribivARB@12) + GL_STUB_ALIAS(VertexAttrib1d, _gloffset_VertexAttrib1dARB, VertexAttrib1d@12, VertexAttrib1dARB, VertexAttrib1dARB@12) + GL_STUB_ALIAS(VertexAttrib1dv, _gloffset_VertexAttrib1dvARB, VertexAttrib1dv@8, VertexAttrib1dvARB, VertexAttrib1dvARB@8) + GL_STUB_ALIAS(VertexAttrib1f, _gloffset_VertexAttrib1fARB, VertexAttrib1f@8, VertexAttrib1fARB, VertexAttrib1fARB@8) + GL_STUB_ALIAS(VertexAttrib1fv, _gloffset_VertexAttrib1fvARB, VertexAttrib1fv@8, VertexAttrib1fvARB, VertexAttrib1fvARB@8) + GL_STUB_ALIAS(VertexAttrib1s, _gloffset_VertexAttrib1sARB, VertexAttrib1s@8, VertexAttrib1sARB, VertexAttrib1sARB@8) + GL_STUB_ALIAS(VertexAttrib1sv, _gloffset_VertexAttrib1svARB, VertexAttrib1sv@8, VertexAttrib1svARB, VertexAttrib1svARB@8) + GL_STUB_ALIAS(VertexAttrib2d, _gloffset_VertexAttrib2dARB, VertexAttrib2d@20, VertexAttrib2dARB, VertexAttrib2dARB@20) + GL_STUB_ALIAS(VertexAttrib2dv, _gloffset_VertexAttrib2dvARB, VertexAttrib2dv@8, VertexAttrib2dvARB, VertexAttrib2dvARB@8) + GL_STUB_ALIAS(VertexAttrib2f, _gloffset_VertexAttrib2fARB, VertexAttrib2f@12, VertexAttrib2fARB, VertexAttrib2fARB@12) + GL_STUB_ALIAS(VertexAttrib2fv, _gloffset_VertexAttrib2fvARB, VertexAttrib2fv@8, VertexAttrib2fvARB, VertexAttrib2fvARB@8) + GL_STUB_ALIAS(VertexAttrib2s, _gloffset_VertexAttrib2sARB, VertexAttrib2s@12, VertexAttrib2sARB, VertexAttrib2sARB@12) + GL_STUB_ALIAS(VertexAttrib2sv, _gloffset_VertexAttrib2svARB, VertexAttrib2sv@8, VertexAttrib2svARB, VertexAttrib2svARB@8) + GL_STUB_ALIAS(VertexAttrib3d, _gloffset_VertexAttrib3dARB, VertexAttrib3d@28, VertexAttrib3dARB, VertexAttrib3dARB@28) + GL_STUB_ALIAS(VertexAttrib3dv, _gloffset_VertexAttrib3dvARB, VertexAttrib3dv@8, VertexAttrib3dvARB, VertexAttrib3dvARB@8) + GL_STUB_ALIAS(VertexAttrib3f, _gloffset_VertexAttrib3fARB, VertexAttrib3f@16, VertexAttrib3fARB, VertexAttrib3fARB@16) + GL_STUB_ALIAS(VertexAttrib3fv, _gloffset_VertexAttrib3fvARB, VertexAttrib3fv@8, VertexAttrib3fvARB, VertexAttrib3fvARB@8) + GL_STUB_ALIAS(VertexAttrib3s, _gloffset_VertexAttrib3sARB, VertexAttrib3s@16, VertexAttrib3sARB, VertexAttrib3sARB@16) + GL_STUB_ALIAS(VertexAttrib3sv, _gloffset_VertexAttrib3svARB, VertexAttrib3sv@8, VertexAttrib3svARB, VertexAttrib3svARB@8) + GL_STUB_ALIAS(VertexAttrib4Nbv, _gloffset_VertexAttrib4NbvARB, VertexAttrib4Nbv@8, VertexAttrib4NbvARB, VertexAttrib4NbvARB@8) + GL_STUB_ALIAS(VertexAttrib4Niv, _gloffset_VertexAttrib4NivARB, VertexAttrib4Niv@8, VertexAttrib4NivARB, VertexAttrib4NivARB@8) + GL_STUB_ALIAS(VertexAttrib4Nsv, _gloffset_VertexAttrib4NsvARB, VertexAttrib4Nsv@8, VertexAttrib4NsvARB, VertexAttrib4NsvARB@8) + GL_STUB_ALIAS(VertexAttrib4Nub, _gloffset_VertexAttrib4NubARB, VertexAttrib4Nub@20, VertexAttrib4NubARB, VertexAttrib4NubARB@20) + GL_STUB_ALIAS(VertexAttrib4Nubv, _gloffset_VertexAttrib4NubvARB, VertexAttrib4Nubv@8, VertexAttrib4NubvARB, VertexAttrib4NubvARB@8) + GL_STUB_ALIAS(VertexAttrib4Nuiv, _gloffset_VertexAttrib4NuivARB, VertexAttrib4Nuiv@8, VertexAttrib4NuivARB, VertexAttrib4NuivARB@8) + GL_STUB_ALIAS(VertexAttrib4Nusv, _gloffset_VertexAttrib4NusvARB, VertexAttrib4Nusv@8, VertexAttrib4NusvARB, VertexAttrib4NusvARB@8) + GL_STUB_ALIAS(VertexAttrib4d, _gloffset_VertexAttrib4dARB, VertexAttrib4d@36, VertexAttrib4dARB, VertexAttrib4dARB@36) + GL_STUB_ALIAS(VertexAttrib4dv, _gloffset_VertexAttrib4dvARB, VertexAttrib4dv@8, VertexAttrib4dvARB, VertexAttrib4dvARB@8) + GL_STUB_ALIAS(VertexAttrib4f, _gloffset_VertexAttrib4fARB, VertexAttrib4f@20, VertexAttrib4fARB, VertexAttrib4fARB@20) + GL_STUB_ALIAS(VertexAttrib4fv, _gloffset_VertexAttrib4fvARB, VertexAttrib4fv@8, VertexAttrib4fvARB, VertexAttrib4fvARB@8) + GL_STUB_ALIAS(VertexAttrib4s, _gloffset_VertexAttrib4sARB, VertexAttrib4s@20, VertexAttrib4sARB, VertexAttrib4sARB@20) + GL_STUB_ALIAS(VertexAttrib4sv, _gloffset_VertexAttrib4svARB, VertexAttrib4sv@8, VertexAttrib4svARB, VertexAttrib4svARB@8) + GL_STUB_ALIAS(VertexAttribPointer, _gloffset_VertexAttribPointerARB, VertexAttribPointer@24, VertexAttribPointerARB, VertexAttribPointerARB@24) GL_STUB_ALIAS(BindBuffer, _gloffset_BindBufferARB, BindBuffer@8, BindBufferARB, BindBufferARB@8) GL_STUB_ALIAS(BufferData, _gloffset_BufferDataARB, BufferData@16, BufferDataARB, BufferDataARB@16) GL_STUB_ALIAS(BufferSubData, _gloffset_BufferSubDataARB, BufferSubData@16, BufferSubDataARB, BufferSubDataARB@16) @@ -1088,6 +1138,38 @@ GLNAME(gl_dispatch_functions_start): GL_STUB_ALIAS(GetQueryObjectuiv, _gloffset_GetQueryObjectuivARB, GetQueryObjectuiv@12, GetQueryObjectuivARB, GetQueryObjectuivARB@12) GL_STUB_ALIAS(GetQueryiv, _gloffset_GetQueryivARB, GetQueryiv@12, GetQueryivARB, GetQueryivARB@12) GL_STUB_ALIAS(IsQuery, _gloffset_IsQueryARB, IsQuery@4, IsQueryARB, IsQueryARB@4) + GL_STUB_ALIAS(CompileShader, _gloffset_CompileShaderARB, CompileShader@4, CompileShaderARB, CompileShaderARB@4) + GL_STUB_ALIAS(GetActiveUniform, _gloffset_GetActiveUniformARB, GetActiveUniform@28, GetActiveUniformARB, GetActiveUniformARB@28) + GL_STUB_ALIAS(GetShaderSource, _gloffset_GetShaderSourceARB, GetShaderSource@16, GetShaderSourceARB, GetShaderSourceARB@16) + GL_STUB_ALIAS(GetUniformLocation, _gloffset_GetUniformLocationARB, GetUniformLocation@8, GetUniformLocationARB, GetUniformLocationARB@8) + GL_STUB_ALIAS(GetUniformfv, _gloffset_GetUniformfvARB, GetUniformfv@12, GetUniformfvARB, GetUniformfvARB@12) + GL_STUB_ALIAS(GetUniformiv, _gloffset_GetUniformivARB, GetUniformiv@12, GetUniformivARB, GetUniformivARB@12) + GL_STUB_ALIAS(LinkProgram, _gloffset_LinkProgramARB, LinkProgram@4, LinkProgramARB, LinkProgramARB@4) + GL_STUB_ALIAS(ShaderSource, _gloffset_ShaderSourceARB, ShaderSource@16, ShaderSourceARB, ShaderSourceARB@16) + GL_STUB_ALIAS(Uniform1f, _gloffset_Uniform1fARB, Uniform1f@8, Uniform1fARB, Uniform1fARB@8) + GL_STUB_ALIAS(Uniform1fv, _gloffset_Uniform1fvARB, Uniform1fv@12, Uniform1fvARB, Uniform1fvARB@12) + GL_STUB_ALIAS(Uniform1i, _gloffset_Uniform1iARB, Uniform1i@8, Uniform1iARB, Uniform1iARB@8) + GL_STUB_ALIAS(Uniform1iv, _gloffset_Uniform1ivARB, Uniform1iv@12, Uniform1ivARB, Uniform1ivARB@12) + GL_STUB_ALIAS(Uniform2f, _gloffset_Uniform2fARB, Uniform2f@12, Uniform2fARB, Uniform2fARB@12) + GL_STUB_ALIAS(Uniform2fv, _gloffset_Uniform2fvARB, Uniform2fv@12, Uniform2fvARB, Uniform2fvARB@12) + GL_STUB_ALIAS(Uniform2i, _gloffset_Uniform2iARB, Uniform2i@12, Uniform2iARB, Uniform2iARB@12) + GL_STUB_ALIAS(Uniform2iv, _gloffset_Uniform2ivARB, Uniform2iv@12, Uniform2ivARB, Uniform2ivARB@12) + GL_STUB_ALIAS(Uniform3f, _gloffset_Uniform3fARB, Uniform3f@16, Uniform3fARB, Uniform3fARB@16) + GL_STUB_ALIAS(Uniform3fv, _gloffset_Uniform3fvARB, Uniform3fv@12, Uniform3fvARB, Uniform3fvARB@12) + GL_STUB_ALIAS(Uniform3i, _gloffset_Uniform3iARB, Uniform3i@16, Uniform3iARB, Uniform3iARB@16) + GL_STUB_ALIAS(Uniform3iv, _gloffset_Uniform3ivARB, Uniform3iv@12, Uniform3ivARB, Uniform3ivARB@12) + GL_STUB_ALIAS(Uniform4f, _gloffset_Uniform4fARB, Uniform4f@20, Uniform4fARB, Uniform4fARB@20) + GL_STUB_ALIAS(Uniform4fv, _gloffset_Uniform4fvARB, Uniform4fv@12, Uniform4fvARB, Uniform4fvARB@12) + GL_STUB_ALIAS(Uniform4i, _gloffset_Uniform4iARB, Uniform4i@20, Uniform4iARB, Uniform4iARB@20) + GL_STUB_ALIAS(Uniform4iv, _gloffset_Uniform4ivARB, Uniform4iv@12, Uniform4ivARB, Uniform4ivARB@12) + GL_STUB_ALIAS(UniformMatrix2fv, _gloffset_UniformMatrix2fvARB, UniformMatrix2fv@16, UniformMatrix2fvARB, UniformMatrix2fvARB@16) + GL_STUB_ALIAS(UniformMatrix3fv, _gloffset_UniformMatrix3fvARB, UniformMatrix3fv@16, UniformMatrix3fvARB, UniformMatrix3fvARB@16) + GL_STUB_ALIAS(UniformMatrix4fv, _gloffset_UniformMatrix4fvARB, UniformMatrix4fv@16, UniformMatrix4fvARB, UniformMatrix4fvARB@16) + GL_STUB_ALIAS(UseProgram, _gloffset_UseProgramObjectARB, UseProgram@4, UseProgramObjectARB, UseProgramObjectARB@4) + GL_STUB_ALIAS(ValidateProgram, _gloffset_ValidateProgramARB, ValidateProgram@4, ValidateProgramARB, ValidateProgramARB@4) + GL_STUB_ALIAS(BindAttribLocation, _gloffset_BindAttribLocationARB, BindAttribLocation@12, BindAttribLocationARB, BindAttribLocationARB@12) + GL_STUB_ALIAS(GetActiveAttrib, _gloffset_GetActiveAttribARB, GetActiveAttrib@28, GetActiveAttribARB, GetActiveAttribARB@28) + GL_STUB_ALIAS(GetAttribLocation, _gloffset_GetAttribLocationARB, GetAttribLocation@8, GetAttribLocationARB, GetAttribLocationARB@8) GL_STUB_ALIAS(DrawBuffers, _gloffset_DrawBuffersARB, DrawBuffers@8, DrawBuffersARB, DrawBuffersARB@8) GL_STUB_ALIAS(DrawBuffersATI, _gloffset_DrawBuffersARB, DrawBuffersATI@8, DrawBuffersARB, DrawBuffersARB@8) GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8) -- cgit v1.2.3 From e7b71f69190c9fec567163dd7f63df593e069678 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 3 Nov 2006 02:07:34 +0000 Subject: remove setting some driver funcs explicitly to NULL, as they are no longer set up later. Thix fixes a segfault in _mesa_Bitmap(). --- src/mesa/drivers/dri/r200/r200_context.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 9cec50147d..06b2a152d9 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -235,10 +235,6 @@ static void r200InitDriverFuncs( struct dd_function_table *functions ) { functions->GetBufferSize = r200GetBufferSize; functions->GetString = r200GetString; - - functions->Error = NULL; - functions->DrawPixels = NULL; - functions->Bitmap = NULL; } static const struct dri_debug_control debug_control[] = -- cgit v1.2.3 From 029d18cd3d79ff956c50b3486078d968d15bf0fb Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 3 Nov 2006 12:48:18 +0000 Subject: enable generic arrays for r200 hw vertex programs by assigning unused color and texture inputs to them. Not widely tested yet. This should eliminate all fallbacks due to vertex programs, except writes to back facing colors, or when exceeding a hw limit (12 temps, 12 attribs etc.). --- src/mesa/drivers/dri/r200/r200_context.h | 5 +- src/mesa/drivers/dri/r200/r200_maos_arrays.c | 63 ++++++++++++++++-- src/mesa/drivers/dri/r200/r200_tcl.c | 4 +- src/mesa/drivers/dri/r200/r200_vertprog.c | 98 ++++++++++++++++++++++------ 4 files changed, 143 insertions(+), 27 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index 07b6d6e12d..c6910f5238 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -725,8 +725,8 @@ struct r200_tcl_info { GLint last_offset; GLuint hw_primitive; -/* FIXME: what's the maximum number of components? */ - struct r200_dma_region *aos_components[11]; +/* hw can handle 12 components max */ + struct r200_dma_region *aos_components[12]; GLuint nr_aos_components; GLuint *Elts; @@ -738,6 +738,7 @@ struct r200_tcl_info { struct r200_dma_region fog; struct r200_dma_region tex[R200_MAX_TEXTURE_UNITS]; struct r200_dma_region norm; + struct r200_dma_region generic[16]; }; diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c index 92348c90ca..f6ab2f0074 100644 --- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c +++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c @@ -385,8 +385,8 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) GLuint vfmt0 = 0, vfmt1 = 0; GLuint count = VB->Count; GLuint i; - - if (1) { + + if (inputs & VERT_BIT_POS) { if (!rmesa->tcl.obj.buf) emit_vector( ctx, &rmesa->tcl.obj, @@ -404,7 +404,6 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) } component[nr++] = &rmesa->tcl.obj; } - if (inputs & VERT_BIT_NORMAL) { if (!rmesa->tcl.norm.buf) @@ -481,7 +480,7 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) vfmt0 |= R200_VTX_FP_RGB << R200_VTX_COLOR_1_SHIFT; component[nr++] = &rmesa->tcl.spec; } - + for ( i = 0 ; i < ctx->Const.MaxTextureUnits ; i++ ) { if (inputs & (VERT_BIT_TEX0 << i)) { if (!rmesa->tcl.tex[i].buf) @@ -497,6 +496,50 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) } } + if (ctx->VertexProgram._Enabled) { + int *vp_inputs = rmesa->curr_vp_hw->inputs; + for ( i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++ ) { + if (inputs & (1 << i)) { + int geninput = i - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[i]->data, + 4, + VB->AttribPtr[i]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + switch (vp_inputs[i]) { + case 0: + vfmt0 |= R200_VTX_W0 | R200_VTX_Z0; + break; + case 2: + case 3: + case 4: + case 5: + vfmt0 |= R200_VTX_FP_RGBA << (R200_VTX_COLOR_0_SHIFT + (vp_inputs[i] - 2) * 2); + break; + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + vfmt1 |= 4 << (R200_VTX_TEX0_COMP_CNT_SHIFT + (vp_inputs[i] - 6) * 3); + break; + case 13: + vfmt0 |= R200_VTX_XY1 | R200_VTX_Z1 | R200_VTX_W1; + break; + case 1: + case 12: + default: + assert(0); + } + } + } + } + if (vfmt0 != rmesa->hw.vtx.cmd[VTX_VTXFMT_0] || vfmt1 != rmesa->hw.vtx.cmd[VTX_VTXFMT_1]) { R200_STATECHANGE( rmesa, vtx ); @@ -522,7 +565,7 @@ void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs ) if (newinputs & VERT_BIT_NORMAL) r200ReleaseDmaRegion( rmesa, &rmesa->tcl.norm, __FUNCTION__ ); - + if (newinputs & VERT_BIT_FOG) r200ReleaseDmaRegion( rmesa, &rmesa->tcl.fog, __FUNCTION__ ); @@ -536,4 +579,14 @@ void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs ) if (newinputs & VERT_BIT_TEX(unit)) r200ReleaseDmaRegion( rmesa, &rmesa->tcl.tex[unit], __FUNCTION__ ); } + + if (ctx->VertexProgram._Enabled) { + int i; + for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) { + if (newinputs & (1 << i)) + r200ReleaseDmaRegion( rmesa, + &rmesa->tcl.generic[i - VERT_ATTRIB_GENERIC0], __FUNCTION__ ); + } + } + } diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c index dab478db92..3334d1e156 100644 --- a/src/mesa/drivers/dri/r200/r200_tcl.c +++ b/src/mesa/drivers/dri/r200/r200_tcl.c @@ -436,11 +436,13 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx, We only need to change compsel. */ GLuint out_compsel = 0; GLuint vp_out = rmesa->curr_vp_hw->mesa_program.Base.OutputsWritten; +#if 0 /* can't handle other inputs, generic attribs etc. currently - should never arrive here */ assert ((rmesa->curr_vp_hw->mesa_program.Base.InputsRead & ~(VERT_BIT_POS | VERT_BIT_NORMAL | VERT_BIT_COLOR0 | VERT_BIT_COLOR1 | VERT_BIT_FOG | VERT_BIT_TEX0 | VERT_BIT_TEX1 | VERT_BIT_TEX2 | VERT_BIT_TEX3 | VERT_BIT_TEX4 | VERT_BIT_TEX5)) == 0); +#endif inputs |= rmesa->curr_vp_hw->mesa_program.Base.InputsRead; assert(vp_out & (1 << VERT_RESULT_HPOS)); out_compsel = R200_OUTPUT_XYZW; @@ -577,7 +579,7 @@ static void transition_to_hwtnl( GLcontext *ctx ) rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] &= ~R200_FOG_USE_MASK; rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] |= R200_FOG_USE_VTX_FOG; } - + R200_STATECHANGE( rmesa, vte ); rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] &= ~(R200_VTX_XY_FMT|R200_VTX_Z_FMT); rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] |= R200_VTX_W0_FMT; diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 9ac7a96827..acea0dba99 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -404,6 +404,8 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte unsigned long hw_op; int dofogfix = 0; int fog_temp_i = 0; + int free_inputs; + int array_count = 0; vp->native = GL_FALSE; vp->translated = GL_TRUE; @@ -412,6 +414,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte if (mesa_vp->Base.NumInstructions == 0) return GL_FALSE; +#if 0 if ((mesa_vp->Base.InputsRead & ~(VERT_BIT_POS | VERT_BIT_NORMAL | VERT_BIT_COLOR0 | VERT_BIT_COLOR1 | VERT_BIT_FOG | VERT_BIT_TEX0 | VERT_BIT_TEX1 | VERT_BIT_TEX2 | @@ -422,6 +425,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte } return GL_FALSE; } +#endif if ((mesa_vp->Base.OutputsWritten & ~((1 << VERT_RESULT_HPOS) | (1 << VERT_RESULT_COL0) | (1 << VERT_RESULT_COL1) | @@ -470,35 +474,85 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte else mesa_vp->Base.NumNativeParameters = 0; - for(i=0; i < VERT_ATTRIB_MAX; i++) + for(i = 0; i < VERT_ATTRIB_MAX; i++) vp->inputs[i] = -1; + free_inputs = 0x2ffd; + /* fglrx uses fixed inputs as follows for conventional attribs. - generic attribs use non-fixed assignment, fglrx will always use the lowest attrib values available. - There are 12 generic attribs possible, corresponding to attrib 0, 2-11 and 13 in a hw vertex prog. - attr 1 and 12 are not available for generic attribs as those cannot be made vec4 (correspond to - vertex normal/weight) + generic attribs use non-fixed assignment, fglrx will always use the + lowest attrib values available. We'll just do the same. + There are 12 generic attribs possible, corresponding to attrib 0, 2-11 + and 13 in a hw vertex prog. + attr 1 and 12 aren't used for generic attribs as those cannot be made vec4 + (correspond to vertex normal/weight - maybe weight actually could be made vec4). + Additionally, not more than 12 arrays in total are possible I think. attr 0 is pos, R200_VTX_XY1|R200_VTX_Z1|R200_VTX_W1 in R200_SE_VTX_FMT_0 attr 2-5 use colors 0-3 (R200_VTX_FP_RGBA << R200_VTX_COLOR_0/1/2/3_SHIFT in R200_SE_VTX_FMT_0) attr 6-11 use tex 0-5 (4 << R200_VTX_TEX0/1/2/3/4/5_COMP_CNT_SHIFT in R200_SE_VTX_FMT_1) attr 13 uses vtx1 pos (R200_VTX_XY1|R200_VTX_Z1|R200_VTX_W1 in R200_SE_VTX_FMT_0) - generic attribs would require some more work (dma regions, renaming). */ +*/ -/* may look different when using idx buf / input_route instead of se_vtx_fmt? */ - vp->inputs[VERT_ATTRIB_POS] = 0; - vp->inputs[VERT_ATTRIB_WEIGHT] = 12; - vp->inputs[VERT_ATTRIB_NORMAL] = 1; - vp->inputs[VERT_ATTRIB_COLOR0] = 2; - vp->inputs[VERT_ATTRIB_COLOR1] = 3; - vp->inputs[VERT_ATTRIB_FOG] = 15; - vp->inputs[VERT_ATTRIB_TEX0] = 6; - vp->inputs[VERT_ATTRIB_TEX1] = 7; - vp->inputs[VERT_ATTRIB_TEX2] = 8; - vp->inputs[VERT_ATTRIB_TEX3] = 9; - vp->inputs[VERT_ATTRIB_TEX4] = 10; - vp->inputs[VERT_ATTRIB_TEX5] = 11; /* attr 4,5 and 13 are only used with generic attribs. Haven't seen attr 14 used, maybe that's for the hw pointsize vec1 (which is not possibe to use with vertex progs as it is lacking in vert prog specification) */ +/* may look different when using idx buf / input_route instead of se_vtx_fmt? */ + if (mesa_vp->Base.InputsRead & VERT_BIT_POS) { + vp->inputs[VERT_ATTRIB_POS] = 0; + free_inputs &= ~(1 << 0); + array_count++; + } + if (mesa_vp->Base.InputsRead & VERT_ATTRIB_WEIGHT) { + /* we don't actually handle that later. Then again, we don't have to... */ + vp->inputs[VERT_ATTRIB_WEIGHT] = 12; + array_count++; + } + if (mesa_vp->Base.InputsRead & VERT_BIT_NORMAL) { + vp->inputs[VERT_ATTRIB_NORMAL] = 1; + array_count++; + } + if (mesa_vp->Base.InputsRead & VERT_BIT_COLOR0) { + vp->inputs[VERT_ATTRIB_COLOR0] = 2; + free_inputs &= ~(1 << 2); + array_count++; + } + if (mesa_vp->Base.InputsRead & VERT_BIT_COLOR1) { + vp->inputs[VERT_ATTRIB_COLOR1] = 3; + free_inputs &= ~(1 << 3); + array_count++; + } + if (mesa_vp->Base.InputsRead & VERT_BIT_FOG) { + vp->inputs[VERT_ATTRIB_FOG] = 15; array_count++; + } + for (i = VERT_ATTRIB_TEX0; i <= VERT_ATTRIB_TEX5; i++) { + if (mesa_vp->Base.InputsRead & (1 << i)) { + vp->inputs[i] = i - VERT_ATTRIB_TEX0 + 6; + free_inputs &= ~(1 << (i - VERT_ATTRIB_TEX0 + 6)); + array_count++; + } + } + /* using VERT_ATTRIB_TEX6/7 would be illegal */ + /* completely ignore aliasing? */ + for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) { + int j; + /* completely ignore aliasing? */ + if (mesa_vp->Base.InputsRead & (1 << i)) { + array_count++; + if (array_count > 12) { + if (R200_DEBUG & DEBUG_FALLBACKS) { + fprintf(stderr, "more than 12 attribs used in vert prog\n"); + } + return GL_FALSE; + } + for (j = 0; j < 14; j++) { + /* will always find one due to limited array_count */ + if (free_inputs & (1 << j)) { + free_inputs &= ~(1 << j); + vp->inputs[i] = j; + break; + } + } + } + } if (!(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) { if (R200_DEBUG & DEBUG_FALLBACKS) { @@ -506,6 +560,12 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte } return GL_FALSE; } + if (free_inputs & 1) { + if (R200_DEBUG & DEBUG_FALLBACKS) { + fprintf(stderr, "can't handle vert prog without position input\n"); + } + return GL_FALSE; + } o_inst = vp->instr; for (vpi = mesa_vp->Base.Instructions; vpi->Opcode != OPCODE_END; vpi++, o_inst++){ -- cgit v1.2.3 From 61fd687c74610a5b3db5e9f3adb3ee2e9a5a6014 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 15:18:17 +0000 Subject: Minor changes to get ready for OpenGL 2.1. --- src/mesa/main/extensions.c | 1 + src/mesa/main/getstring.c | 10 +++++++++- src/mesa/main/mtypes.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 081ec995d3..135323f9c1 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -58,6 +58,7 @@ static const struct { { OFF, "GL_ARB_point_sprite", F(ARB_point_sprite) }, { OFF, "GL_ARB_shader_objects", F(ARB_shader_objects) }, { OFF, "GL_ARB_shading_language_100", F(ARB_shading_language_100) }, + { OFF, "GL_ARB_shading_language_120", F(ARB_shading_language_120) }, { OFF, "GL_ARB_shadow", F(ARB_shadow) }, { OFF, "GL_ARB_shadow_ambient", F(SGIX_shadow_ambient) }, { OFF, "GL_ARB_texture_border_clamp", F(ARB_texture_border_clamp) }, diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index f68bbf2ff3..f033ddc895 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -55,6 +55,7 @@ _mesa_GetString( GLenum name ) static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING; static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING; static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING; + static const char *version_2_1 = "1.5 Mesa " MESA_VERSION_STRING; #if FEATURE_ARB_shading_language_100 static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING; @@ -114,7 +115,14 @@ _mesa_GetString( GLenum name ) ctx->Extensions.ARB_vertex_shader && ctx->Extensions.ARB_fragment_shader && ctx->Extensions.ARB_texture_non_power_of_two) { - return (const GLubyte *) version_2_0; + if (ctx->Extensions.ARB_shading_language_120 && + ctx->Extensions.EXT_pixel_buffer_object && + ctx->Extensions.EXT_texture_sRGB) { + return (const GLubyte *) version_2_1; + } + else { + return (const GLubyte *) version_2_0; + } } else { return (const GLubyte *) version_1_5; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1399dddf50..0ed73beb3c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2406,6 +2406,7 @@ struct gl_extensions GLboolean ARB_point_sprite; GLboolean ARB_shader_objects; GLboolean ARB_shading_language_100; + GLboolean ARB_shading_language_120; GLboolean ARB_shadow; GLboolean ARB_texture_border_clamp; GLboolean ARB_texture_compression; -- cgit v1.2.3 From 4d5744e66dbe1057244cace18e2970e64fb27e78 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 16:50:22 +0000 Subject: reindent --- src/mesa/shader/shaderobjects_3dlabs.c | 2489 ++++++++++++++++---------------- 1 file changed, 1264 insertions(+), 1225 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects_3dlabs.c b/src/mesa/shader/shaderobjects_3dlabs.c index 96680f2140..aed6a96c6a 100755 --- a/src/mesa/shader/shaderobjects_3dlabs.c +++ b/src/mesa/shader/shaderobjects_3dlabs.c @@ -48,217 +48,214 @@ struct gl2_unknown_obj { - GLuint reference_count; - void (* _destructor) (struct gl2_unknown_intf **); + GLuint reference_count; + void (*_destructor) (struct gl2_unknown_intf **); }; struct gl2_unknown_impl { - struct gl2_unknown_intf *_vftbl; - struct gl2_unknown_obj _obj; + struct gl2_unknown_intf *_vftbl; + struct gl2_unknown_obj _obj; }; static void -_unknown_destructor (struct gl2_unknown_intf **intf) +_unknown_destructor(struct gl2_unknown_intf **intf) { } static void -_unknown_AddRef (struct gl2_unknown_intf **intf) +_unknown_AddRef(struct gl2_unknown_intf **intf) { - struct gl2_unknown_impl *impl = (struct gl2_unknown_impl *) intf; + struct gl2_unknown_impl *impl = (struct gl2_unknown_impl *) intf; - impl->_obj.reference_count++; + impl->_obj.reference_count++; } static void -_unknown_Release (struct gl2_unknown_intf **intf) +_unknown_Release(struct gl2_unknown_intf **intf) { - struct gl2_unknown_impl *impl = (struct gl2_unknown_impl *) intf; + struct gl2_unknown_impl *impl = (struct gl2_unknown_impl *) intf; - impl->_obj.reference_count--; - if (impl->_obj.reference_count == 0) - { - impl->_obj._destructor (intf); - _mesa_free ((void *) intf); - } + impl->_obj.reference_count--; + if (impl->_obj.reference_count == 0) { + impl->_obj._destructor(intf); + _mesa_free((void *) intf); + } } static struct gl2_unknown_intf ** -_unknown_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_unknown_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { - if (uiid == UIID_UNKNOWN) - { - (**intf).AddRef (intf); - return intf; - } - return NULL; + if (uiid == UIID_UNKNOWN) { + (**intf).AddRef(intf); + return intf; + } + return NULL; } static struct gl2_unknown_intf _unknown_vftbl = { - _unknown_AddRef, - _unknown_Release, - _unknown_QueryInterface + _unknown_AddRef, + _unknown_Release, + _unknown_QueryInterface }; static void -_unknown_constructor (struct gl2_unknown_impl *impl) +_unknown_constructor(struct gl2_unknown_impl *impl) { - impl->_vftbl = &_unknown_vftbl; - impl->_obj.reference_count = 1; - impl->_obj._destructor = _unknown_destructor; + impl->_vftbl = &_unknown_vftbl; + impl->_obj.reference_count = 1; + impl->_obj._destructor = _unknown_destructor; } struct gl2_unkinner_obj { - struct gl2_unknown_intf **unkouter; + struct gl2_unknown_intf **unkouter; }; struct gl2_unkinner_impl { - struct gl2_unknown_intf *_vftbl; - struct gl2_unkinner_obj _obj; + struct gl2_unknown_intf *_vftbl; + struct gl2_unkinner_obj _obj; }; static void -_unkinner_destructor (struct gl2_unknown_intf **intf) +_unkinner_destructor(struct gl2_unknown_intf **intf) { } static void -_unkinner_AddRef (struct gl2_unknown_intf **intf) +_unkinner_AddRef(struct gl2_unknown_intf **intf) { - struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; + struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; - (**impl->_obj.unkouter).AddRef (impl->_obj.unkouter); + (**impl->_obj.unkouter).AddRef(impl->_obj.unkouter); } static void -_unkinner_Release (struct gl2_unknown_intf **intf) +_unkinner_Release(struct gl2_unknown_intf **intf) { - struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; + struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; - (**impl->_obj.unkouter).Release (impl->_obj.unkouter); + (**impl->_obj.unkouter).Release(impl->_obj.unkouter); } static struct gl2_unknown_intf ** -_unkinner_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_unkinner_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { - struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; + struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; - return (**impl->_obj.unkouter).QueryInterface (impl->_obj.unkouter, uiid); + return (**impl->_obj.unkouter).QueryInterface(impl->_obj.unkouter, uiid); } static struct gl2_unknown_intf _unkinner_vftbl = { - _unkinner_AddRef, - _unkinner_Release, - _unkinner_QueryInterface + _unkinner_AddRef, + _unkinner_Release, + _unkinner_QueryInterface }; static void -_unkinner_constructor (struct gl2_unkinner_impl *impl, struct gl2_unknown_intf **outer) +_unkinner_constructor(struct gl2_unkinner_impl *impl, + struct gl2_unknown_intf **outer) { - impl->_vftbl = &_unkinner_vftbl; - impl->_obj.unkouter = outer; + impl->_vftbl = &_unkinner_vftbl; + impl->_obj.unkouter = outer; } struct gl2_generic_obj { - struct gl2_unknown_obj _unknown; - GLhandleARB name; - GLboolean delete_status; - GLcharARB *info_log; + struct gl2_unknown_obj _unknown; + GLhandleARB name; + GLboolean delete_status; + GLcharARB *info_log; }; struct gl2_generic_impl { - struct gl2_generic_intf *_vftbl; - struct gl2_generic_obj _obj; + struct gl2_generic_intf *_vftbl; + struct gl2_generic_obj _obj; }; static void -_generic_destructor (struct gl2_unknown_intf **intf) +_generic_destructor(struct gl2_unknown_intf **intf) { - GET_CURRENT_CONTEXT(ctx); - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; + GET_CURRENT_CONTEXT(ctx); + struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - _mesa_free ((void *) impl->_obj.info_log); + _mesa_free((void *) impl->_obj.info_log); - _glthread_LOCK_MUTEX (ctx->Shared->Mutex); - _mesa_HashRemove (ctx->Shared->GL2Objects, impl->_obj.name); - _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex); + _glthread_LOCK_MUTEX(ctx->Shared->Mutex); + _mesa_HashRemove(ctx->Shared->GL2Objects, impl->_obj.name); + _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - _unknown_destructor (intf); + _unknown_destructor(intf); } static struct gl2_unknown_intf ** -_generic_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_generic_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { - if (uiid == UIID_GENERIC) - { - (**intf).AddRef (intf); - return intf; - } - return _unknown_QueryInterface (intf, uiid); + if (uiid == UIID_GENERIC) { + (**intf).AddRef(intf); + return intf; + } + return _unknown_QueryInterface(intf, uiid); } static void -_generic_Delete (struct gl2_generic_intf **intf) +_generic_Delete(struct gl2_generic_intf **intf) { - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; + struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - if (impl->_obj.delete_status == GL_FALSE) - { - impl->_obj.delete_status = GL_TRUE; - (**intf)._unknown.Release ((struct gl2_unknown_intf **) intf); - } + if (impl->_obj.delete_status == GL_FALSE) { + impl->_obj.delete_status = GL_TRUE; + (**intf)._unknown.Release((struct gl2_unknown_intf **) intf); + } } static GLhandleARB -_generic_GetName (struct gl2_generic_intf **intf) +_generic_GetName(struct gl2_generic_intf **intf) { - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; + struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - return impl->_obj.name; + return impl->_obj.name; } static GLboolean -_generic_GetDeleteStatus (struct gl2_generic_intf **intf) +_generic_GetDeleteStatus(struct gl2_generic_intf **intf) { - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; + struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - return impl->_obj.delete_status; + return impl->_obj.delete_status; } static GLvoid -_generic_GetInfoLog (struct gl2_generic_intf **intf, GLsizei maxlen, GLcharARB *infolog) +_generic_GetInfoLog(struct gl2_generic_intf **intf, GLsizei maxlen, + GLcharARB * infolog) { struct gl2_generic_impl *impl = (struct gl2_generic_impl *) (intf); if (maxlen > 0) { - _mesa_strncpy (infolog, impl->_obj.info_log, maxlen - 1); + _mesa_strncpy(infolog, impl->_obj.info_log, maxlen - 1); infolog[maxlen - 1] = '\0'; } } static GLsizei -_generic_GetInfoLogLength (struct gl2_generic_intf **intf) +_generic_GetInfoLogLength(struct gl2_generic_intf **intf) { struct gl2_generic_impl *impl = (struct gl2_generic_impl *) (intf); if (impl->_obj.info_log == NULL) return 1; - return _mesa_strlen (impl->_obj.info_log) + 1; + return _mesa_strlen(impl->_obj.info_log) + 1; } static struct gl2_generic_intf _generic_vftbl = { { - _unknown_AddRef, - _unknown_Release, - _generic_QueryInterface - }, + _unknown_AddRef, + _unknown_Release, + _generic_QueryInterface}, _generic_Delete, - NULL, /* abstract GetType */ + NULL, /* abstract GetType */ _generic_GetName, _generic_GetDeleteStatus, _generic_GetInfoLog, @@ -266,922 +263,950 @@ static struct gl2_generic_intf _generic_vftbl = { }; static void -_generic_constructor (struct gl2_generic_impl *impl) +_generic_constructor(struct gl2_generic_impl *impl) { - GET_CURRENT_CONTEXT(ctx); + GET_CURRENT_CONTEXT(ctx); - _unknown_constructor ((struct gl2_unknown_impl *) impl); - impl->_vftbl = &_generic_vftbl; - impl->_obj._unknown._destructor = _generic_destructor; - impl->_obj.delete_status = GL_FALSE; - impl->_obj.info_log = NULL; + _unknown_constructor((struct gl2_unknown_impl *) impl); + impl->_vftbl = &_generic_vftbl; + impl->_obj._unknown._destructor = _generic_destructor; + impl->_obj.delete_status = GL_FALSE; + impl->_obj.info_log = NULL; - _glthread_LOCK_MUTEX (ctx->Shared->Mutex); - impl->_obj.name = _mesa_HashFindFreeKeyBlock (ctx->Shared->GL2Objects, 1); - _mesa_HashInsert (ctx->Shared->GL2Objects, impl->_obj.name, (void *) impl); - _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex); + _glthread_LOCK_MUTEX(ctx->Shared->Mutex); + impl->_obj.name = _mesa_HashFindFreeKeyBlock(ctx->Shared->GL2Objects, 1); + _mesa_HashInsert(ctx->Shared->GL2Objects, impl->_obj.name, (void *) impl); + _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); } struct gl2_container_obj { - struct gl2_generic_obj _generic; - struct gl2_generic_intf ***attached; - GLuint attached_count; + struct gl2_generic_obj _generic; + struct gl2_generic_intf ***attached; + GLuint attached_count; }; struct gl2_container_impl { - struct gl2_container_intf *_vftbl; - struct gl2_container_obj _obj; + struct gl2_container_intf *_vftbl; + struct gl2_container_obj _obj; }; static void -_container_destructor (struct gl2_unknown_intf **intf) +_container_destructor(struct gl2_unknown_intf **intf) { - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - GLuint i; + struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; + GLuint i; - for (i = 0; i < impl->_obj.attached_count; i++) - { - struct gl2_generic_intf **x = impl->_obj.attached[i]; - (**x)._unknown.Release ((struct gl2_unknown_intf **) x); - } + for (i = 0; i < impl->_obj.attached_count; i++) { + struct gl2_generic_intf **x = impl->_obj.attached[i]; + (**x)._unknown.Release((struct gl2_unknown_intf **) x); + } - _generic_destructor (intf); + _generic_destructor(intf); } static struct gl2_unknown_intf ** -_container_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_container_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { - if (uiid == UIID_CONTAINER) - { - (**intf).AddRef (intf); - return intf; - } - return _generic_QueryInterface (intf, uiid); + if (uiid == UIID_CONTAINER) { + (**intf).AddRef(intf); + return intf; + } + return _generic_QueryInterface(intf, uiid); } static GLboolean -_container_Attach (struct gl2_container_intf **intf, struct gl2_generic_intf **att) +_container_Attach(struct gl2_container_intf **intf, + struct gl2_generic_intf **att) { - GET_CURRENT_CONTEXT(ctx); - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - GLuint i; + GET_CURRENT_CONTEXT(ctx); + struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; + GLuint i; - for (i = 0; i < impl->_obj.attached_count; i++) - if (impl->_obj.attached[i] == att) - { - _mesa_error (ctx, GL_INVALID_OPERATION, "_container_Attach"); - return GL_FALSE; - } + for (i = 0; i < impl->_obj.attached_count; i++) + if (impl->_obj.attached[i] == att) { + _mesa_error(ctx, GL_INVALID_OPERATION, "_container_Attach"); + return GL_FALSE; + } - impl->_obj.attached = (struct gl2_generic_intf ***) _mesa_realloc (impl->_obj.attached, - impl->_obj.attached_count * sizeof (*impl->_obj.attached), (impl->_obj.attached_count + 1) * - sizeof (*impl->_obj.attached)); - if (impl->_obj.attached == NULL) - return GL_FALSE; + impl->_obj.attached = (struct gl2_generic_intf ***) + _mesa_realloc(impl->_obj.attached, + impl->_obj.attached_count * sizeof(*impl->_obj.attached), + (impl->_obj.attached_count + 1) * sizeof(*impl->_obj.attached)); + if (impl->_obj.attached == NULL) + return GL_FALSE; - impl->_obj.attached[impl->_obj.attached_count] = att; - impl->_obj.attached_count++; - (**att)._unknown.AddRef ((struct gl2_unknown_intf **) att); - return GL_TRUE; + impl->_obj.attached[impl->_obj.attached_count] = att; + impl->_obj.attached_count++; + (**att)._unknown.AddRef((struct gl2_unknown_intf **) att); + return GL_TRUE; } static GLboolean -_container_Detach (struct gl2_container_intf **intf, struct gl2_generic_intf **att) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - GLuint i, j; - - for (i = 0; i < impl->_obj.attached_count; i++) - if (impl->_obj.attached[i] == att) - { - for (j = i; j < impl->_obj.attached_count - 1; j++) - impl->_obj.attached[j] = impl->_obj.attached[j + 1]; - impl->_obj.attached = (struct gl2_generic_intf ***) _mesa_realloc (impl->_obj.attached, - impl->_obj.attached_count * sizeof (*impl->_obj.attached), - (impl->_obj.attached_count - 1) * sizeof (*impl->_obj.attached)); - impl->_obj.attached_count--; - (**att)._unknown.Release ((struct gl2_unknown_intf **) att); - return GL_TRUE; - } +_container_Detach(struct gl2_container_intf **intf, + struct gl2_generic_intf **att) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; + GLuint i, j; + + for (i = 0; i < impl->_obj.attached_count; i++) + if (impl->_obj.attached[i] == att) { + for (j = i; j < impl->_obj.attached_count - 1; j++) + impl->_obj.attached[j] = impl->_obj.attached[j + 1]; + impl->_obj.attached = (struct gl2_generic_intf ***) + _mesa_realloc(impl->_obj.attached, + impl->_obj.attached_count * sizeof(*impl->_obj.attached), + (impl->_obj.attached_count - 1) * sizeof(*impl->_obj.attached)); + impl->_obj.attached_count--; + (**att)._unknown.Release((struct gl2_unknown_intf **) att); + return GL_TRUE; + } - _mesa_error (ctx, GL_INVALID_OPERATION, "_container_Detach"); - return GL_FALSE; + _mesa_error(ctx, GL_INVALID_OPERATION, "_container_Detach"); + return GL_FALSE; } static GLsizei -_container_GetAttachedCount (struct gl2_container_intf **intf) +_container_GetAttachedCount(struct gl2_container_intf **intf) { - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; + struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - return impl->_obj.attached_count; + return impl->_obj.attached_count; } static struct gl2_generic_intf ** -_container_GetAttached (struct gl2_container_intf **intf, GLuint index) +_container_GetAttached(struct gl2_container_intf **intf, GLuint index) { - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; + struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - (**impl->_obj.attached[index])._unknown.AddRef ( - (struct gl2_unknown_intf **)impl->_obj.attached[index]); - return impl->_obj.attached[index]; + (**impl->_obj.attached[index])._unknown.AddRef((struct gl2_unknown_intf **) + impl->_obj.attached[index]); + return impl->_obj.attached[index]; } static struct gl2_container_intf _container_vftbl = { - { - { - _unknown_AddRef, - _unknown_Release, - _container_QueryInterface - }, - _generic_Delete, - NULL, /* abstract GetType */ - _generic_GetName, - _generic_GetDeleteStatus, + { + { + _unknown_AddRef, + _unknown_Release, + _container_QueryInterface + }, + _generic_Delete, + NULL, /* abstract GetType */ + _generic_GetName, + _generic_GetDeleteStatus, _generic_GetInfoLog, _generic_GetInfoLogLength - }, - _container_Attach, - _container_Detach, - _container_GetAttachedCount, - _container_GetAttached + }, + _container_Attach, + _container_Detach, + _container_GetAttachedCount, + _container_GetAttached }; static void -_container_constructor (struct gl2_container_impl *impl) +_container_constructor(struct gl2_container_impl *impl) { - _generic_constructor ((struct gl2_generic_impl *) impl); - impl->_vftbl = &_container_vftbl; - impl->_obj._generic._unknown._destructor = _container_destructor; - impl->_obj.attached = NULL; - impl->_obj.attached_count = 0; + _generic_constructor((struct gl2_generic_impl *) impl); + impl->_vftbl = &_container_vftbl; + impl->_obj._generic._unknown._destructor = _container_destructor; + impl->_obj.attached = NULL; + impl->_obj.attached_count = 0; } struct gl2_3dlabs_shhandle_obj { - struct gl2_unkinner_obj _unknown; + struct gl2_unkinner_obj _unknown; #if USE_3DLABS_FRONTEND - ShHandle handle; + ShHandle handle; #endif }; struct gl2_3dlabs_shhandle_impl { - struct gl2_3dlabs_shhandle_intf *_vftbl; - struct gl2_3dlabs_shhandle_obj _obj; + struct gl2_3dlabs_shhandle_intf *_vftbl; + struct gl2_3dlabs_shhandle_obj _obj; }; static void -_3dlabs_shhandle_destructor (struct gl2_unknown_intf **intf) +_3dlabs_shhandle_destructor(struct gl2_unknown_intf **intf) { #if USE_3DLABS_FRONTEND - struct gl2_3dlabs_shhandle_impl *impl = (struct gl2_3dlabs_shhandle_impl *) intf; - ShDestruct (impl->_obj.handle); + struct gl2_3dlabs_shhandle_impl *impl = + (struct gl2_3dlabs_shhandle_impl *) intf; + ShDestruct(impl->_obj.handle); #endif - _unkinner_destructor (intf); + _unkinner_destructor(intf); } static GLvoid * -_3dlabs_shhandle_GetShHandle (struct gl2_3dlabs_shhandle_intf **intf) +_3dlabs_shhandle_GetShHandle(struct gl2_3dlabs_shhandle_intf **intf) { #if USE_3DLABS_FRONTEND - struct gl2_3dlabs_shhandle_impl *impl = (struct gl2_3dlabs_shhandle_impl *) intf; - return impl->_obj.handle; + struct gl2_3dlabs_shhandle_impl *impl = + (struct gl2_3dlabs_shhandle_impl *) intf; + return impl->_obj.handle; #else - return NULL; + return NULL; #endif } static struct gl2_3dlabs_shhandle_intf _3dlabs_shhandle_vftbl = { - { - _unkinner_AddRef, - _unkinner_Release, - _unkinner_QueryInterface - }, - _3dlabs_shhandle_GetShHandle + { + _unkinner_AddRef, + _unkinner_Release, + _unkinner_QueryInterface}, + _3dlabs_shhandle_GetShHandle }; static void -_3dlabs_shhandle_constructor (struct gl2_3dlabs_shhandle_impl *impl, struct gl2_unknown_intf **outer) +_3dlabs_shhandle_constructor(struct gl2_3dlabs_shhandle_impl *impl, + struct gl2_unknown_intf **outer) { - _unkinner_constructor ((struct gl2_unkinner_impl *) impl, outer); - impl->_vftbl = &_3dlabs_shhandle_vftbl; + _unkinner_constructor((struct gl2_unkinner_impl *) impl, outer); + impl->_vftbl = &_3dlabs_shhandle_vftbl; #if USE_3DLABS_FRONTEND - impl->_obj.handle = NULL; + impl->_obj.handle = NULL; #endif } struct gl2_shader_obj { - struct gl2_generic_obj _generic; - struct gl2_3dlabs_shhandle_impl _3dlabs_shhandle; - GLboolean compile_status; - GLcharARB *source; - GLint *offsets; - GLsizei offset_count; + struct gl2_generic_obj _generic; + struct gl2_3dlabs_shhandle_impl _3dlabs_shhandle; + GLboolean compile_status; + GLcharARB *source; + GLint *offsets; + GLsizei offset_count; slang_code_object code; }; struct gl2_shader_impl { - struct gl2_shader_intf *_vftbl; - struct gl2_shader_obj _obj; + struct gl2_shader_intf *_vftbl; + struct gl2_shader_obj _obj; }; static void -_shader_destructor (struct gl2_unknown_intf **intf) +_shader_destructor(struct gl2_unknown_intf **intf) { - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; + struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - _mesa_free ((void *) impl->_obj.source); - _mesa_free ((void *) impl->_obj.offsets); - _slang_code_object_dtr (&impl->_obj.code); - _3dlabs_shhandle_destructor ((struct gl2_unknown_intf **) &impl->_obj._3dlabs_shhandle._vftbl); - _generic_destructor (intf); + _mesa_free((void *) impl->_obj.source); + _mesa_free((void *) impl->_obj.offsets); + _slang_code_object_dtr(&impl->_obj.code); + _3dlabs_shhandle_destructor((struct gl2_unknown_intf **) &impl->_obj. + _3dlabs_shhandle._vftbl); + _generic_destructor(intf); } static struct gl2_unknown_intf ** -_shader_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_shader_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { #if USE_3DLABS_FRONTEND - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; + struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; #endif - if (uiid == UIID_SHADER) - { - (**intf).AddRef (intf); - return intf; - } + if (uiid == UIID_SHADER) { + (**intf).AddRef(intf); + return intf; + } #if USE_3DLABS_FRONTEND - if (uiid == UIID_3DLABS_SHHANDLE) - { - (**intf).AddRef (intf); - return (struct gl2_unknown_intf **) &impl->_obj._3dlabs_shhandle._vftbl; - } + if (uiid == UIID_3DLABS_SHHANDLE) { + (**intf).AddRef(intf); + return (struct gl2_unknown_intf **) &impl->_obj._3dlabs_shhandle._vftbl; + } #endif - return _generic_QueryInterface (intf, uiid); + return _generic_QueryInterface(intf, uiid); } static GLenum -_shader_GetType (struct gl2_generic_intf **intf) +_shader_GetType(struct gl2_generic_intf **intf) { - return GL_SHADER_OBJECT_ARB; + return GL_SHADER_OBJECT_ARB; } static GLvoid -_shader_GetInfoLog (struct gl2_generic_intf **intf, GLsizei maxlen, GLcharARB *infolog) +_shader_GetInfoLog(struct gl2_generic_intf **intf, GLsizei maxlen, + GLcharARB * infolog) { struct gl2_shader_impl *impl = (struct gl2_shader_impl *) (intf); if (maxlen > 0) { if (impl->_obj._generic.info_log != NULL) { - GLsizei len = _mesa_strlen (impl->_obj._generic.info_log); + GLsizei len = _mesa_strlen(impl->_obj._generic.info_log); if (len > maxlen - 1) len = maxlen - 1; - _mesa_memcpy (infolog, impl->_obj._generic.info_log, len); + _mesa_memcpy(infolog, impl->_obj._generic.info_log, len); infolog += len; maxlen -= len; } if (impl->_obj.code.machine.infolog != NULL && impl->_obj.code.machine.infolog->text != NULL) { - GLsizei len = _mesa_strlen (impl->_obj.code.machine.infolog->text); + GLsizei len = _mesa_strlen(impl->_obj.code.machine.infolog->text); if (len > maxlen - 1) len = maxlen - 1; - _mesa_memcpy (infolog, impl->_obj.code.machine.infolog->text, len); + _mesa_memcpy(infolog, impl->_obj.code.machine.infolog->text, len); } infolog[maxlen - 1] = '\0'; } } static GLsizei -_shader_GetInfoLogLength (struct gl2_generic_intf **intf) +_shader_GetInfoLogLength(struct gl2_generic_intf **intf) { struct gl2_shader_impl *impl = (struct gl2_shader_impl *) (intf); GLsizei length = 1; if (impl->_obj._generic.info_log != NULL) - length += _mesa_strlen (impl->_obj._generic.info_log); + length += _mesa_strlen(impl->_obj._generic.info_log); if (impl->_obj.code.machine.infolog != NULL && impl->_obj.code.machine.infolog->text != NULL) - length += _mesa_strlen (impl->_obj.code.machine.infolog->text); + length += _mesa_strlen(impl->_obj.code.machine.infolog->text); return length; } static GLboolean -_shader_GetCompileStatus (struct gl2_shader_intf **intf) +_shader_GetCompileStatus(struct gl2_shader_intf **intf) { - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; + struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - return impl->_obj.compile_status; + return impl->_obj.compile_status; } static GLvoid -_shader_SetSource (struct gl2_shader_intf **intf, GLcharARB *src, GLint *off, GLsizei cnt) +_shader_SetSource(struct gl2_shader_intf **intf, GLcharARB * src, GLint * off, + GLsizei cnt) { - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; + struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - _mesa_free ((void *) impl->_obj.source); - impl->_obj.source = src; - _mesa_free ((void *) impl->_obj.offsets); - impl->_obj.offsets = off; - impl->_obj.offset_count = cnt; + _mesa_free((void *) impl->_obj.source); + impl->_obj.source = src; + _mesa_free((void *) impl->_obj.offsets); + impl->_obj.offsets = off; + impl->_obj.offset_count = cnt; } static const GLcharARB * -_shader_GetSource (struct gl2_shader_intf **intf) +_shader_GetSource(struct gl2_shader_intf **intf) { - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; + struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - return impl->_obj.source; + return impl->_obj.source; } static GLvoid -_shader_Compile (struct gl2_shader_intf **intf) +_shader_Compile(struct gl2_shader_intf **intf) { - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; + struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; #if USE_3DLABS_FRONTEND - char **strings; - TBuiltInResource res; + char **strings; + TBuiltInResource res; #else - slang_unit_type type; - slang_info_log info_log; + slang_unit_type type; + slang_info_log info_log; #endif - impl->_obj.compile_status = GL_FALSE; - _mesa_free ((void *) impl->_obj._generic.info_log); - impl->_obj._generic.info_log = NULL; + impl->_obj.compile_status = GL_FALSE; + _mesa_free((void *) impl->_obj._generic.info_log); + impl->_obj._generic.info_log = NULL; #if USE_3DLABS_FRONTEND - /* 3dlabs compiler expects us to feed it with null-terminated string array, - we've got only one big string with offsets, so we must split it; but when - there's only one string to deal with, we pass its address directly */ - - if (impl->_obj.offset_count <= 1) - strings = &impl->_obj.source; - else - { - GLsizei i, offset = 0; - - strings = (char **) _mesa_malloc (impl->_obj.offset_count * sizeof (char *)); - if (strings == NULL) - return; - - for (i = 0; i < impl->_obj.offset_count; i++) - { - GLsizei size = impl->_obj.offsets[i] - offset; - - strings[i] = (char *) _mesa_malloc ((size + 1) * sizeof (char)); - if (strings[i] == NULL) - { - GLsizei j; - - for (j = 0; j < i; j++) - _mesa_free (strings[j]); - _mesa_free (strings); - return; - } - - _mesa_memcpy (strings[i], impl->_obj.source + offset, size * sizeof (char)); - strings[i][size] = '\0'; - offset = impl->_obj.offsets[i]; - } - } - - /* TODO set these fields to some REAL numbers */ - res.maxLights = 8; - res.maxClipPlanes = 6; - res.maxTextureUnits = 2; - res.maxTextureCoords = 2; - res.maxVertexAttribs = 8; - res.maxVertexUniformComponents = 64; - res.maxVaryingFloats = 8; - res.maxVertexTextureImageUnits = 2; - res.maxCombinedTextureImageUnits = 2; - res.maxTextureImageUnits = 2; - res.maxFragmentUniformComponents = 64; - res.maxDrawBuffers = 1; - - if (ShCompile (impl->_obj._3dlabs_shhandle._obj.handle, strings, impl->_obj.offset_count, - EShOptFull, &res, 0)) - impl->_obj.compile_status = GL_TRUE; - if (impl->_obj.offset_count > 1) - { - GLsizei i; - - for (i = 0; i < impl->_obj.offset_count; i++) - _mesa_free (strings[i]); - _mesa_free (strings); - } - - impl->_obj._generic.info_log = _mesa_strdup (ShGetInfoLog ( - impl->_obj._3dlabs_shhandle._obj.handle)); + /* 3dlabs compiler expects us to feed it with null-terminated string array, + we've got only one big string with offsets, so we must split it; but when + there's only one string to deal with, we pass its address directly */ + + if (impl->_obj.offset_count <= 1) + strings = &impl->_obj.source; + else { + GLsizei i, offset = 0; + + strings = + (char **) _mesa_malloc(impl->_obj.offset_count * sizeof(char *)); + if (strings == NULL) + return; + + for (i = 0; i < impl->_obj.offset_count; i++) { + GLsizei size = impl->_obj.offsets[i] - offset; + + strings[i] = (char *) _mesa_malloc((size + 1) * sizeof(char)); + if (strings[i] == NULL) { + GLsizei j; + + for (j = 0; j < i; j++) + _mesa_free(strings[j]); + _mesa_free(strings); + return; + } + + _mesa_memcpy(strings[i], impl->_obj.source + offset, + size * sizeof(char)); + strings[i][size] = '\0'; + offset = impl->_obj.offsets[i]; + } + } + + /* TODO set these fields to some REAL numbers */ + res.maxLights = 8; + res.maxClipPlanes = 6; + res.maxTextureUnits = 2; + res.maxTextureCoords = 2; + res.maxVertexAttribs = 8; + res.maxVertexUniformComponents = 64; + res.maxVaryingFloats = 8; + res.maxVertexTextureImageUnits = 2; + res.maxCombinedTextureImageUnits = 2; + res.maxTextureImageUnits = 2; + res.maxFragmentUniformComponents = 64; + res.maxDrawBuffers = 1; + + if (ShCompile + (impl->_obj._3dlabs_shhandle._obj.handle, strings, + impl->_obj.offset_count, EShOptFull, &res, 0)) + impl->_obj.compile_status = GL_TRUE; + if (impl->_obj.offset_count > 1) { + GLsizei i; + + for (i = 0; i < impl->_obj.offset_count; i++) + _mesa_free(strings[i]); + _mesa_free(strings); + } + + impl->_obj._generic.info_log = + _mesa_strdup(ShGetInfoLog(impl->_obj._3dlabs_shhandle._obj.handle)); #else - if (impl->_vftbl->GetSubType (intf) == GL_FRAGMENT_SHADER) - type = slang_unit_fragment_shader; - else - type = slang_unit_vertex_shader; - slang_info_log_construct (&info_log); - if (_slang_compile (impl->_obj.source, &impl->_obj.code, type, &info_log)) + if (impl->_vftbl->GetSubType(intf) == GL_FRAGMENT_SHADER) + type = slang_unit_fragment_shader; + else + type = slang_unit_vertex_shader; + slang_info_log_construct(&info_log); + if (_slang_compile(impl->_obj.source, &impl->_obj.code, type, &info_log)) impl->_obj.compile_status = GL_TRUE; - if (info_log.text != NULL) - impl->_obj._generic.info_log = _mesa_strdup (info_log.text); - else if (impl->_obj.compile_status) - impl->_obj._generic.info_log = _mesa_strdup ("Compile OK.\n"); + if (info_log.text != NULL) + impl->_obj._generic.info_log = _mesa_strdup(info_log.text); + else if (impl->_obj.compile_status) + impl->_obj._generic.info_log = _mesa_strdup("Compile OK.\n"); else - impl->_obj._generic.info_log = _mesa_strdup ("Compile failed.\n"); - slang_info_log_destruct (&info_log); + impl->_obj._generic.info_log = _mesa_strdup("Compile failed.\n"); + slang_info_log_destruct(&info_log); #endif } static struct gl2_shader_intf _shader_vftbl = { - { - { - _unknown_AddRef, - _unknown_Release, - _shader_QueryInterface - }, - _generic_Delete, - _shader_GetType, - _generic_GetName, - _generic_GetDeleteStatus, + { + { + _unknown_AddRef, + _unknown_Release, + _shader_QueryInterface + }, + _generic_Delete, + _shader_GetType, + _generic_GetName, + _generic_GetDeleteStatus, _shader_GetInfoLog, _shader_GetInfoLogLength - }, - NULL, /* abstract GetSubType */ - _shader_GetCompileStatus, - _shader_SetSource, - _shader_GetSource, - _shader_Compile + }, + NULL, /* abstract GetSubType */ + _shader_GetCompileStatus, + _shader_SetSource, + _shader_GetSource, + _shader_Compile }; static void -_shader_constructor (struct gl2_shader_impl *impl) +_shader_constructor(struct gl2_shader_impl *impl) { - _generic_constructor ((struct gl2_generic_impl *) impl); - _3dlabs_shhandle_constructor (&impl->_obj._3dlabs_shhandle, (struct gl2_unknown_intf **) - &impl->_vftbl); - impl->_vftbl = &_shader_vftbl; - impl->_obj._generic._unknown._destructor = _shader_destructor; - impl->_obj.compile_status = GL_FALSE; - impl->_obj.source = NULL; - impl->_obj.offsets = NULL; - impl->_obj.offset_count = 0; - _slang_code_object_ctr (&impl->_obj.code); + _generic_constructor((struct gl2_generic_impl *) impl); + _3dlabs_shhandle_constructor(&impl->_obj._3dlabs_shhandle, + (struct gl2_unknown_intf **) + &impl->_vftbl); + impl->_vftbl = &_shader_vftbl; + impl->_obj._generic._unknown._destructor = _shader_destructor; + impl->_obj.compile_status = GL_FALSE; + impl->_obj.source = NULL; + impl->_obj.offsets = NULL; + impl->_obj.offset_count = 0; + _slang_code_object_ctr(&impl->_obj.code); } struct gl2_program_obj { - struct gl2_container_obj _container; - GLboolean link_status; - GLboolean validate_status; + struct gl2_container_obj _container; + GLboolean link_status; + GLboolean validate_status; #if USE_3DLABS_FRONTEND - ShHandle linker; - ShHandle uniforms; + ShHandle linker; + ShHandle uniforms; #endif - slang_program prog; + slang_program prog; }; struct gl2_program_impl { - struct gl2_program_intf *_vftbl; - struct gl2_program_obj _obj; + struct gl2_program_intf *_vftbl; + struct gl2_program_obj _obj; }; static void -_program_destructor (struct gl2_unknown_intf **intf) +_program_destructor(struct gl2_unknown_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; #if USE_3DLABS_FRONTEND - ShDestruct (impl->_obj.linker); - ShDestruct (impl->_obj.uniforms); + ShDestruct(impl->_obj.linker); + ShDestruct(impl->_obj.uniforms); #endif - _container_destructor (intf); - _slang_program_dtr (&impl->_obj.prog); + _container_destructor(intf); + _slang_program_dtr(&impl->_obj.prog); } static struct gl2_unknown_intf ** -_program_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_program_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { - if (uiid == UIID_PROGRAM) - { - (**intf).AddRef (intf); - return intf; - } - return _container_QueryInterface (intf, uiid); + if (uiid == UIID_PROGRAM) { + (**intf).AddRef(intf); + return intf; + } + return _container_QueryInterface(intf, uiid); } static GLenum -_program_GetType (struct gl2_generic_intf **intf) +_program_GetType(struct gl2_generic_intf **intf) { - return GL_PROGRAM_OBJECT_ARB; + return GL_PROGRAM_OBJECT_ARB; } static GLboolean -_program_Attach (struct gl2_container_intf **intf, struct gl2_generic_intf **att) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_unknown_intf **sha; - - sha = (**att)._unknown.QueryInterface ((struct gl2_unknown_intf **) att, UIID_SHADER); - if (sha == NULL) - { - _mesa_error (ctx, GL_INVALID_OPERATION, "_program_Attach"); - return GL_FALSE; - } +_program_Attach(struct gl2_container_intf **intf, + struct gl2_generic_intf **att) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl2_unknown_intf **sha; + + sha = + (**att)._unknown.QueryInterface((struct gl2_unknown_intf **) att, + UIID_SHADER); + if (sha == NULL) { + _mesa_error(ctx, GL_INVALID_OPERATION, "_program_Attach"); + return GL_FALSE; + } - (**sha).Release (sha); - return _container_Attach (intf, att); + (**sha).Release(sha); + return _container_Attach(intf, att); } static GLboolean -_program_GetLinkStatus (struct gl2_program_intf **intf) +_program_GetLinkStatus(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - return impl->_obj.link_status; + return impl->_obj.link_status; } static GLboolean -_program_GetValidateStatus (struct gl2_program_intf **intf) +_program_GetValidateStatus(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - return impl->_obj.validate_status; + return impl->_obj.validate_status; } static GLvoid -_program_Link (struct gl2_program_intf **intf) +_program_Link(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; #if USE_3DLABS_FRONTEND - ShHandle *handles; + ShHandle *handles; #endif - GLuint i, count; + GLuint i, count; slang_code_object *code[2]; GLboolean all_compiled = GL_TRUE; - impl->_obj.link_status = GL_FALSE; - _mesa_free ((void *) impl->_obj._container._generic.info_log); - impl->_obj._container._generic.info_log = NULL; - _slang_program_rst (&impl->_obj.prog); + impl->_obj.link_status = GL_FALSE; + _mesa_free((void *) impl->_obj._container._generic.info_log); + impl->_obj._container._generic.info_log = NULL; + _slang_program_rst(&impl->_obj.prog); #if USE_3DLABS_FRONTEND - handles = (ShHandle *) _mesa_malloc (impl->_obj._container.attached_count * sizeof (ShHandle)); - if (handles == NULL) - return; - - for (i = 0; i < impl->_obj._container.attached_count; i++) - { - struct gl2_generic_intf **gen = impl->_obj._container.attached[i]; - struct gl2_3dlabs_shhandle_intf **sh; - - sh = (struct gl2_3dlabs_shhandle_intf **) (**gen)._unknown.QueryInterface ( - (struct gl2_unknown_intf **) gen, UIID_3DLABS_SHHANDLE); - if (sh != NULL) - { - handles[i] = (**sh).GetShHandle (sh); - (**sh)._unknown.Release ((struct gl2_unknown_intf **) sh); - } - else - { - _mesa_free (handles); - return; - } - } - - if (ShLink (impl->_obj.linker, handles, impl->_obj._container.attached_count, - impl->_obj.uniforms, NULL, NULL)) - impl->_obj.link_status = GL_TRUE; - - impl->_obj._container._generic.info_log = _mesa_strdup (ShGetInfoLog (impl->_obj.linker)); + handles = + (ShHandle *) _mesa_malloc(impl->_obj._container.attached_count * + sizeof(ShHandle)); + if (handles == NULL) + return; + + for (i = 0; i < impl->_obj._container.attached_count; i++) { + struct gl2_generic_intf **gen = impl->_obj._container.attached[i]; + struct gl2_3dlabs_shhandle_intf **sh; + + sh = + (struct gl2_3dlabs_shhandle_intf **) (**gen)._unknown. + QueryInterface((struct gl2_unknown_intf **) gen, + UIID_3DLABS_SHHANDLE); + if (sh != NULL) { + handles[i] = (**sh).GetShHandle(sh); + (**sh)._unknown.Release((struct gl2_unknown_intf **) sh); + } + else { + _mesa_free(handles); + return; + } + } + + if (ShLink(impl->_obj.linker, handles, impl->_obj._container.attached_count, + impl->_obj.uniforms, NULL, NULL)) + impl->_obj.link_status = GL_TRUE; + + impl->_obj._container._generic.info_log = + _mesa_strdup(ShGetInfoLog(impl->_obj.linker)); #else count = impl->_obj._container.attached_count; if (count > 2) return; - for (i = 0; i < count; i++) - { - struct gl2_generic_intf **obj; - struct gl2_unknown_intf **unk; - struct gl2_shader_impl *sha; - - obj = impl->_obj._container.attached[i]; - unk = (**obj)._unknown.QueryInterface ((struct gl2_unknown_intf **) obj, UIID_SHADER); - if (unk == NULL) - return; - sha = (struct gl2_shader_impl *) unk; + + for (i = 0; i < count; i++) { + struct gl2_generic_intf **obj; + struct gl2_unknown_intf **unk; + struct gl2_shader_impl *sha; + + obj = impl->_obj._container.attached[i]; + unk = + (**obj)._unknown.QueryInterface((struct gl2_unknown_intf **) obj, + UIID_SHADER); + if (unk == NULL) + return; + sha = (struct gl2_shader_impl *) unk; code[i] = &sha->_obj.code; all_compiled = all_compiled && sha->_obj.compile_status; - (**unk).Release (unk); + (**unk).Release(unk); } impl->_obj.link_status = all_compiled; - if (!impl->_obj.link_status) - { - impl->_obj._container._generic.info_log = _mesa_strdup ( - "Error: One or more shaders has not successfully compiled.\n"); + if (!impl->_obj.link_status) { + impl->_obj._container._generic.info_log = + _mesa_strdup + ("Error: One or more shaders has not successfully compiled.\n"); return; } - impl->_obj.link_status = _slang_link (&impl->_obj.prog, code, count); - if (!impl->_obj.link_status) - { - impl->_obj._container._generic.info_log = _mesa_strdup ("Link failed.\n"); + impl->_obj.link_status = _slang_link(&impl->_obj.prog, code, count); + if (!impl->_obj.link_status) { + impl->_obj._container._generic.info_log = + _mesa_strdup("Link failed.\n"); return; } - impl->_obj._container._generic.info_log = _mesa_strdup ("Link OK.\n"); + impl->_obj._container._generic.info_log = _mesa_strdup("Link OK.\n"); #endif } static GLvoid -_program_Validate (struct gl2_program_intf **intf) +_program_Validate(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - impl->_obj.validate_status = GL_FALSE; - _mesa_free ((void *) impl->_obj._container._generic.info_log); - impl->_obj._container._generic.info_log = NULL; + impl->_obj.validate_status = GL_FALSE; + _mesa_free((void *) impl->_obj._container._generic.info_log); + impl->_obj._container._generic.info_log = NULL; - /* TODO validate */ + /* TODO validate */ } static GLvoid -write_common_fixed (slang_program *pro, GLuint index, const GLvoid *src, GLuint off, GLuint size) +write_common_fixed(slang_program * pro, GLuint index, const GLvoid * src, + GLuint off, GLuint size) { - GLuint i; + GLuint i; - for (i = 0; i < SLANG_SHADER_MAX; i++) - { - GLuint addr; + for (i = 0; i < SLANG_SHADER_MAX; i++) { + GLuint addr; - addr = pro->common_fixed_entries[i][index]; - if (addr != ~0) - { - GLubyte *dst; + addr = pro->common_fixed_entries[i][index]; + if (addr != ~0) { + GLubyte *dst; - dst = (GLubyte *) pro->machines[i]->mem + addr + off * size; - _mesa_memcpy (dst, src, size); - } - } + dst = (GLubyte *) pro->machines[i]->mem + addr + off * size; + _mesa_memcpy(dst, src, size); + } + } } static GLvoid -write_common_fixed_mat4 (slang_program *pro, GLmatrix *matrix, GLuint off, GLuint i, GLuint ii, - GLuint it, GLuint iit) +write_common_fixed_mat4(slang_program * pro, GLmatrix * matrix, GLuint off, + GLuint i, GLuint ii, GLuint it, GLuint iit) { - GLfloat mat[16]; + GLfloat mat[16]; - /* we want inverse matrix */ - if (!matrix->inv) - { - /* allocate inverse matrix and make it dirty */ - _math_matrix_alloc_inv (matrix); - _math_matrix_loadf (matrix, matrix->m); - } - _math_matrix_analyse (matrix); + /* we want inverse matrix */ + if (!matrix->inv) { + /* allocate inverse matrix and make it dirty */ + _math_matrix_alloc_inv(matrix); + _math_matrix_loadf(matrix, matrix->m); + } + _math_matrix_analyse(matrix); - write_common_fixed (pro, i, matrix->m, off, 16 * sizeof (GLfloat)); + write_common_fixed(pro, i, matrix->m, off, 16 * sizeof(GLfloat)); - /* inverse */ - write_common_fixed (pro, ii, matrix->inv, off, 16 * sizeof (GLfloat)); + /* inverse */ + write_common_fixed(pro, ii, matrix->inv, off, 16 * sizeof(GLfloat)); - /* transpose */ - _math_transposef (mat, matrix->m); - write_common_fixed (pro, it, mat, off, 16 * sizeof (GLfloat)); + /* transpose */ + _math_transposef(mat, matrix->m); + write_common_fixed(pro, it, mat, off, 16 * sizeof(GLfloat)); - /* inverse transpose */ - _math_transposef (mat, matrix->inv); - write_common_fixed (pro, iit, mat, off, 16 * sizeof (GLfloat)); + /* inverse transpose */ + _math_transposef(mat, matrix->inv); + write_common_fixed(pro, iit, mat, off, 16 * sizeof(GLfloat)); } static GLvoid -write_common_fixed_material (GLcontext *ctx, slang_program *pro, GLuint i, GLuint e, GLuint a, - GLuint d, GLuint sp, GLuint sh) +write_common_fixed_material(GLcontext * ctx, slang_program * pro, GLuint i, + GLuint e, GLuint a, GLuint d, GLuint sp, + GLuint sh) { - GLfloat v[17]; + GLfloat v[17]; - COPY_4FV(v, ctx->Light.Material.Attrib[e]); - COPY_4FV((v + 4), ctx->Light.Material.Attrib[a]); - COPY_4FV((v + 8), ctx->Light.Material.Attrib[d]); - COPY_4FV((v + 12), ctx->Light.Material.Attrib[sp]); - v[16] = ctx->Light.Material.Attrib[sh][0]; - write_common_fixed (pro, i, v, 0, 17 * sizeof (GLfloat)); + COPY_4FV(v, ctx->Light.Material.Attrib[e]); + COPY_4FV((v + 4), ctx->Light.Material.Attrib[a]); + COPY_4FV((v + 8), ctx->Light.Material.Attrib[d]); + COPY_4FV((v + 12), ctx->Light.Material.Attrib[sp]); + v[16] = ctx->Light.Material.Attrib[sh][0]; + write_common_fixed(pro, i, v, 0, 17 * sizeof(GLfloat)); } static GLvoid -write_common_fixed_light_model_product (GLcontext *ctx, slang_program *pro, GLuint i, GLuint e, - GLuint a) +write_common_fixed_light_model_product(GLcontext * ctx, slang_program * pro, + GLuint i, GLuint e, GLuint a) { - GLfloat v[4]; + GLfloat v[4]; - SCALE_4V(v, ctx->Light.Material.Attrib[a], ctx->Light.Model.Ambient); - ACC_4V(v, ctx->Light.Material.Attrib[e]); - write_common_fixed (pro, i, v, 0, 4 * sizeof (GLfloat)); + SCALE_4V(v, ctx->Light.Material.Attrib[a], ctx->Light.Model.Ambient); + ACC_4V(v, ctx->Light.Material.Attrib[e]); + write_common_fixed(pro, i, v, 0, 4 * sizeof(GLfloat)); } static GLvoid -write_common_fixed_light_product (GLcontext *ctx, slang_program *pro, GLuint off, GLuint i, GLuint a, - GLuint d, GLuint s) +write_common_fixed_light_product(GLcontext * ctx, slang_program * pro, + GLuint off, GLuint i, GLuint a, GLuint d, + GLuint s) { - GLfloat v[12]; + GLfloat v[12]; - SCALE_4V(v, ctx->Light.Light[off].Ambient, ctx->Light.Material.Attrib[a]); - SCALE_4V((v + 4), ctx->Light.Light[off].Diffuse, ctx->Light.Material.Attrib[d]); - SCALE_4V((v + 8), ctx->Light.Light[off].Specular, ctx->Light.Material.Attrib[s]); - write_common_fixed (pro, i, v, off, 12 * sizeof (GLfloat)); + SCALE_4V(v, ctx->Light.Light[off].Ambient, ctx->Light.Material.Attrib[a]); + SCALE_4V((v + 4), ctx->Light.Light[off].Diffuse, + ctx->Light.Material.Attrib[d]); + SCALE_4V((v + 8), ctx->Light.Light[off].Specular, + ctx->Light.Material.Attrib[s]); + write_common_fixed(pro, i, v, off, 12 * sizeof(GLfloat)); } static GLvoid -_program_UpdateFixedUniforms (struct gl2_program_intf **intf) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint i; - GLfloat v[29]; - GLfloat *p; - - /* MODELVIEW matrix */ - write_common_fixed_mat4 (pro, ctx->ModelviewMatrixStack.Top, 0, - SLANG_COMMON_FIXED_MODELVIEWMATRIX, - SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE, - SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE); - - /* PROJECTION matrix */ - write_common_fixed_mat4 (pro, ctx->ProjectionMatrixStack.Top, 0, - SLANG_COMMON_FIXED_PROJECTIONMATRIX, - SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE); - - /* MVP matrix */ - write_common_fixed_mat4 (pro, &ctx->_ModelProjectMatrix, 0, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE); - - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) - { - /* TEXTURE matrix */ - write_common_fixed_mat4 (pro, ctx->TextureMatrixStack[i].Top, i, - SLANG_COMMON_FIXED_TEXTUREMATRIX, - SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE); - - /* EYE_PLANE texture-coordinate generation */ - write_common_fixed (pro, SLANG_COMMON_FIXED_EYEPLANES, ctx->Texture.Unit[i].EyePlaneS, - i, 4 * sizeof (GLfloat)); - write_common_fixed (pro, SLANG_COMMON_FIXED_EYEPLANET, ctx->Texture.Unit[i].EyePlaneT, - i, 4 * sizeof (GLfloat)); - write_common_fixed (pro, SLANG_COMMON_FIXED_EYEPLANER, ctx->Texture.Unit[i].EyePlaneR, - i, 4 * sizeof (GLfloat)); - write_common_fixed (pro, SLANG_COMMON_FIXED_EYEPLANEQ, ctx->Texture.Unit[i].EyePlaneQ, - i, 4 * sizeof (GLfloat)); - - /* OBJECT_PLANE texture-coordinate generation */ - write_common_fixed (pro, SLANG_COMMON_FIXED_OBJECTPLANES, ctx->Texture.Unit[i].ObjectPlaneS, - i, 4 * sizeof (GLfloat)); - write_common_fixed (pro, SLANG_COMMON_FIXED_OBJECTPLANET, ctx->Texture.Unit[i].ObjectPlaneT, - i, 4 * sizeof (GLfloat)); - write_common_fixed (pro, SLANG_COMMON_FIXED_OBJECTPLANER, ctx->Texture.Unit[i].ObjectPlaneR, - i, 4 * sizeof (GLfloat)); - write_common_fixed (pro, SLANG_COMMON_FIXED_OBJECTPLANEQ, ctx->Texture.Unit[i].ObjectPlaneQ, - i, 4 * sizeof (GLfloat)); - } - - /* NORMAL matrix - upper 3x3 inverse transpose of MODELVIEW matrix */ - p = ctx->ModelviewMatrixStack.Top->inv; - v[0] = p[0]; - v[1] = p[4]; - v[2] = p[8]; - v[3] = p[1]; - v[4] = p[5]; - v[5] = p[9]; - v[6] = p[2]; - v[7] = p[6]; - v[8] = p[10]; - write_common_fixed (pro, SLANG_COMMON_FIXED_NORMALMATRIX, v, 0, 9 * sizeof (GLfloat)); - - /* normal scale */ - write_common_fixed (pro, SLANG_COMMON_FIXED_NORMALSCALE, &ctx->_ModelViewInvScale, 0, sizeof (GLfloat)); - - /* depth range parameters */ - v[0] = ctx->Viewport.Near; - v[1] = ctx->Viewport.Far; - v[2] = ctx->Viewport.Far - ctx->Viewport.Near; - write_common_fixed (pro, SLANG_COMMON_FIXED_DEPTHRANGE, v, 0, 3 * sizeof (GLfloat)); - - /* CLIP_PLANEi */ - for (i = 0; i < ctx->Const.MaxClipPlanes; i++) - { - write_common_fixed (pro, SLANG_COMMON_FIXED_CLIPPLANE, ctx->Transform.EyeUserPlane[i], i, - 4 * sizeof (GLfloat)); - } - - /* point parameters */ - v[0] = ctx->Point.Size; - v[1] = ctx->Point.MinSize; - v[2] = ctx->Point.MaxSize; - v[3] = ctx->Point.Threshold; - COPY_3FV((v + 4), ctx->Point.Params); - write_common_fixed (pro, SLANG_COMMON_FIXED_POINT, v, 0, 7 * sizeof (GLfloat)); - - /* material parameters */ - write_common_fixed_material (ctx, pro, SLANG_COMMON_FIXED_FRONTMATERIAL, - MAT_ATTRIB_FRONT_EMISSION, - MAT_ATTRIB_FRONT_AMBIENT, - MAT_ATTRIB_FRONT_DIFFUSE, - MAT_ATTRIB_FRONT_SPECULAR, - MAT_ATTRIB_FRONT_SHININESS); - write_common_fixed_material (ctx, pro, SLANG_COMMON_FIXED_BACKMATERIAL, - MAT_ATTRIB_BACK_EMISSION, - MAT_ATTRIB_BACK_AMBIENT, - MAT_ATTRIB_BACK_DIFFUSE, - MAT_ATTRIB_BACK_SPECULAR, - MAT_ATTRIB_BACK_SHININESS); - - for (i = 0; i < ctx->Const.MaxLights; i++) - { - /* light source parameters */ - COPY_4FV(v, ctx->Light.Light[i].Ambient); - COPY_4FV((v + 4), ctx->Light.Light[i].Diffuse); - COPY_4FV((v + 8), ctx->Light.Light[i].Specular); - COPY_4FV((v + 12), ctx->Light.Light[i].EyePosition); - COPY_2FV((v + 16), ctx->Light.Light[i].EyePosition); - v[18] = ctx->Light.Light[i].EyePosition[2] + 1.0f; - NORMALIZE_3FV((v + 16)); - v[19] = 0.0f; - COPY_3V((v + 20), ctx->Light.Light[i].EyeDirection); - v[23] = ctx->Light.Light[i].SpotExponent; - v[24] = ctx->Light.Light[i].SpotCutoff; - v[25] = ctx->Light.Light[i]._CosCutoffNeg; - v[26] = ctx->Light.Light[i].ConstantAttenuation; - v[27] = ctx->Light.Light[i].LinearAttenuation; - v[28] = ctx->Light.Light[i].QuadraticAttenuation; - write_common_fixed (pro, SLANG_COMMON_FIXED_LIGHTSOURCE, v, i, 29 * sizeof (GLfloat)); - - /* light product */ - write_common_fixed_light_product (ctx, pro, i, SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT, - MAT_ATTRIB_FRONT_AMBIENT, - MAT_ATTRIB_FRONT_DIFFUSE, - MAT_ATTRIB_FRONT_SPECULAR); - write_common_fixed_light_product (ctx, pro, i, SLANG_COMMON_FIXED_BACKLIGHTPRODUCT, - MAT_ATTRIB_BACK_AMBIENT, - MAT_ATTRIB_BACK_DIFFUSE, - MAT_ATTRIB_BACK_SPECULAR); - } - - /* light model parameters */ - write_common_fixed (pro, SLANG_COMMON_FIXED_LIGHTMODEL, ctx->Light.Model.Ambient, 0, 4 * sizeof (GLfloat)); - - /* light model product */ - write_common_fixed_light_model_product (ctx, pro, SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT, - MAT_ATTRIB_FRONT_EMISSION, - MAT_ATTRIB_FRONT_AMBIENT); - write_common_fixed_light_model_product (ctx, pro, SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT, - MAT_ATTRIB_BACK_EMISSION, - MAT_ATTRIB_BACK_AMBIENT); - - /* TEXTURE_ENV_COLOR */ - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) - { - write_common_fixed (pro, SLANG_COMMON_FIXED_TEXTUREENVCOLOR, ctx->Texture.Unit[i].EnvColor, - i, 4 * sizeof (GLfloat)); - } - - /* fog parameters */ - COPY_4FV(v, ctx->Fog.Color); - v[4] = ctx->Fog.Density; - v[5] = ctx->Fog.Start; - v[6] = ctx->Fog.End; - v[7] = ctx->Fog._Scale; - write_common_fixed (pro, SLANG_COMMON_FIXED_FOG, v, 0, 8 * sizeof (GLfloat)); +_program_UpdateFixedUniforms(struct gl2_program_intf **intf) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + slang_program *pro = &impl->_obj.prog; + GLuint i; + GLfloat v[29]; + GLfloat *p; + + /* MODELVIEW matrix */ + write_common_fixed_mat4(pro, ctx->ModelviewMatrixStack.Top, 0, + SLANG_COMMON_FIXED_MODELVIEWMATRIX, + SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE, + SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE, + SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE); + + /* PROJECTION matrix */ + write_common_fixed_mat4(pro, ctx->ProjectionMatrixStack.Top, 0, + SLANG_COMMON_FIXED_PROJECTIONMATRIX, + SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE, + SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE, + SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE); + + /* MVP matrix */ + write_common_fixed_mat4(pro, &ctx->_ModelProjectMatrix, 0, + SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX, + SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE, + SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE, + SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE); + + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + /* TEXTURE matrix */ + write_common_fixed_mat4(pro, ctx->TextureMatrixStack[i].Top, i, + SLANG_COMMON_FIXED_TEXTUREMATRIX, + SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE, + SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE, + SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE); + + /* EYE_PLANE texture-coordinate generation */ + write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANES, + ctx->Texture.Unit[i].EyePlaneS, i, + 4 * sizeof(GLfloat)); + write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANET, + ctx->Texture.Unit[i].EyePlaneT, i, + 4 * sizeof(GLfloat)); + write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANER, + ctx->Texture.Unit[i].EyePlaneR, i, + 4 * sizeof(GLfloat)); + write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANEQ, + ctx->Texture.Unit[i].EyePlaneQ, i, + 4 * sizeof(GLfloat)); + + /* OBJECT_PLANE texture-coordinate generation */ + write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANES, + ctx->Texture.Unit[i].ObjectPlaneS, i, + 4 * sizeof(GLfloat)); + write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANET, + ctx->Texture.Unit[i].ObjectPlaneT, i, + 4 * sizeof(GLfloat)); + write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANER, + ctx->Texture.Unit[i].ObjectPlaneR, i, + 4 * sizeof(GLfloat)); + write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANEQ, + ctx->Texture.Unit[i].ObjectPlaneQ, i, + 4 * sizeof(GLfloat)); + } + + /* NORMAL matrix - upper 3x3 inverse transpose of MODELVIEW matrix */ + p = ctx->ModelviewMatrixStack.Top->inv; + v[0] = p[0]; + v[1] = p[4]; + v[2] = p[8]; + v[3] = p[1]; + v[4] = p[5]; + v[5] = p[9]; + v[6] = p[2]; + v[7] = p[6]; + v[8] = p[10]; + write_common_fixed(pro, SLANG_COMMON_FIXED_NORMALMATRIX, v, 0, + 9 * sizeof(GLfloat)); + + /* normal scale */ + write_common_fixed(pro, SLANG_COMMON_FIXED_NORMALSCALE, + &ctx->_ModelViewInvScale, 0, sizeof(GLfloat)); + + /* depth range parameters */ + v[0] = ctx->Viewport.Near; + v[1] = ctx->Viewport.Far; + v[2] = ctx->Viewport.Far - ctx->Viewport.Near; + write_common_fixed(pro, SLANG_COMMON_FIXED_DEPTHRANGE, v, 0, + 3 * sizeof(GLfloat)); + + /* CLIP_PLANEi */ + for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { + write_common_fixed(pro, SLANG_COMMON_FIXED_CLIPPLANE, + ctx->Transform.EyeUserPlane[i], i, + 4 * sizeof(GLfloat)); + } + + /* point parameters */ + v[0] = ctx->Point.Size; + v[1] = ctx->Point.MinSize; + v[2] = ctx->Point.MaxSize; + v[3] = ctx->Point.Threshold; + COPY_3FV((v + 4), ctx->Point.Params); + write_common_fixed(pro, SLANG_COMMON_FIXED_POINT, v, 0, + 7 * sizeof(GLfloat)); + + /* material parameters */ + write_common_fixed_material(ctx, pro, SLANG_COMMON_FIXED_FRONTMATERIAL, + MAT_ATTRIB_FRONT_EMISSION, + MAT_ATTRIB_FRONT_AMBIENT, + MAT_ATTRIB_FRONT_DIFFUSE, + MAT_ATTRIB_FRONT_SPECULAR, + MAT_ATTRIB_FRONT_SHININESS); + write_common_fixed_material(ctx, pro, SLANG_COMMON_FIXED_BACKMATERIAL, + MAT_ATTRIB_BACK_EMISSION, + MAT_ATTRIB_BACK_AMBIENT, + MAT_ATTRIB_BACK_DIFFUSE, + MAT_ATTRIB_BACK_SPECULAR, + MAT_ATTRIB_BACK_SHININESS); + + for (i = 0; i < ctx->Const.MaxLights; i++) { + /* light source parameters */ + COPY_4FV(v, ctx->Light.Light[i].Ambient); + COPY_4FV((v + 4), ctx->Light.Light[i].Diffuse); + COPY_4FV((v + 8), ctx->Light.Light[i].Specular); + COPY_4FV((v + 12), ctx->Light.Light[i].EyePosition); + COPY_2FV((v + 16), ctx->Light.Light[i].EyePosition); + v[18] = ctx->Light.Light[i].EyePosition[2] + 1.0f; + NORMALIZE_3FV((v + 16)); + v[19] = 0.0f; + COPY_3V((v + 20), ctx->Light.Light[i].EyeDirection); + v[23] = ctx->Light.Light[i].SpotExponent; + v[24] = ctx->Light.Light[i].SpotCutoff; + v[25] = ctx->Light.Light[i]._CosCutoffNeg; + v[26] = ctx->Light.Light[i].ConstantAttenuation; + v[27] = ctx->Light.Light[i].LinearAttenuation; + v[28] = ctx->Light.Light[i].QuadraticAttenuation; + write_common_fixed(pro, SLANG_COMMON_FIXED_LIGHTSOURCE, v, i, + 29 * sizeof(GLfloat)); + + /* light product */ + write_common_fixed_light_product(ctx, pro, i, + SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT, + MAT_ATTRIB_FRONT_AMBIENT, + MAT_ATTRIB_FRONT_DIFFUSE, + MAT_ATTRIB_FRONT_SPECULAR); + write_common_fixed_light_product(ctx, pro, i, + SLANG_COMMON_FIXED_BACKLIGHTPRODUCT, + MAT_ATTRIB_BACK_AMBIENT, + MAT_ATTRIB_BACK_DIFFUSE, + MAT_ATTRIB_BACK_SPECULAR); + } + + /* light model parameters */ + write_common_fixed(pro, SLANG_COMMON_FIXED_LIGHTMODEL, + ctx->Light.Model.Ambient, 0, 4 * sizeof(GLfloat)); + + /* light model product */ + write_common_fixed_light_model_product(ctx, pro, + SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT, + MAT_ATTRIB_FRONT_EMISSION, + MAT_ATTRIB_FRONT_AMBIENT); + write_common_fixed_light_model_product(ctx, pro, + SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT, + MAT_ATTRIB_BACK_EMISSION, + MAT_ATTRIB_BACK_AMBIENT); + + /* TEXTURE_ENV_COLOR */ + for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { + write_common_fixed(pro, SLANG_COMMON_FIXED_TEXTUREENVCOLOR, + ctx->Texture.Unit[i].EnvColor, i, + 4 * sizeof(GLfloat)); + } + + /* fog parameters */ + COPY_4FV(v, ctx->Fog.Color); + v[4] = ctx->Fog.Density; + v[5] = ctx->Fog.Start; + v[6] = ctx->Fog.End; + v[7] = ctx->Fog._Scale; + write_common_fixed(pro, SLANG_COMMON_FIXED_FOG, v, 0, 8 * sizeof(GLfloat)); } static GLvoid -_program_UpdateFixedAttrib (struct gl2_program_intf **intf, GLuint index, GLvoid *data, - GLuint offset, GLuint size, GLboolean write) +_program_UpdateFixedAttrib(struct gl2_program_intf **intf, GLuint index, + GLvoid * data, GLuint offset, GLuint size, + GLboolean write) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint addr; - - addr = pro->vertex_fixed_entries[index]; - if (addr != ~0) - { - GLubyte *mem; - - mem = (GLubyte *) pro->machines[SLANG_SHADER_VERTEX]->mem + addr + offset * size; - if (write) - _mesa_memcpy (mem, data, size); - else - _mesa_memcpy (data, mem, size); - } + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + slang_program *pro = &impl->_obj.prog; + GLuint addr; + + addr = pro->vertex_fixed_entries[index]; + if (addr != ~0) { + GLubyte *mem; + + mem = + (GLubyte *) pro->machines[SLANG_SHADER_VERTEX]->mem + addr + + offset * size; + if (write) + _mesa_memcpy(mem, data, size); + else + _mesa_memcpy(data, mem, size); + } } @@ -1199,594 +1224,602 @@ _program_UpdateFixedAttrib (struct gl2_program_intf **intf, GLuint index, GLvoid */ static GLvoid _program_UpdateFixedVarying(struct gl2_program_intf **intf, GLuint index, - GLvoid *data, + GLvoid * data, GLuint offset, GLuint size, GLboolean write) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint addr; - - addr = pro->fragment_fixed_entries[index]; - if (addr != ~0) - { - GLubyte *mem; - - mem = (GLubyte *) pro->machines[SLANG_SHADER_FRAGMENT]->mem + addr + offset * size; - if (write) - _mesa_memcpy (mem, data, size); - else - _mesa_memcpy (data, mem, size); - } + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + slang_program *pro = &impl->_obj.prog; + GLuint addr; + + addr = pro->fragment_fixed_entries[index]; + if (addr != ~0) { + GLubyte *mem; + + mem = + (GLubyte *) pro->machines[SLANG_SHADER_FRAGMENT]->mem + addr + + offset * size; + if (write) + _mesa_memcpy(mem, data, size); + else + _mesa_memcpy(data, mem, size); + } } static GLvoid -_program_GetTextureImageUsage (struct gl2_program_intf **intf, GLbitfield *teximageusage) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint i; - - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) - teximageusage[i] = 0; - - for (i = 0; i < pro->texture_usage.count; i++) - { - GLuint n, addr, j; - - n = slang_export_data_quant_elements (pro->texture_usage.table[i].quant); - addr = pro->texture_usage.table[i].frag_address; - for (j = 0; j < n; j++) - { - GLubyte *mem; - GLuint image; - - mem = (GLubyte *) pro->machines[SLANG_SHADER_FRAGMENT]->mem + addr + j * 4; - image = (GLuint) *((GLfloat *) mem); - if (image >= 0 && image < ctx->Const.MaxTextureImageUnits) - { - switch (slang_export_data_quant_type (pro->texture_usage.table[i].quant)) - { - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - teximageusage[image] |= TEXTURE_1D_BIT; - break; - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - teximageusage[image] |= TEXTURE_2D_BIT; - break; - case GL_SAMPLER_3D_ARB: - teximageusage[image] |= TEXTURE_3D_BIT; - break; - case GL_SAMPLER_CUBE_ARB: - teximageusage[image] |= TEXTURE_CUBE_BIT; - break; - } - } - } - } - - /* TODO: make sure that for 0<=i<=MaxTextureImageUint bitcount(teximageuint[i])<=0 */ +_program_GetTextureImageUsage(struct gl2_program_intf **intf, + GLbitfield * teximageusage) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + slang_program *pro = &impl->_obj.prog; + GLuint i; + + for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) + teximageusage[i] = 0; + + for (i = 0; i < pro->texture_usage.count; i++) { + GLuint n, addr, j; + + n = slang_export_data_quant_elements(pro->texture_usage.table[i].quant); + addr = pro->texture_usage.table[i].frag_address; + for (j = 0; j < n; j++) { + GLubyte *mem; + GLuint image; + + mem = + (GLubyte *) pro->machines[SLANG_SHADER_FRAGMENT]->mem + addr + + j * 4; + image = (GLuint) * ((GLfloat *) mem); + if (image >= 0 && image < ctx->Const.MaxTextureImageUnits) { + switch (slang_export_data_quant_type + (pro->texture_usage.table[i].quant)) { + case GL_SAMPLER_1D_ARB: + case GL_SAMPLER_1D_SHADOW_ARB: + teximageusage[image] |= TEXTURE_1D_BIT; + break; + case GL_SAMPLER_2D_ARB: + case GL_SAMPLER_2D_SHADOW_ARB: + teximageusage[image] |= TEXTURE_2D_BIT; + break; + case GL_SAMPLER_3D_ARB: + teximageusage[image] |= TEXTURE_3D_BIT; + break; + case GL_SAMPLER_CUBE_ARB: + teximageusage[image] |= TEXTURE_CUBE_BIT; + break; + } + } + } + } + + /* TODO: make sure that for 0<=i<=MaxTextureImageUint bitcount(teximageuint[i])<=0 */ } static GLboolean -_program_IsShaderPresent (struct gl2_program_intf **intf, GLenum subtype) +_program_IsShaderPresent(struct gl2_program_intf **intf, GLenum subtype) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + slang_program *pro = &impl->_obj.prog; - switch (subtype) - { - case GL_VERTEX_SHADER_ARB: - return pro->machines[SLANG_SHADER_VERTEX] != NULL; - case GL_FRAGMENT_SHADER_ARB: - return pro->machines[SLANG_SHADER_FRAGMENT] != NULL; - default: - return GL_FALSE; - } + switch (subtype) { + case GL_VERTEX_SHADER_ARB: + return pro->machines[SLANG_SHADER_VERTEX] != NULL; + case GL_FRAGMENT_SHADER_ARB: + return pro->machines[SLANG_SHADER_FRAGMENT] != NULL; + default: + return GL_FALSE; + } } static GLvoid -get_active_variable (slang_active_variable *var, GLsizei maxLength, GLsizei *length, GLint *size, - GLenum *type, GLchar *name) +get_active_variable(slang_active_variable * var, GLsizei maxLength, + GLsizei * length, GLint * size, GLenum * type, + GLchar * name) { - GLsizei len; + GLsizei len; - len = _mesa_strlen (var->name); - if (len >= maxLength) - len = maxLength - 1; - if (length != NULL) - *length = len; - *size = slang_export_data_quant_elements (var->quant); - *type = slang_export_data_quant_type (var->quant); - _mesa_memcpy (name, var->name, len); - name[len] = '\0'; + len = _mesa_strlen(var->name); + if (len >= maxLength) + len = maxLength - 1; + if (length != NULL) + *length = len; + *size = slang_export_data_quant_elements(var->quant); + *type = slang_export_data_quant_type(var->quant); + _mesa_memcpy(name, var->name, len); + name[len] = '\0'; } static GLuint -get_active_variable_max_length (slang_active_variables *vars) +get_active_variable_max_length(slang_active_variables * vars) { - GLuint i, len = 0; + GLuint i, len = 0; - for (i = 0; i < vars->count; i++) - { - GLuint n = _mesa_strlen (vars->table[i].name); - if (n > len) - len = n; - } - return len; + for (i = 0; i < vars->count; i++) { + GLuint n = _mesa_strlen(vars->table[i].name); + if (n > len) + len = n; + } + return len; } static GLvoid -_program_GetActiveUniform (struct gl2_program_intf **intf, GLuint index, GLsizei maxLength, - GLsizei *length, GLint *size, GLenum *type, GLchar *name) +_program_GetActiveUniform(struct gl2_program_intf **intf, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLchar * name) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_active_variable *u = &impl->_obj.prog.active_uniforms.table[index]; + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + slang_active_variable *u = &impl->_obj.prog.active_uniforms.table[index]; - get_active_variable (u, maxLength, length, size, type, name); + get_active_variable(u, maxLength, length, size, type, name); } static GLuint -_program_GetActiveUniformMaxLength (struct gl2_program_intf **intf) +_program_GetActiveUniformMaxLength(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - return get_active_variable_max_length (&impl->_obj.prog.active_uniforms); + return get_active_variable_max_length(&impl->_obj.prog.active_uniforms); } static GLuint -_program_GetActiveUniformCount (struct gl2_program_intf **intf) +_program_GetActiveUniformCount(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - return impl->_obj.prog.active_uniforms.count; + return impl->_obj.prog.active_uniforms.count; } static GLint -_program_GetUniformLocation (struct gl2_program_intf **intf, const GLchar *name) +_program_GetUniformLocation(struct gl2_program_intf **intf, + const GLchar * name) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_uniform_bindings *bind = &impl->_obj.prog.uniforms; - GLuint i; + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + slang_uniform_bindings *bind = &impl->_obj.prog.uniforms; + GLuint i; - for (i = 0; i < bind->count; i++) - if (_mesa_strcmp (bind->table[i].name, name) == 0) - return i; - return -1; + for (i = 0; i < bind->count; i++) + if (_mesa_strcmp(bind->table[i].name, name) == 0) + return i; + return -1; } static GLboolean -_program_WriteUniform (struct gl2_program_intf **intf, GLint loc, GLsizei count, const GLvoid *data, - GLenum type) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_uniform_bindings *uniforms = &impl->_obj.prog.uniforms; - slang_uniform_binding *uniform; - GLuint i; - GLboolean convert_float_to_bool = GL_FALSE; - GLboolean convert_int_to_bool = GL_FALSE; - GLboolean convert_int_to_float = GL_FALSE; - GLboolean types_match = GL_FALSE; - - if (loc == -1) - return GL_TRUE; - if (loc >= uniforms->count) - return GL_FALSE; - - uniform = &uniforms->table[loc]; - /* TODO: check sizes */ - if (slang_export_data_quant_struct (uniform->quant)) - return GL_FALSE; - - switch (slang_export_data_quant_type (uniform->quant)) - { - case GL_BOOL_ARB: - types_match = (type == GL_FLOAT) || (type == GL_INT); - if (type == GL_FLOAT) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_BOOL_VEC2_ARB: - types_match = (type == GL_FLOAT_VEC2_ARB) || (type == GL_INT_VEC2_ARB); - if (type == GL_FLOAT_VEC2_ARB) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_BOOL_VEC3_ARB: - types_match = (type == GL_FLOAT_VEC3_ARB) || (type == GL_INT_VEC3_ARB); - if (type == GL_FLOAT_VEC3_ARB) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_BOOL_VEC4_ARB: - types_match = (type == GL_FLOAT_VEC4_ARB) || (type == GL_INT_VEC4_ARB); - if (type == GL_FLOAT_VEC4_ARB) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_3D_ARB: - case GL_SAMPLER_CUBE_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - types_match = (type == GL_INT); - break; - default: - types_match = (type == slang_export_data_quant_type (uniform->quant)); - break; - } - - if (!types_match) - return GL_FALSE; - - switch (type) - { - case GL_INT: - case GL_INT_VEC2_ARB: - case GL_INT_VEC3_ARB: - case GL_INT_VEC4_ARB: - convert_int_to_float = GL_TRUE; - break; - } - - if (convert_float_to_bool) - { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) - { - const GLfloat *src = (GLfloat *) (data); - GLfloat *dst = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint j; - GLuint total = count * slang_export_data_quant_components (uniform->quant); - - for (j = 0; j < total; j++) - dst[j] = src[j] != 0.0f ? 1.0f : 0.0f; - } - } - else if (convert_int_to_bool) - { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) - { - const GLuint *src = (GLuint *) (data); - GLfloat *dst = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint j; - GLuint total = count * slang_export_data_quant_components (uniform->quant); - - for (j = 0; j < total; j++) - dst[j] = src[j] ? 1.0f : 0.0f; - } - } - else if (convert_int_to_float) - { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) - { - const GLuint *src = (GLuint *) (data); - GLfloat *dst = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint j; - GLuint total = count * slang_export_data_quant_components (uniform->quant); - - for (j = 0; j < total; j++) - dst[j] = (GLfloat) src[j]; - } - } - else - { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) - { - _mesa_memcpy (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4], data, - count * slang_export_data_quant_size (uniform->quant)); - } - } - return GL_TRUE; +_program_WriteUniform(struct gl2_program_intf **intf, GLint loc, + GLsizei count, const GLvoid * data, GLenum type) +{ + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + slang_uniform_bindings *uniforms = &impl->_obj.prog.uniforms; + slang_uniform_binding *uniform; + GLuint i; + GLboolean convert_float_to_bool = GL_FALSE; + GLboolean convert_int_to_bool = GL_FALSE; + GLboolean convert_int_to_float = GL_FALSE; + GLboolean types_match = GL_FALSE; + + if (loc == -1) + return GL_TRUE; + if (loc >= uniforms->count) + return GL_FALSE; + + uniform = &uniforms->table[loc]; + /* TODO: check sizes */ + if (slang_export_data_quant_struct(uniform->quant)) + return GL_FALSE; + + switch (slang_export_data_quant_type(uniform->quant)) { + case GL_BOOL_ARB: + types_match = (type == GL_FLOAT) || (type == GL_INT); + if (type == GL_FLOAT) + convert_float_to_bool = GL_TRUE; + else + convert_int_to_bool = GL_TRUE; + break; + case GL_BOOL_VEC2_ARB: + types_match = (type == GL_FLOAT_VEC2_ARB) || (type == GL_INT_VEC2_ARB); + if (type == GL_FLOAT_VEC2_ARB) + convert_float_to_bool = GL_TRUE; + else + convert_int_to_bool = GL_TRUE; + break; + case GL_BOOL_VEC3_ARB: + types_match = (type == GL_FLOAT_VEC3_ARB) || (type == GL_INT_VEC3_ARB); + if (type == GL_FLOAT_VEC3_ARB) + convert_float_to_bool = GL_TRUE; + else + convert_int_to_bool = GL_TRUE; + break; + case GL_BOOL_VEC4_ARB: + types_match = (type == GL_FLOAT_VEC4_ARB) || (type == GL_INT_VEC4_ARB); + if (type == GL_FLOAT_VEC4_ARB) + convert_float_to_bool = GL_TRUE; + else + convert_int_to_bool = GL_TRUE; + break; + case GL_SAMPLER_1D_ARB: + case GL_SAMPLER_2D_ARB: + case GL_SAMPLER_3D_ARB: + case GL_SAMPLER_CUBE_ARB: + case GL_SAMPLER_1D_SHADOW_ARB: + case GL_SAMPLER_2D_SHADOW_ARB: + types_match = (type == GL_INT); + break; + default: + types_match = (type == slang_export_data_quant_type(uniform->quant)); + break; + } + + if (!types_match) + return GL_FALSE; + + switch (type) { + case GL_INT: + case GL_INT_VEC2_ARB: + case GL_INT_VEC3_ARB: + case GL_INT_VEC4_ARB: + convert_int_to_float = GL_TRUE; + break; + } + + if (convert_float_to_bool) { + for (i = 0; i < SLANG_SHADER_MAX; i++) + if (uniform->address[i] != ~0) { + const GLfloat *src = (GLfloat *) (data); + GLfloat *dst = (GLfloat *) + (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); + GLuint j; + GLuint total = + count * slang_export_data_quant_components(uniform->quant); + + for (j = 0; j < total; j++) + dst[j] = src[j] != 0.0f ? 1.0f : 0.0f; + } + } + else if (convert_int_to_bool) { + for (i = 0; i < SLANG_SHADER_MAX; i++) + if (uniform->address[i] != ~0) { + const GLuint *src = (GLuint *) (data); + GLfloat *dst = (GLfloat *) + (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); + GLuint j; + GLuint total = + count * slang_export_data_quant_components(uniform->quant); + + for (j = 0; j < total; j++) + dst[j] = src[j] ? 1.0f : 0.0f; + } + } + else if (convert_int_to_float) { + for (i = 0; i < SLANG_SHADER_MAX; i++) + if (uniform->address[i] != ~0) { + const GLuint *src = (GLuint *) (data); + GLfloat *dst = (GLfloat *) + (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); + GLuint j; + GLuint total = + count * slang_export_data_quant_components(uniform->quant); + + for (j = 0; j < total; j++) + dst[j] = (GLfloat) src[j]; + } + } + else { + for (i = 0; i < SLANG_SHADER_MAX; i++) + if (uniform->address[i] != ~0) { + _mesa_memcpy(&impl->_obj.prog.machines[i]-> + mem[uniform->address[i] / 4], data, + count * + slang_export_data_quant_size(uniform->quant)); + } + } + return GL_TRUE; } static GLvoid -_program_GetActiveAttrib (struct gl2_program_intf **intf, GLuint index, GLsizei maxLength, - GLsizei *length, GLint *size, GLenum *type, GLchar *name) +_program_GetActiveAttrib(struct gl2_program_intf **intf, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLchar * name) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_active_variable *a = &impl->_obj.prog.active_attribs.table[index]; + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + slang_active_variable *a = &impl->_obj.prog.active_attribs.table[index]; - get_active_variable (a, maxLength, length, size, type, name); + get_active_variable(a, maxLength, length, size, type, name); } static GLuint -_program_GetActiveAttribMaxLength (struct gl2_program_intf **intf) +_program_GetActiveAttribMaxLength(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - return get_active_variable_max_length (&impl->_obj.prog.active_attribs); + return get_active_variable_max_length(&impl->_obj.prog.active_attribs); } static GLuint -_program_GetActiveAttribCount (struct gl2_program_intf **intf) +_program_GetActiveAttribCount(struct gl2_program_intf **intf) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - return impl->_obj.prog.active_attribs.count; + return impl->_obj.prog.active_attribs.count; } static GLint -_program_GetAttribLocation (struct gl2_program_intf **intf, const GLchar *name) +_program_GetAttribLocation(struct gl2_program_intf **intf, + const GLchar * name) { - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_attrib_bindings *attribs = &impl->_obj.prog.attribs; - GLuint i; + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + slang_attrib_bindings *attribs = &impl->_obj.prog.attribs; + GLuint i; - for (i = 0; i < attribs->binding_count; i++) - if (_mesa_strcmp (attribs->bindings[i].name, name) == 0) - return attribs->bindings[i].first_slot_index; - return -1; + for (i = 0; i < attribs->binding_count; i++) + if (_mesa_strcmp(attribs->bindings[i].name, name) == 0) + return attribs->bindings[i].first_slot_index; + return -1; } static GLvoid -_program_OverrideAttribBinding (struct gl2_program_intf **intf, GLuint index, const GLchar *name) +_program_OverrideAttribBinding(struct gl2_program_intf **intf, GLuint index, + const GLchar * name) { - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_program *pro = &impl->_obj.prog; + GET_CURRENT_CONTEXT(ctx); + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + slang_program *pro = &impl->_obj.prog; - if (!_slang_attrib_overrides_add (&pro->attrib_overrides, index, name)) - _mesa_error (ctx, GL_OUT_OF_MEMORY, "_program_OverrideAttribBinding"); + if (!_slang_attrib_overrides_add(&pro->attrib_overrides, index, name)) + _mesa_error(ctx, GL_OUT_OF_MEMORY, "_program_OverrideAttribBinding"); } static GLvoid -_program_WriteAttrib (struct gl2_program_intf **intf, GLuint index, const GLfloat *value) +_program_WriteAttrib(struct gl2_program_intf **intf, GLuint index, + const GLfloat * value) { struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); slang_program *pro = &impl->_obj.prog; slang_attrib_slot *slot = &pro->attribs.slots[index]; /* - * Generic attributes can be allocated in a shader with scalar, vec or mat type. - * For scalar and vec types (specifically float, vec2 and vec3) this is simple - just - * ignore the extra components. For mat type this is more complicated - the vertex_shader - * spec requires to store every column of a matrix in a separate attrib slot. - * To prvent from overwriting data from neighbouring matrix columns, the "fill" information - * is kept to know how many components to copy. + * Generic attributes can be allocated in a shader with scalar, vec + * or mat type. For scalar and vec types (specifically float, vec2 + * and vec3) this is simple - just ignore the extra components. For + * mat type this is more complicated - the vertex_shader spec + * requires to store every column of a matrix in a separate attrib + * slot. To prvent from overwriting data from neighbouring matrix + * columns, the "fill" information is kept to know how many + * components to copy. */ if (slot->addr != ~0) - _mesa_memcpy (&pro->machines[SLANG_SHADER_VERTEX]->mem[slot->addr / 4]._float, value, - slot->fill * sizeof (GLfloat)); + _mesa_memcpy(&pro->machines[SLANG_SHADER_VERTEX]->mem[slot->addr / 4]. + _float, value, slot->fill * sizeof(GLfloat)); } static GLvoid -_program_UpdateVarying (struct gl2_program_intf **intf, GLuint index, GLfloat *value, - GLboolean vert) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint addr; - - if (index >= pro->varyings.slot_count) - return; - if (vert) - addr = pro->varyings.slots[index].vert_addr / 4; - else - addr = pro->varyings.slots[index].frag_addr / 4; - if (addr != ~0) - { - if (vert) - *value = pro->machines[SLANG_SHADER_VERTEX]->mem[addr]._float; - else - pro->machines[SLANG_SHADER_FRAGMENT]->mem[addr]._float = *value; - } +_program_UpdateVarying(struct gl2_program_intf **intf, GLuint index, + GLfloat * value, GLboolean vert) +{ + struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; + slang_program *pro = &impl->_obj.prog; + GLuint addr; + + if (index >= pro->varyings.slot_count) + return; + if (vert) + addr = pro->varyings.slots[index].vert_addr / 4; + else + addr = pro->varyings.slots[index].frag_addr / 4; + if (addr != ~0) { + if (vert) + *value = pro->machines[SLANG_SHADER_VERTEX]->mem[addr]._float; + else + pro->machines[SLANG_SHADER_FRAGMENT]->mem[addr]._float = *value; + } } static struct gl2_program_intf _program_vftbl = { - { - { - { - _unknown_AddRef, - _unknown_Release, - _program_QueryInterface - }, - _generic_Delete, - _program_GetType, - _generic_GetName, - _generic_GetDeleteStatus, + { + { + { + _unknown_AddRef, + _unknown_Release, + _program_QueryInterface + }, + _generic_Delete, + _program_GetType, + _generic_GetName, + _generic_GetDeleteStatus, _generic_GetInfoLog, _generic_GetInfoLogLength - }, - _program_Attach, - _container_Detach, - _container_GetAttachedCount, - _container_GetAttached - }, - _program_GetLinkStatus, - _program_GetValidateStatus, - _program_Link, - _program_Validate, - _program_UpdateFixedUniforms, - _program_UpdateFixedAttrib, - _program_UpdateFixedVarying, - _program_GetTextureImageUsage, - _program_IsShaderPresent, - _program_GetActiveUniform, - _program_GetActiveUniformMaxLength, - _program_GetActiveUniformCount, - _program_GetUniformLocation, - _program_WriteUniform, - _program_GetActiveAttrib, - _program_GetActiveAttribMaxLength, - _program_GetActiveAttribCount, - _program_GetAttribLocation, - _program_OverrideAttribBinding, + }, + _program_Attach, + _container_Detach, + _container_GetAttachedCount, + _container_GetAttached + }, + _program_GetLinkStatus, + _program_GetValidateStatus, + _program_Link, + _program_Validate, + _program_UpdateFixedUniforms, + _program_UpdateFixedAttrib, + _program_UpdateFixedVarying, + _program_GetTextureImageUsage, + _program_IsShaderPresent, + _program_GetActiveUniform, + _program_GetActiveUniformMaxLength, + _program_GetActiveUniformCount, + _program_GetUniformLocation, + _program_WriteUniform, + _program_GetActiveAttrib, + _program_GetActiveAttribMaxLength, + _program_GetActiveAttribCount, + _program_GetAttribLocation, + _program_OverrideAttribBinding, _program_WriteAttrib, - _program_UpdateVarying + _program_UpdateVarying }; static void -_program_constructor (struct gl2_program_impl *impl) +_program_constructor(struct gl2_program_impl *impl) { - _container_constructor ((struct gl2_container_impl *) impl); - impl->_vftbl = &_program_vftbl; - impl->_obj._container._generic._unknown._destructor = _program_destructor; - impl->_obj.link_status = GL_FALSE; - impl->_obj.validate_status = GL_FALSE; + _container_constructor((struct gl2_container_impl *) impl); + impl->_vftbl = &_program_vftbl; + impl->_obj._container._generic._unknown._destructor = _program_destructor; + impl->_obj.link_status = GL_FALSE; + impl->_obj.validate_status = GL_FALSE; #if USE_3DLABS_FRONTEND - impl->_obj.linker = ShConstructLinker (EShExVertexFragment, 0); - impl->_obj.uniforms = ShConstructUniformMap (); + impl->_obj.linker = ShConstructLinker(EShExVertexFragment, 0); + impl->_obj.uniforms = ShConstructUniformMap(); #endif - _slang_program_ctr (&impl->_obj.prog); + _slang_program_ctr(&impl->_obj.prog); } struct gl2_fragment_shader_obj { - struct gl2_shader_obj _shader; + struct gl2_shader_obj _shader; }; struct gl2_fragment_shader_impl { - struct gl2_fragment_shader_intf *_vftbl; - struct gl2_fragment_shader_obj _obj; + struct gl2_fragment_shader_intf *_vftbl; + struct gl2_fragment_shader_obj _obj; }; static void -_fragment_shader_destructor (struct gl2_unknown_intf **intf) +_fragment_shader_destructor(struct gl2_unknown_intf **intf) { - struct gl2_fragment_shader_impl *impl = (struct gl2_fragment_shader_impl *) intf; + struct gl2_fragment_shader_impl *impl = + (struct gl2_fragment_shader_impl *) intf; - (void) impl; - /* TODO free fragment shader data */ + (void) impl; + /* TODO free fragment shader data */ - _shader_destructor (intf); + _shader_destructor(intf); } static struct gl2_unknown_intf ** -_fragment_shader_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_fragment_shader_QueryInterface(struct gl2_unknown_intf **intf, + enum gl2_uiid uiid) { - if (uiid == UIID_FRAGMENT_SHADER) - { - (**intf).AddRef (intf); - return intf; - } - return _shader_QueryInterface (intf, uiid); + if (uiid == UIID_FRAGMENT_SHADER) { + (**intf).AddRef(intf); + return intf; + } + return _shader_QueryInterface(intf, uiid); } static GLenum -_fragment_shader_GetSubType (struct gl2_shader_intf **intf) +_fragment_shader_GetSubType(struct gl2_shader_intf **intf) { - return GL_FRAGMENT_SHADER_ARB; + return GL_FRAGMENT_SHADER_ARB; } static struct gl2_fragment_shader_intf _fragment_shader_vftbl = { - { - { - { - _unknown_AddRef, - _unknown_Release, - _fragment_shader_QueryInterface - }, - _generic_Delete, - _shader_GetType, - _generic_GetName, - _generic_GetDeleteStatus, + { + { + { + _unknown_AddRef, + _unknown_Release, + _fragment_shader_QueryInterface + }, + _generic_Delete, + _shader_GetType, + _generic_GetName, + _generic_GetDeleteStatus, _shader_GetInfoLog, _shader_GetInfoLogLength - }, - _fragment_shader_GetSubType, - _shader_GetCompileStatus, - _shader_SetSource, - _shader_GetSource, - _shader_Compile - } + }, + _fragment_shader_GetSubType, + _shader_GetCompileStatus, + _shader_SetSource, + _shader_GetSource, + _shader_Compile + } }; static void -_fragment_shader_constructor (struct gl2_fragment_shader_impl *impl) +_fragment_shader_constructor(struct gl2_fragment_shader_impl *impl) { - _shader_constructor ((struct gl2_shader_impl *) impl); - impl->_vftbl = &_fragment_shader_vftbl; - impl->_obj._shader._generic._unknown._destructor = _fragment_shader_destructor; + _shader_constructor((struct gl2_shader_impl *) impl); + impl->_vftbl = &_fragment_shader_vftbl; + impl->_obj._shader._generic._unknown._destructor = + _fragment_shader_destructor; #if USE_3DLABS_FRONTEND - impl->_obj._shader._3dlabs_shhandle._obj.handle = ShConstructCompiler (EShLangFragment, 0); + impl->_obj._shader._3dlabs_shhandle._obj.handle = + ShConstructCompiler(EShLangFragment, 0); #endif } struct gl2_vertex_shader_obj { - struct gl2_shader_obj _shader; + struct gl2_shader_obj _shader; }; struct gl2_vertex_shader_impl { - struct gl2_vertex_shader_intf *_vftbl; - struct gl2_vertex_shader_obj _obj; + struct gl2_vertex_shader_intf *_vftbl; + struct gl2_vertex_shader_obj _obj; }; static void -_vertex_shader_destructor (struct gl2_unknown_intf **intf) +_vertex_shader_destructor(struct gl2_unknown_intf **intf) { - struct gl2_vertex_shader_impl *impl = (struct gl2_vertex_shader_impl *) intf; + struct gl2_vertex_shader_impl *impl = + (struct gl2_vertex_shader_impl *) intf; - (void) impl; - /* TODO free vertex shader data */ + (void) impl; + /* TODO free vertex shader data */ - _shader_destructor (intf); + _shader_destructor(intf); } static struct gl2_unknown_intf ** -_vertex_shader_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_vertex_shader_QueryInterface(struct gl2_unknown_intf **intf, + enum gl2_uiid uiid) { - if (uiid == UIID_VERTEX_SHADER) - { - (**intf).AddRef (intf); - return intf; - } - return _shader_QueryInterface (intf, uiid); + if (uiid == UIID_VERTEX_SHADER) { + (**intf).AddRef(intf); + return intf; + } + return _shader_QueryInterface(intf, uiid); } static GLenum -_vertex_shader_GetSubType (struct gl2_shader_intf **intf) +_vertex_shader_GetSubType(struct gl2_shader_intf **intf) { - return GL_VERTEX_SHADER_ARB; + return GL_VERTEX_SHADER_ARB; } static struct gl2_vertex_shader_intf _vertex_shader_vftbl = { - { - { - { - _unknown_AddRef, - _unknown_Release, - _vertex_shader_QueryInterface - }, - _generic_Delete, - _shader_GetType, - _generic_GetName, - _generic_GetDeleteStatus, + { + { + { + _unknown_AddRef, + _unknown_Release, + _vertex_shader_QueryInterface + }, + _generic_Delete, + _shader_GetType, + _generic_GetName, + _generic_GetDeleteStatus, _shader_GetInfoLog, _shader_GetInfoLogLength - }, - _vertex_shader_GetSubType, - _shader_GetCompileStatus, - _shader_SetSource, - _shader_GetSource, - _shader_Compile - } + }, + _vertex_shader_GetSubType, + _shader_GetCompileStatus, + _shader_SetSource, + _shader_GetSource, + _shader_Compile + } }; static void -_vertex_shader_constructor (struct gl2_vertex_shader_impl *impl) +_vertex_shader_constructor(struct gl2_vertex_shader_impl *impl) { - _shader_constructor ((struct gl2_shader_impl *) impl); - impl->_vftbl = &_vertex_shader_vftbl; - impl->_obj._shader._generic._unknown._destructor = _vertex_shader_destructor; + _shader_constructor((struct gl2_shader_impl *) impl); + impl->_vftbl = &_vertex_shader_vftbl; + impl->_obj._shader._generic._unknown._destructor = + _vertex_shader_destructor; #if USE_3DLABS_FRONTEND - impl->_obj._shader._3dlabs_shhandle._obj.handle = ShConstructCompiler (EShLangVertex, 0); + impl->_obj._shader._3dlabs_shhandle._obj.handle = + ShConstructCompiler(EShLangVertex, 0); #endif } @@ -1802,34 +1835,35 @@ struct gl2_debug_impl }; static GLvoid -_debug_destructor (struct gl2_unknown_intf **intf) +_debug_destructor(struct gl2_unknown_intf **intf) { struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); (void) (impl); /* TODO */ - _generic_destructor (intf); + _generic_destructor(intf); } static struct gl2_unknown_intf ** -_debug_QueryInterface (struct gl2_unknown_intf **intf, enum gl2_uiid uiid) +_debug_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) { if (uiid == UIID_DEBUG) { - (**intf).AddRef (intf); + (**intf).AddRef(intf); return intf; } - return _generic_QueryInterface (intf, uiid); + return _generic_QueryInterface(intf, uiid); } static GLenum -_debug_GetType (struct gl2_generic_intf **intf) +_debug_GetType(struct gl2_generic_intf **intf) { - return /*GL_DEBUG_OBJECT_MESA*/0; + return /*GL_DEBUG_OBJECT_MESA */ 0; } static GLvoid -_debug_ClearDebugLog (struct gl2_debug_intf **intf, GLenum logType, GLenum shaderType) +_debug_ClearDebugLog(struct gl2_debug_intf **intf, GLenum logType, + GLenum shaderType) { struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); @@ -1838,8 +1872,9 @@ _debug_ClearDebugLog (struct gl2_debug_intf **intf, GLenum logType, GLenum shade } static GLvoid -_debug_GetDebugLog (struct gl2_debug_intf **intf, GLenum logType, GLenum shaderType, - GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) +_debug_GetDebugLog(struct gl2_debug_intf **intf, GLenum logType, + GLenum shaderType, GLsizei maxLength, GLsizei * length, + GLcharARB * infoLog) { struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); @@ -1848,7 +1883,8 @@ _debug_GetDebugLog (struct gl2_debug_intf **intf, GLenum logType, GLenum shaderT } static GLsizei -_debug_GetDebugLogLength (struct gl2_debug_intf **intf, GLenum logType, GLenum shaderType) +_debug_GetDebugLogLength(struct gl2_debug_intf **intf, GLenum logType, + GLenum shaderType) { struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); @@ -1878,70 +1914,68 @@ static struct gl2_debug_intf _debug_vftbl = { }; static GLvoid -_debug_constructor (struct gl2_debug_impl *impl) +_debug_constructor(struct gl2_debug_impl *impl) { - _generic_constructor ((struct gl2_generic_impl *) (impl)); + _generic_constructor((struct gl2_generic_impl *) (impl)); impl->_vftbl = &_debug_vftbl; impl->_obj._generic._unknown._destructor = _debug_destructor; } GLhandleARB -_mesa_3dlabs_create_shader_object (GLenum shaderType) -{ - switch (shaderType) - { - case GL_FRAGMENT_SHADER_ARB: - { - struct gl2_fragment_shader_impl *x = (struct gl2_fragment_shader_impl *) - _mesa_malloc (sizeof (struct gl2_fragment_shader_impl)); - - if (x != NULL) - { - _fragment_shader_constructor (x); - return x->_obj._shader._generic.name; - } - } - break; - case GL_VERTEX_SHADER_ARB: - { - struct gl2_vertex_shader_impl *x = (struct gl2_vertex_shader_impl *) - _mesa_malloc (sizeof (struct gl2_vertex_shader_impl)); - - if (x != NULL) - { - _vertex_shader_constructor (x); - return x->_obj._shader._generic.name; - } - } - break; - } - - return 0; +_mesa_3dlabs_create_shader_object(GLenum shaderType) +{ + switch (shaderType) { + case GL_FRAGMENT_SHADER_ARB: + { + struct gl2_fragment_shader_impl *x = + (struct gl2_fragment_shader_impl *) + _mesa_malloc(sizeof(struct gl2_fragment_shader_impl)); + + if (x != NULL) { + _fragment_shader_constructor(x); + return x->_obj._shader._generic.name; + } + } + break; + case GL_VERTEX_SHADER_ARB: + { + struct gl2_vertex_shader_impl *x = (struct gl2_vertex_shader_impl *) + _mesa_malloc(sizeof(struct gl2_vertex_shader_impl)); + + if (x != NULL) { + _vertex_shader_constructor(x); + return x->_obj._shader._generic.name; + } + } + break; + } + + return 0; } GLhandleARB -_mesa_3dlabs_create_program_object (void) +_mesa_3dlabs_create_program_object(void) { - struct gl2_program_impl *x = (struct gl2_program_impl *) - _mesa_malloc (sizeof (struct gl2_program_impl)); + struct gl2_program_impl *x = (struct gl2_program_impl *) + _mesa_malloc(sizeof(struct gl2_program_impl)); - if (x != NULL) - { - _program_constructor (x); - return x->_obj._container._generic.name; - } + if (x != NULL) { + _program_constructor(x); + return x->_obj._container._generic.name; + } - return 0; + return 0; } GLhandleARB -_mesa_3dlabs_create_debug_object (GLvoid) +_mesa_3dlabs_create_debug_object(GLvoid) { struct gl2_debug_impl *obj; - obj = (struct gl2_debug_impl *) (_mesa_malloc (sizeof (struct gl2_debug_impl))); + obj = + (struct gl2_debug_impl *) (_mesa_malloc(sizeof(struct gl2_debug_impl))); if (obj != NULL) { - _debug_constructor (obj); + _debug_constructor(obj); return obj->_obj._generic.name; } return 0; @@ -1950,47 +1984,52 @@ _mesa_3dlabs_create_debug_object (GLvoid) #include "slang_assemble.h" #include "slang_execute.h" -int _slang_fetch_discard (struct gl2_program_intf **pro, GLboolean *val) +int +_slang_fetch_discard(struct gl2_program_intf **pro, GLboolean * val) { - struct gl2_program_impl *impl; + struct gl2_program_impl *impl; - impl = (struct gl2_program_impl *) pro; - *val = impl->_obj.prog.machines[SLANG_SHADER_FRAGMENT]->kill ? GL_TRUE : GL_FALSE; - return 1; + impl = (struct gl2_program_impl *) pro; + *val = + impl->_obj.prog.machines[SLANG_SHADER_FRAGMENT]-> + kill ? GL_TRUE : GL_FALSE; + return 1; } -static GLvoid exec_shader (struct gl2_program_intf **pro, GLuint i) +static GLvoid +exec_shader(struct gl2_program_intf **pro, GLuint i) { - struct gl2_program_impl *impl; - slang_program *p; + struct gl2_program_impl *impl; + slang_program *p; - impl = (struct gl2_program_impl *) pro; - p = &impl->_obj.prog; + impl = (struct gl2_program_impl *) pro; + p = &impl->_obj.prog; - slang_machine_init (p->machines[i]); - p->machines[i]->ip = p->code[i][SLANG_COMMON_CODE_MAIN]; + slang_machine_init(p->machines[i]); + p->machines[i]->ip = p->code[i][SLANG_COMMON_CODE_MAIN]; - _slang_execute2 (p->assemblies[i], p->machines[i]); + _slang_execute2(p->assemblies[i], p->machines[i]); } -GLvoid _slang_exec_fragment_shader (struct gl2_program_intf **pro) +GLvoid +_slang_exec_fragment_shader(struct gl2_program_intf **pro) { - exec_shader (pro, SLANG_SHADER_FRAGMENT); + exec_shader(pro, SLANG_SHADER_FRAGMENT); } -GLvoid _slang_exec_vertex_shader (struct gl2_program_intf **pro) +GLvoid +_slang_exec_vertex_shader(struct gl2_program_intf **pro) { - exec_shader (pro, SLANG_SHADER_VERTEX); + exec_shader(pro, SLANG_SHADER_VERTEX); } #endif void -_mesa_init_shaderobjects_3dlabs (GLcontext *ctx) +_mesa_init_shaderobjects_3dlabs(GLcontext * ctx) { #if USE_3DLABS_FRONTEND - _glslang_3dlabs_InitProcess (); - _glslang_3dlabs_ShInitialize (); + _glslang_3dlabs_InitProcess(); + _glslang_3dlabs_ShInitialize(); #endif } - -- cgit v1.2.3 From e90e8278240f1c4c00b5cc466e92ffd671181b31 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 17:18:05 +0000 Subject: reformat comments in Doxygen style --- src/mesa/shader/slang/slang_link.h | 115 +++++++++++++++++++++++-------------- 1 file changed, 71 insertions(+), 44 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 2195ec5bdf..433964223a 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.2 * * Copyright (C) 2006 Brian Paul All Rights Reserved. * @@ -38,13 +38,15 @@ enum SLANG_SHADER_MAX }; -/* + +/** * Active variables. * - * Active uniforms/attribs can be queried by the application to get a list of - * uniforms/attribs actually used by shaders (uniforms) or vertex shader only (attribs). + * Active uniforms/attribs can be queried by the application to get a + * list of uniforms/attribs actually used by shaders (uniforms) or + * vertex shader only (attribs). */ - +/*@{*/ typedef struct { slang_export_data_quant *quant; @@ -56,14 +58,17 @@ typedef struct slang_active_variable *table; GLuint count; } slang_active_variables; +/*@}*/ -/* + +/** * Attrib binding override. * - * The application can override GL attrib binding by specifying its preferred index assignment - * for a given attrib name. Those overrides are taken into account while linking the program. + * The application can override GL attrib binding by specifying its + * preferred index assignment for a given attrib name. Those overrides + * are taken into account while linking the program. */ - +/*@{*/ typedef struct { GLuint index; @@ -75,26 +80,33 @@ typedef struct slang_attrib_override *table; GLuint count; } slang_attrib_overrides; +/*@}*/ + extern GLboolean _slang_attrib_overrides_add (slang_attrib_overrides *, GLuint, const GLchar *); -/* + +/** * Uniform bindings. * - * Each slang_uniform_binding holds an array of addresses to actual memory locations in those - * shader types that use that uniform. Uniform bindings are held in an array and accessed - * by array index which is seen to the application as a uniform location. + * Each slang_uniform_binding holds an array of addresses to actual + * memory locations in those shader types that use that + * uniform. Uniform bindings are held in an array and accessed by + * array index which is seen to the application as a uniform location. * - * When the application writes to a particular uniform, it specifies its location. - * This location is treated as an array index to slang_uniform_bindings::table and tested - * against slang_uniform_bindings::count limit. The result is a pointer to slang_uniform_binding. - * The type of data being written to uniform is tested against slang_uniform_binding::quant. - * If the types are compatible, the array slang_uniform_binding::address is iterated for - * each shader type and if the address is valid (i.e. the uniform is used by this shader type), - * the new uniform value is written at that address. + * When the application writes to a particular uniform, it specifies + * its location. This location is treated as an array index to + * slang_uniform_bindings::table and tested against + * slang_uniform_bindings::count limit. The result is a pointer to + * slang_uniform_binding. The type of data being written to uniform + * is tested against slang_uniform_binding::quant. If the types are + * compatible, the array slang_uniform_binding::address is iterated + * for each shader type and if the address is valid (i.e. the uniform + * is used by this shader type), the new uniform value is written at + * that address. */ - +/*@{*/ typedef struct { slang_export_data_quant *quant; @@ -107,16 +119,20 @@ typedef struct slang_uniform_binding *table; GLuint count; } slang_uniform_bindings; +/*@}*/ -/* + +/** * Attrib bindings. * - * There is a fixed number of vertex attrib vectors (attrib slots). The slang_attrib_slot::addr - * maps vertex attrib index to the actual memory location of the attrib in vertex shader. - * One vertex attrib can span over many attrib slots (this is the case for matrices). The - * slang_attrib_binding::first_slot_index holds the first slot index that the attrib is bound to. + * There is a fixed number of vertex attrib vectors (attrib + * slots). The slang_attrib_slot::addr maps vertex attrib index to the + * actual memory location of the attrib in vertex shader. One vertex + * attrib can span over many attrib slots (this is the case for + * matrices). The slang_attrib_binding::first_slot_index holds the + * first slot index that the attrib is bound to. */ - +/*@{*/ typedef struct { slang_export_data_quant *quant; @@ -126,8 +142,8 @@ typedef struct typedef struct { - GLuint addr; /* memory location */ - GLuint fill; /* 1..4, number of components used */ + GLuint addr; /**< memory location */ + GLuint fill; /**< 1..4, number of components used */ } slang_attrib_slot; typedef struct @@ -136,16 +152,20 @@ typedef struct GLuint binding_count; slang_attrib_slot slots[MAX_VERTEX_ATTRIBS]; } slang_attrib_bindings; +/*@}*/ -/* + + +/** * Varying bindings. * - * There is a fixed number of varying floats (varying slots). The slang_varying_slot::vert_addr - * maps varying float index to the actual memory location of the output variable in vertex shader. - * The slang_varying_slot::frag_addr maps varying float index to the actual memory location of - * the input variable in fragment shader. + * There is a fixed number of varying floats (varying slots). The + * slang_varying_slot::vert_addr maps varying float index to the + * actual memory location of the output variable in vertex shader. + * The slang_varying_slot::frag_addr maps varying float index to the + * actual memory location of the input variable in fragment shader. */ - +/*@{*/ typedef struct { GLuint vert_addr; @@ -166,20 +186,25 @@ typedef struct slang_varying_slot slots[MAX_VARYING_FLOATS]; GLuint slot_count; } slang_varying_bindings; +/*@}*/ -/* + +/** * Texture usage. * - * A slang_texture_usage struct holds indirect information about texture image unit usage. The - * slang_texture_usages::table is derived from active uniform table by extracting only uniforms - * that are samplers. + * A slang_texture_usage struct holds indirect information about + * texture image unit usage. The slang_texture_usages::table is + * derived from active uniform table by extracting only uniforms that + * are samplers. * - * To collect current texture usage one must iterate the slang_texture_usages::table and read - * uniform at address slang_texture_usage::frag_address to get texture unit index. This - * index, coupled with texture access type (target) taken from slang_texture_usage::quant - * forms texture usage for that texture unit. + * To collect current texture usage one must iterate the + * slang_texture_usages::table and read uniform at address + * slang_texture_usage::frag_address to get texture unit index. This + * index, coupled with texture access type (target) taken from + * slang_texture_usage::quant forms texture usage for that texture + * unit. */ - +/*@{*/ typedef struct { slang_export_data_quant *quant; @@ -191,6 +216,8 @@ typedef struct slang_texture_usage *table; GLuint count; } slang_texture_usages; +/*@}*/ + extern GLvoid _slang_texture_usages_ctr (slang_texture_usages *); -- cgit v1.2.3 From bdb251bcbf94e71f3adba4183c363259c01cde60 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 17:29:31 +0000 Subject: Added OpenGL 2.1 glUniformMatrix* functions. Refactor the _mesa_UniformMatrix() functions to use a helper function. Implement GetUniformfv function (might need more work someday). --- src/mesa/shader/shaderobjects.c | 264 +++++++++++++++++---------------- src/mesa/shader/shaderobjects.h | 30 ++++ src/mesa/shader/shaderobjects_3dlabs.c | 32 ++++ 3 files changed, 199 insertions(+), 127 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 6540525e6e..b9068d4a96 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -50,6 +50,8 @@ #define RELEASE_SHADER(x)\ (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) + + static struct gl2_unknown_intf ** lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, const char *function) @@ -57,20 +59,21 @@ lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, struct gl2_unknown_intf **unk; /* - * Note: _mesa_HashLookup() requires non-zero input values, so the passed-in handle value - * must be checked beforehand. + * Note: _mesa_HashLookup() requires non-zero input values, so the + * passed-in handle value must be checked beforehand. */ if (handle == 0) { _mesa_error(ctx, GL_INVALID_VALUE, function); return NULL; } _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - unk = - (struct gl2_unknown_intf - **) (_mesa_HashLookup(ctx->Shared->GL2Objects, handle)); + unk = (struct gl2_unknown_intf **) + (_mesa_HashLookup(ctx->Shared->GL2Objects, handle)); _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - if (unk == NULL) + + if (unk == NULL) { _mesa_error(ctx, GL_INVALID_VALUE, function); + } else { unk = (**unk).QueryInterface(unk, uiid); if (unk == NULL) @@ -641,138 +644,88 @@ _mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) } } -GLvoid GLAPIENTRY -_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) + +/** + * Helper function used by UniformMatrix**vARB() functions below. + */ +static void +uniform_matrix(GLint cols, GLint rows, const char *caller, + GLenum matrixType, + GLint location, GLsizei count, GLboolean transpose, + const GLfloat *values) { + const GLint matElements = rows * cols; GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix2fvARB"); + GET_CURRENT_LINKED_PROGRAM(pro, caller); - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix2fvARB"); + if (values == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, caller); return; } FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) { - if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - - trans = (GLfloat *) _mesa_malloc(count * 4 * sizeof(GLfloat)); - if (trans == NULL) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glUniformMatrix2fvARB"); - return; - } - for (pt = trans, pv = value; pt != trans + count * 4; - pt += 4, pv += 4) { - pt[0] = pv[0]; - pt[1] = pv[2]; - pt[2] = pv[1]; - pt[3] = pv[3]; - } - if (!(**pro). - WriteUniform(pro, location, count, trans, GL_FLOAT_MAT2)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB"); - _mesa_free(trans); + if (!pro) + return; /* no error? */ + + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + GLint i, j, k; + + trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); + if (!trans) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); + return; } - else { - if (!(**pro). - WriteUniform(pro, location, count, value, GL_FLOAT_MAT2)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB"); + + pt = trans; + pv = values; + for (i = 0; i < count; i++) { + /* transpose from pv matrix into pt matrix */ + for (j = 0; j < cols; j++) { + for (k = 0; k < rows; k++) { + /* XXX verify this */ + pt[j * rows + k] = pv[k * cols + j]; + } + } + pt += matElements; + pv += matElements; } + + if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); + _mesa_free(trans); } + else { + if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); + } +} + + +GLvoid GLAPIENTRY +_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + uniform_matrix(2, 2, "glUniformMatrix2fvARB", GL_FLOAT_MAT2, + location, count, transpose, value); } GLvoid GLAPIENTRY _mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix3fvARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix3fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - - trans = (GLfloat *) _mesa_malloc(count * 9 * sizeof(GLfloat)); - if (trans == NULL) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glUniformMatrix3fvARB"); - return; - } - for (pt = trans, pv = value; pt != trans + count * 9; - pt += 9, pv += 9) { - pt[0] = pv[0]; - pt[1] = pv[3]; - pt[2] = pv[6]; - pt[3] = pv[1]; - pt[4] = pv[4]; - pt[5] = pv[7]; - pt[6] = pv[2]; - pt[7] = pv[5]; - pt[8] = pv[8]; - } - if (!(**pro). - WriteUniform(pro, location, count, trans, GL_FLOAT_MAT3)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB"); - _mesa_free(trans); - } - else { - if (!(**pro). - WriteUniform(pro, location, count, value, GL_FLOAT_MAT3)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB"); - } - } + uniform_matrix(3, 3, "glUniformMatrix3fvARB", GL_FLOAT_MAT3, + location, count, transpose, value); } GLvoid GLAPIENTRY _mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix4fvARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix4fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - - trans = (GLfloat *) _mesa_malloc(count * 16 * sizeof(GLfloat)); - if (trans == NULL) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glUniformMatrix4fvARB"); - return; - } - for (pt = trans, pv = value; pt != trans + count * 16; - pt += 16, pv += 16) { - _math_transposef(pt, pv); - } - if (!(**pro). - WriteUniform(pro, location, count, trans, GL_FLOAT_MAT4)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB"); - _mesa_free(trans); - } - else { - if (!(**pro). - WriteUniform(pro, location, count, value, GL_FLOAT_MAT4)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB"); - } - } + uniform_matrix(4, 4, "glUniformMatrix4fvARB", GL_FLOAT_MAT4, + location, count, transpose, value); } static GLboolean @@ -783,8 +736,8 @@ _mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, GLint *ipar = (GLint *) params; /* set default values */ - *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ - *size = 1; /* param array size */ + *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ + *size = 1; /* param array size */ switch (pname) { case GL_OBJECT_TYPE_ARB: @@ -830,7 +783,6 @@ _mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: { const GLcharARB *src = (**sha).GetSource(sha); - if (src == NULL) *ipar = 0; else @@ -904,14 +856,14 @@ _mesa_GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) assert(sizeof(GLfloat) == sizeof(GLint)); - if (_mesa_get_object_parameter - (obj, pname, (GLvoid *) params, &integral, &size)) + if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, + &integral, &size)) { if (integral) { GLint i; - for (i = 0; i < size; i++) params[i] = (GLfloat) ((GLint *) params)[i]; } + } } GLvoid GLAPIENTRY @@ -928,14 +880,14 @@ _mesa_GetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) assert(sizeof(GLfloat) == sizeof(GLint)); - if (_mesa_get_object_parameter - (obj, pname, (GLvoid *) params, &integral, &size)) + if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, + &integral, &size)) { if (!integral) { GLint i; - for (i = 0; i < size; i++) params[i] = (GLint) ((GLfloat *) params)[i]; } + } } @@ -1058,14 +1010,16 @@ _mesa_GetActiveUniformARB(GLhandleARB programObj, GLuint index, } GLvoid GLAPIENTRY -_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, - GLfloat * params) +_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) { GET_CURRENT_CONTEXT(ctx); GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); + /* XXX error-check location here */ + if (pro != NULL) { - /* TODO */ + if (!(**pro).ReadUniform(pro, location, 1, params)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); RELEASE_PROGRAM(pro); } } @@ -1250,6 +1204,62 @@ _mesa_IsShader(GLuint shader) } +/** + ** 2.1 functions + **/ + +void GLAPIENTRY +_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(2, 3, "glUniformMatrix2x3fv", GL_FLOAT_MAT2x3, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(3, 2, "glUniformMatrix3x2fv", GL_FLOAT_MAT3x2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(2, 4, "glUniformMatrix2x4fv", GL_FLOAT_MAT2x4, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(4, 2, "glUniformMatrix4x2fv", GL_FLOAT_MAT4x2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(3, 4, "glUniformMatrix3x4fv", GL_FLOAT_MAT3x4, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(4, 3, "glUniformMatrix4x3fv", GL_FLOAT_MAT4x3, + location, count, transpose, value); +} + + + + + #endif GLvoid diff --git a/src/mesa/shader/shaderobjects.h b/src/mesa/shader/shaderobjects.h index ebcf591611..3afd0c9b29 100644 --- a/src/mesa/shader/shaderobjects.h +++ b/src/mesa/shader/shaderobjects.h @@ -104,6 +104,8 @@ struct gl2_program_intf GLint (* GetUniformLocation) (struct gl2_program_intf **, const GLchar *name); GLboolean (* WriteUniform) (struct gl2_program_intf **, GLint loc, GLsizei count, const GLvoid *data, GLenum type); + GLboolean (* ReadUniform) (struct gl2_program_intf **, GLint loc, GLsizei count, + GLfloat *data); GLvoid (* GetActiveAttrib) (struct gl2_program_intf **, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *name); GLuint (* GetActiveAttribMaxLength) (struct gl2_program_intf **); @@ -315,6 +317,34 @@ extern GLboolean GLAPIENTRY _mesa_IsShader(GLuint shader); + +/* 2.1 */ +extern void GLAPIENTRY +_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + + + #endif /* FEATURE_ARB_shader_objects */ extern void diff --git a/src/mesa/shader/shaderobjects_3dlabs.c b/src/mesa/shader/shaderobjects_3dlabs.c index aed6a96c6a..0209e868ad 100755 --- a/src/mesa/shader/shaderobjects_3dlabs.c +++ b/src/mesa/shader/shaderobjects_3dlabs.c @@ -1514,6 +1514,37 @@ _program_WriteUniform(struct gl2_program_intf **intf, GLint loc, return GL_TRUE; } +static GLboolean +_program_ReadUniform(struct gl2_program_intf **intf, GLint loc, + GLsizei count, GLfloat *data) +{ + struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); + const slang_uniform_bindings *uniforms = &impl->_obj.prog.uniforms; + const slang_uniform_binding *uniform; + GLint i, j; + + if (loc < 0 || loc >= uniforms->count) + return GL_FALSE; + + uniform = &uniforms->table[loc]; + + /* loop over shader types (fragment, vertex) */ + for (i = 0; i < SLANG_SHADER_MAX; i++) { + if (uniform->address[i] != ~0) { + GLfloat *src = (GLfloat *) + (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); + GLuint total = + count * slang_export_data_quant_components(uniform->quant); + for (j = 0; j < total; j++) + data[j] = src[j]; + break; + } + } + + return GL_TRUE; +} + + static GLvoid _program_GetActiveAttrib(struct gl2_program_intf **intf, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, @@ -1647,6 +1678,7 @@ static struct gl2_program_intf _program_vftbl = { _program_GetActiveUniformCount, _program_GetUniformLocation, _program_WriteUniform, + _program_ReadUniform, _program_GetActiveAttrib, _program_GetActiveAttribMaxLength, _program_GetActiveAttribCount, -- cgit v1.2.3 From d00ef005fedb21a1b42c0a12264433089b7a10c5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 18:35:52 +0000 Subject: replace CONFIG_H with MESA_CONFIG_H_INCLUDED --- src/mesa/main/config.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index e2ba65ac63..5a0481328f 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -5,7 +5,7 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -28,8 +28,8 @@ */ -#ifndef CONFIG_H -#define CONFIG_H +#ifndef MESA_CONFIG_H_INCLUDED +#define MESA_CONFIG_H_INCLUDED /** * \name OpenGL implementation limits @@ -323,4 +323,4 @@ #define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1) -#endif /* CONFIG_H */ +#endif /* MESA_CONFIG_H_INCLUDED */ -- cgit v1.2.3 From 3c1ce571ed7a5e8d811a3fb8ed1667e0f71b5bfc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 19:54:40 +0000 Subject: only enabled memcpy timing if DO_DEBUG=1 --- src/mesa/drivers/dri/i915tex/intel_tex.c | 51 ++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_tex.c b/src/mesa/drivers/dri/i915tex/intel_tex.c index 51875ab292..8046c29d95 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex.c @@ -75,6 +75,31 @@ intelFreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage) } +/* The system memcpy (at least on ubuntu 5.10) has problems copying + * to agp (writecombined) memory from a source which isn't 64-byte + * aligned - there is a 4x performance falloff. + * + * The x86 __memcpy is immune to this but is slightly slower + * (10%-ish) than the system memcpy. + * + * The sse_memcpy seems to have a slight cliff at 64/32 bytes, but + * isn't much faster than x86_memcpy for agp copies. + * + * TODO: switch dynamically. + */ +static void * +do_memcpy(void *dest, const void *src, size_t n) +{ + if ((((unsigned) src) & 63) || (((unsigned) dest) & 63)) { + return __memcpy(dest, src, n); + } + else + return memcpy(dest, src, n); +} + + +#if DO_DEBUG + #ifndef __x86_64__ static unsigned fastrdtsc(void) @@ -109,29 +134,6 @@ time_diff(unsigned t, unsigned t2) } -/* The system memcpy (at least on ubuntu 5.10) has problems copying - * to agp (writecombined) memory from a source which isn't 64-byte - * aligned - there is a 4x performance falloff. - * - * The x86 __memcpy is immune to this but is slightly slower - * (10%-ish) than the system memcpy. - * - * The sse_memcpy seems to have a slight cliff at 64/32 bytes, but - * isn't much faster than x86_memcpy for agp copies. - * - * TODO: switch dynamically. - */ -static void * -do_memcpy(void *dest, const void *src, size_t n) -{ - if ((((unsigned) src) & 63) || (((unsigned) dest) & 63)) { - return __memcpy(dest, src, n); - } - else - return memcpy(dest, src, n); -} - - static void * timed_memcpy(void *dest, const void *src, size_t n) { @@ -151,6 +153,7 @@ timed_memcpy(void *dest, const void *src, size_t n) _mesa_printf("timed_memcpy: %u %u --> %f clocks/byte\n", t1, t2, rate); return ret; } +#endif /* DO_DEBUG */ void @@ -175,8 +178,10 @@ intelInitTextureFuncs(struct dd_function_table *functions) functions->UpdateTexturePalette = 0; functions->IsTextureResident = intelIsTextureResident; +#if DO_DEBUG if (INTEL_DEBUG & DEBUG_BUFMGR) functions->TextureMemCpy = timed_memcpy; else +#endif functions->TextureMemCpy = do_memcpy; } -- cgit v1.2.3 From 33748aaad885c6edd8fa94b7f319d7b406f93153 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 19:55:01 +0000 Subject: Set DO_DEBUG=0 --- src/mesa/drivers/dri/i915tex/intel_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_context.h b/src/mesa/drivers/dri/i915tex/intel_context.h index fa3cf58571..7654e4ecd5 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.h +++ b/src/mesa/drivers/dri/i915tex/intel_context.h @@ -354,7 +354,7 @@ __memcpy(void *to, const void *from, size_t n) /* ================================================================ * Debugging: */ -#define DO_DEBUG 1 +#define DO_DEBUG 0 #if DO_DEBUG extern int INTEL_DEBUG; #else -- cgit v1.2.3 From 39cc8e8a0676dea4409ac530c64d754ce4fd6def Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 20:20:28 +0000 Subject: Added OpenGL 2.1 entrypoints. --- src/mesa/drivers/dri/common/extension_helper.h | 72 +- src/mesa/glapi/dispatch.h | 728 ++-- src/mesa/glapi/gl_API.xml | 74 + src/mesa/glapi/glapioffsets.h | 698 ++-- src/mesa/glapi/glapitable.h | 690 ++-- src/mesa/glapi/glapitemp.h | 230 +- src/mesa/glapi/glprocs.h | 1286 +++---- src/mesa/main/enums.c | 4251 ++++++++++++------------ src/mesa/sparc/glapi_sparc.S | 120 +- src/mesa/x86-64/glapi_x86-64.S | 3326 +++++++++--------- src/mesa/x86/glapi_x86.S | 132 +- 11 files changed, 6098 insertions(+), 5509 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h index 1434edb4cb..d6d51cdd16 100644 --- a/src/mesa/drivers/dri/common/extension_helper.h +++ b/src/mesa/drivers/dri/common/extension_helper.h @@ -426,6 +426,13 @@ static const char ReadInstrumentsSGIX_names[] = ""; #endif +#if defined(need_GL_VERSION_2_1) +static const char UniformMatrix2x4fv_names[] = + "iiip\0" /* Parameter signature */ + "glUniformMatrix2x4fv\0" + ""; +#endif + #if defined(need_GL_SUN_vertex) static const char Color4ubVertex3fvSUN_names[] = "pp\0" /* Parameter signature */ @@ -469,10 +476,10 @@ static const char FragmentLightModelivSGIX_names[] = ""; #endif -#if defined(need_GL_ATI_fragment_shader) -static const char ColorFragmentOp3ATI_names[] = - "iiiiiiiiiiiii\0" /* Parameter signature */ - "glColorFragmentOp3ATI\0" +#if defined(need_GL_VERSION_2_1) +static const char UniformMatrix4x3fv_names[] = + "iiip\0" /* Parameter signature */ + "glUniformMatrix4x3fv\0" ""; #endif @@ -2122,6 +2129,13 @@ static const char BindFramebufferEXT_names[] = ""; #endif +#if defined(need_GL_SGIX_reference_plane) +static const char ReferencePlaneSGIX_names[] = + "p\0" /* Parameter signature */ + "glReferencePlaneSGIX\0" + ""; +#endif + #if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char ValidateProgramARB_names[] = "i\0" /* Parameter signature */ @@ -2312,6 +2326,13 @@ static const char SecondaryColor3ivEXT_names[] = ""; #endif +#if defined(need_GL_VERSION_2_1) +static const char UniformMatrix4x2fv_names[] = + "iiip\0" /* Parameter signature */ + "glUniformMatrix4x2fv\0" + ""; +#endif + #if defined(need_GL_SGIS_detail_texture) static const char GetDetailTexFuncSGIS_names[] = "ip\0" /* Parameter signature */ @@ -3198,6 +3219,13 @@ static const char MultiTexCoord4fvARB_names[] = ""; #endif +#if defined(need_GL_VERSION_2_1) +static const char UniformMatrix2x3fv_names[] = + "iiip\0" /* Parameter signature */ + "glUniformMatrix2x3fv\0" + ""; +#endif + #if defined(need_GL_NV_vertex_program) static const char TrackMatrixNV_names[] = "iiii\0" /* Parameter signature */ @@ -4378,10 +4406,10 @@ static const char Tangent3bvEXT_names[] = ""; #endif -#if defined(need_GL_SGIX_reference_plane) -static const char ReferencePlaneSGIX_names[] = - "p\0" /* Parameter signature */ - "glReferencePlaneSGIX\0" +#if defined(need_GL_VERSION_2_1) +static const char UniformMatrix3x4fv_names[] = + "iiip\0" /* Parameter signature */ + "glUniformMatrix3x4fv\0" ""; #endif @@ -4541,6 +4569,13 @@ static const char GetFinalCombinerInputParameterfvNV_names[] = ""; #endif +#if defined(need_GL_ATI_fragment_shader) +static const char ColorFragmentOp3ATI_names[] = + "iiiiiiiiiiiii\0" /* Parameter signature */ + "glColorFragmentOp3ATI\0" + ""; +#endif + #if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) static const char VertexAttrib2svARB_names[] = "ip\0" /* Parameter signature */ @@ -4746,6 +4781,13 @@ static const char EdgeFlagPointerListIBM_names[] = ""; #endif +#if defined(need_GL_VERSION_2_1) +static const char UniformMatrix3x2fv_names[] = + "iiip\0" /* Parameter signature */ + "glUniformMatrix3x2fv\0" + ""; +#endif + #if defined(need_GL_EXT_histogram) static const char GetMinmaxParameterfv_names[] = "iip\0" /* Parameter signature */ @@ -5116,7 +5158,6 @@ static const struct dri_extension_function GL_ATI_draw_buffers_functions[] = { #if defined(need_GL_ATI_fragment_shader) static const struct dri_extension_function GL_ATI_fragment_shader_functions[] = { - { ColorFragmentOp3ATI_names, ColorFragmentOp3ATI_remap_index, -1 }, { ColorFragmentOp2ATI_names, ColorFragmentOp2ATI_remap_index, -1 }, { DeleteFragmentShaderATI_names, DeleteFragmentShaderATI_remap_index, -1 }, { SetFragmentShaderConstantATI_names, SetFragmentShaderConstantATI_remap_index, -1 }, @@ -5128,6 +5169,7 @@ static const struct dri_extension_function GL_ATI_fragment_shader_functions[] = { PassTexCoordATI_names, PassTexCoordATI_remap_index, -1 }, { BeginFragmentShaderATI_names, BeginFragmentShaderATI_remap_index, -1 }, { BindFragmentShaderATI_names, BindFragmentShaderATI_remap_index, -1 }, + { ColorFragmentOp3ATI_names, ColorFragmentOp3ATI_remap_index, -1 }, { GenFragmentShadersATI_names, GenFragmentShadersATI_remap_index, -1 }, { EndFragmentShaderATI_names, EndFragmentShaderATI_remap_index, -1 }, { NULL, 0, 0 } @@ -6271,3 +6313,15 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = { }; #endif +#if defined(need_GL_VERSION_2_1) +static const struct dri_extension_function GL_VERSION_2_1_functions[] = { + { UniformMatrix2x4fv_names, UniformMatrix2x4fv_remap_index, -1 }, + { UniformMatrix4x3fv_names, UniformMatrix4x3fv_remap_index, -1 }, + { UniformMatrix4x2fv_names, UniformMatrix4x2fv_remap_index, -1 }, + { UniformMatrix2x3fv_names, UniformMatrix2x3fv_remap_index, -1 }, + { UniformMatrix3x4fv_names, UniformMatrix3x4fv_remap_index, -1 }, + { UniformMatrix3x2fv_names, UniformMatrix3x2fv_remap_index, -1 }, + { NULL, 0, 0 } +}; +#endif + diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h index e57ca002e1..a128164323 100644 --- a/src/mesa/glapi/dispatch.h +++ b/src/mesa/glapi/dispatch.h @@ -1330,6 +1330,24 @@ #define CALL_StencilOpSeparate(disp, parameters) (*((disp)->StencilOpSeparate)) parameters #define GET_StencilOpSeparate(disp) ((disp)->StencilOpSeparate) #define SET_StencilOpSeparate(disp, fn) ((disp)->StencilOpSeparate = fn) +#define CALL_UniformMatrix2x3fv(disp, parameters) (*((disp)->UniformMatrix2x3fv)) parameters +#define GET_UniformMatrix2x3fv(disp) ((disp)->UniformMatrix2x3fv) +#define SET_UniformMatrix2x3fv(disp, fn) ((disp)->UniformMatrix2x3fv = fn) +#define CALL_UniformMatrix2x4fv(disp, parameters) (*((disp)->UniformMatrix2x4fv)) parameters +#define GET_UniformMatrix2x4fv(disp) ((disp)->UniformMatrix2x4fv) +#define SET_UniformMatrix2x4fv(disp, fn) ((disp)->UniformMatrix2x4fv = fn) +#define CALL_UniformMatrix3x2fv(disp, parameters) (*((disp)->UniformMatrix3x2fv)) parameters +#define GET_UniformMatrix3x2fv(disp) ((disp)->UniformMatrix3x2fv) +#define SET_UniformMatrix3x2fv(disp, fn) ((disp)->UniformMatrix3x2fv = fn) +#define CALL_UniformMatrix3x4fv(disp, parameters) (*((disp)->UniformMatrix3x4fv)) parameters +#define GET_UniformMatrix3x4fv(disp) ((disp)->UniformMatrix3x4fv) +#define SET_UniformMatrix3x4fv(disp, fn) ((disp)->UniformMatrix3x4fv = fn) +#define CALL_UniformMatrix4x2fv(disp, parameters) (*((disp)->UniformMatrix4x2fv)) parameters +#define GET_UniformMatrix4x2fv(disp) ((disp)->UniformMatrix4x2fv) +#define SET_UniformMatrix4x2fv(disp, fn) ((disp)->UniformMatrix4x2fv = fn) +#define CALL_UniformMatrix4x3fv(disp, parameters) (*((disp)->UniformMatrix4x3fv)) parameters +#define GET_UniformMatrix4x3fv(disp) ((disp)->UniformMatrix4x3fv) +#define SET_UniformMatrix4x3fv(disp, fn) ((disp)->UniformMatrix4x3fv = fn) #define CALL_LoadTransposeMatrixdARB(disp, parameters) (*((disp)->LoadTransposeMatrixdARB)) parameters #define GET_LoadTransposeMatrixdARB(disp) ((disp)->LoadTransposeMatrixdARB) #define SET_LoadTransposeMatrixdARB(disp, fn) ((disp)->LoadTransposeMatrixdARB = fn) @@ -2359,7 +2377,7 @@ #else -#define driDispatchRemapTable_size 358 +#define driDispatchRemapTable_size 364 extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define AttachShader_remap_index 0 @@ -2378,348 +2396,354 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define StencilFuncSeparate_remap_index 13 #define StencilMaskSeparate_remap_index 14 #define StencilOpSeparate_remap_index 15 -#define LoadTransposeMatrixdARB_remap_index 16 -#define LoadTransposeMatrixfARB_remap_index 17 -#define MultTransposeMatrixdARB_remap_index 18 -#define MultTransposeMatrixfARB_remap_index 19 -#define SampleCoverageARB_remap_index 20 -#define CompressedTexImage1DARB_remap_index 21 -#define CompressedTexImage2DARB_remap_index 22 -#define CompressedTexImage3DARB_remap_index 23 -#define CompressedTexSubImage1DARB_remap_index 24 -#define CompressedTexSubImage2DARB_remap_index 25 -#define CompressedTexSubImage3DARB_remap_index 26 -#define GetCompressedTexImageARB_remap_index 27 -#define DisableVertexAttribArrayARB_remap_index 28 -#define EnableVertexAttribArrayARB_remap_index 29 -#define GetProgramEnvParameterdvARB_remap_index 30 -#define GetProgramEnvParameterfvARB_remap_index 31 -#define GetProgramLocalParameterdvARB_remap_index 32 -#define GetProgramLocalParameterfvARB_remap_index 33 -#define GetProgramStringARB_remap_index 34 -#define GetProgramivARB_remap_index 35 -#define GetVertexAttribdvARB_remap_index 36 -#define GetVertexAttribfvARB_remap_index 37 -#define GetVertexAttribivARB_remap_index 38 -#define ProgramEnvParameter4dARB_remap_index 39 -#define ProgramEnvParameter4dvARB_remap_index 40 -#define ProgramEnvParameter4fARB_remap_index 41 -#define ProgramEnvParameter4fvARB_remap_index 42 -#define ProgramLocalParameter4dARB_remap_index 43 -#define ProgramLocalParameter4dvARB_remap_index 44 -#define ProgramLocalParameter4fARB_remap_index 45 -#define ProgramLocalParameter4fvARB_remap_index 46 -#define ProgramStringARB_remap_index 47 -#define VertexAttrib1dARB_remap_index 48 -#define VertexAttrib1dvARB_remap_index 49 -#define VertexAttrib1fARB_remap_index 50 -#define VertexAttrib1fvARB_remap_index 51 -#define VertexAttrib1sARB_remap_index 52 -#define VertexAttrib1svARB_remap_index 53 -#define VertexAttrib2dARB_remap_index 54 -#define VertexAttrib2dvARB_remap_index 55 -#define VertexAttrib2fARB_remap_index 56 -#define VertexAttrib2fvARB_remap_index 57 -#define VertexAttrib2sARB_remap_index 58 -#define VertexAttrib2svARB_remap_index 59 -#define VertexAttrib3dARB_remap_index 60 -#define VertexAttrib3dvARB_remap_index 61 -#define VertexAttrib3fARB_remap_index 62 -#define VertexAttrib3fvARB_remap_index 63 -#define VertexAttrib3sARB_remap_index 64 -#define VertexAttrib3svARB_remap_index 65 -#define VertexAttrib4NbvARB_remap_index 66 -#define VertexAttrib4NivARB_remap_index 67 -#define VertexAttrib4NsvARB_remap_index 68 -#define VertexAttrib4NubARB_remap_index 69 -#define VertexAttrib4NubvARB_remap_index 70 -#define VertexAttrib4NuivARB_remap_index 71 -#define VertexAttrib4NusvARB_remap_index 72 -#define VertexAttrib4bvARB_remap_index 73 -#define VertexAttrib4dARB_remap_index 74 -#define VertexAttrib4dvARB_remap_index 75 -#define VertexAttrib4fARB_remap_index 76 -#define VertexAttrib4fvARB_remap_index 77 -#define VertexAttrib4ivARB_remap_index 78 -#define VertexAttrib4sARB_remap_index 79 -#define VertexAttrib4svARB_remap_index 80 -#define VertexAttrib4ubvARB_remap_index 81 -#define VertexAttrib4uivARB_remap_index 82 -#define VertexAttrib4usvARB_remap_index 83 -#define VertexAttribPointerARB_remap_index 84 -#define BindBufferARB_remap_index 85 -#define BufferDataARB_remap_index 86 -#define BufferSubDataARB_remap_index 87 -#define DeleteBuffersARB_remap_index 88 -#define GenBuffersARB_remap_index 89 -#define GetBufferParameterivARB_remap_index 90 -#define GetBufferPointervARB_remap_index 91 -#define GetBufferSubDataARB_remap_index 92 -#define IsBufferARB_remap_index 93 -#define MapBufferARB_remap_index 94 -#define UnmapBufferARB_remap_index 95 -#define BeginQueryARB_remap_index 96 -#define DeleteQueriesARB_remap_index 97 -#define EndQueryARB_remap_index 98 -#define GenQueriesARB_remap_index 99 -#define GetQueryObjectivARB_remap_index 100 -#define GetQueryObjectuivARB_remap_index 101 -#define GetQueryivARB_remap_index 102 -#define IsQueryARB_remap_index 103 -#define AttachObjectARB_remap_index 104 -#define CompileShaderARB_remap_index 105 -#define CreateProgramObjectARB_remap_index 106 -#define CreateShaderObjectARB_remap_index 107 -#define DeleteObjectARB_remap_index 108 -#define DetachObjectARB_remap_index 109 -#define GetActiveUniformARB_remap_index 110 -#define GetAttachedObjectsARB_remap_index 111 -#define GetHandleARB_remap_index 112 -#define GetInfoLogARB_remap_index 113 -#define GetObjectParameterfvARB_remap_index 114 -#define GetObjectParameterivARB_remap_index 115 -#define GetShaderSourceARB_remap_index 116 -#define GetUniformLocationARB_remap_index 117 -#define GetUniformfvARB_remap_index 118 -#define GetUniformivARB_remap_index 119 -#define LinkProgramARB_remap_index 120 -#define ShaderSourceARB_remap_index 121 -#define Uniform1fARB_remap_index 122 -#define Uniform1fvARB_remap_index 123 -#define Uniform1iARB_remap_index 124 -#define Uniform1ivARB_remap_index 125 -#define Uniform2fARB_remap_index 126 -#define Uniform2fvARB_remap_index 127 -#define Uniform2iARB_remap_index 128 -#define Uniform2ivARB_remap_index 129 -#define Uniform3fARB_remap_index 130 -#define Uniform3fvARB_remap_index 131 -#define Uniform3iARB_remap_index 132 -#define Uniform3ivARB_remap_index 133 -#define Uniform4fARB_remap_index 134 -#define Uniform4fvARB_remap_index 135 -#define Uniform4iARB_remap_index 136 -#define Uniform4ivARB_remap_index 137 -#define UniformMatrix2fvARB_remap_index 138 -#define UniformMatrix3fvARB_remap_index 139 -#define UniformMatrix4fvARB_remap_index 140 -#define UseProgramObjectARB_remap_index 141 -#define ValidateProgramARB_remap_index 142 -#define BindAttribLocationARB_remap_index 143 -#define GetActiveAttribARB_remap_index 144 -#define GetAttribLocationARB_remap_index 145 -#define DrawBuffersARB_remap_index 146 -#define PolygonOffsetEXT_remap_index 147 -#define GetPixelTexGenParameterfvSGIS_remap_index 148 -#define GetPixelTexGenParameterivSGIS_remap_index 149 -#define PixelTexGenParameterfSGIS_remap_index 150 -#define PixelTexGenParameterfvSGIS_remap_index 151 -#define PixelTexGenParameteriSGIS_remap_index 152 -#define PixelTexGenParameterivSGIS_remap_index 153 -#define SampleMaskSGIS_remap_index 154 -#define SamplePatternSGIS_remap_index 155 -#define ColorPointerEXT_remap_index 156 -#define EdgeFlagPointerEXT_remap_index 157 -#define IndexPointerEXT_remap_index 158 -#define NormalPointerEXT_remap_index 159 -#define TexCoordPointerEXT_remap_index 160 -#define VertexPointerEXT_remap_index 161 -#define PointParameterfEXT_remap_index 162 -#define PointParameterfvEXT_remap_index 163 -#define LockArraysEXT_remap_index 164 -#define UnlockArraysEXT_remap_index 165 -#define CullParameterdvEXT_remap_index 166 -#define CullParameterfvEXT_remap_index 167 -#define SecondaryColor3bEXT_remap_index 168 -#define SecondaryColor3bvEXT_remap_index 169 -#define SecondaryColor3dEXT_remap_index 170 -#define SecondaryColor3dvEXT_remap_index 171 -#define SecondaryColor3fEXT_remap_index 172 -#define SecondaryColor3fvEXT_remap_index 173 -#define SecondaryColor3iEXT_remap_index 174 -#define SecondaryColor3ivEXT_remap_index 175 -#define SecondaryColor3sEXT_remap_index 176 -#define SecondaryColor3svEXT_remap_index 177 -#define SecondaryColor3ubEXT_remap_index 178 -#define SecondaryColor3ubvEXT_remap_index 179 -#define SecondaryColor3uiEXT_remap_index 180 -#define SecondaryColor3uivEXT_remap_index 181 -#define SecondaryColor3usEXT_remap_index 182 -#define SecondaryColor3usvEXT_remap_index 183 -#define SecondaryColorPointerEXT_remap_index 184 -#define MultiDrawArraysEXT_remap_index 185 -#define MultiDrawElementsEXT_remap_index 186 -#define FogCoordPointerEXT_remap_index 187 -#define FogCoorddEXT_remap_index 188 -#define FogCoorddvEXT_remap_index 189 -#define FogCoordfEXT_remap_index 190 -#define FogCoordfvEXT_remap_index 191 -#define PixelTexGenSGIX_remap_index 192 -#define BlendFuncSeparateEXT_remap_index 193 -#define FlushVertexArrayRangeNV_remap_index 194 -#define VertexArrayRangeNV_remap_index 195 -#define CombinerInputNV_remap_index 196 -#define CombinerOutputNV_remap_index 197 -#define CombinerParameterfNV_remap_index 198 -#define CombinerParameterfvNV_remap_index 199 -#define CombinerParameteriNV_remap_index 200 -#define CombinerParameterivNV_remap_index 201 -#define FinalCombinerInputNV_remap_index 202 -#define GetCombinerInputParameterfvNV_remap_index 203 -#define GetCombinerInputParameterivNV_remap_index 204 -#define GetCombinerOutputParameterfvNV_remap_index 205 -#define GetCombinerOutputParameterivNV_remap_index 206 -#define GetFinalCombinerInputParameterfvNV_remap_index 207 -#define GetFinalCombinerInputParameterivNV_remap_index 208 -#define ResizeBuffersMESA_remap_index 209 -#define WindowPos2dMESA_remap_index 210 -#define WindowPos2dvMESA_remap_index 211 -#define WindowPos2fMESA_remap_index 212 -#define WindowPos2fvMESA_remap_index 213 -#define WindowPos2iMESA_remap_index 214 -#define WindowPos2ivMESA_remap_index 215 -#define WindowPos2sMESA_remap_index 216 -#define WindowPos2svMESA_remap_index 217 -#define WindowPos3dMESA_remap_index 218 -#define WindowPos3dvMESA_remap_index 219 -#define WindowPos3fMESA_remap_index 220 -#define WindowPos3fvMESA_remap_index 221 -#define WindowPos3iMESA_remap_index 222 -#define WindowPos3ivMESA_remap_index 223 -#define WindowPos3sMESA_remap_index 224 -#define WindowPos3svMESA_remap_index 225 -#define WindowPos4dMESA_remap_index 226 -#define WindowPos4dvMESA_remap_index 227 -#define WindowPos4fMESA_remap_index 228 -#define WindowPos4fvMESA_remap_index 229 -#define WindowPos4iMESA_remap_index 230 -#define WindowPos4ivMESA_remap_index 231 -#define WindowPos4sMESA_remap_index 232 -#define WindowPos4svMESA_remap_index 233 -#define MultiModeDrawArraysIBM_remap_index 234 -#define MultiModeDrawElementsIBM_remap_index 235 -#define DeleteFencesNV_remap_index 236 -#define FinishFenceNV_remap_index 237 -#define GenFencesNV_remap_index 238 -#define GetFenceivNV_remap_index 239 -#define IsFenceNV_remap_index 240 -#define SetFenceNV_remap_index 241 -#define TestFenceNV_remap_index 242 -#define AreProgramsResidentNV_remap_index 243 -#define BindProgramNV_remap_index 244 -#define DeleteProgramsNV_remap_index 245 -#define ExecuteProgramNV_remap_index 246 -#define GenProgramsNV_remap_index 247 -#define GetProgramParameterdvNV_remap_index 248 -#define GetProgramParameterfvNV_remap_index 249 -#define GetProgramStringNV_remap_index 250 -#define GetProgramivNV_remap_index 251 -#define GetTrackMatrixivNV_remap_index 252 -#define GetVertexAttribPointervNV_remap_index 253 -#define GetVertexAttribdvNV_remap_index 254 -#define GetVertexAttribfvNV_remap_index 255 -#define GetVertexAttribivNV_remap_index 256 -#define IsProgramNV_remap_index 257 -#define LoadProgramNV_remap_index 258 -#define ProgramParameter4dNV_remap_index 259 -#define ProgramParameter4dvNV_remap_index 260 -#define ProgramParameter4fNV_remap_index 261 -#define ProgramParameter4fvNV_remap_index 262 -#define ProgramParameters4dvNV_remap_index 263 -#define ProgramParameters4fvNV_remap_index 264 -#define RequestResidentProgramsNV_remap_index 265 -#define TrackMatrixNV_remap_index 266 -#define VertexAttrib1dNV_remap_index 267 -#define VertexAttrib1dvNV_remap_index 268 -#define VertexAttrib1fNV_remap_index 269 -#define VertexAttrib1fvNV_remap_index 270 -#define VertexAttrib1sNV_remap_index 271 -#define VertexAttrib1svNV_remap_index 272 -#define VertexAttrib2dNV_remap_index 273 -#define VertexAttrib2dvNV_remap_index 274 -#define VertexAttrib2fNV_remap_index 275 -#define VertexAttrib2fvNV_remap_index 276 -#define VertexAttrib2sNV_remap_index 277 -#define VertexAttrib2svNV_remap_index 278 -#define VertexAttrib3dNV_remap_index 279 -#define VertexAttrib3dvNV_remap_index 280 -#define VertexAttrib3fNV_remap_index 281 -#define VertexAttrib3fvNV_remap_index 282 -#define VertexAttrib3sNV_remap_index 283 -#define VertexAttrib3svNV_remap_index 284 -#define VertexAttrib4dNV_remap_index 285 -#define VertexAttrib4dvNV_remap_index 286 -#define VertexAttrib4fNV_remap_index 287 -#define VertexAttrib4fvNV_remap_index 288 -#define VertexAttrib4sNV_remap_index 289 -#define VertexAttrib4svNV_remap_index 290 -#define VertexAttrib4ubNV_remap_index 291 -#define VertexAttrib4ubvNV_remap_index 292 -#define VertexAttribPointerNV_remap_index 293 -#define VertexAttribs1dvNV_remap_index 294 -#define VertexAttribs1fvNV_remap_index 295 -#define VertexAttribs1svNV_remap_index 296 -#define VertexAttribs2dvNV_remap_index 297 -#define VertexAttribs2fvNV_remap_index 298 -#define VertexAttribs2svNV_remap_index 299 -#define VertexAttribs3dvNV_remap_index 300 -#define VertexAttribs3fvNV_remap_index 301 -#define VertexAttribs3svNV_remap_index 302 -#define VertexAttribs4dvNV_remap_index 303 -#define VertexAttribs4fvNV_remap_index 304 -#define VertexAttribs4svNV_remap_index 305 -#define VertexAttribs4ubvNV_remap_index 306 -#define AlphaFragmentOp1ATI_remap_index 307 -#define AlphaFragmentOp2ATI_remap_index 308 -#define AlphaFragmentOp3ATI_remap_index 309 -#define BeginFragmentShaderATI_remap_index 310 -#define BindFragmentShaderATI_remap_index 311 -#define ColorFragmentOp1ATI_remap_index 312 -#define ColorFragmentOp2ATI_remap_index 313 -#define ColorFragmentOp3ATI_remap_index 314 -#define DeleteFragmentShaderATI_remap_index 315 -#define EndFragmentShaderATI_remap_index 316 -#define GenFragmentShadersATI_remap_index 317 -#define PassTexCoordATI_remap_index 318 -#define SampleMapATI_remap_index 319 -#define SetFragmentShaderConstantATI_remap_index 320 -#define PointParameteriNV_remap_index 321 -#define PointParameterivNV_remap_index 322 -#define ActiveStencilFaceEXT_remap_index 323 -#define BindVertexArrayAPPLE_remap_index 324 -#define DeleteVertexArraysAPPLE_remap_index 325 -#define GenVertexArraysAPPLE_remap_index 326 -#define IsVertexArrayAPPLE_remap_index 327 -#define GetProgramNamedParameterdvNV_remap_index 328 -#define GetProgramNamedParameterfvNV_remap_index 329 -#define ProgramNamedParameter4dNV_remap_index 330 -#define ProgramNamedParameter4dvNV_remap_index 331 -#define ProgramNamedParameter4fNV_remap_index 332 -#define ProgramNamedParameter4fvNV_remap_index 333 -#define DepthBoundsEXT_remap_index 334 -#define BlendEquationSeparateEXT_remap_index 335 -#define BindFramebufferEXT_remap_index 336 -#define BindRenderbufferEXT_remap_index 337 -#define CheckFramebufferStatusEXT_remap_index 338 -#define DeleteFramebuffersEXT_remap_index 339 -#define DeleteRenderbuffersEXT_remap_index 340 -#define FramebufferRenderbufferEXT_remap_index 341 -#define FramebufferTexture1DEXT_remap_index 342 -#define FramebufferTexture2DEXT_remap_index 343 -#define FramebufferTexture3DEXT_remap_index 344 -#define GenFramebuffersEXT_remap_index 345 -#define GenRenderbuffersEXT_remap_index 346 -#define GenerateMipmapEXT_remap_index 347 -#define GetFramebufferAttachmentParameterivEXT_remap_index 348 -#define GetRenderbufferParameterivEXT_remap_index 349 -#define IsFramebufferEXT_remap_index 350 -#define IsRenderbufferEXT_remap_index 351 -#define RenderbufferStorageEXT_remap_index 352 -#define BlitFramebufferEXT_remap_index 353 -#define ProgramEnvParameters4fvEXT_remap_index 354 -#define ProgramLocalParameters4fvEXT_remap_index 355 -#define GetQueryObjecti64vEXT_remap_index 356 -#define GetQueryObjectui64vEXT_remap_index 357 +#define UniformMatrix2x3fv_remap_index 16 +#define UniformMatrix2x4fv_remap_index 17 +#define UniformMatrix3x2fv_remap_index 18 +#define UniformMatrix3x4fv_remap_index 19 +#define UniformMatrix4x2fv_remap_index 20 +#define UniformMatrix4x3fv_remap_index 21 +#define LoadTransposeMatrixdARB_remap_index 22 +#define LoadTransposeMatrixfARB_remap_index 23 +#define MultTransposeMatrixdARB_remap_index 24 +#define MultTransposeMatrixfARB_remap_index 25 +#define SampleCoverageARB_remap_index 26 +#define CompressedTexImage1DARB_remap_index 27 +#define CompressedTexImage2DARB_remap_index 28 +#define CompressedTexImage3DARB_remap_index 29 +#define CompressedTexSubImage1DARB_remap_index 30 +#define CompressedTexSubImage2DARB_remap_index 31 +#define CompressedTexSubImage3DARB_remap_index 32 +#define GetCompressedTexImageARB_remap_index 33 +#define DisableVertexAttribArrayARB_remap_index 34 +#define EnableVertexAttribArrayARB_remap_index 35 +#define GetProgramEnvParameterdvARB_remap_index 36 +#define GetProgramEnvParameterfvARB_remap_index 37 +#define GetProgramLocalParameterdvARB_remap_index 38 +#define GetProgramLocalParameterfvARB_remap_index 39 +#define GetProgramStringARB_remap_index 40 +#define GetProgramivARB_remap_index 41 +#define GetVertexAttribdvARB_remap_index 42 +#define GetVertexAttribfvARB_remap_index 43 +#define GetVertexAttribivARB_remap_index 44 +#define ProgramEnvParameter4dARB_remap_index 45 +#define ProgramEnvParameter4dvARB_remap_index 46 +#define ProgramEnvParameter4fARB_remap_index 47 +#define ProgramEnvParameter4fvARB_remap_index 48 +#define ProgramLocalParameter4dARB_remap_index 49 +#define ProgramLocalParameter4dvARB_remap_index 50 +#define ProgramLocalParameter4fARB_remap_index 51 +#define ProgramLocalParameter4fvARB_remap_index 52 +#define ProgramStringARB_remap_index 53 +#define VertexAttrib1dARB_remap_index 54 +#define VertexAttrib1dvARB_remap_index 55 +#define VertexAttrib1fARB_remap_index 56 +#define VertexAttrib1fvARB_remap_index 57 +#define VertexAttrib1sARB_remap_index 58 +#define VertexAttrib1svARB_remap_index 59 +#define VertexAttrib2dARB_remap_index 60 +#define VertexAttrib2dvARB_remap_index 61 +#define VertexAttrib2fARB_remap_index 62 +#define VertexAttrib2fvARB_remap_index 63 +#define VertexAttrib2sARB_remap_index 64 +#define VertexAttrib2svARB_remap_index 65 +#define VertexAttrib3dARB_remap_index 66 +#define VertexAttrib3dvARB_remap_index 67 +#define VertexAttrib3fARB_remap_index 68 +#define VertexAttrib3fvARB_remap_index 69 +#define VertexAttrib3sARB_remap_index 70 +#define VertexAttrib3svARB_remap_index 71 +#define VertexAttrib4NbvARB_remap_index 72 +#define VertexAttrib4NivARB_remap_index 73 +#define VertexAttrib4NsvARB_remap_index 74 +#define VertexAttrib4NubARB_remap_index 75 +#define VertexAttrib4NubvARB_remap_index 76 +#define VertexAttrib4NuivARB_remap_index 77 +#define VertexAttrib4NusvARB_remap_index 78 +#define VertexAttrib4bvARB_remap_index 79 +#define VertexAttrib4dARB_remap_index 80 +#define VertexAttrib4dvARB_remap_index 81 +#define VertexAttrib4fARB_remap_index 82 +#define VertexAttrib4fvARB_remap_index 83 +#define VertexAttrib4ivARB_remap_index 84 +#define VertexAttrib4sARB_remap_index 85 +#define VertexAttrib4svARB_remap_index 86 +#define VertexAttrib4ubvARB_remap_index 87 +#define VertexAttrib4uivARB_remap_index 88 +#define VertexAttrib4usvARB_remap_index 89 +#define VertexAttribPointerARB_remap_index 90 +#define BindBufferARB_remap_index 91 +#define BufferDataARB_remap_index 92 +#define BufferSubDataARB_remap_index 93 +#define DeleteBuffersARB_remap_index 94 +#define GenBuffersARB_remap_index 95 +#define GetBufferParameterivARB_remap_index 96 +#define GetBufferPointervARB_remap_index 97 +#define GetBufferSubDataARB_remap_index 98 +#define IsBufferARB_remap_index 99 +#define MapBufferARB_remap_index 100 +#define UnmapBufferARB_remap_index 101 +#define BeginQueryARB_remap_index 102 +#define DeleteQueriesARB_remap_index 103 +#define EndQueryARB_remap_index 104 +#define GenQueriesARB_remap_index 105 +#define GetQueryObjectivARB_remap_index 106 +#define GetQueryObjectuivARB_remap_index 107 +#define GetQueryivARB_remap_index 108 +#define IsQueryARB_remap_index 109 +#define AttachObjectARB_remap_index 110 +#define CompileShaderARB_remap_index 111 +#define CreateProgramObjectARB_remap_index 112 +#define CreateShaderObjectARB_remap_index 113 +#define DeleteObjectARB_remap_index 114 +#define DetachObjectARB_remap_index 115 +#define GetActiveUniformARB_remap_index 116 +#define GetAttachedObjectsARB_remap_index 117 +#define GetHandleARB_remap_index 118 +#define GetInfoLogARB_remap_index 119 +#define GetObjectParameterfvARB_remap_index 120 +#define GetObjectParameterivARB_remap_index 121 +#define GetShaderSourceARB_remap_index 122 +#define GetUniformLocationARB_remap_index 123 +#define GetUniformfvARB_remap_index 124 +#define GetUniformivARB_remap_index 125 +#define LinkProgramARB_remap_index 126 +#define ShaderSourceARB_remap_index 127 +#define Uniform1fARB_remap_index 128 +#define Uniform1fvARB_remap_index 129 +#define Uniform1iARB_remap_index 130 +#define Uniform1ivARB_remap_index 131 +#define Uniform2fARB_remap_index 132 +#define Uniform2fvARB_remap_index 133 +#define Uniform2iARB_remap_index 134 +#define Uniform2ivARB_remap_index 135 +#define Uniform3fARB_remap_index 136 +#define Uniform3fvARB_remap_index 137 +#define Uniform3iARB_remap_index 138 +#define Uniform3ivARB_remap_index 139 +#define Uniform4fARB_remap_index 140 +#define Uniform4fvARB_remap_index 141 +#define Uniform4iARB_remap_index 142 +#define Uniform4ivARB_remap_index 143 +#define UniformMatrix2fvARB_remap_index 144 +#define UniformMatrix3fvARB_remap_index 145 +#define UniformMatrix4fvARB_remap_index 146 +#define UseProgramObjectARB_remap_index 147 +#define ValidateProgramARB_remap_index 148 +#define BindAttribLocationARB_remap_index 149 +#define GetActiveAttribARB_remap_index 150 +#define GetAttribLocationARB_remap_index 151 +#define DrawBuffersARB_remap_index 152 +#define PolygonOffsetEXT_remap_index 153 +#define GetPixelTexGenParameterfvSGIS_remap_index 154 +#define GetPixelTexGenParameterivSGIS_remap_index 155 +#define PixelTexGenParameterfSGIS_remap_index 156 +#define PixelTexGenParameterfvSGIS_remap_index 157 +#define PixelTexGenParameteriSGIS_remap_index 158 +#define PixelTexGenParameterivSGIS_remap_index 159 +#define SampleMaskSGIS_remap_index 160 +#define SamplePatternSGIS_remap_index 161 +#define ColorPointerEXT_remap_index 162 +#define EdgeFlagPointerEXT_remap_index 163 +#define IndexPointerEXT_remap_index 164 +#define NormalPointerEXT_remap_index 165 +#define TexCoordPointerEXT_remap_index 166 +#define VertexPointerEXT_remap_index 167 +#define PointParameterfEXT_remap_index 168 +#define PointParameterfvEXT_remap_index 169 +#define LockArraysEXT_remap_index 170 +#define UnlockArraysEXT_remap_index 171 +#define CullParameterdvEXT_remap_index 172 +#define CullParameterfvEXT_remap_index 173 +#define SecondaryColor3bEXT_remap_index 174 +#define SecondaryColor3bvEXT_remap_index 175 +#define SecondaryColor3dEXT_remap_index 176 +#define SecondaryColor3dvEXT_remap_index 177 +#define SecondaryColor3fEXT_remap_index 178 +#define SecondaryColor3fvEXT_remap_index 179 +#define SecondaryColor3iEXT_remap_index 180 +#define SecondaryColor3ivEXT_remap_index 181 +#define SecondaryColor3sEXT_remap_index 182 +#define SecondaryColor3svEXT_remap_index 183 +#define SecondaryColor3ubEXT_remap_index 184 +#define SecondaryColor3ubvEXT_remap_index 185 +#define SecondaryColor3uiEXT_remap_index 186 +#define SecondaryColor3uivEXT_remap_index 187 +#define SecondaryColor3usEXT_remap_index 188 +#define SecondaryColor3usvEXT_remap_index 189 +#define SecondaryColorPointerEXT_remap_index 190 +#define MultiDrawArraysEXT_remap_index 191 +#define MultiDrawElementsEXT_remap_index 192 +#define FogCoordPointerEXT_remap_index 193 +#define FogCoorddEXT_remap_index 194 +#define FogCoorddvEXT_remap_index 195 +#define FogCoordfEXT_remap_index 196 +#define FogCoordfvEXT_remap_index 197 +#define PixelTexGenSGIX_remap_index 198 +#define BlendFuncSeparateEXT_remap_index 199 +#define FlushVertexArrayRangeNV_remap_index 200 +#define VertexArrayRangeNV_remap_index 201 +#define CombinerInputNV_remap_index 202 +#define CombinerOutputNV_remap_index 203 +#define CombinerParameterfNV_remap_index 204 +#define CombinerParameterfvNV_remap_index 205 +#define CombinerParameteriNV_remap_index 206 +#define CombinerParameterivNV_remap_index 207 +#define FinalCombinerInputNV_remap_index 208 +#define GetCombinerInputParameterfvNV_remap_index 209 +#define GetCombinerInputParameterivNV_remap_index 210 +#define GetCombinerOutputParameterfvNV_remap_index 211 +#define GetCombinerOutputParameterivNV_remap_index 212 +#define GetFinalCombinerInputParameterfvNV_remap_index 213 +#define GetFinalCombinerInputParameterivNV_remap_index 214 +#define ResizeBuffersMESA_remap_index 215 +#define WindowPos2dMESA_remap_index 216 +#define WindowPos2dvMESA_remap_index 217 +#define WindowPos2fMESA_remap_index 218 +#define WindowPos2fvMESA_remap_index 219 +#define WindowPos2iMESA_remap_index 220 +#define WindowPos2ivMESA_remap_index 221 +#define WindowPos2sMESA_remap_index 222 +#define WindowPos2svMESA_remap_index 223 +#define WindowPos3dMESA_remap_index 224 +#define WindowPos3dvMESA_remap_index 225 +#define WindowPos3fMESA_remap_index 226 +#define WindowPos3fvMESA_remap_index 227 +#define WindowPos3iMESA_remap_index 228 +#define WindowPos3ivMESA_remap_index 229 +#define WindowPos3sMESA_remap_index 230 +#define WindowPos3svMESA_remap_index 231 +#define WindowPos4dMESA_remap_index 232 +#define WindowPos4dvMESA_remap_index 233 +#define WindowPos4fMESA_remap_index 234 +#define WindowPos4fvMESA_remap_index 235 +#define WindowPos4iMESA_remap_index 236 +#define WindowPos4ivMESA_remap_index 237 +#define WindowPos4sMESA_remap_index 238 +#define WindowPos4svMESA_remap_index 239 +#define MultiModeDrawArraysIBM_remap_index 240 +#define MultiModeDrawElementsIBM_remap_index 241 +#define DeleteFencesNV_remap_index 242 +#define FinishFenceNV_remap_index 243 +#define GenFencesNV_remap_index 244 +#define GetFenceivNV_remap_index 245 +#define IsFenceNV_remap_index 246 +#define SetFenceNV_remap_index 247 +#define TestFenceNV_remap_index 248 +#define AreProgramsResidentNV_remap_index 249 +#define BindProgramNV_remap_index 250 +#define DeleteProgramsNV_remap_index 251 +#define ExecuteProgramNV_remap_index 252 +#define GenProgramsNV_remap_index 253 +#define GetProgramParameterdvNV_remap_index 254 +#define GetProgramParameterfvNV_remap_index 255 +#define GetProgramStringNV_remap_index 256 +#define GetProgramivNV_remap_index 257 +#define GetTrackMatrixivNV_remap_index 258 +#define GetVertexAttribPointervNV_remap_index 259 +#define GetVertexAttribdvNV_remap_index 260 +#define GetVertexAttribfvNV_remap_index 261 +#define GetVertexAttribivNV_remap_index 262 +#define IsProgramNV_remap_index 263 +#define LoadProgramNV_remap_index 264 +#define ProgramParameter4dNV_remap_index 265 +#define ProgramParameter4dvNV_remap_index 266 +#define ProgramParameter4fNV_remap_index 267 +#define ProgramParameter4fvNV_remap_index 268 +#define ProgramParameters4dvNV_remap_index 269 +#define ProgramParameters4fvNV_remap_index 270 +#define RequestResidentProgramsNV_remap_index 271 +#define TrackMatrixNV_remap_index 272 +#define VertexAttrib1dNV_remap_index 273 +#define VertexAttrib1dvNV_remap_index 274 +#define VertexAttrib1fNV_remap_index 275 +#define VertexAttrib1fvNV_remap_index 276 +#define VertexAttrib1sNV_remap_index 277 +#define VertexAttrib1svNV_remap_index 278 +#define VertexAttrib2dNV_remap_index 279 +#define VertexAttrib2dvNV_remap_index 280 +#define VertexAttrib2fNV_remap_index 281 +#define VertexAttrib2fvNV_remap_index 282 +#define VertexAttrib2sNV_remap_index 283 +#define VertexAttrib2svNV_remap_index 284 +#define VertexAttrib3dNV_remap_index 285 +#define VertexAttrib3dvNV_remap_index 286 +#define VertexAttrib3fNV_remap_index 287 +#define VertexAttrib3fvNV_remap_index 288 +#define VertexAttrib3sNV_remap_index 289 +#define VertexAttrib3svNV_remap_index 290 +#define VertexAttrib4dNV_remap_index 291 +#define VertexAttrib4dvNV_remap_index 292 +#define VertexAttrib4fNV_remap_index 293 +#define VertexAttrib4fvNV_remap_index 294 +#define VertexAttrib4sNV_remap_index 295 +#define VertexAttrib4svNV_remap_index 296 +#define VertexAttrib4ubNV_remap_index 297 +#define VertexAttrib4ubvNV_remap_index 298 +#define VertexAttribPointerNV_remap_index 299 +#define VertexAttribs1dvNV_remap_index 300 +#define VertexAttribs1fvNV_remap_index 301 +#define VertexAttribs1svNV_remap_index 302 +#define VertexAttribs2dvNV_remap_index 303 +#define VertexAttribs2fvNV_remap_index 304 +#define VertexAttribs2svNV_remap_index 305 +#define VertexAttribs3dvNV_remap_index 306 +#define VertexAttribs3fvNV_remap_index 307 +#define VertexAttribs3svNV_remap_index 308 +#define VertexAttribs4dvNV_remap_index 309 +#define VertexAttribs4fvNV_remap_index 310 +#define VertexAttribs4svNV_remap_index 311 +#define VertexAttribs4ubvNV_remap_index 312 +#define AlphaFragmentOp1ATI_remap_index 313 +#define AlphaFragmentOp2ATI_remap_index 314 +#define AlphaFragmentOp3ATI_remap_index 315 +#define BeginFragmentShaderATI_remap_index 316 +#define BindFragmentShaderATI_remap_index 317 +#define ColorFragmentOp1ATI_remap_index 318 +#define ColorFragmentOp2ATI_remap_index 319 +#define ColorFragmentOp3ATI_remap_index 320 +#define DeleteFragmentShaderATI_remap_index 321 +#define EndFragmentShaderATI_remap_index 322 +#define GenFragmentShadersATI_remap_index 323 +#define PassTexCoordATI_remap_index 324 +#define SampleMapATI_remap_index 325 +#define SetFragmentShaderConstantATI_remap_index 326 +#define PointParameteriNV_remap_index 327 +#define PointParameterivNV_remap_index 328 +#define ActiveStencilFaceEXT_remap_index 329 +#define BindVertexArrayAPPLE_remap_index 330 +#define DeleteVertexArraysAPPLE_remap_index 331 +#define GenVertexArraysAPPLE_remap_index 332 +#define IsVertexArrayAPPLE_remap_index 333 +#define GetProgramNamedParameterdvNV_remap_index 334 +#define GetProgramNamedParameterfvNV_remap_index 335 +#define ProgramNamedParameter4dNV_remap_index 336 +#define ProgramNamedParameter4dvNV_remap_index 337 +#define ProgramNamedParameter4fNV_remap_index 338 +#define ProgramNamedParameter4fvNV_remap_index 339 +#define DepthBoundsEXT_remap_index 340 +#define BlendEquationSeparateEXT_remap_index 341 +#define BindFramebufferEXT_remap_index 342 +#define BindRenderbufferEXT_remap_index 343 +#define CheckFramebufferStatusEXT_remap_index 344 +#define DeleteFramebuffersEXT_remap_index 345 +#define DeleteRenderbuffersEXT_remap_index 346 +#define FramebufferRenderbufferEXT_remap_index 347 +#define FramebufferTexture1DEXT_remap_index 348 +#define FramebufferTexture2DEXT_remap_index 349 +#define FramebufferTexture3DEXT_remap_index 350 +#define GenFramebuffersEXT_remap_index 351 +#define GenRenderbuffersEXT_remap_index 352 +#define GenerateMipmapEXT_remap_index 353 +#define GetFramebufferAttachmentParameterivEXT_remap_index 354 +#define GetRenderbufferParameterivEXT_remap_index 355 +#define IsFramebufferEXT_remap_index 356 +#define IsRenderbufferEXT_remap_index 357 +#define RenderbufferStorageEXT_remap_index 358 +#define BlitFramebufferEXT_remap_index 359 +#define ProgramEnvParameters4fvEXT_remap_index 360 +#define ProgramLocalParameters4fvEXT_remap_index 361 +#define GetQueryObjecti64vEXT_remap_index 362 +#define GetQueryObjectui64vEXT_remap_index 363 #define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters) #define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index]) @@ -2769,6 +2793,24 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[StencilOpSeparate_remap_index], parameters) #define GET_StencilOpSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilOpSeparate_remap_index]) #define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilOpSeparate_remap_index], fn) +#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2x3fv_remap_index], parameters) +#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x3fv_remap_index]) +#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x3fv_remap_index], fn) +#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2x4fv_remap_index], parameters) +#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x4fv_remap_index]) +#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x4fv_remap_index], fn) +#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3x2fv_remap_index], parameters) +#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x2fv_remap_index]) +#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x2fv_remap_index], fn) +#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3x4fv_remap_index], parameters) +#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x4fv_remap_index]) +#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x4fv_remap_index], fn) +#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4x2fv_remap_index], parameters) +#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x2fv_remap_index]) +#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x2fv_remap_index], fn) +#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4x3fv_remap_index], parameters) +#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x3fv_remap_index]) +#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x3fv_remap_index], fn) #define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index], parameters) #define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index]) #define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index], fn) diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index 7da00d2e3b..4f3a8805e0 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -5648,6 +5648,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h index 548d58c79c..cb0d21083e 100644 --- a/src/mesa/glapi/glapioffsets.h +++ b/src/mesa/glapi/glapioffsets.h @@ -456,349 +456,355 @@ #define _gloffset_StencilFuncSeparate 421 #define _gloffset_StencilMaskSeparate 422 #define _gloffset_StencilOpSeparate 423 -#define _gloffset_LoadTransposeMatrixdARB 424 -#define _gloffset_LoadTransposeMatrixfARB 425 -#define _gloffset_MultTransposeMatrixdARB 426 -#define _gloffset_MultTransposeMatrixfARB 427 -#define _gloffset_SampleCoverageARB 428 -#define _gloffset_CompressedTexImage1DARB 429 -#define _gloffset_CompressedTexImage2DARB 430 -#define _gloffset_CompressedTexImage3DARB 431 -#define _gloffset_CompressedTexSubImage1DARB 432 -#define _gloffset_CompressedTexSubImage2DARB 433 -#define _gloffset_CompressedTexSubImage3DARB 434 -#define _gloffset_GetCompressedTexImageARB 435 -#define _gloffset_DisableVertexAttribArrayARB 436 -#define _gloffset_EnableVertexAttribArrayARB 437 -#define _gloffset_GetProgramEnvParameterdvARB 438 -#define _gloffset_GetProgramEnvParameterfvARB 439 -#define _gloffset_GetProgramLocalParameterdvARB 440 -#define _gloffset_GetProgramLocalParameterfvARB 441 -#define _gloffset_GetProgramStringARB 442 -#define _gloffset_GetProgramivARB 443 -#define _gloffset_GetVertexAttribdvARB 444 -#define _gloffset_GetVertexAttribfvARB 445 -#define _gloffset_GetVertexAttribivARB 446 -#define _gloffset_ProgramEnvParameter4dARB 447 -#define _gloffset_ProgramEnvParameter4dvARB 448 -#define _gloffset_ProgramEnvParameter4fARB 449 -#define _gloffset_ProgramEnvParameter4fvARB 450 -#define _gloffset_ProgramLocalParameter4dARB 451 -#define _gloffset_ProgramLocalParameter4dvARB 452 -#define _gloffset_ProgramLocalParameter4fARB 453 -#define _gloffset_ProgramLocalParameter4fvARB 454 -#define _gloffset_ProgramStringARB 455 -#define _gloffset_VertexAttrib1dARB 456 -#define _gloffset_VertexAttrib1dvARB 457 -#define _gloffset_VertexAttrib1fARB 458 -#define _gloffset_VertexAttrib1fvARB 459 -#define _gloffset_VertexAttrib1sARB 460 -#define _gloffset_VertexAttrib1svARB 461 -#define _gloffset_VertexAttrib2dARB 462 -#define _gloffset_VertexAttrib2dvARB 463 -#define _gloffset_VertexAttrib2fARB 464 -#define _gloffset_VertexAttrib2fvARB 465 -#define _gloffset_VertexAttrib2sARB 466 -#define _gloffset_VertexAttrib2svARB 467 -#define _gloffset_VertexAttrib3dARB 468 -#define _gloffset_VertexAttrib3dvARB 469 -#define _gloffset_VertexAttrib3fARB 470 -#define _gloffset_VertexAttrib3fvARB 471 -#define _gloffset_VertexAttrib3sARB 472 -#define _gloffset_VertexAttrib3svARB 473 -#define _gloffset_VertexAttrib4NbvARB 474 -#define _gloffset_VertexAttrib4NivARB 475 -#define _gloffset_VertexAttrib4NsvARB 476 -#define _gloffset_VertexAttrib4NubARB 477 -#define _gloffset_VertexAttrib4NubvARB 478 -#define _gloffset_VertexAttrib4NuivARB 479 -#define _gloffset_VertexAttrib4NusvARB 480 -#define _gloffset_VertexAttrib4bvARB 481 -#define _gloffset_VertexAttrib4dARB 482 -#define _gloffset_VertexAttrib4dvARB 483 -#define _gloffset_VertexAttrib4fARB 484 -#define _gloffset_VertexAttrib4fvARB 485 -#define _gloffset_VertexAttrib4ivARB 486 -#define _gloffset_VertexAttrib4sARB 487 -#define _gloffset_VertexAttrib4svARB 488 -#define _gloffset_VertexAttrib4ubvARB 489 -#define _gloffset_VertexAttrib4uivARB 490 -#define _gloffset_VertexAttrib4usvARB 491 -#define _gloffset_VertexAttribPointerARB 492 -#define _gloffset_BindBufferARB 493 -#define _gloffset_BufferDataARB 494 -#define _gloffset_BufferSubDataARB 495 -#define _gloffset_DeleteBuffersARB 496 -#define _gloffset_GenBuffersARB 497 -#define _gloffset_GetBufferParameterivARB 498 -#define _gloffset_GetBufferPointervARB 499 -#define _gloffset_GetBufferSubDataARB 500 -#define _gloffset_IsBufferARB 501 -#define _gloffset_MapBufferARB 502 -#define _gloffset_UnmapBufferARB 503 -#define _gloffset_BeginQueryARB 504 -#define _gloffset_DeleteQueriesARB 505 -#define _gloffset_EndQueryARB 506 -#define _gloffset_GenQueriesARB 507 -#define _gloffset_GetQueryObjectivARB 508 -#define _gloffset_GetQueryObjectuivARB 509 -#define _gloffset_GetQueryivARB 510 -#define _gloffset_IsQueryARB 511 -#define _gloffset_AttachObjectARB 512 -#define _gloffset_CompileShaderARB 513 -#define _gloffset_CreateProgramObjectARB 514 -#define _gloffset_CreateShaderObjectARB 515 -#define _gloffset_DeleteObjectARB 516 -#define _gloffset_DetachObjectARB 517 -#define _gloffset_GetActiveUniformARB 518 -#define _gloffset_GetAttachedObjectsARB 519 -#define _gloffset_GetHandleARB 520 -#define _gloffset_GetInfoLogARB 521 -#define _gloffset_GetObjectParameterfvARB 522 -#define _gloffset_GetObjectParameterivARB 523 -#define _gloffset_GetShaderSourceARB 524 -#define _gloffset_GetUniformLocationARB 525 -#define _gloffset_GetUniformfvARB 526 -#define _gloffset_GetUniformivARB 527 -#define _gloffset_LinkProgramARB 528 -#define _gloffset_ShaderSourceARB 529 -#define _gloffset_Uniform1fARB 530 -#define _gloffset_Uniform1fvARB 531 -#define _gloffset_Uniform1iARB 532 -#define _gloffset_Uniform1ivARB 533 -#define _gloffset_Uniform2fARB 534 -#define _gloffset_Uniform2fvARB 535 -#define _gloffset_Uniform2iARB 536 -#define _gloffset_Uniform2ivARB 537 -#define _gloffset_Uniform3fARB 538 -#define _gloffset_Uniform3fvARB 539 -#define _gloffset_Uniform3iARB 540 -#define _gloffset_Uniform3ivARB 541 -#define _gloffset_Uniform4fARB 542 -#define _gloffset_Uniform4fvARB 543 -#define _gloffset_Uniform4iARB 544 -#define _gloffset_Uniform4ivARB 545 -#define _gloffset_UniformMatrix2fvARB 546 -#define _gloffset_UniformMatrix3fvARB 547 -#define _gloffset_UniformMatrix4fvARB 548 -#define _gloffset_UseProgramObjectARB 549 -#define _gloffset_ValidateProgramARB 550 -#define _gloffset_BindAttribLocationARB 551 -#define _gloffset_GetActiveAttribARB 552 -#define _gloffset_GetAttribLocationARB 553 -#define _gloffset_DrawBuffersARB 554 -#define _gloffset_PolygonOffsetEXT 555 -#define _gloffset_GetPixelTexGenParameterfvSGIS 556 -#define _gloffset_GetPixelTexGenParameterivSGIS 557 -#define _gloffset_PixelTexGenParameterfSGIS 558 -#define _gloffset_PixelTexGenParameterfvSGIS 559 -#define _gloffset_PixelTexGenParameteriSGIS 560 -#define _gloffset_PixelTexGenParameterivSGIS 561 -#define _gloffset_SampleMaskSGIS 562 -#define _gloffset_SamplePatternSGIS 563 -#define _gloffset_ColorPointerEXT 564 -#define _gloffset_EdgeFlagPointerEXT 565 -#define _gloffset_IndexPointerEXT 566 -#define _gloffset_NormalPointerEXT 567 -#define _gloffset_TexCoordPointerEXT 568 -#define _gloffset_VertexPointerEXT 569 -#define _gloffset_PointParameterfEXT 570 -#define _gloffset_PointParameterfvEXT 571 -#define _gloffset_LockArraysEXT 572 -#define _gloffset_UnlockArraysEXT 573 -#define _gloffset_CullParameterdvEXT 574 -#define _gloffset_CullParameterfvEXT 575 -#define _gloffset_SecondaryColor3bEXT 576 -#define _gloffset_SecondaryColor3bvEXT 577 -#define _gloffset_SecondaryColor3dEXT 578 -#define _gloffset_SecondaryColor3dvEXT 579 -#define _gloffset_SecondaryColor3fEXT 580 -#define _gloffset_SecondaryColor3fvEXT 581 -#define _gloffset_SecondaryColor3iEXT 582 -#define _gloffset_SecondaryColor3ivEXT 583 -#define _gloffset_SecondaryColor3sEXT 584 -#define _gloffset_SecondaryColor3svEXT 585 -#define _gloffset_SecondaryColor3ubEXT 586 -#define _gloffset_SecondaryColor3ubvEXT 587 -#define _gloffset_SecondaryColor3uiEXT 588 -#define _gloffset_SecondaryColor3uivEXT 589 -#define _gloffset_SecondaryColor3usEXT 590 -#define _gloffset_SecondaryColor3usvEXT 591 -#define _gloffset_SecondaryColorPointerEXT 592 -#define _gloffset_MultiDrawArraysEXT 593 -#define _gloffset_MultiDrawElementsEXT 594 -#define _gloffset_FogCoordPointerEXT 595 -#define _gloffset_FogCoorddEXT 596 -#define _gloffset_FogCoorddvEXT 597 -#define _gloffset_FogCoordfEXT 598 -#define _gloffset_FogCoordfvEXT 599 -#define _gloffset_PixelTexGenSGIX 600 -#define _gloffset_BlendFuncSeparateEXT 601 -#define _gloffset_FlushVertexArrayRangeNV 602 -#define _gloffset_VertexArrayRangeNV 603 -#define _gloffset_CombinerInputNV 604 -#define _gloffset_CombinerOutputNV 605 -#define _gloffset_CombinerParameterfNV 606 -#define _gloffset_CombinerParameterfvNV 607 -#define _gloffset_CombinerParameteriNV 608 -#define _gloffset_CombinerParameterivNV 609 -#define _gloffset_FinalCombinerInputNV 610 -#define _gloffset_GetCombinerInputParameterfvNV 611 -#define _gloffset_GetCombinerInputParameterivNV 612 -#define _gloffset_GetCombinerOutputParameterfvNV 613 -#define _gloffset_GetCombinerOutputParameterivNV 614 -#define _gloffset_GetFinalCombinerInputParameterfvNV 615 -#define _gloffset_GetFinalCombinerInputParameterivNV 616 -#define _gloffset_ResizeBuffersMESA 617 -#define _gloffset_WindowPos2dMESA 618 -#define _gloffset_WindowPos2dvMESA 619 -#define _gloffset_WindowPos2fMESA 620 -#define _gloffset_WindowPos2fvMESA 621 -#define _gloffset_WindowPos2iMESA 622 -#define _gloffset_WindowPos2ivMESA 623 -#define _gloffset_WindowPos2sMESA 624 -#define _gloffset_WindowPos2svMESA 625 -#define _gloffset_WindowPos3dMESA 626 -#define _gloffset_WindowPos3dvMESA 627 -#define _gloffset_WindowPos3fMESA 628 -#define _gloffset_WindowPos3fvMESA 629 -#define _gloffset_WindowPos3iMESA 630 -#define _gloffset_WindowPos3ivMESA 631 -#define _gloffset_WindowPos3sMESA 632 -#define _gloffset_WindowPos3svMESA 633 -#define _gloffset_WindowPos4dMESA 634 -#define _gloffset_WindowPos4dvMESA 635 -#define _gloffset_WindowPos4fMESA 636 -#define _gloffset_WindowPos4fvMESA 637 -#define _gloffset_WindowPos4iMESA 638 -#define _gloffset_WindowPos4ivMESA 639 -#define _gloffset_WindowPos4sMESA 640 -#define _gloffset_WindowPos4svMESA 641 -#define _gloffset_MultiModeDrawArraysIBM 642 -#define _gloffset_MultiModeDrawElementsIBM 643 -#define _gloffset_DeleteFencesNV 644 -#define _gloffset_FinishFenceNV 645 -#define _gloffset_GenFencesNV 646 -#define _gloffset_GetFenceivNV 647 -#define _gloffset_IsFenceNV 648 -#define _gloffset_SetFenceNV 649 -#define _gloffset_TestFenceNV 650 -#define _gloffset_AreProgramsResidentNV 651 -#define _gloffset_BindProgramNV 652 -#define _gloffset_DeleteProgramsNV 653 -#define _gloffset_ExecuteProgramNV 654 -#define _gloffset_GenProgramsNV 655 -#define _gloffset_GetProgramParameterdvNV 656 -#define _gloffset_GetProgramParameterfvNV 657 -#define _gloffset_GetProgramStringNV 658 -#define _gloffset_GetProgramivNV 659 -#define _gloffset_GetTrackMatrixivNV 660 -#define _gloffset_GetVertexAttribPointervNV 661 -#define _gloffset_GetVertexAttribdvNV 662 -#define _gloffset_GetVertexAttribfvNV 663 -#define _gloffset_GetVertexAttribivNV 664 -#define _gloffset_IsProgramNV 665 -#define _gloffset_LoadProgramNV 666 -#define _gloffset_ProgramParameter4dNV 667 -#define _gloffset_ProgramParameter4dvNV 668 -#define _gloffset_ProgramParameter4fNV 669 -#define _gloffset_ProgramParameter4fvNV 670 -#define _gloffset_ProgramParameters4dvNV 671 -#define _gloffset_ProgramParameters4fvNV 672 -#define _gloffset_RequestResidentProgramsNV 673 -#define _gloffset_TrackMatrixNV 674 -#define _gloffset_VertexAttrib1dNV 675 -#define _gloffset_VertexAttrib1dvNV 676 -#define _gloffset_VertexAttrib1fNV 677 -#define _gloffset_VertexAttrib1fvNV 678 -#define _gloffset_VertexAttrib1sNV 679 -#define _gloffset_VertexAttrib1svNV 680 -#define _gloffset_VertexAttrib2dNV 681 -#define _gloffset_VertexAttrib2dvNV 682 -#define _gloffset_VertexAttrib2fNV 683 -#define _gloffset_VertexAttrib2fvNV 684 -#define _gloffset_VertexAttrib2sNV 685 -#define _gloffset_VertexAttrib2svNV 686 -#define _gloffset_VertexAttrib3dNV 687 -#define _gloffset_VertexAttrib3dvNV 688 -#define _gloffset_VertexAttrib3fNV 689 -#define _gloffset_VertexAttrib3fvNV 690 -#define _gloffset_VertexAttrib3sNV 691 -#define _gloffset_VertexAttrib3svNV 692 -#define _gloffset_VertexAttrib4dNV 693 -#define _gloffset_VertexAttrib4dvNV 694 -#define _gloffset_VertexAttrib4fNV 695 -#define _gloffset_VertexAttrib4fvNV 696 -#define _gloffset_VertexAttrib4sNV 697 -#define _gloffset_VertexAttrib4svNV 698 -#define _gloffset_VertexAttrib4ubNV 699 -#define _gloffset_VertexAttrib4ubvNV 700 -#define _gloffset_VertexAttribPointerNV 701 -#define _gloffset_VertexAttribs1dvNV 702 -#define _gloffset_VertexAttribs1fvNV 703 -#define _gloffset_VertexAttribs1svNV 704 -#define _gloffset_VertexAttribs2dvNV 705 -#define _gloffset_VertexAttribs2fvNV 706 -#define _gloffset_VertexAttribs2svNV 707 -#define _gloffset_VertexAttribs3dvNV 708 -#define _gloffset_VertexAttribs3fvNV 709 -#define _gloffset_VertexAttribs3svNV 710 -#define _gloffset_VertexAttribs4dvNV 711 -#define _gloffset_VertexAttribs4fvNV 712 -#define _gloffset_VertexAttribs4svNV 713 -#define _gloffset_VertexAttribs4ubvNV 714 -#define _gloffset_AlphaFragmentOp1ATI 715 -#define _gloffset_AlphaFragmentOp2ATI 716 -#define _gloffset_AlphaFragmentOp3ATI 717 -#define _gloffset_BeginFragmentShaderATI 718 -#define _gloffset_BindFragmentShaderATI 719 -#define _gloffset_ColorFragmentOp1ATI 720 -#define _gloffset_ColorFragmentOp2ATI 721 -#define _gloffset_ColorFragmentOp3ATI 722 -#define _gloffset_DeleteFragmentShaderATI 723 -#define _gloffset_EndFragmentShaderATI 724 -#define _gloffset_GenFragmentShadersATI 725 -#define _gloffset_PassTexCoordATI 726 -#define _gloffset_SampleMapATI 727 -#define _gloffset_SetFragmentShaderConstantATI 728 -#define _gloffset_PointParameteriNV 729 -#define _gloffset_PointParameterivNV 730 -#define _gloffset_ActiveStencilFaceEXT 731 -#define _gloffset_BindVertexArrayAPPLE 732 -#define _gloffset_DeleteVertexArraysAPPLE 733 -#define _gloffset_GenVertexArraysAPPLE 734 -#define _gloffset_IsVertexArrayAPPLE 735 -#define _gloffset_GetProgramNamedParameterdvNV 736 -#define _gloffset_GetProgramNamedParameterfvNV 737 -#define _gloffset_ProgramNamedParameter4dNV 738 -#define _gloffset_ProgramNamedParameter4dvNV 739 -#define _gloffset_ProgramNamedParameter4fNV 740 -#define _gloffset_ProgramNamedParameter4fvNV 741 -#define _gloffset_DepthBoundsEXT 742 -#define _gloffset_BlendEquationSeparateEXT 743 -#define _gloffset_BindFramebufferEXT 744 -#define _gloffset_BindRenderbufferEXT 745 -#define _gloffset_CheckFramebufferStatusEXT 746 -#define _gloffset_DeleteFramebuffersEXT 747 -#define _gloffset_DeleteRenderbuffersEXT 748 -#define _gloffset_FramebufferRenderbufferEXT 749 -#define _gloffset_FramebufferTexture1DEXT 750 -#define _gloffset_FramebufferTexture2DEXT 751 -#define _gloffset_FramebufferTexture3DEXT 752 -#define _gloffset_GenFramebuffersEXT 753 -#define _gloffset_GenRenderbuffersEXT 754 -#define _gloffset_GenerateMipmapEXT 755 -#define _gloffset_GetFramebufferAttachmentParameterivEXT 756 -#define _gloffset_GetRenderbufferParameterivEXT 757 -#define _gloffset_IsFramebufferEXT 758 -#define _gloffset_IsRenderbufferEXT 759 -#define _gloffset_RenderbufferStorageEXT 760 -#define _gloffset_BlitFramebufferEXT 761 -#define _gloffset_ProgramEnvParameters4fvEXT 762 -#define _gloffset_ProgramLocalParameters4fvEXT 763 -#define _gloffset_GetQueryObjecti64vEXT 764 -#define _gloffset_GetQueryObjectui64vEXT 765 -#define _gloffset_FIRST_DYNAMIC 766 +#define _gloffset_UniformMatrix2x3fv 424 +#define _gloffset_UniformMatrix2x4fv 425 +#define _gloffset_UniformMatrix3x2fv 426 +#define _gloffset_UniformMatrix3x4fv 427 +#define _gloffset_UniformMatrix4x2fv 428 +#define _gloffset_UniformMatrix4x3fv 429 +#define _gloffset_LoadTransposeMatrixdARB 430 +#define _gloffset_LoadTransposeMatrixfARB 431 +#define _gloffset_MultTransposeMatrixdARB 432 +#define _gloffset_MultTransposeMatrixfARB 433 +#define _gloffset_SampleCoverageARB 434 +#define _gloffset_CompressedTexImage1DARB 435 +#define _gloffset_CompressedTexImage2DARB 436 +#define _gloffset_CompressedTexImage3DARB 437 +#define _gloffset_CompressedTexSubImage1DARB 438 +#define _gloffset_CompressedTexSubImage2DARB 439 +#define _gloffset_CompressedTexSubImage3DARB 440 +#define _gloffset_GetCompressedTexImageARB 441 +#define _gloffset_DisableVertexAttribArrayARB 442 +#define _gloffset_EnableVertexAttribArrayARB 443 +#define _gloffset_GetProgramEnvParameterdvARB 444 +#define _gloffset_GetProgramEnvParameterfvARB 445 +#define _gloffset_GetProgramLocalParameterdvARB 446 +#define _gloffset_GetProgramLocalParameterfvARB 447 +#define _gloffset_GetProgramStringARB 448 +#define _gloffset_GetProgramivARB 449 +#define _gloffset_GetVertexAttribdvARB 450 +#define _gloffset_GetVertexAttribfvARB 451 +#define _gloffset_GetVertexAttribivARB 452 +#define _gloffset_ProgramEnvParameter4dARB 453 +#define _gloffset_ProgramEnvParameter4dvARB 454 +#define _gloffset_ProgramEnvParameter4fARB 455 +#define _gloffset_ProgramEnvParameter4fvARB 456 +#define _gloffset_ProgramLocalParameter4dARB 457 +#define _gloffset_ProgramLocalParameter4dvARB 458 +#define _gloffset_ProgramLocalParameter4fARB 459 +#define _gloffset_ProgramLocalParameter4fvARB 460 +#define _gloffset_ProgramStringARB 461 +#define _gloffset_VertexAttrib1dARB 462 +#define _gloffset_VertexAttrib1dvARB 463 +#define _gloffset_VertexAttrib1fARB 464 +#define _gloffset_VertexAttrib1fvARB 465 +#define _gloffset_VertexAttrib1sARB 466 +#define _gloffset_VertexAttrib1svARB 467 +#define _gloffset_VertexAttrib2dARB 468 +#define _gloffset_VertexAttrib2dvARB 469 +#define _gloffset_VertexAttrib2fARB 470 +#define _gloffset_VertexAttrib2fvARB 471 +#define _gloffset_VertexAttrib2sARB 472 +#define _gloffset_VertexAttrib2svARB 473 +#define _gloffset_VertexAttrib3dARB 474 +#define _gloffset_VertexAttrib3dvARB 475 +#define _gloffset_VertexAttrib3fARB 476 +#define _gloffset_VertexAttrib3fvARB 477 +#define _gloffset_VertexAttrib3sARB 478 +#define _gloffset_VertexAttrib3svARB 479 +#define _gloffset_VertexAttrib4NbvARB 480 +#define _gloffset_VertexAttrib4NivARB 481 +#define _gloffset_VertexAttrib4NsvARB 482 +#define _gloffset_VertexAttrib4NubARB 483 +#define _gloffset_VertexAttrib4NubvARB 484 +#define _gloffset_VertexAttrib4NuivARB 485 +#define _gloffset_VertexAttrib4NusvARB 486 +#define _gloffset_VertexAttrib4bvARB 487 +#define _gloffset_VertexAttrib4dARB 488 +#define _gloffset_VertexAttrib4dvARB 489 +#define _gloffset_VertexAttrib4fARB 490 +#define _gloffset_VertexAttrib4fvARB 491 +#define _gloffset_VertexAttrib4ivARB 492 +#define _gloffset_VertexAttrib4sARB 493 +#define _gloffset_VertexAttrib4svARB 494 +#define _gloffset_VertexAttrib4ubvARB 495 +#define _gloffset_VertexAttrib4uivARB 496 +#define _gloffset_VertexAttrib4usvARB 497 +#define _gloffset_VertexAttribPointerARB 498 +#define _gloffset_BindBufferARB 499 +#define _gloffset_BufferDataARB 500 +#define _gloffset_BufferSubDataARB 501 +#define _gloffset_DeleteBuffersARB 502 +#define _gloffset_GenBuffersARB 503 +#define _gloffset_GetBufferParameterivARB 504 +#define _gloffset_GetBufferPointervARB 505 +#define _gloffset_GetBufferSubDataARB 506 +#define _gloffset_IsBufferARB 507 +#define _gloffset_MapBufferARB 508 +#define _gloffset_UnmapBufferARB 509 +#define _gloffset_BeginQueryARB 510 +#define _gloffset_DeleteQueriesARB 511 +#define _gloffset_EndQueryARB 512 +#define _gloffset_GenQueriesARB 513 +#define _gloffset_GetQueryObjectivARB 514 +#define _gloffset_GetQueryObjectuivARB 515 +#define _gloffset_GetQueryivARB 516 +#define _gloffset_IsQueryARB 517 +#define _gloffset_AttachObjectARB 518 +#define _gloffset_CompileShaderARB 519 +#define _gloffset_CreateProgramObjectARB 520 +#define _gloffset_CreateShaderObjectARB 521 +#define _gloffset_DeleteObjectARB 522 +#define _gloffset_DetachObjectARB 523 +#define _gloffset_GetActiveUniformARB 524 +#define _gloffset_GetAttachedObjectsARB 525 +#define _gloffset_GetHandleARB 526 +#define _gloffset_GetInfoLogARB 527 +#define _gloffset_GetObjectParameterfvARB 528 +#define _gloffset_GetObjectParameterivARB 529 +#define _gloffset_GetShaderSourceARB 530 +#define _gloffset_GetUniformLocationARB 531 +#define _gloffset_GetUniformfvARB 532 +#define _gloffset_GetUniformivARB 533 +#define _gloffset_LinkProgramARB 534 +#define _gloffset_ShaderSourceARB 535 +#define _gloffset_Uniform1fARB 536 +#define _gloffset_Uniform1fvARB 537 +#define _gloffset_Uniform1iARB 538 +#define _gloffset_Uniform1ivARB 539 +#define _gloffset_Uniform2fARB 540 +#define _gloffset_Uniform2fvARB 541 +#define _gloffset_Uniform2iARB 542 +#define _gloffset_Uniform2ivARB 543 +#define _gloffset_Uniform3fARB 544 +#define _gloffset_Uniform3fvARB 545 +#define _gloffset_Uniform3iARB 546 +#define _gloffset_Uniform3ivARB 547 +#define _gloffset_Uniform4fARB 548 +#define _gloffset_Uniform4fvARB 549 +#define _gloffset_Uniform4iARB 550 +#define _gloffset_Uniform4ivARB 551 +#define _gloffset_UniformMatrix2fvARB 552 +#define _gloffset_UniformMatrix3fvARB 553 +#define _gloffset_UniformMatrix4fvARB 554 +#define _gloffset_UseProgramObjectARB 555 +#define _gloffset_ValidateProgramARB 556 +#define _gloffset_BindAttribLocationARB 557 +#define _gloffset_GetActiveAttribARB 558 +#define _gloffset_GetAttribLocationARB 559 +#define _gloffset_DrawBuffersARB 560 +#define _gloffset_PolygonOffsetEXT 561 +#define _gloffset_GetPixelTexGenParameterfvSGIS 562 +#define _gloffset_GetPixelTexGenParameterivSGIS 563 +#define _gloffset_PixelTexGenParameterfSGIS 564 +#define _gloffset_PixelTexGenParameterfvSGIS 565 +#define _gloffset_PixelTexGenParameteriSGIS 566 +#define _gloffset_PixelTexGenParameterivSGIS 567 +#define _gloffset_SampleMaskSGIS 568 +#define _gloffset_SamplePatternSGIS 569 +#define _gloffset_ColorPointerEXT 570 +#define _gloffset_EdgeFlagPointerEXT 571 +#define _gloffset_IndexPointerEXT 572 +#define _gloffset_NormalPointerEXT 573 +#define _gloffset_TexCoordPointerEXT 574 +#define _gloffset_VertexPointerEXT 575 +#define _gloffset_PointParameterfEXT 576 +#define _gloffset_PointParameterfvEXT 577 +#define _gloffset_LockArraysEXT 578 +#define _gloffset_UnlockArraysEXT 579 +#define _gloffset_CullParameterdvEXT 580 +#define _gloffset_CullParameterfvEXT 581 +#define _gloffset_SecondaryColor3bEXT 582 +#define _gloffset_SecondaryColor3bvEXT 583 +#define _gloffset_SecondaryColor3dEXT 584 +#define _gloffset_SecondaryColor3dvEXT 585 +#define _gloffset_SecondaryColor3fEXT 586 +#define _gloffset_SecondaryColor3fvEXT 587 +#define _gloffset_SecondaryColor3iEXT 588 +#define _gloffset_SecondaryColor3ivEXT 589 +#define _gloffset_SecondaryColor3sEXT 590 +#define _gloffset_SecondaryColor3svEXT 591 +#define _gloffset_SecondaryColor3ubEXT 592 +#define _gloffset_SecondaryColor3ubvEXT 593 +#define _gloffset_SecondaryColor3uiEXT 594 +#define _gloffset_SecondaryColor3uivEXT 595 +#define _gloffset_SecondaryColor3usEXT 596 +#define _gloffset_SecondaryColor3usvEXT 597 +#define _gloffset_SecondaryColorPointerEXT 598 +#define _gloffset_MultiDrawArraysEXT 599 +#define _gloffset_MultiDrawElementsEXT 600 +#define _gloffset_FogCoordPointerEXT 601 +#define _gloffset_FogCoorddEXT 602 +#define _gloffset_FogCoorddvEXT 603 +#define _gloffset_FogCoordfEXT 604 +#define _gloffset_FogCoordfvEXT 605 +#define _gloffset_PixelTexGenSGIX 606 +#define _gloffset_BlendFuncSeparateEXT 607 +#define _gloffset_FlushVertexArrayRangeNV 608 +#define _gloffset_VertexArrayRangeNV 609 +#define _gloffset_CombinerInputNV 610 +#define _gloffset_CombinerOutputNV 611 +#define _gloffset_CombinerParameterfNV 612 +#define _gloffset_CombinerParameterfvNV 613 +#define _gloffset_CombinerParameteriNV 614 +#define _gloffset_CombinerParameterivNV 615 +#define _gloffset_FinalCombinerInputNV 616 +#define _gloffset_GetCombinerInputParameterfvNV 617 +#define _gloffset_GetCombinerInputParameterivNV 618 +#define _gloffset_GetCombinerOutputParameterfvNV 619 +#define _gloffset_GetCombinerOutputParameterivNV 620 +#define _gloffset_GetFinalCombinerInputParameterfvNV 621 +#define _gloffset_GetFinalCombinerInputParameterivNV 622 +#define _gloffset_ResizeBuffersMESA 623 +#define _gloffset_WindowPos2dMESA 624 +#define _gloffset_WindowPos2dvMESA 625 +#define _gloffset_WindowPos2fMESA 626 +#define _gloffset_WindowPos2fvMESA 627 +#define _gloffset_WindowPos2iMESA 628 +#define _gloffset_WindowPos2ivMESA 629 +#define _gloffset_WindowPos2sMESA 630 +#define _gloffset_WindowPos2svMESA 631 +#define _gloffset_WindowPos3dMESA 632 +#define _gloffset_WindowPos3dvMESA 633 +#define _gloffset_WindowPos3fMESA 634 +#define _gloffset_WindowPos3fvMESA 635 +#define _gloffset_WindowPos3iMESA 636 +#define _gloffset_WindowPos3ivMESA 637 +#define _gloffset_WindowPos3sMESA 638 +#define _gloffset_WindowPos3svMESA 639 +#define _gloffset_WindowPos4dMESA 640 +#define _gloffset_WindowPos4dvMESA 641 +#define _gloffset_WindowPos4fMESA 642 +#define _gloffset_WindowPos4fvMESA 643 +#define _gloffset_WindowPos4iMESA 644 +#define _gloffset_WindowPos4ivMESA 645 +#define _gloffset_WindowPos4sMESA 646 +#define _gloffset_WindowPos4svMESA 647 +#define _gloffset_MultiModeDrawArraysIBM 648 +#define _gloffset_MultiModeDrawElementsIBM 649 +#define _gloffset_DeleteFencesNV 650 +#define _gloffset_FinishFenceNV 651 +#define _gloffset_GenFencesNV 652 +#define _gloffset_GetFenceivNV 653 +#define _gloffset_IsFenceNV 654 +#define _gloffset_SetFenceNV 655 +#define _gloffset_TestFenceNV 656 +#define _gloffset_AreProgramsResidentNV 657 +#define _gloffset_BindProgramNV 658 +#define _gloffset_DeleteProgramsNV 659 +#define _gloffset_ExecuteProgramNV 660 +#define _gloffset_GenProgramsNV 661 +#define _gloffset_GetProgramParameterdvNV 662 +#define _gloffset_GetProgramParameterfvNV 663 +#define _gloffset_GetProgramStringNV 664 +#define _gloffset_GetProgramivNV 665 +#define _gloffset_GetTrackMatrixivNV 666 +#define _gloffset_GetVertexAttribPointervNV 667 +#define _gloffset_GetVertexAttribdvNV 668 +#define _gloffset_GetVertexAttribfvNV 669 +#define _gloffset_GetVertexAttribivNV 670 +#define _gloffset_IsProgramNV 671 +#define _gloffset_LoadProgramNV 672 +#define _gloffset_ProgramParameter4dNV 673 +#define _gloffset_ProgramParameter4dvNV 674 +#define _gloffset_ProgramParameter4fNV 675 +#define _gloffset_ProgramParameter4fvNV 676 +#define _gloffset_ProgramParameters4dvNV 677 +#define _gloffset_ProgramParameters4fvNV 678 +#define _gloffset_RequestResidentProgramsNV 679 +#define _gloffset_TrackMatrixNV 680 +#define _gloffset_VertexAttrib1dNV 681 +#define _gloffset_VertexAttrib1dvNV 682 +#define _gloffset_VertexAttrib1fNV 683 +#define _gloffset_VertexAttrib1fvNV 684 +#define _gloffset_VertexAttrib1sNV 685 +#define _gloffset_VertexAttrib1svNV 686 +#define _gloffset_VertexAttrib2dNV 687 +#define _gloffset_VertexAttrib2dvNV 688 +#define _gloffset_VertexAttrib2fNV 689 +#define _gloffset_VertexAttrib2fvNV 690 +#define _gloffset_VertexAttrib2sNV 691 +#define _gloffset_VertexAttrib2svNV 692 +#define _gloffset_VertexAttrib3dNV 693 +#define _gloffset_VertexAttrib3dvNV 694 +#define _gloffset_VertexAttrib3fNV 695 +#define _gloffset_VertexAttrib3fvNV 696 +#define _gloffset_VertexAttrib3sNV 697 +#define _gloffset_VertexAttrib3svNV 698 +#define _gloffset_VertexAttrib4dNV 699 +#define _gloffset_VertexAttrib4dvNV 700 +#define _gloffset_VertexAttrib4fNV 701 +#define _gloffset_VertexAttrib4fvNV 702 +#define _gloffset_VertexAttrib4sNV 703 +#define _gloffset_VertexAttrib4svNV 704 +#define _gloffset_VertexAttrib4ubNV 705 +#define _gloffset_VertexAttrib4ubvNV 706 +#define _gloffset_VertexAttribPointerNV 707 +#define _gloffset_VertexAttribs1dvNV 708 +#define _gloffset_VertexAttribs1fvNV 709 +#define _gloffset_VertexAttribs1svNV 710 +#define _gloffset_VertexAttribs2dvNV 711 +#define _gloffset_VertexAttribs2fvNV 712 +#define _gloffset_VertexAttribs2svNV 713 +#define _gloffset_VertexAttribs3dvNV 714 +#define _gloffset_VertexAttribs3fvNV 715 +#define _gloffset_VertexAttribs3svNV 716 +#define _gloffset_VertexAttribs4dvNV 717 +#define _gloffset_VertexAttribs4fvNV 718 +#define _gloffset_VertexAttribs4svNV 719 +#define _gloffset_VertexAttribs4ubvNV 720 +#define _gloffset_AlphaFragmentOp1ATI 721 +#define _gloffset_AlphaFragmentOp2ATI 722 +#define _gloffset_AlphaFragmentOp3ATI 723 +#define _gloffset_BeginFragmentShaderATI 724 +#define _gloffset_BindFragmentShaderATI 725 +#define _gloffset_ColorFragmentOp1ATI 726 +#define _gloffset_ColorFragmentOp2ATI 727 +#define _gloffset_ColorFragmentOp3ATI 728 +#define _gloffset_DeleteFragmentShaderATI 729 +#define _gloffset_EndFragmentShaderATI 730 +#define _gloffset_GenFragmentShadersATI 731 +#define _gloffset_PassTexCoordATI 732 +#define _gloffset_SampleMapATI 733 +#define _gloffset_SetFragmentShaderConstantATI 734 +#define _gloffset_PointParameteriNV 735 +#define _gloffset_PointParameterivNV 736 +#define _gloffset_ActiveStencilFaceEXT 737 +#define _gloffset_BindVertexArrayAPPLE 738 +#define _gloffset_DeleteVertexArraysAPPLE 739 +#define _gloffset_GenVertexArraysAPPLE 740 +#define _gloffset_IsVertexArrayAPPLE 741 +#define _gloffset_GetProgramNamedParameterdvNV 742 +#define _gloffset_GetProgramNamedParameterfvNV 743 +#define _gloffset_ProgramNamedParameter4dNV 744 +#define _gloffset_ProgramNamedParameter4dvNV 745 +#define _gloffset_ProgramNamedParameter4fNV 746 +#define _gloffset_ProgramNamedParameter4fvNV 747 +#define _gloffset_DepthBoundsEXT 748 +#define _gloffset_BlendEquationSeparateEXT 749 +#define _gloffset_BindFramebufferEXT 750 +#define _gloffset_BindRenderbufferEXT 751 +#define _gloffset_CheckFramebufferStatusEXT 752 +#define _gloffset_DeleteFramebuffersEXT 753 +#define _gloffset_DeleteRenderbuffersEXT 754 +#define _gloffset_FramebufferRenderbufferEXT 755 +#define _gloffset_FramebufferTexture1DEXT 756 +#define _gloffset_FramebufferTexture2DEXT 757 +#define _gloffset_FramebufferTexture3DEXT 758 +#define _gloffset_GenFramebuffersEXT 759 +#define _gloffset_GenRenderbuffersEXT 760 +#define _gloffset_GenerateMipmapEXT 761 +#define _gloffset_GetFramebufferAttachmentParameterivEXT 762 +#define _gloffset_GetRenderbufferParameterivEXT 763 +#define _gloffset_IsFramebufferEXT 764 +#define _gloffset_IsRenderbufferEXT 765 +#define _gloffset_RenderbufferStorageEXT 766 +#define _gloffset_BlitFramebufferEXT 767 +#define _gloffset_ProgramEnvParameters4fvEXT 768 +#define _gloffset_ProgramLocalParameters4fvEXT 769 +#define _gloffset_GetQueryObjecti64vEXT 770 +#define _gloffset_GetQueryObjectui64vEXT 771 +#define _gloffset_FIRST_DYNAMIC 772 #else @@ -818,6 +824,12 @@ #define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] #define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] #define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] +#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index] +#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index] +#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index] +#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index] +#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index] +#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index] #define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] #define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] #define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h index e77fe05d59..026af32af8 100644 --- a/src/mesa/glapi/glapitable.h +++ b/src/mesa/glapi/glapitable.h @@ -461,348 +461,354 @@ struct _glapi_table void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */ void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */ void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); /* 423 */ - void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 424 */ - void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 425 */ - void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 426 */ - void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 427 */ - void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 428 */ - void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 429 */ - void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 430 */ - void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 431 */ - void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 432 */ - void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 433 */ - void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 434 */ - void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 435 */ - void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 436 */ - void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 437 */ - void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 438 */ - void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 439 */ - void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 440 */ - void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 441 */ - void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 442 */ - void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 443 */ - void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 444 */ - void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 445 */ - void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 446 */ - void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 447 */ - void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 448 */ - void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 449 */ - void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 450 */ - void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 451 */ - void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 452 */ - void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 453 */ - void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 454 */ - void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 455 */ - void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 456 */ - void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 457 */ - void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 458 */ - void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 459 */ - void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 460 */ - void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 461 */ - void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 462 */ - void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 463 */ - void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 464 */ - void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 465 */ - void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 466 */ - void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 467 */ - void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 468 */ - void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 469 */ - void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 470 */ - void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 471 */ - void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 472 */ - void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 473 */ - void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 474 */ - void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 475 */ - void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 476 */ - void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 477 */ - void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 478 */ - void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 479 */ - void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 480 */ - void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 481 */ - void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 482 */ - void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 483 */ - void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 484 */ - void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 485 */ - void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 486 */ - void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 487 */ - void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 488 */ - void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 489 */ - void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 490 */ - void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 491 */ - void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 492 */ - void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 493 */ - void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 494 */ - void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 495 */ - void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 496 */ - void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 497 */ - void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 498 */ - void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 499 */ - void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 500 */ - GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 501 */ - GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 502 */ - GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 503 */ - void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 504 */ - void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 505 */ - void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 506 */ - void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 507 */ - void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 508 */ - void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 509 */ - void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 510 */ - GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 511 */ - void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 512 */ - void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 513 */ - GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 514 */ - GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 515 */ - void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 516 */ - void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 517 */ - void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 518 */ - void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 519 */ - GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 520 */ - void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 521 */ - void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 522 */ - void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 523 */ - void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 524 */ - GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 525 */ - void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 526 */ - void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 527 */ - void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 528 */ - void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 529 */ - void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 530 */ - void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 531 */ - void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 532 */ - void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 533 */ - void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 534 */ - void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 535 */ - void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 536 */ - void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 537 */ - void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 538 */ - void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 539 */ - void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 540 */ - void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 541 */ - void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 542 */ - void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 543 */ - void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 544 */ - void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 545 */ - void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 546 */ - void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 547 */ - void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 548 */ - void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 549 */ - void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 550 */ - void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 551 */ - void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 552 */ - GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 553 */ - void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 554 */ - void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 555 */ - void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 556 */ - void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 557 */ - void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 558 */ - void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 559 */ - void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 560 */ - void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 561 */ - void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 562 */ - void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 563 */ - void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 564 */ - void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 565 */ - void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 566 */ - void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 567 */ - void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 568 */ - void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 569 */ - void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 570 */ - void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 571 */ - void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 572 */ - void (GLAPIENTRYP UnlockArraysEXT)(void); /* 573 */ - void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 574 */ - void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 575 */ - void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 576 */ - void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 577 */ - void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 578 */ - void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 579 */ - void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 580 */ - void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 581 */ - void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 582 */ - void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 583 */ - void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 584 */ - void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 585 */ - void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 586 */ - void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 587 */ - void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 588 */ - void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 589 */ - void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 590 */ - void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 591 */ - void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 592 */ - void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 593 */ - void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 594 */ - void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 595 */ - void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 596 */ - void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 597 */ - void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 598 */ - void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 599 */ - void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 600 */ - void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 601 */ - void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 602 */ - void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 603 */ - void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 604 */ - void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 605 */ - void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 606 */ - void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 607 */ - void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 608 */ - void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 609 */ - void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 610 */ - void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 611 */ - void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 612 */ - void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 613 */ - void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 614 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 615 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 616 */ - void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 617 */ - void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 618 */ - void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 619 */ - void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 620 */ - void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 621 */ - void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 622 */ - void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 623 */ - void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 624 */ - void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 625 */ - void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 626 */ - void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 627 */ - void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 628 */ - void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 629 */ - void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 630 */ - void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 631 */ - void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 632 */ - void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 633 */ - void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 634 */ - void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 635 */ - void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 636 */ - void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 637 */ - void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 638 */ - void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 639 */ - void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 640 */ - void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 641 */ - void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 642 */ - void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 643 */ - void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 644 */ - void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 645 */ - void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 646 */ - void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 647 */ - GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 648 */ - void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 649 */ - GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 650 */ - GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 651 */ - void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 652 */ - void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 653 */ - void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 654 */ - void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 655 */ - void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 656 */ - void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 657 */ - void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 658 */ - void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 659 */ - void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 660 */ - void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params); /* 661 */ - void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 662 */ - void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 663 */ - void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 664 */ - GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 665 */ - void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 666 */ - void (GLAPIENTRYP ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 667 */ - void (GLAPIENTRYP ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); /* 668 */ - void (GLAPIENTRYP ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 669 */ - void (GLAPIENTRYP ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); /* 670 */ - void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 671 */ - void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 672 */ - void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 673 */ - void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 674 */ - void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 675 */ - void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 676 */ - void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 677 */ - void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 678 */ - void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 679 */ - void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 680 */ - void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 681 */ - void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 682 */ - void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 683 */ - void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 684 */ - void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 685 */ - void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 686 */ - void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 687 */ - void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 688 */ - void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 689 */ - void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 690 */ - void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 691 */ - void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 692 */ - void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 693 */ - void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 694 */ - void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 695 */ - void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 696 */ - void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 697 */ - void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 698 */ - void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 699 */ - void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 700 */ - void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 701 */ - void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 702 */ - void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 703 */ - void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 704 */ - void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 705 */ - void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 706 */ - void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 707 */ - void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 708 */ - void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 709 */ - void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 710 */ - void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 711 */ - void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 712 */ - void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 713 */ - void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 714 */ - void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 715 */ - void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 716 */ - void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 717 */ - void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 718 */ - void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 719 */ - void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 720 */ - void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 721 */ - void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 722 */ - void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 723 */ - void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 724 */ - GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 725 */ - void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 726 */ - void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 727 */ - void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 728 */ - void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 729 */ - void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 730 */ - void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 731 */ - void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 732 */ - void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 733 */ - void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 734 */ - GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 735 */ - void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 736 */ - void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 737 */ - void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 738 */ - void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 739 */ - void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 740 */ - void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 741 */ - void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 742 */ - void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 743 */ - void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 744 */ - void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 745 */ - GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 746 */ - void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 747 */ - void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 748 */ - void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 749 */ - void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 750 */ - void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 751 */ - void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 752 */ - void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 753 */ - void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 754 */ - void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 755 */ - void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 756 */ - void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 757 */ - GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 758 */ - GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 759 */ - void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 760 */ - void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 761 */ - void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 762 */ - void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 763 */ - void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 764 */ - void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 765 */ + void (GLAPIENTRYP UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 424 */ + void (GLAPIENTRYP UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 425 */ + void (GLAPIENTRYP UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 426 */ + void (GLAPIENTRYP UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 427 */ + void (GLAPIENTRYP UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 428 */ + void (GLAPIENTRYP UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 429 */ + void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 430 */ + void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 431 */ + void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 432 */ + void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 433 */ + void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 434 */ + void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 435 */ + void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 436 */ + void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 437 */ + void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 438 */ + void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 439 */ + void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 440 */ + void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 441 */ + void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 442 */ + void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 443 */ + void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 444 */ + void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 445 */ + void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 446 */ + void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 447 */ + void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 448 */ + void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 449 */ + void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 450 */ + void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 451 */ + void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 452 */ + void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 453 */ + void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 454 */ + void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 455 */ + void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 456 */ + void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 457 */ + void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 458 */ + void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 459 */ + void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 460 */ + void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 461 */ + void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 462 */ + void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 463 */ + void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 464 */ + void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 465 */ + void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 466 */ + void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 467 */ + void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 468 */ + void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 469 */ + void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 470 */ + void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 471 */ + void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 472 */ + void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 473 */ + void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 474 */ + void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 475 */ + void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 476 */ + void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 477 */ + void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 478 */ + void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 479 */ + void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 480 */ + void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 481 */ + void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 482 */ + void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 483 */ + void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 484 */ + void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 485 */ + void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 486 */ + void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 487 */ + void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 488 */ + void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 489 */ + void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 490 */ + void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 491 */ + void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 492 */ + void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 493 */ + void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 494 */ + void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 495 */ + void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 496 */ + void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 497 */ + void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 498 */ + void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 499 */ + void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 500 */ + void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 501 */ + void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 502 */ + void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 503 */ + void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 504 */ + void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 505 */ + void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 506 */ + GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 507 */ + GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 508 */ + GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 509 */ + void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 510 */ + void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 511 */ + void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 512 */ + void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 513 */ + void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 514 */ + void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 515 */ + void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 516 */ + GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 517 */ + void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 518 */ + void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 519 */ + GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 520 */ + GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 521 */ + void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 522 */ + void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 523 */ + void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 524 */ + void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 525 */ + GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 526 */ + void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 527 */ + void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 528 */ + void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 529 */ + void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 530 */ + GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 531 */ + void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 532 */ + void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 533 */ + void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 534 */ + void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 535 */ + void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 536 */ + void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 537 */ + void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 538 */ + void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 539 */ + void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 540 */ + void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 541 */ + void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 542 */ + void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 543 */ + void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 544 */ + void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 545 */ + void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 546 */ + void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 547 */ + void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 548 */ + void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 549 */ + void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 550 */ + void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 551 */ + void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 552 */ + void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 553 */ + void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 554 */ + void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 555 */ + void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 556 */ + void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 557 */ + void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 558 */ + GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 559 */ + void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 560 */ + void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 561 */ + void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 562 */ + void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 563 */ + void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 564 */ + void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 565 */ + void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 566 */ + void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 567 */ + void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 568 */ + void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 569 */ + void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 570 */ + void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 571 */ + void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 572 */ + void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 573 */ + void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 574 */ + void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 575 */ + void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 576 */ + void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 577 */ + void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 578 */ + void (GLAPIENTRYP UnlockArraysEXT)(void); /* 579 */ + void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 580 */ + void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 581 */ + void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 582 */ + void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 583 */ + void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 584 */ + void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 585 */ + void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 586 */ + void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 587 */ + void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 588 */ + void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 589 */ + void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 590 */ + void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 591 */ + void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 592 */ + void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 593 */ + void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 594 */ + void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 595 */ + void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 596 */ + void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 597 */ + void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 598 */ + void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 599 */ + void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 600 */ + void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 601 */ + void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 602 */ + void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 603 */ + void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 604 */ + void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 605 */ + void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 606 */ + void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 607 */ + void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 608 */ + void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 609 */ + void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 610 */ + void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 611 */ + void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 612 */ + void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 613 */ + void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 614 */ + void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 615 */ + void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 616 */ + void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 617 */ + void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 618 */ + void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 619 */ + void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 620 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 621 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 622 */ + void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 623 */ + void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 624 */ + void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 625 */ + void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 626 */ + void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 627 */ + void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 628 */ + void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 629 */ + void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 630 */ + void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 631 */ + void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 632 */ + void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 633 */ + void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 634 */ + void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 635 */ + void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 636 */ + void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 637 */ + void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 638 */ + void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 639 */ + void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 640 */ + void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 641 */ + void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 642 */ + void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 643 */ + void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 644 */ + void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 645 */ + void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 646 */ + void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 647 */ + void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 648 */ + void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 649 */ + void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 650 */ + void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 651 */ + void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 652 */ + void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 653 */ + GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 654 */ + void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 655 */ + GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 656 */ + GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 657 */ + void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 658 */ + void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 659 */ + void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 660 */ + void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 661 */ + void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 662 */ + void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 663 */ + void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 664 */ + void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 665 */ + void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 666 */ + void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params); /* 667 */ + void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 668 */ + void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 669 */ + void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 670 */ + GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 671 */ + void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 672 */ + void (GLAPIENTRYP ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 673 */ + void (GLAPIENTRYP ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); /* 674 */ + void (GLAPIENTRYP ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 675 */ + void (GLAPIENTRYP ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); /* 676 */ + void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 677 */ + void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 678 */ + void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 679 */ + void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 680 */ + void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 681 */ + void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 682 */ + void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 683 */ + void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 684 */ + void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 685 */ + void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 686 */ + void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 687 */ + void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 688 */ + void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 689 */ + void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 690 */ + void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 691 */ + void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 692 */ + void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 693 */ + void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 694 */ + void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 695 */ + void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 696 */ + void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 697 */ + void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 698 */ + void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 699 */ + void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 700 */ + void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 701 */ + void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 702 */ + void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 703 */ + void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 704 */ + void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 705 */ + void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 706 */ + void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 707 */ + void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 708 */ + void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 709 */ + void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 710 */ + void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 711 */ + void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 712 */ + void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 713 */ + void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 714 */ + void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 715 */ + void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 716 */ + void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 717 */ + void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 718 */ + void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 719 */ + void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 720 */ + void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 721 */ + void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 722 */ + void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 723 */ + void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 724 */ + void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 725 */ + void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 726 */ + void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 727 */ + void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 728 */ + void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 729 */ + void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 730 */ + GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 731 */ + void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 732 */ + void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 733 */ + void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 734 */ + void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 735 */ + void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 736 */ + void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 737 */ + void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 738 */ + void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 739 */ + void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 740 */ + GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 741 */ + void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 742 */ + void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 743 */ + void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 744 */ + void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 745 */ + void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 746 */ + void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 747 */ + void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 748 */ + void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 749 */ + void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 750 */ + void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 751 */ + GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 752 */ + void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 753 */ + void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 754 */ + void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 755 */ + void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 756 */ + void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 757 */ + void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 758 */ + void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 759 */ + void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 760 */ + void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 761 */ + void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 762 */ + void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 763 */ + GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 764 */ + GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 765 */ + void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 766 */ + void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 767 */ + void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 768 */ + void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 769 */ + void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 770 */ + void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 771 */ }; #endif /* !defined( _GLAPI_TABLE_H_ ) */ diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h index 1b17723b08..340a4f6a04 100644 --- a/src/mesa/glapi/glapitemp.h +++ b/src/mesa/glapi/glapitemp.h @@ -2759,6 +2759,36 @@ KEYWORD1 void KEYWORD2 NAME(StencilOpSeparate)(GLenum face, GLenum fail, GLenum DISPATCH(StencilOpSeparate, (face, fail, zfail, zpass), (F, "glStencilOpSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", face, fail, zfail, zpass)); } +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2x3fv, (location, count, transpose, value), (F, "glUniformMatrix2x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2x4fv, (location, count, transpose, value), (F, "glUniformMatrix2x4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3x2fv, (location, count, transpose, value), (F, "glUniformMatrix3x2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3x4fv, (location, count, transpose, value), (F, "glUniformMatrix3x4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4x2fv, (location, count, transpose, value), (F, "glUniformMatrix4x2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4x3fv, (location, count, transpose, value), (F, "glUniformMatrix4x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m) { DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m)); @@ -3929,58 +3959,58 @@ KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias) DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_556)(GLenum pname, GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_556)(GLenum pname, GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params) { DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_557)(GLenum pname, GLint * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLint * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_557)(GLenum pname, GLint * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLint * params) { DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_558)(GLenum pname, GLfloat param); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_564)(GLenum pname, GLfloat param); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_558)(GLenum pname, GLfloat param) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_564)(GLenum pname, GLfloat param) { DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_559)(GLenum pname, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_565)(GLenum pname, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_559)(GLenum pname, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_565)(GLenum pname, const GLfloat * params) { DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_560)(GLenum pname, GLint param); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_566)(GLenum pname, GLint param); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_560)(GLenum pname, GLint param) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_566)(GLenum pname, GLint param) { DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_561)(GLenum pname, const GLint * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_567)(GLenum pname, const GLint * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_561)(GLenum pname, const GLint * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_567)(GLenum pname, const GLint * params) { DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLclampf value, GLboolean invert); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_568)(GLclampf value, GLboolean invert); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLclampf value, GLboolean invert) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_568)(GLclampf value, GLboolean invert) { DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pattern); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_569)(GLenum pattern); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pattern) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_569)(GLenum pattern) { DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern)); } @@ -4030,9 +4060,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param) DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_570)(GLenum pname, GLfloat param); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_576)(GLenum pname, GLfloat param); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_570)(GLenum pname, GLfloat param) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_576)(GLenum pname, GLfloat param) { DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param)); } @@ -4052,9 +4082,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * p DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_571)(GLenum pname, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_577)(GLenum pname, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_571)(GLenum pname, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_577)(GLenum pname, const GLfloat * params) { DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); } @@ -4069,16 +4099,16 @@ KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void) DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n")); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_574)(GLenum pname, GLdouble * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_580)(GLenum pname, GLdouble * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_574)(GLenum pname, GLdouble * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_580)(GLenum pname, GLdouble * params) { DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_575)(GLenum pname, GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_581)(GLenum pname, GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_575)(GLenum pname, GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_581)(GLenum pname, GLfloat * params) { DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); } @@ -4323,9 +4353,9 @@ KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord) DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_600)(GLenum mode); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum mode); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_600)(GLenum mode) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum mode) { DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode)); } @@ -4340,9 +4370,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfac DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_601)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_601)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); } @@ -4707,65 +4737,65 @@ KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v) DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_642)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_648)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_642)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_648)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) { DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_643)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_643)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride) { DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_644)(GLsizei n, const GLuint * fences); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_650)(GLsizei n, const GLuint * fences); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_644)(GLsizei n, const GLuint * fences) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_650)(GLsizei n, const GLuint * fences) { DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_645)(GLuint fence); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_651)(GLuint fence); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_645)(GLuint fence) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_651)(GLuint fence) { DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_646)(GLsizei n, GLuint * fences); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_652)(GLsizei n, GLuint * fences); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_646)(GLsizei n, GLuint * fences) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_652)(GLsizei n, GLuint * fences) { DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_647)(GLuint fence, GLenum pname, GLint * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLuint fence, GLenum pname, GLint * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_647)(GLuint fence, GLenum pname, GLint * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLuint fence, GLenum pname, GLint * params) { DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params)); } -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_648)(GLuint fence); +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_654)(GLuint fence); -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_648)(GLuint fence) +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_654)(GLuint fence) { RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(GLuint fence, GLenum condition); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_655)(GLuint fence, GLenum condition); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(GLuint fence, GLenum condition) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_655)(GLuint fence, GLenum condition) { DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition)); } -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_650)(GLuint fence); +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_656)(GLuint fence); -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_650)(GLuint fence) +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_656)(GLuint fence) { RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence)); } @@ -5205,37 +5235,37 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * para DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_731)(GLenum face); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_737)(GLenum face); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_731)(GLenum face) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_737)(GLenum face) { DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_732)(GLuint array); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_738)(GLuint array); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_732)(GLuint array) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_738)(GLuint array) { DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLsizei n, const GLuint * arrays); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_739)(GLsizei n, const GLuint * arrays); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLsizei n, const GLuint * arrays) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_739)(GLsizei n, const GLuint * arrays) { DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLsizei n, GLuint * arrays); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_740)(GLsizei n, GLuint * arrays); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLsizei n, GLuint * arrays) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_740)(GLsizei n, GLuint * arrays) { DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); } -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_735)(GLuint array); +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_741)(GLuint array); -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_735)(GLuint array) +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_741)(GLuint array) { RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array)); } @@ -5270,9 +5300,9 @@ KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_742)(GLclampd zmin, GLclampd zmax); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_748)(GLclampd zmin, GLclampd zmax); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_742)(GLclampd zmin, GLclampd zmax) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_748)(GLclampd zmin, GLclampd zmax) { DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax)); } @@ -5282,9 +5312,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA) DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_743)(GLenum modeRGB, GLenum modeA); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_749)(GLenum modeRGB, GLenum modeA); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_743)(GLenum modeRGB, GLenum modeA) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_749)(GLenum modeRGB, GLenum modeA) { DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA)); } @@ -5374,37 +5404,37 @@ KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageEXT)(GLenum target, GLenum intern DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorageEXT(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_761)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_761)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_762)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_762)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) { DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) { DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_764)(GLuint id, GLenum pname, GLint64EXT * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_770)(GLuint id, GLenum pname, GLint64EXT * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_764)(GLuint id, GLenum pname, GLint64EXT * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_770)(GLuint id, GLenum pname, GLint64EXT * params) { DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLuint id, GLenum pname, GLuint64EXT * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_771)(GLuint id, GLenum pname, GLuint64EXT * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLuint id, GLenum pname, GLuint64EXT * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_771)(GLuint id, GLenum pname, GLuint64EXT * params) { DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); } @@ -5847,6 +5877,12 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(StencilFuncSeparate), TABLE_ENTRY(StencilMaskSeparate), TABLE_ENTRY(StencilOpSeparate), + TABLE_ENTRY(UniformMatrix2x3fv), + TABLE_ENTRY(UniformMatrix2x4fv), + TABLE_ENTRY(UniformMatrix3x2fv), + TABLE_ENTRY(UniformMatrix3x4fv), + TABLE_ENTRY(UniformMatrix4x2fv), + TABLE_ENTRY(UniformMatrix4x3fv), TABLE_ENTRY(LoadTransposeMatrixdARB), TABLE_ENTRY(LoadTransposeMatrixfARB), TABLE_ENTRY(MultTransposeMatrixdARB), @@ -5979,14 +6015,14 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(GetAttribLocationARB), TABLE_ENTRY(DrawBuffersARB), TABLE_ENTRY(PolygonOffsetEXT), - TABLE_ENTRY(_dispatch_stub_556), - TABLE_ENTRY(_dispatch_stub_557), - TABLE_ENTRY(_dispatch_stub_558), - TABLE_ENTRY(_dispatch_stub_559), - TABLE_ENTRY(_dispatch_stub_560), - TABLE_ENTRY(_dispatch_stub_561), TABLE_ENTRY(_dispatch_stub_562), TABLE_ENTRY(_dispatch_stub_563), + TABLE_ENTRY(_dispatch_stub_564), + TABLE_ENTRY(_dispatch_stub_565), + TABLE_ENTRY(_dispatch_stub_566), + TABLE_ENTRY(_dispatch_stub_567), + TABLE_ENTRY(_dispatch_stub_568), + TABLE_ENTRY(_dispatch_stub_569), TABLE_ENTRY(ColorPointerEXT), TABLE_ENTRY(EdgeFlagPointerEXT), TABLE_ENTRY(IndexPointerEXT), @@ -5997,8 +6033,8 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(PointParameterfvEXT), TABLE_ENTRY(LockArraysEXT), TABLE_ENTRY(UnlockArraysEXT), - TABLE_ENTRY(_dispatch_stub_574), - TABLE_ENTRY(_dispatch_stub_575), + TABLE_ENTRY(_dispatch_stub_580), + TABLE_ENTRY(_dispatch_stub_581), TABLE_ENTRY(SecondaryColor3bEXT), TABLE_ENTRY(SecondaryColor3bvEXT), TABLE_ENTRY(SecondaryColor3dEXT), @@ -6023,7 +6059,7 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(FogCoorddvEXT), TABLE_ENTRY(FogCoordfEXT), TABLE_ENTRY(FogCoordfvEXT), - TABLE_ENTRY(_dispatch_stub_600), + TABLE_ENTRY(_dispatch_stub_606), TABLE_ENTRY(BlendFuncSeparateEXT), TABLE_ENTRY(FlushVertexArrayRangeNV), TABLE_ENTRY(VertexArrayRangeNV), @@ -6065,15 +6101,15 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(WindowPos4ivMESA), TABLE_ENTRY(WindowPos4sMESA), TABLE_ENTRY(WindowPos4svMESA), - TABLE_ENTRY(_dispatch_stub_642), - TABLE_ENTRY(_dispatch_stub_643), - TABLE_ENTRY(_dispatch_stub_644), - TABLE_ENTRY(_dispatch_stub_645), - TABLE_ENTRY(_dispatch_stub_646), - TABLE_ENTRY(_dispatch_stub_647), TABLE_ENTRY(_dispatch_stub_648), TABLE_ENTRY(_dispatch_stub_649), TABLE_ENTRY(_dispatch_stub_650), + TABLE_ENTRY(_dispatch_stub_651), + TABLE_ENTRY(_dispatch_stub_652), + TABLE_ENTRY(_dispatch_stub_653), + TABLE_ENTRY(_dispatch_stub_654), + TABLE_ENTRY(_dispatch_stub_655), + TABLE_ENTRY(_dispatch_stub_656), TABLE_ENTRY(AreProgramsResidentNV), TABLE_ENTRY(BindProgramNV), TABLE_ENTRY(DeleteProgramsNV), @@ -6154,19 +6190,19 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(SetFragmentShaderConstantATI), TABLE_ENTRY(PointParameteriNV), TABLE_ENTRY(PointParameterivNV), - TABLE_ENTRY(_dispatch_stub_731), - TABLE_ENTRY(_dispatch_stub_732), - TABLE_ENTRY(_dispatch_stub_733), - TABLE_ENTRY(_dispatch_stub_734), - TABLE_ENTRY(_dispatch_stub_735), + TABLE_ENTRY(_dispatch_stub_737), + TABLE_ENTRY(_dispatch_stub_738), + TABLE_ENTRY(_dispatch_stub_739), + TABLE_ENTRY(_dispatch_stub_740), + TABLE_ENTRY(_dispatch_stub_741), TABLE_ENTRY(GetProgramNamedParameterdvNV), TABLE_ENTRY(GetProgramNamedParameterfvNV), TABLE_ENTRY(ProgramNamedParameter4dNV), TABLE_ENTRY(ProgramNamedParameter4dvNV), TABLE_ENTRY(ProgramNamedParameter4fNV), TABLE_ENTRY(ProgramNamedParameter4fvNV), - TABLE_ENTRY(_dispatch_stub_742), - TABLE_ENTRY(_dispatch_stub_743), + TABLE_ENTRY(_dispatch_stub_748), + TABLE_ENTRY(_dispatch_stub_749), TABLE_ENTRY(BindFramebufferEXT), TABLE_ENTRY(BindRenderbufferEXT), TABLE_ENTRY(CheckFramebufferStatusEXT), @@ -6184,11 +6220,11 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(IsFramebufferEXT), TABLE_ENTRY(IsRenderbufferEXT), TABLE_ENTRY(RenderbufferStorageEXT), - TABLE_ENTRY(_dispatch_stub_761), - TABLE_ENTRY(_dispatch_stub_762), - TABLE_ENTRY(_dispatch_stub_763), - TABLE_ENTRY(_dispatch_stub_764), - TABLE_ENTRY(_dispatch_stub_765), + TABLE_ENTRY(_dispatch_stub_767), + TABLE_ENTRY(_dispatch_stub_768), + TABLE_ENTRY(_dispatch_stub_769), + TABLE_ENTRY(_dispatch_stub_770), + TABLE_ENTRY(_dispatch_stub_771), /* A whole bunch of no-op functions. These might be called * when someone tries to call a dynamically-registered * extension function without a current rendering context. diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h index 32439811a5..548c271bdf 100644 --- a/src/mesa/glapi/glprocs.h +++ b/src/mesa/glapi/glprocs.h @@ -476,6 +476,12 @@ static const char gl_string_table[] = "glStencilFuncSeparate\0" "glStencilMaskSeparate\0" "glStencilOpSeparate\0" + "glUniformMatrix2x3fv\0" + "glUniformMatrix2x4fv\0" + "glUniformMatrix3x2fv\0" + "glUniformMatrix3x4fv\0" + "glUniformMatrix4x2fv\0" + "glUniformMatrix4x3fv\0" "glLoadTransposeMatrixdARB\0" "glLoadTransposeMatrixfARB\0" "glMultTransposeMatrixdARB\0" @@ -1103,38 +1109,38 @@ extern void gl_dispatch_stub_363(void); extern void gl_dispatch_stub_364(void); extern void gl_dispatch_stub_365(void); extern void gl_dispatch_stub_366(void); -extern void gl_dispatch_stub_556(void); -extern void gl_dispatch_stub_557(void); -extern void gl_dispatch_stub_558(void); -extern void gl_dispatch_stub_559(void); -extern void gl_dispatch_stub_560(void); -extern void gl_dispatch_stub_561(void); extern void gl_dispatch_stub_562(void); extern void gl_dispatch_stub_563(void); -extern void gl_dispatch_stub_574(void); -extern void gl_dispatch_stub_575(void); -extern void gl_dispatch_stub_600(void); -extern void gl_dispatch_stub_642(void); -extern void gl_dispatch_stub_643(void); -extern void gl_dispatch_stub_644(void); -extern void gl_dispatch_stub_645(void); -extern void gl_dispatch_stub_646(void); -extern void gl_dispatch_stub_647(void); +extern void gl_dispatch_stub_564(void); +extern void gl_dispatch_stub_565(void); +extern void gl_dispatch_stub_566(void); +extern void gl_dispatch_stub_567(void); +extern void gl_dispatch_stub_568(void); +extern void gl_dispatch_stub_569(void); +extern void gl_dispatch_stub_580(void); +extern void gl_dispatch_stub_581(void); +extern void gl_dispatch_stub_606(void); extern void gl_dispatch_stub_648(void); extern void gl_dispatch_stub_649(void); extern void gl_dispatch_stub_650(void); -extern void gl_dispatch_stub_731(void); -extern void gl_dispatch_stub_732(void); -extern void gl_dispatch_stub_733(void); -extern void gl_dispatch_stub_734(void); -extern void gl_dispatch_stub_735(void); -extern void gl_dispatch_stub_742(void); -extern void gl_dispatch_stub_743(void); -extern void gl_dispatch_stub_761(void); -extern void gl_dispatch_stub_762(void); -extern void gl_dispatch_stub_763(void); -extern void gl_dispatch_stub_764(void); -extern void gl_dispatch_stub_765(void); +extern void gl_dispatch_stub_651(void); +extern void gl_dispatch_stub_652(void); +extern void gl_dispatch_stub_653(void); +extern void gl_dispatch_stub_654(void); +extern void gl_dispatch_stub_655(void); +extern void gl_dispatch_stub_656(void); +extern void gl_dispatch_stub_737(void); +extern void gl_dispatch_stub_738(void); +extern void gl_dispatch_stub_739(void); +extern void gl_dispatch_stub_740(void); +extern void gl_dispatch_stub_741(void); +extern void gl_dispatch_stub_748(void); +extern void gl_dispatch_stub_749(void); +extern void gl_dispatch_stub_767(void); +extern void gl_dispatch_stub_768(void); +extern void gl_dispatch_stub_769(void); +extern void gl_dispatch_stub_770(void); +extern void gl_dispatch_stub_771(void); #endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */ static const glprocs_table_t static_functions[] = { @@ -1562,616 +1568,622 @@ static const glprocs_table_t static_functions[] = { NAME_FUNC_OFFSET( 5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, _gloffset_StencilFuncSeparate), NAME_FUNC_OFFSET( 5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, _gloffset_StencilMaskSeparate), NAME_FUNC_OFFSET( 6017, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), - NAME_FUNC_OFFSET( 6037, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), - NAME_FUNC_OFFSET( 6063, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), - NAME_FUNC_OFFSET( 6089, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), - NAME_FUNC_OFFSET( 6115, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), - NAME_FUNC_OFFSET( 6141, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), - NAME_FUNC_OFFSET( 6161, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), - NAME_FUNC_OFFSET( 6187, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), - NAME_FUNC_OFFSET( 6213, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), - NAME_FUNC_OFFSET( 6239, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), - NAME_FUNC_OFFSET( 6268, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), - NAME_FUNC_OFFSET( 6297, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), - NAME_FUNC_OFFSET( 6326, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), - NAME_FUNC_OFFSET( 6353, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), - NAME_FUNC_OFFSET( 6383, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), - NAME_FUNC_OFFSET( 6412, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, _gloffset_GetProgramEnvParameterdvARB), - NAME_FUNC_OFFSET( 6442, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, _gloffset_GetProgramEnvParameterfvARB), - NAME_FUNC_OFFSET( 6472, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, _gloffset_GetProgramLocalParameterdvARB), - NAME_FUNC_OFFSET( 6504, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, _gloffset_GetProgramLocalParameterfvARB), - NAME_FUNC_OFFSET( 6536, glGetProgramStringARB, glGetProgramStringARB, NULL, _gloffset_GetProgramStringARB), - NAME_FUNC_OFFSET( 6558, glGetProgramivARB, glGetProgramivARB, NULL, _gloffset_GetProgramivARB), - NAME_FUNC_OFFSET( 6576, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), - NAME_FUNC_OFFSET( 6599, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), - NAME_FUNC_OFFSET( 6622, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), - NAME_FUNC_OFFSET( 6645, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), - NAME_FUNC_OFFSET( 6672, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), - NAME_FUNC_OFFSET( 6700, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), - NAME_FUNC_OFFSET( 6727, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), - NAME_FUNC_OFFSET( 6755, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, _gloffset_ProgramLocalParameter4dARB), - NAME_FUNC_OFFSET( 6784, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, _gloffset_ProgramLocalParameter4dvARB), - NAME_FUNC_OFFSET( 6814, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, _gloffset_ProgramLocalParameter4fARB), - NAME_FUNC_OFFSET( 6843, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, _gloffset_ProgramLocalParameter4fvARB), - NAME_FUNC_OFFSET( 6873, glProgramStringARB, glProgramStringARB, NULL, _gloffset_ProgramStringARB), - NAME_FUNC_OFFSET( 6892, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), - NAME_FUNC_OFFSET( 6912, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), - NAME_FUNC_OFFSET( 6933, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), - NAME_FUNC_OFFSET( 6953, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), - NAME_FUNC_OFFSET( 6974, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), - NAME_FUNC_OFFSET( 6994, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), - NAME_FUNC_OFFSET( 7015, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), - NAME_FUNC_OFFSET( 7035, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), - NAME_FUNC_OFFSET( 7056, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), - NAME_FUNC_OFFSET( 7076, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), - NAME_FUNC_OFFSET( 7097, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), - NAME_FUNC_OFFSET( 7117, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), - NAME_FUNC_OFFSET( 7138, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), - NAME_FUNC_OFFSET( 7158, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), - NAME_FUNC_OFFSET( 7179, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), - NAME_FUNC_OFFSET( 7199, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), - NAME_FUNC_OFFSET( 7220, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), - NAME_FUNC_OFFSET( 7240, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), - NAME_FUNC_OFFSET( 7261, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), - NAME_FUNC_OFFSET( 7283, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), - NAME_FUNC_OFFSET( 7305, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), - NAME_FUNC_OFFSET( 7327, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), - NAME_FUNC_OFFSET( 7349, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), - NAME_FUNC_OFFSET( 7372, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), - NAME_FUNC_OFFSET( 7395, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), - NAME_FUNC_OFFSET( 7418, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), - NAME_FUNC_OFFSET( 7439, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), - NAME_FUNC_OFFSET( 7459, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), - NAME_FUNC_OFFSET( 7480, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), - NAME_FUNC_OFFSET( 7500, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), - NAME_FUNC_OFFSET( 7521, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), - NAME_FUNC_OFFSET( 7542, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), - NAME_FUNC_OFFSET( 7562, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), - NAME_FUNC_OFFSET( 7583, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), - NAME_FUNC_OFFSET( 7605, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), - NAME_FUNC_OFFSET( 7627, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), - NAME_FUNC_OFFSET( 7649, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), - NAME_FUNC_OFFSET( 7674, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), - NAME_FUNC_OFFSET( 7690, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), - NAME_FUNC_OFFSET( 7706, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), - NAME_FUNC_OFFSET( 7725, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), - NAME_FUNC_OFFSET( 7744, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), - NAME_FUNC_OFFSET( 7760, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), - NAME_FUNC_OFFSET( 7786, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), - NAME_FUNC_OFFSET( 7809, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), - NAME_FUNC_OFFSET( 7831, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), - NAME_FUNC_OFFSET( 7845, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), - NAME_FUNC_OFFSET( 7860, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), - NAME_FUNC_OFFSET( 7877, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), - NAME_FUNC_OFFSET( 7893, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), - NAME_FUNC_OFFSET( 7912, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), - NAME_FUNC_OFFSET( 7926, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), - NAME_FUNC_OFFSET( 7942, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), - NAME_FUNC_OFFSET( 7964, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), - NAME_FUNC_OFFSET( 7987, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), - NAME_FUNC_OFFSET( 8003, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), - NAME_FUNC_OFFSET( 8016, glAttachObjectARB, glAttachObjectARB, NULL, _gloffset_AttachObjectARB), - NAME_FUNC_OFFSET( 8034, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), - NAME_FUNC_OFFSET( 8053, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, _gloffset_CreateProgramObjectARB), - NAME_FUNC_OFFSET( 8078, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, _gloffset_CreateShaderObjectARB), - NAME_FUNC_OFFSET( 8102, glDeleteObjectARB, glDeleteObjectARB, NULL, _gloffset_DeleteObjectARB), - NAME_FUNC_OFFSET( 8120, glDetachObjectARB, glDetachObjectARB, NULL, _gloffset_DetachObjectARB), - NAME_FUNC_OFFSET( 8138, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), - NAME_FUNC_OFFSET( 8160, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, _gloffset_GetAttachedObjectsARB), - NAME_FUNC_OFFSET( 8184, glGetHandleARB, glGetHandleARB, NULL, _gloffset_GetHandleARB), - NAME_FUNC_OFFSET( 8199, glGetInfoLogARB, glGetInfoLogARB, NULL, _gloffset_GetInfoLogARB), - NAME_FUNC_OFFSET( 8215, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, _gloffset_GetObjectParameterfvARB), - NAME_FUNC_OFFSET( 8241, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, _gloffset_GetObjectParameterivARB), - NAME_FUNC_OFFSET( 8267, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), - NAME_FUNC_OFFSET( 8288, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), - NAME_FUNC_OFFSET( 8312, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), - NAME_FUNC_OFFSET( 8330, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), - NAME_FUNC_OFFSET( 8348, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), - NAME_FUNC_OFFSET( 8365, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), - NAME_FUNC_OFFSET( 8383, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), - NAME_FUNC_OFFSET( 8398, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), - NAME_FUNC_OFFSET( 8414, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), - NAME_FUNC_OFFSET( 8429, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), - NAME_FUNC_OFFSET( 8445, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), - NAME_FUNC_OFFSET( 8460, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), - NAME_FUNC_OFFSET( 8476, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), - NAME_FUNC_OFFSET( 8491, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), - NAME_FUNC_OFFSET( 8507, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), - NAME_FUNC_OFFSET( 8522, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), - NAME_FUNC_OFFSET( 8538, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), - NAME_FUNC_OFFSET( 8553, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), - NAME_FUNC_OFFSET( 8569, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), - NAME_FUNC_OFFSET( 8584, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), - NAME_FUNC_OFFSET( 8600, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), - NAME_FUNC_OFFSET( 8615, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), - NAME_FUNC_OFFSET( 8631, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), - NAME_FUNC_OFFSET( 8653, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), - NAME_FUNC_OFFSET( 8675, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), - NAME_FUNC_OFFSET( 8697, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), - NAME_FUNC_OFFSET( 8719, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), - NAME_FUNC_OFFSET( 8740, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), - NAME_FUNC_OFFSET( 8764, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), - NAME_FUNC_OFFSET( 8785, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), - NAME_FUNC_OFFSET( 8808, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET( 8825, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, _gloffset_PolygonOffsetEXT), - NAME_FUNC_OFFSET( 8844, gl_dispatch_stub_556, gl_dispatch_stub_556, NULL, _gloffset_GetPixelTexGenParameterfvSGIS), - NAME_FUNC_OFFSET( 8876, gl_dispatch_stub_557, gl_dispatch_stub_557, NULL, _gloffset_GetPixelTexGenParameterivSGIS), - NAME_FUNC_OFFSET( 8908, gl_dispatch_stub_558, gl_dispatch_stub_558, NULL, _gloffset_PixelTexGenParameterfSGIS), - NAME_FUNC_OFFSET( 8936, gl_dispatch_stub_559, gl_dispatch_stub_559, NULL, _gloffset_PixelTexGenParameterfvSGIS), - NAME_FUNC_OFFSET( 8965, gl_dispatch_stub_560, gl_dispatch_stub_560, NULL, _gloffset_PixelTexGenParameteriSGIS), - NAME_FUNC_OFFSET( 8993, gl_dispatch_stub_561, gl_dispatch_stub_561, NULL, _gloffset_PixelTexGenParameterivSGIS), - NAME_FUNC_OFFSET( 9022, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_SampleMaskSGIS), - NAME_FUNC_OFFSET( 9039, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_SamplePatternSGIS), - NAME_FUNC_OFFSET( 9059, glColorPointerEXT, glColorPointerEXT, NULL, _gloffset_ColorPointerEXT), - NAME_FUNC_OFFSET( 9077, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, _gloffset_EdgeFlagPointerEXT), - NAME_FUNC_OFFSET( 9098, glIndexPointerEXT, glIndexPointerEXT, NULL, _gloffset_IndexPointerEXT), - NAME_FUNC_OFFSET( 9116, glNormalPointerEXT, glNormalPointerEXT, NULL, _gloffset_NormalPointerEXT), - NAME_FUNC_OFFSET( 9135, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, _gloffset_TexCoordPointerEXT), - NAME_FUNC_OFFSET( 9156, glVertexPointerEXT, glVertexPointerEXT, NULL, _gloffset_VertexPointerEXT), - NAME_FUNC_OFFSET( 9175, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET( 9196, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET( 9218, glLockArraysEXT, glLockArraysEXT, NULL, _gloffset_LockArraysEXT), - NAME_FUNC_OFFSET( 9234, glUnlockArraysEXT, glUnlockArraysEXT, NULL, _gloffset_UnlockArraysEXT), - NAME_FUNC_OFFSET( 9252, gl_dispatch_stub_574, gl_dispatch_stub_574, NULL, _gloffset_CullParameterdvEXT), - NAME_FUNC_OFFSET( 9273, gl_dispatch_stub_575, gl_dispatch_stub_575, NULL, _gloffset_CullParameterfvEXT), - NAME_FUNC_OFFSET( 9294, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), - NAME_FUNC_OFFSET( 9316, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), - NAME_FUNC_OFFSET( 9339, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), - NAME_FUNC_OFFSET( 9361, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), - NAME_FUNC_OFFSET( 9384, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), - NAME_FUNC_OFFSET( 9406, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), - NAME_FUNC_OFFSET( 9429, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), - NAME_FUNC_OFFSET( 9451, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), - NAME_FUNC_OFFSET( 9474, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), - NAME_FUNC_OFFSET( 9496, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), - NAME_FUNC_OFFSET( 9519, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), - NAME_FUNC_OFFSET( 9542, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), - NAME_FUNC_OFFSET( 9566, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), - NAME_FUNC_OFFSET( 9589, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), - NAME_FUNC_OFFSET( 9613, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), - NAME_FUNC_OFFSET( 9636, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), - NAME_FUNC_OFFSET( 9660, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), - NAME_FUNC_OFFSET( 9687, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), - NAME_FUNC_OFFSET( 9708, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), - NAME_FUNC_OFFSET( 9731, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), - NAME_FUNC_OFFSET( 9752, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), - NAME_FUNC_OFFSET( 9767, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), - NAME_FUNC_OFFSET( 9783, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), - NAME_FUNC_OFFSET( 9798, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), - NAME_FUNC_OFFSET( 9814, gl_dispatch_stub_600, gl_dispatch_stub_600, NULL, _gloffset_PixelTexGenSGIX), - NAME_FUNC_OFFSET( 9832, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET( 9855, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, _gloffset_FlushVertexArrayRangeNV), - NAME_FUNC_OFFSET( 9881, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, _gloffset_VertexArrayRangeNV), - NAME_FUNC_OFFSET( 9902, glCombinerInputNV, glCombinerInputNV, NULL, _gloffset_CombinerInputNV), - NAME_FUNC_OFFSET( 9920, glCombinerOutputNV, glCombinerOutputNV, NULL, _gloffset_CombinerOutputNV), - NAME_FUNC_OFFSET( 9939, glCombinerParameterfNV, glCombinerParameterfNV, NULL, _gloffset_CombinerParameterfNV), - NAME_FUNC_OFFSET( 9962, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, _gloffset_CombinerParameterfvNV), - NAME_FUNC_OFFSET( 9986, glCombinerParameteriNV, glCombinerParameteriNV, NULL, _gloffset_CombinerParameteriNV), - NAME_FUNC_OFFSET(10009, glCombinerParameterivNV, glCombinerParameterivNV, NULL, _gloffset_CombinerParameterivNV), - NAME_FUNC_OFFSET(10033, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, _gloffset_FinalCombinerInputNV), - NAME_FUNC_OFFSET(10056, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, _gloffset_GetCombinerInputParameterfvNV), - NAME_FUNC_OFFSET(10088, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, _gloffset_GetCombinerInputParameterivNV), - NAME_FUNC_OFFSET(10120, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, _gloffset_GetCombinerOutputParameterfvNV), - NAME_FUNC_OFFSET(10153, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, _gloffset_GetCombinerOutputParameterivNV), - NAME_FUNC_OFFSET(10186, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, _gloffset_GetFinalCombinerInputParameterfvNV), - NAME_FUNC_OFFSET(10223, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, _gloffset_GetFinalCombinerInputParameterivNV), - NAME_FUNC_OFFSET(10260, glResizeBuffersMESA, glResizeBuffersMESA, NULL, _gloffset_ResizeBuffersMESA), - NAME_FUNC_OFFSET(10280, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(10298, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(10317, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(10335, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(10354, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(10372, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(10391, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(10409, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(10428, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(10446, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(10465, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(10483, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(10502, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(10520, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(10539, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(10557, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(10576, glWindowPos4dMESA, glWindowPos4dMESA, NULL, _gloffset_WindowPos4dMESA), - NAME_FUNC_OFFSET(10594, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, _gloffset_WindowPos4dvMESA), - NAME_FUNC_OFFSET(10613, glWindowPos4fMESA, glWindowPos4fMESA, NULL, _gloffset_WindowPos4fMESA), - NAME_FUNC_OFFSET(10631, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, _gloffset_WindowPos4fvMESA), - NAME_FUNC_OFFSET(10650, glWindowPos4iMESA, glWindowPos4iMESA, NULL, _gloffset_WindowPos4iMESA), - NAME_FUNC_OFFSET(10668, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, _gloffset_WindowPos4ivMESA), - NAME_FUNC_OFFSET(10687, glWindowPos4sMESA, glWindowPos4sMESA, NULL, _gloffset_WindowPos4sMESA), - NAME_FUNC_OFFSET(10705, glWindowPos4svMESA, glWindowPos4svMESA, NULL, _gloffset_WindowPos4svMESA), - NAME_FUNC_OFFSET(10724, gl_dispatch_stub_642, gl_dispatch_stub_642, NULL, _gloffset_MultiModeDrawArraysIBM), - NAME_FUNC_OFFSET(10749, gl_dispatch_stub_643, gl_dispatch_stub_643, NULL, _gloffset_MultiModeDrawElementsIBM), - NAME_FUNC_OFFSET(10776, gl_dispatch_stub_644, gl_dispatch_stub_644, NULL, _gloffset_DeleteFencesNV), - NAME_FUNC_OFFSET(10793, gl_dispatch_stub_645, gl_dispatch_stub_645, NULL, _gloffset_FinishFenceNV), - NAME_FUNC_OFFSET(10809, gl_dispatch_stub_646, gl_dispatch_stub_646, NULL, _gloffset_GenFencesNV), - NAME_FUNC_OFFSET(10823, gl_dispatch_stub_647, gl_dispatch_stub_647, NULL, _gloffset_GetFenceivNV), - NAME_FUNC_OFFSET(10838, gl_dispatch_stub_648, gl_dispatch_stub_648, NULL, _gloffset_IsFenceNV), - NAME_FUNC_OFFSET(10850, gl_dispatch_stub_649, gl_dispatch_stub_649, NULL, _gloffset_SetFenceNV), - NAME_FUNC_OFFSET(10863, gl_dispatch_stub_650, gl_dispatch_stub_650, NULL, _gloffset_TestFenceNV), - NAME_FUNC_OFFSET(10877, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, _gloffset_AreProgramsResidentNV), - NAME_FUNC_OFFSET(10901, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), - NAME_FUNC_OFFSET(10917, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), - NAME_FUNC_OFFSET(10936, glExecuteProgramNV, glExecuteProgramNV, NULL, _gloffset_ExecuteProgramNV), - NAME_FUNC_OFFSET(10955, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), - NAME_FUNC_OFFSET(10971, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, _gloffset_GetProgramParameterdvNV), - NAME_FUNC_OFFSET(10997, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, _gloffset_GetProgramParameterfvNV), - NAME_FUNC_OFFSET(11023, glGetProgramStringNV, glGetProgramStringNV, NULL, _gloffset_GetProgramStringNV), - NAME_FUNC_OFFSET(11044, glGetProgramivNV, glGetProgramivNV, NULL, _gloffset_GetProgramivNV), - NAME_FUNC_OFFSET(11061, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, _gloffset_GetTrackMatrixivNV), - NAME_FUNC_OFFSET(11082, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(11110, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, _gloffset_GetVertexAttribdvNV), - NAME_FUNC_OFFSET(11132, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, _gloffset_GetVertexAttribfvNV), - NAME_FUNC_OFFSET(11154, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, _gloffset_GetVertexAttribivNV), - NAME_FUNC_OFFSET(11176, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), - NAME_FUNC_OFFSET(11190, glLoadProgramNV, glLoadProgramNV, NULL, _gloffset_LoadProgramNV), - NAME_FUNC_OFFSET(11206, glProgramParameter4dNV, glProgramParameter4dNV, NULL, _gloffset_ProgramParameter4dNV), - NAME_FUNC_OFFSET(11229, glProgramParameter4dvNV, glProgramParameter4dvNV, NULL, _gloffset_ProgramParameter4dvNV), - NAME_FUNC_OFFSET(11253, glProgramParameter4fNV, glProgramParameter4fNV, NULL, _gloffset_ProgramParameter4fNV), - NAME_FUNC_OFFSET(11276, glProgramParameter4fvNV, glProgramParameter4fvNV, NULL, _gloffset_ProgramParameter4fvNV), - NAME_FUNC_OFFSET(11300, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, _gloffset_ProgramParameters4dvNV), - NAME_FUNC_OFFSET(11325, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, _gloffset_ProgramParameters4fvNV), - NAME_FUNC_OFFSET(11350, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, _gloffset_RequestResidentProgramsNV), - NAME_FUNC_OFFSET(11378, glTrackMatrixNV, glTrackMatrixNV, NULL, _gloffset_TrackMatrixNV), - NAME_FUNC_OFFSET(11394, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, _gloffset_VertexAttrib1dNV), - NAME_FUNC_OFFSET(11413, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, _gloffset_VertexAttrib1dvNV), - NAME_FUNC_OFFSET(11433, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, _gloffset_VertexAttrib1fNV), - NAME_FUNC_OFFSET(11452, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, _gloffset_VertexAttrib1fvNV), - NAME_FUNC_OFFSET(11472, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, _gloffset_VertexAttrib1sNV), - NAME_FUNC_OFFSET(11491, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, _gloffset_VertexAttrib1svNV), - NAME_FUNC_OFFSET(11511, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, _gloffset_VertexAttrib2dNV), - NAME_FUNC_OFFSET(11530, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, _gloffset_VertexAttrib2dvNV), - NAME_FUNC_OFFSET(11550, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, _gloffset_VertexAttrib2fNV), - NAME_FUNC_OFFSET(11569, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, _gloffset_VertexAttrib2fvNV), - NAME_FUNC_OFFSET(11589, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, _gloffset_VertexAttrib2sNV), - NAME_FUNC_OFFSET(11608, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, _gloffset_VertexAttrib2svNV), - NAME_FUNC_OFFSET(11628, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, _gloffset_VertexAttrib3dNV), - NAME_FUNC_OFFSET(11647, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, _gloffset_VertexAttrib3dvNV), - NAME_FUNC_OFFSET(11667, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, _gloffset_VertexAttrib3fNV), - NAME_FUNC_OFFSET(11686, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, _gloffset_VertexAttrib3fvNV), - NAME_FUNC_OFFSET(11706, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, _gloffset_VertexAttrib3sNV), - NAME_FUNC_OFFSET(11725, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, _gloffset_VertexAttrib3svNV), - NAME_FUNC_OFFSET(11745, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, _gloffset_VertexAttrib4dNV), - NAME_FUNC_OFFSET(11764, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, _gloffset_VertexAttrib4dvNV), - NAME_FUNC_OFFSET(11784, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, _gloffset_VertexAttrib4fNV), - NAME_FUNC_OFFSET(11803, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, _gloffset_VertexAttrib4fvNV), - NAME_FUNC_OFFSET(11823, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, _gloffset_VertexAttrib4sNV), - NAME_FUNC_OFFSET(11842, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, _gloffset_VertexAttrib4svNV), - NAME_FUNC_OFFSET(11862, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, _gloffset_VertexAttrib4ubNV), - NAME_FUNC_OFFSET(11882, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, _gloffset_VertexAttrib4ubvNV), - NAME_FUNC_OFFSET(11903, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, _gloffset_VertexAttribPointerNV), - NAME_FUNC_OFFSET(11927, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, _gloffset_VertexAttribs1dvNV), - NAME_FUNC_OFFSET(11948, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, _gloffset_VertexAttribs1fvNV), - NAME_FUNC_OFFSET(11969, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, _gloffset_VertexAttribs1svNV), - NAME_FUNC_OFFSET(11990, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, _gloffset_VertexAttribs2dvNV), - NAME_FUNC_OFFSET(12011, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, _gloffset_VertexAttribs2fvNV), - NAME_FUNC_OFFSET(12032, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, _gloffset_VertexAttribs2svNV), - NAME_FUNC_OFFSET(12053, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, _gloffset_VertexAttribs3dvNV), - NAME_FUNC_OFFSET(12074, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, _gloffset_VertexAttribs3fvNV), - NAME_FUNC_OFFSET(12095, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, _gloffset_VertexAttribs3svNV), - NAME_FUNC_OFFSET(12116, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, _gloffset_VertexAttribs4dvNV), - NAME_FUNC_OFFSET(12137, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, _gloffset_VertexAttribs4fvNV), - NAME_FUNC_OFFSET(12158, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, _gloffset_VertexAttribs4svNV), - NAME_FUNC_OFFSET(12179, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, _gloffset_VertexAttribs4ubvNV), - NAME_FUNC_OFFSET(12201, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, _gloffset_AlphaFragmentOp1ATI), - NAME_FUNC_OFFSET(12223, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, _gloffset_AlphaFragmentOp2ATI), - NAME_FUNC_OFFSET(12245, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, _gloffset_AlphaFragmentOp3ATI), - NAME_FUNC_OFFSET(12267, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, _gloffset_BeginFragmentShaderATI), - NAME_FUNC_OFFSET(12292, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, _gloffset_BindFragmentShaderATI), - NAME_FUNC_OFFSET(12316, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, _gloffset_ColorFragmentOp1ATI), - NAME_FUNC_OFFSET(12338, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, _gloffset_ColorFragmentOp2ATI), - NAME_FUNC_OFFSET(12360, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, _gloffset_ColorFragmentOp3ATI), - NAME_FUNC_OFFSET(12382, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, _gloffset_DeleteFragmentShaderATI), - NAME_FUNC_OFFSET(12408, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, _gloffset_EndFragmentShaderATI), - NAME_FUNC_OFFSET(12431, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, _gloffset_GenFragmentShadersATI), - NAME_FUNC_OFFSET(12455, glPassTexCoordATI, glPassTexCoordATI, NULL, _gloffset_PassTexCoordATI), - NAME_FUNC_OFFSET(12473, glSampleMapATI, glSampleMapATI, NULL, _gloffset_SampleMapATI), - NAME_FUNC_OFFSET(12488, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, _gloffset_SetFragmentShaderConstantATI), - NAME_FUNC_OFFSET(12519, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), - NAME_FUNC_OFFSET(12539, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), - NAME_FUNC_OFFSET(12560, gl_dispatch_stub_731, gl_dispatch_stub_731, NULL, _gloffset_ActiveStencilFaceEXT), - NAME_FUNC_OFFSET(12583, gl_dispatch_stub_732, gl_dispatch_stub_732, NULL, _gloffset_BindVertexArrayAPPLE), - NAME_FUNC_OFFSET(12606, gl_dispatch_stub_733, gl_dispatch_stub_733, NULL, _gloffset_DeleteVertexArraysAPPLE), - NAME_FUNC_OFFSET(12632, gl_dispatch_stub_734, gl_dispatch_stub_734, NULL, _gloffset_GenVertexArraysAPPLE), - NAME_FUNC_OFFSET(12655, gl_dispatch_stub_735, gl_dispatch_stub_735, NULL, _gloffset_IsVertexArrayAPPLE), - NAME_FUNC_OFFSET(12676, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, _gloffset_GetProgramNamedParameterdvNV), - NAME_FUNC_OFFSET(12707, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, _gloffset_GetProgramNamedParameterfvNV), - NAME_FUNC_OFFSET(12738, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, _gloffset_ProgramNamedParameter4dNV), - NAME_FUNC_OFFSET(12766, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, _gloffset_ProgramNamedParameter4dvNV), - NAME_FUNC_OFFSET(12795, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, _gloffset_ProgramNamedParameter4fNV), - NAME_FUNC_OFFSET(12823, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, _gloffset_ProgramNamedParameter4fvNV), - NAME_FUNC_OFFSET(12852, gl_dispatch_stub_742, gl_dispatch_stub_742, NULL, _gloffset_DepthBoundsEXT), - NAME_FUNC_OFFSET(12869, gl_dispatch_stub_743, gl_dispatch_stub_743, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(12896, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), - NAME_FUNC_OFFSET(12917, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), - NAME_FUNC_OFFSET(12939, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), - NAME_FUNC_OFFSET(12967, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), - NAME_FUNC_OFFSET(12991, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), - NAME_FUNC_OFFSET(13016, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), - NAME_FUNC_OFFSET(13045, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), - NAME_FUNC_OFFSET(13071, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), - NAME_FUNC_OFFSET(13097, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), - NAME_FUNC_OFFSET(13123, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), - NAME_FUNC_OFFSET(13144, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), - NAME_FUNC_OFFSET(13166, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), - NAME_FUNC_OFFSET(13186, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), - NAME_FUNC_OFFSET(13227, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), - NAME_FUNC_OFFSET(13259, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), - NAME_FUNC_OFFSET(13278, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), - NAME_FUNC_OFFSET(13298, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), - NAME_FUNC_OFFSET(13323, gl_dispatch_stub_761, gl_dispatch_stub_761, NULL, _gloffset_BlitFramebufferEXT), - NAME_FUNC_OFFSET(13344, gl_dispatch_stub_762, gl_dispatch_stub_762, NULL, _gloffset_ProgramEnvParameters4fvEXT), - NAME_FUNC_OFFSET(13373, gl_dispatch_stub_763, gl_dispatch_stub_763, NULL, _gloffset_ProgramLocalParameters4fvEXT), - NAME_FUNC_OFFSET(13404, gl_dispatch_stub_764, gl_dispatch_stub_764, NULL, _gloffset_GetQueryObjecti64vEXT), - NAME_FUNC_OFFSET(13428, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_GetQueryObjectui64vEXT), - NAME_FUNC_OFFSET(13453, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), - NAME_FUNC_OFFSET(13471, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), - NAME_FUNC_OFFSET(13488, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), - NAME_FUNC_OFFSET(13504, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), - NAME_FUNC_OFFSET(13529, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), - NAME_FUNC_OFFSET(13549, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), - NAME_FUNC_OFFSET(13569, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), - NAME_FUNC_OFFSET(13592, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), - NAME_FUNC_OFFSET(13615, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), - NAME_FUNC_OFFSET(13635, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), - NAME_FUNC_OFFSET(13652, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), - NAME_FUNC_OFFSET(13669, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), - NAME_FUNC_OFFSET(13684, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), - NAME_FUNC_OFFSET(13708, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), - NAME_FUNC_OFFSET(13727, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), - NAME_FUNC_OFFSET(13746, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), - NAME_FUNC_OFFSET(13762, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), - NAME_FUNC_OFFSET(13781, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), - NAME_FUNC_OFFSET(13804, glColorTable, glColorTable, NULL, _gloffset_ColorTable), - NAME_FUNC_OFFSET(13820, glColorTable, glColorTable, NULL, _gloffset_ColorTable), - NAME_FUNC_OFFSET(13836, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), - NAME_FUNC_OFFSET(13863, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), - NAME_FUNC_OFFSET(13890, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), - NAME_FUNC_OFFSET(13910, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), - NAME_FUNC_OFFSET(13929, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), - NAME_FUNC_OFFSET(13948, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), - NAME_FUNC_OFFSET(13978, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), - NAME_FUNC_OFFSET(14008, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), - NAME_FUNC_OFFSET(14038, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), - NAME_FUNC_OFFSET(14068, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), - NAME_FUNC_OFFSET(14087, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), - NAME_FUNC_OFFSET(14110, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), - NAME_FUNC_OFFSET(14135, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), - NAME_FUNC_OFFSET(14160, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), - NAME_FUNC_OFFSET(14187, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), - NAME_FUNC_OFFSET(14215, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), - NAME_FUNC_OFFSET(14242, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), - NAME_FUNC_OFFSET(14270, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), - NAME_FUNC_OFFSET(14299, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), - NAME_FUNC_OFFSET(14328, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), - NAME_FUNC_OFFSET(14354, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), - NAME_FUNC_OFFSET(14385, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), - NAME_FUNC_OFFSET(14416, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), - NAME_FUNC_OFFSET(14440, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), - NAME_FUNC_OFFSET(14463, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), - NAME_FUNC_OFFSET(14481, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), - NAME_FUNC_OFFSET(14510, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), - NAME_FUNC_OFFSET(14539, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), - NAME_FUNC_OFFSET(14554, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), - NAME_FUNC_OFFSET(14580, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), - NAME_FUNC_OFFSET(14606, glHistogram, glHistogram, NULL, _gloffset_Histogram), - NAME_FUNC_OFFSET(14621, glMinmax, glMinmax, NULL, _gloffset_Minmax), - NAME_FUNC_OFFSET(14633, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), - NAME_FUNC_OFFSET(14653, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), - NAME_FUNC_OFFSET(14670, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), - NAME_FUNC_OFFSET(14686, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), - NAME_FUNC_OFFSET(14705, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), - NAME_FUNC_OFFSET(14728, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), - NAME_FUNC_OFFSET(14744, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), - NAME_FUNC_OFFSET(14766, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), - NAME_FUNC_OFFSET(14784, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), - NAME_FUNC_OFFSET(14803, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), - NAME_FUNC_OFFSET(14821, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), - NAME_FUNC_OFFSET(14840, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), - NAME_FUNC_OFFSET(14858, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), - NAME_FUNC_OFFSET(14877, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), - NAME_FUNC_OFFSET(14895, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), - NAME_FUNC_OFFSET(14914, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), - NAME_FUNC_OFFSET(14932, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), - NAME_FUNC_OFFSET(14951, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), - NAME_FUNC_OFFSET(14969, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), - NAME_FUNC_OFFSET(14988, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), - NAME_FUNC_OFFSET(15006, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), - NAME_FUNC_OFFSET(15025, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), - NAME_FUNC_OFFSET(15043, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), - NAME_FUNC_OFFSET(15062, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), - NAME_FUNC_OFFSET(15080, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), - NAME_FUNC_OFFSET(15099, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), - NAME_FUNC_OFFSET(15117, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), - NAME_FUNC_OFFSET(15136, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), - NAME_FUNC_OFFSET(15154, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), - NAME_FUNC_OFFSET(15173, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), - NAME_FUNC_OFFSET(15191, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), - NAME_FUNC_OFFSET(15210, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), - NAME_FUNC_OFFSET(15228, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), - NAME_FUNC_OFFSET(15247, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), - NAME_FUNC_OFFSET(15265, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), - NAME_FUNC_OFFSET(15284, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), - NAME_FUNC_OFFSET(15302, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), - NAME_FUNC_OFFSET(15321, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), - NAME_FUNC_OFFSET(15339, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), - NAME_FUNC_OFFSET(15358, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), - NAME_FUNC_OFFSET(15381, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), - NAME_FUNC_OFFSET(15404, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), - NAME_FUNC_OFFSET(15427, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), - NAME_FUNC_OFFSET(15450, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), - NAME_FUNC_OFFSET(15467, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), - NAME_FUNC_OFFSET(15490, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), - NAME_FUNC_OFFSET(15513, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), - NAME_FUNC_OFFSET(15536, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), - NAME_FUNC_OFFSET(15562, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), - NAME_FUNC_OFFSET(15588, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), - NAME_FUNC_OFFSET(15614, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), - NAME_FUNC_OFFSET(15638, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), - NAME_FUNC_OFFSET(15665, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), - NAME_FUNC_OFFSET(15691, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), - NAME_FUNC_OFFSET(15711, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), - NAME_FUNC_OFFSET(15731, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), - NAME_FUNC_OFFSET(15751, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), - NAME_FUNC_OFFSET(15768, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), - NAME_FUNC_OFFSET(15786, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), - NAME_FUNC_OFFSET(15803, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), - NAME_FUNC_OFFSET(15821, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), - NAME_FUNC_OFFSET(15838, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), - NAME_FUNC_OFFSET(15856, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), - NAME_FUNC_OFFSET(15873, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), - NAME_FUNC_OFFSET(15891, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), - NAME_FUNC_OFFSET(15908, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), - NAME_FUNC_OFFSET(15926, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), - NAME_FUNC_OFFSET(15943, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), - NAME_FUNC_OFFSET(15961, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), - NAME_FUNC_OFFSET(15978, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), - NAME_FUNC_OFFSET(15996, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), - NAME_FUNC_OFFSET(16013, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), - NAME_FUNC_OFFSET(16031, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), - NAME_FUNC_OFFSET(16048, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), - NAME_FUNC_OFFSET(16066, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), - NAME_FUNC_OFFSET(16085, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), - NAME_FUNC_OFFSET(16104, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), - NAME_FUNC_OFFSET(16123, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), - NAME_FUNC_OFFSET(16142, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), - NAME_FUNC_OFFSET(16162, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), - NAME_FUNC_OFFSET(16182, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), - NAME_FUNC_OFFSET(16202, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), - NAME_FUNC_OFFSET(16219, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), - NAME_FUNC_OFFSET(16237, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), - NAME_FUNC_OFFSET(16254, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), - NAME_FUNC_OFFSET(16272, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), - NAME_FUNC_OFFSET(16289, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), - NAME_FUNC_OFFSET(16307, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), - NAME_FUNC_OFFSET(16329, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), - NAME_FUNC_OFFSET(16342, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), - NAME_FUNC_OFFSET(16355, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), - NAME_FUNC_OFFSET(16371, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), - NAME_FUNC_OFFSET(16387, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), - NAME_FUNC_OFFSET(16400, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), - NAME_FUNC_OFFSET(16423, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), - NAME_FUNC_OFFSET(16443, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), - NAME_FUNC_OFFSET(16462, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), - NAME_FUNC_OFFSET(16473, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), - NAME_FUNC_OFFSET(16485, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), - NAME_FUNC_OFFSET(16499, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), - NAME_FUNC_OFFSET(16512, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), - NAME_FUNC_OFFSET(16528, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), - NAME_FUNC_OFFSET(16539, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), - NAME_FUNC_OFFSET(16552, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), - NAME_FUNC_OFFSET(16571, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), - NAME_FUNC_OFFSET(16591, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), - NAME_FUNC_OFFSET(16604, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), - NAME_FUNC_OFFSET(16614, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), - NAME_FUNC_OFFSET(16630, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), - NAME_FUNC_OFFSET(16649, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), - NAME_FUNC_OFFSET(16667, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), - NAME_FUNC_OFFSET(16688, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), - NAME_FUNC_OFFSET(16703, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), - NAME_FUNC_OFFSET(16718, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), - NAME_FUNC_OFFSET(16732, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), - NAME_FUNC_OFFSET(16747, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), - NAME_FUNC_OFFSET(16759, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), - NAME_FUNC_OFFSET(16772, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), - NAME_FUNC_OFFSET(16784, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), - NAME_FUNC_OFFSET(16797, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), - NAME_FUNC_OFFSET(16809, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), - NAME_FUNC_OFFSET(16822, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), - NAME_FUNC_OFFSET(16834, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), - NAME_FUNC_OFFSET(16847, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), - NAME_FUNC_OFFSET(16859, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), - NAME_FUNC_OFFSET(16872, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), - NAME_FUNC_OFFSET(16884, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), - NAME_FUNC_OFFSET(16897, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), - NAME_FUNC_OFFSET(16909, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), - NAME_FUNC_OFFSET(16922, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), - NAME_FUNC_OFFSET(16934, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), - NAME_FUNC_OFFSET(16947, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), - NAME_FUNC_OFFSET(16966, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), - NAME_FUNC_OFFSET(16985, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), - NAME_FUNC_OFFSET(17004, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), - NAME_FUNC_OFFSET(17017, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), - NAME_FUNC_OFFSET(17035, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), - NAME_FUNC_OFFSET(17056, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), - NAME_FUNC_OFFSET(17074, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), - NAME_FUNC_OFFSET(17094, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET(17108, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET(17125, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_SampleMaskSGIS), - NAME_FUNC_OFFSET(17141, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_SamplePatternSGIS), - NAME_FUNC_OFFSET(17160, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(17178, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(17199, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(17221, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(17240, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(17262, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(17285, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), - NAME_FUNC_OFFSET(17304, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), - NAME_FUNC_OFFSET(17324, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), - NAME_FUNC_OFFSET(17343, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), - NAME_FUNC_OFFSET(17363, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), - NAME_FUNC_OFFSET(17382, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), - NAME_FUNC_OFFSET(17402, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), - NAME_FUNC_OFFSET(17421, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), - NAME_FUNC_OFFSET(17441, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), - NAME_FUNC_OFFSET(17460, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), - NAME_FUNC_OFFSET(17480, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), - NAME_FUNC_OFFSET(17500, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), - NAME_FUNC_OFFSET(17521, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), - NAME_FUNC_OFFSET(17541, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), - NAME_FUNC_OFFSET(17562, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), - NAME_FUNC_OFFSET(17582, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), - NAME_FUNC_OFFSET(17603, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), - NAME_FUNC_OFFSET(17627, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), - NAME_FUNC_OFFSET(17645, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), - NAME_FUNC_OFFSET(17665, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), - NAME_FUNC_OFFSET(17683, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), - NAME_FUNC_OFFSET(17695, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), - NAME_FUNC_OFFSET(17708, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), - NAME_FUNC_OFFSET(17720, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), - NAME_FUNC_OFFSET(17733, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET(17753, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET(17777, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(17791, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(17808, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(17823, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(17841, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(17855, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(17872, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(17887, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(17905, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(17919, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(17936, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(17951, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(17969, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(17983, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(18000, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(18015, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(18033, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(18047, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(18064, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(18079, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(18097, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(18111, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(18128, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(18143, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(18161, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(18175, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(18192, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(18207, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(18225, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(18239, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(18256, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(18271, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(18289, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), - NAME_FUNC_OFFSET(18306, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), - NAME_FUNC_OFFSET(18326, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), - NAME_FUNC_OFFSET(18343, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(18372, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), - NAME_FUNC_OFFSET(18387, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), - NAME_FUNC_OFFSET(18405, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), - NAME_FUNC_OFFSET(18424, gl_dispatch_stub_743, gl_dispatch_stub_743, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(18448, gl_dispatch_stub_743, gl_dispatch_stub_743, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET( 6037, glUniformMatrix2x3fv, glUniformMatrix2x3fv, NULL, _gloffset_UniformMatrix2x3fv), + NAME_FUNC_OFFSET( 6058, glUniformMatrix2x4fv, glUniformMatrix2x4fv, NULL, _gloffset_UniformMatrix2x4fv), + NAME_FUNC_OFFSET( 6079, glUniformMatrix3x2fv, glUniformMatrix3x2fv, NULL, _gloffset_UniformMatrix3x2fv), + NAME_FUNC_OFFSET( 6100, glUniformMatrix3x4fv, glUniformMatrix3x4fv, NULL, _gloffset_UniformMatrix3x4fv), + NAME_FUNC_OFFSET( 6121, glUniformMatrix4x2fv, glUniformMatrix4x2fv, NULL, _gloffset_UniformMatrix4x2fv), + NAME_FUNC_OFFSET( 6142, glUniformMatrix4x3fv, glUniformMatrix4x3fv, NULL, _gloffset_UniformMatrix4x3fv), + NAME_FUNC_OFFSET( 6163, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET( 6189, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET( 6215, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET( 6241, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET( 6267, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET( 6287, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET( 6313, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET( 6339, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET( 6365, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET( 6394, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET( 6423, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET( 6452, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET( 6479, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET( 6509, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET( 6538, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, _gloffset_GetProgramEnvParameterdvARB), + NAME_FUNC_OFFSET( 6568, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, _gloffset_GetProgramEnvParameterfvARB), + NAME_FUNC_OFFSET( 6598, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, _gloffset_GetProgramLocalParameterdvARB), + NAME_FUNC_OFFSET( 6630, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, _gloffset_GetProgramLocalParameterfvARB), + NAME_FUNC_OFFSET( 6662, glGetProgramStringARB, glGetProgramStringARB, NULL, _gloffset_GetProgramStringARB), + NAME_FUNC_OFFSET( 6684, glGetProgramivARB, glGetProgramivARB, NULL, _gloffset_GetProgramivARB), + NAME_FUNC_OFFSET( 6702, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET( 6725, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET( 6748, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET( 6771, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), + NAME_FUNC_OFFSET( 6798, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), + NAME_FUNC_OFFSET( 6826, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), + NAME_FUNC_OFFSET( 6853, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), + NAME_FUNC_OFFSET( 6881, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, _gloffset_ProgramLocalParameter4dARB), + NAME_FUNC_OFFSET( 6910, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, _gloffset_ProgramLocalParameter4dvARB), + NAME_FUNC_OFFSET( 6940, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, _gloffset_ProgramLocalParameter4fARB), + NAME_FUNC_OFFSET( 6969, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, _gloffset_ProgramLocalParameter4fvARB), + NAME_FUNC_OFFSET( 6999, glProgramStringARB, glProgramStringARB, NULL, _gloffset_ProgramStringARB), + NAME_FUNC_OFFSET( 7018, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET( 7038, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET( 7059, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET( 7079, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET( 7100, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET( 7120, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET( 7141, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET( 7161, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET( 7182, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET( 7202, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET( 7223, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET( 7243, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET( 7264, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET( 7284, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET( 7305, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET( 7325, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET( 7346, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET( 7366, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET( 7387, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET( 7409, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET( 7431, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET( 7453, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET( 7475, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET( 7498, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET( 7521, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET( 7544, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), + NAME_FUNC_OFFSET( 7565, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET( 7585, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET( 7606, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET( 7626, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET( 7647, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), + NAME_FUNC_OFFSET( 7668, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET( 7688, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET( 7709, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), + NAME_FUNC_OFFSET( 7731, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), + NAME_FUNC_OFFSET( 7753, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), + NAME_FUNC_OFFSET( 7775, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET( 7800, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET( 7816, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET( 7832, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET( 7851, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET( 7870, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET( 7886, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET( 7912, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET( 7935, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET( 7957, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET( 7971, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET( 7986, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET( 8003, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET( 8019, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET( 8038, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET( 8052, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET( 8068, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET( 8090, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET( 8113, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET( 8129, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET( 8142, glAttachObjectARB, glAttachObjectARB, NULL, _gloffset_AttachObjectARB), + NAME_FUNC_OFFSET( 8160, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET( 8179, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, _gloffset_CreateProgramObjectARB), + NAME_FUNC_OFFSET( 8204, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, _gloffset_CreateShaderObjectARB), + NAME_FUNC_OFFSET( 8228, glDeleteObjectARB, glDeleteObjectARB, NULL, _gloffset_DeleteObjectARB), + NAME_FUNC_OFFSET( 8246, glDetachObjectARB, glDetachObjectARB, NULL, _gloffset_DetachObjectARB), + NAME_FUNC_OFFSET( 8264, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET( 8286, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, _gloffset_GetAttachedObjectsARB), + NAME_FUNC_OFFSET( 8310, glGetHandleARB, glGetHandleARB, NULL, _gloffset_GetHandleARB), + NAME_FUNC_OFFSET( 8325, glGetInfoLogARB, glGetInfoLogARB, NULL, _gloffset_GetInfoLogARB), + NAME_FUNC_OFFSET( 8341, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, _gloffset_GetObjectParameterfvARB), + NAME_FUNC_OFFSET( 8367, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, _gloffset_GetObjectParameterivARB), + NAME_FUNC_OFFSET( 8393, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET( 8414, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET( 8438, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET( 8456, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET( 8474, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET( 8491, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET( 8509, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET( 8524, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET( 8540, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET( 8555, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET( 8571, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET( 8586, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET( 8602, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET( 8617, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET( 8633, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET( 8648, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET( 8664, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET( 8679, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET( 8695, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET( 8710, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET( 8726, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET( 8741, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET( 8757, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET( 8779, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET( 8801, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET( 8823, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET( 8845, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET( 8866, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET( 8890, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET( 8911, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET( 8934, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET( 8951, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, _gloffset_PolygonOffsetEXT), + NAME_FUNC_OFFSET( 8970, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_GetPixelTexGenParameterfvSGIS), + NAME_FUNC_OFFSET( 9002, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_GetPixelTexGenParameterivSGIS), + NAME_FUNC_OFFSET( 9034, gl_dispatch_stub_564, gl_dispatch_stub_564, NULL, _gloffset_PixelTexGenParameterfSGIS), + NAME_FUNC_OFFSET( 9062, gl_dispatch_stub_565, gl_dispatch_stub_565, NULL, _gloffset_PixelTexGenParameterfvSGIS), + NAME_FUNC_OFFSET( 9091, gl_dispatch_stub_566, gl_dispatch_stub_566, NULL, _gloffset_PixelTexGenParameteriSGIS), + NAME_FUNC_OFFSET( 9119, gl_dispatch_stub_567, gl_dispatch_stub_567, NULL, _gloffset_PixelTexGenParameterivSGIS), + NAME_FUNC_OFFSET( 9148, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET( 9165, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET( 9185, glColorPointerEXT, glColorPointerEXT, NULL, _gloffset_ColorPointerEXT), + NAME_FUNC_OFFSET( 9203, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, _gloffset_EdgeFlagPointerEXT), + NAME_FUNC_OFFSET( 9224, glIndexPointerEXT, glIndexPointerEXT, NULL, _gloffset_IndexPointerEXT), + NAME_FUNC_OFFSET( 9242, glNormalPointerEXT, glNormalPointerEXT, NULL, _gloffset_NormalPointerEXT), + NAME_FUNC_OFFSET( 9261, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, _gloffset_TexCoordPointerEXT), + NAME_FUNC_OFFSET( 9282, glVertexPointerEXT, glVertexPointerEXT, NULL, _gloffset_VertexPointerEXT), + NAME_FUNC_OFFSET( 9301, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET( 9322, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET( 9344, glLockArraysEXT, glLockArraysEXT, NULL, _gloffset_LockArraysEXT), + NAME_FUNC_OFFSET( 9360, glUnlockArraysEXT, glUnlockArraysEXT, NULL, _gloffset_UnlockArraysEXT), + NAME_FUNC_OFFSET( 9378, gl_dispatch_stub_580, gl_dispatch_stub_580, NULL, _gloffset_CullParameterdvEXT), + NAME_FUNC_OFFSET( 9399, gl_dispatch_stub_581, gl_dispatch_stub_581, NULL, _gloffset_CullParameterfvEXT), + NAME_FUNC_OFFSET( 9420, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET( 9442, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET( 9465, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET( 9487, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET( 9510, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET( 9532, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET( 9555, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET( 9577, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET( 9600, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET( 9622, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET( 9645, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET( 9668, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET( 9692, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET( 9715, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET( 9739, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET( 9762, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET( 9786, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET( 9813, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET( 9834, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET( 9857, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET( 9878, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET( 9893, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET( 9909, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET( 9924, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET( 9940, gl_dispatch_stub_606, gl_dispatch_stub_606, NULL, _gloffset_PixelTexGenSGIX), + NAME_FUNC_OFFSET( 9958, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET( 9981, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, _gloffset_FlushVertexArrayRangeNV), + NAME_FUNC_OFFSET(10007, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, _gloffset_VertexArrayRangeNV), + NAME_FUNC_OFFSET(10028, glCombinerInputNV, glCombinerInputNV, NULL, _gloffset_CombinerInputNV), + NAME_FUNC_OFFSET(10046, glCombinerOutputNV, glCombinerOutputNV, NULL, _gloffset_CombinerOutputNV), + NAME_FUNC_OFFSET(10065, glCombinerParameterfNV, glCombinerParameterfNV, NULL, _gloffset_CombinerParameterfNV), + NAME_FUNC_OFFSET(10088, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, _gloffset_CombinerParameterfvNV), + NAME_FUNC_OFFSET(10112, glCombinerParameteriNV, glCombinerParameteriNV, NULL, _gloffset_CombinerParameteriNV), + NAME_FUNC_OFFSET(10135, glCombinerParameterivNV, glCombinerParameterivNV, NULL, _gloffset_CombinerParameterivNV), + NAME_FUNC_OFFSET(10159, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, _gloffset_FinalCombinerInputNV), + NAME_FUNC_OFFSET(10182, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, _gloffset_GetCombinerInputParameterfvNV), + NAME_FUNC_OFFSET(10214, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, _gloffset_GetCombinerInputParameterivNV), + NAME_FUNC_OFFSET(10246, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, _gloffset_GetCombinerOutputParameterfvNV), + NAME_FUNC_OFFSET(10279, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, _gloffset_GetCombinerOutputParameterivNV), + NAME_FUNC_OFFSET(10312, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, _gloffset_GetFinalCombinerInputParameterfvNV), + NAME_FUNC_OFFSET(10349, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, _gloffset_GetFinalCombinerInputParameterivNV), + NAME_FUNC_OFFSET(10386, glResizeBuffersMESA, glResizeBuffersMESA, NULL, _gloffset_ResizeBuffersMESA), + NAME_FUNC_OFFSET(10406, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(10424, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(10443, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(10461, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(10480, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(10498, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(10517, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(10535, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(10554, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(10572, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(10591, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(10609, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(10628, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(10646, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(10665, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(10683, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(10702, glWindowPos4dMESA, glWindowPos4dMESA, NULL, _gloffset_WindowPos4dMESA), + NAME_FUNC_OFFSET(10720, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, _gloffset_WindowPos4dvMESA), + NAME_FUNC_OFFSET(10739, glWindowPos4fMESA, glWindowPos4fMESA, NULL, _gloffset_WindowPos4fMESA), + NAME_FUNC_OFFSET(10757, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, _gloffset_WindowPos4fvMESA), + NAME_FUNC_OFFSET(10776, glWindowPos4iMESA, glWindowPos4iMESA, NULL, _gloffset_WindowPos4iMESA), + NAME_FUNC_OFFSET(10794, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, _gloffset_WindowPos4ivMESA), + NAME_FUNC_OFFSET(10813, glWindowPos4sMESA, glWindowPos4sMESA, NULL, _gloffset_WindowPos4sMESA), + NAME_FUNC_OFFSET(10831, glWindowPos4svMESA, glWindowPos4svMESA, NULL, _gloffset_WindowPos4svMESA), + NAME_FUNC_OFFSET(10850, gl_dispatch_stub_648, gl_dispatch_stub_648, NULL, _gloffset_MultiModeDrawArraysIBM), + NAME_FUNC_OFFSET(10875, gl_dispatch_stub_649, gl_dispatch_stub_649, NULL, _gloffset_MultiModeDrawElementsIBM), + NAME_FUNC_OFFSET(10902, gl_dispatch_stub_650, gl_dispatch_stub_650, NULL, _gloffset_DeleteFencesNV), + NAME_FUNC_OFFSET(10919, gl_dispatch_stub_651, gl_dispatch_stub_651, NULL, _gloffset_FinishFenceNV), + NAME_FUNC_OFFSET(10935, gl_dispatch_stub_652, gl_dispatch_stub_652, NULL, _gloffset_GenFencesNV), + NAME_FUNC_OFFSET(10949, gl_dispatch_stub_653, gl_dispatch_stub_653, NULL, _gloffset_GetFenceivNV), + NAME_FUNC_OFFSET(10964, gl_dispatch_stub_654, gl_dispatch_stub_654, NULL, _gloffset_IsFenceNV), + NAME_FUNC_OFFSET(10976, gl_dispatch_stub_655, gl_dispatch_stub_655, NULL, _gloffset_SetFenceNV), + NAME_FUNC_OFFSET(10989, gl_dispatch_stub_656, gl_dispatch_stub_656, NULL, _gloffset_TestFenceNV), + NAME_FUNC_OFFSET(11003, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, _gloffset_AreProgramsResidentNV), + NAME_FUNC_OFFSET(11027, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(11043, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(11062, glExecuteProgramNV, glExecuteProgramNV, NULL, _gloffset_ExecuteProgramNV), + NAME_FUNC_OFFSET(11081, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(11097, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, _gloffset_GetProgramParameterdvNV), + NAME_FUNC_OFFSET(11123, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, _gloffset_GetProgramParameterfvNV), + NAME_FUNC_OFFSET(11149, glGetProgramStringNV, glGetProgramStringNV, NULL, _gloffset_GetProgramStringNV), + NAME_FUNC_OFFSET(11170, glGetProgramivNV, glGetProgramivNV, NULL, _gloffset_GetProgramivNV), + NAME_FUNC_OFFSET(11187, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, _gloffset_GetTrackMatrixivNV), + NAME_FUNC_OFFSET(11208, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(11236, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, _gloffset_GetVertexAttribdvNV), + NAME_FUNC_OFFSET(11258, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, _gloffset_GetVertexAttribfvNV), + NAME_FUNC_OFFSET(11280, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, _gloffset_GetVertexAttribivNV), + NAME_FUNC_OFFSET(11302, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(11316, glLoadProgramNV, glLoadProgramNV, NULL, _gloffset_LoadProgramNV), + NAME_FUNC_OFFSET(11332, glProgramParameter4dNV, glProgramParameter4dNV, NULL, _gloffset_ProgramParameter4dNV), + NAME_FUNC_OFFSET(11355, glProgramParameter4dvNV, glProgramParameter4dvNV, NULL, _gloffset_ProgramParameter4dvNV), + NAME_FUNC_OFFSET(11379, glProgramParameter4fNV, glProgramParameter4fNV, NULL, _gloffset_ProgramParameter4fNV), + NAME_FUNC_OFFSET(11402, glProgramParameter4fvNV, glProgramParameter4fvNV, NULL, _gloffset_ProgramParameter4fvNV), + NAME_FUNC_OFFSET(11426, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, _gloffset_ProgramParameters4dvNV), + NAME_FUNC_OFFSET(11451, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, _gloffset_ProgramParameters4fvNV), + NAME_FUNC_OFFSET(11476, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, _gloffset_RequestResidentProgramsNV), + NAME_FUNC_OFFSET(11504, glTrackMatrixNV, glTrackMatrixNV, NULL, _gloffset_TrackMatrixNV), + NAME_FUNC_OFFSET(11520, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, _gloffset_VertexAttrib1dNV), + NAME_FUNC_OFFSET(11539, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, _gloffset_VertexAttrib1dvNV), + NAME_FUNC_OFFSET(11559, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, _gloffset_VertexAttrib1fNV), + NAME_FUNC_OFFSET(11578, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, _gloffset_VertexAttrib1fvNV), + NAME_FUNC_OFFSET(11598, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, _gloffset_VertexAttrib1sNV), + NAME_FUNC_OFFSET(11617, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, _gloffset_VertexAttrib1svNV), + NAME_FUNC_OFFSET(11637, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, _gloffset_VertexAttrib2dNV), + NAME_FUNC_OFFSET(11656, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, _gloffset_VertexAttrib2dvNV), + NAME_FUNC_OFFSET(11676, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, _gloffset_VertexAttrib2fNV), + NAME_FUNC_OFFSET(11695, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, _gloffset_VertexAttrib2fvNV), + NAME_FUNC_OFFSET(11715, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, _gloffset_VertexAttrib2sNV), + NAME_FUNC_OFFSET(11734, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, _gloffset_VertexAttrib2svNV), + NAME_FUNC_OFFSET(11754, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, _gloffset_VertexAttrib3dNV), + NAME_FUNC_OFFSET(11773, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, _gloffset_VertexAttrib3dvNV), + NAME_FUNC_OFFSET(11793, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, _gloffset_VertexAttrib3fNV), + NAME_FUNC_OFFSET(11812, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, _gloffset_VertexAttrib3fvNV), + NAME_FUNC_OFFSET(11832, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, _gloffset_VertexAttrib3sNV), + NAME_FUNC_OFFSET(11851, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, _gloffset_VertexAttrib3svNV), + NAME_FUNC_OFFSET(11871, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, _gloffset_VertexAttrib4dNV), + NAME_FUNC_OFFSET(11890, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, _gloffset_VertexAttrib4dvNV), + NAME_FUNC_OFFSET(11910, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, _gloffset_VertexAttrib4fNV), + NAME_FUNC_OFFSET(11929, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, _gloffset_VertexAttrib4fvNV), + NAME_FUNC_OFFSET(11949, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, _gloffset_VertexAttrib4sNV), + NAME_FUNC_OFFSET(11968, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, _gloffset_VertexAttrib4svNV), + NAME_FUNC_OFFSET(11988, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, _gloffset_VertexAttrib4ubNV), + NAME_FUNC_OFFSET(12008, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, _gloffset_VertexAttrib4ubvNV), + NAME_FUNC_OFFSET(12029, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, _gloffset_VertexAttribPointerNV), + NAME_FUNC_OFFSET(12053, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, _gloffset_VertexAttribs1dvNV), + NAME_FUNC_OFFSET(12074, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, _gloffset_VertexAttribs1fvNV), + NAME_FUNC_OFFSET(12095, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, _gloffset_VertexAttribs1svNV), + NAME_FUNC_OFFSET(12116, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, _gloffset_VertexAttribs2dvNV), + NAME_FUNC_OFFSET(12137, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, _gloffset_VertexAttribs2fvNV), + NAME_FUNC_OFFSET(12158, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, _gloffset_VertexAttribs2svNV), + NAME_FUNC_OFFSET(12179, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, _gloffset_VertexAttribs3dvNV), + NAME_FUNC_OFFSET(12200, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, _gloffset_VertexAttribs3fvNV), + NAME_FUNC_OFFSET(12221, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, _gloffset_VertexAttribs3svNV), + NAME_FUNC_OFFSET(12242, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, _gloffset_VertexAttribs4dvNV), + NAME_FUNC_OFFSET(12263, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, _gloffset_VertexAttribs4fvNV), + NAME_FUNC_OFFSET(12284, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, _gloffset_VertexAttribs4svNV), + NAME_FUNC_OFFSET(12305, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, _gloffset_VertexAttribs4ubvNV), + NAME_FUNC_OFFSET(12327, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, _gloffset_AlphaFragmentOp1ATI), + NAME_FUNC_OFFSET(12349, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, _gloffset_AlphaFragmentOp2ATI), + NAME_FUNC_OFFSET(12371, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, _gloffset_AlphaFragmentOp3ATI), + NAME_FUNC_OFFSET(12393, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, _gloffset_BeginFragmentShaderATI), + NAME_FUNC_OFFSET(12418, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, _gloffset_BindFragmentShaderATI), + NAME_FUNC_OFFSET(12442, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, _gloffset_ColorFragmentOp1ATI), + NAME_FUNC_OFFSET(12464, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, _gloffset_ColorFragmentOp2ATI), + NAME_FUNC_OFFSET(12486, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, _gloffset_ColorFragmentOp3ATI), + NAME_FUNC_OFFSET(12508, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, _gloffset_DeleteFragmentShaderATI), + NAME_FUNC_OFFSET(12534, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, _gloffset_EndFragmentShaderATI), + NAME_FUNC_OFFSET(12557, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, _gloffset_GenFragmentShadersATI), + NAME_FUNC_OFFSET(12581, glPassTexCoordATI, glPassTexCoordATI, NULL, _gloffset_PassTexCoordATI), + NAME_FUNC_OFFSET(12599, glSampleMapATI, glSampleMapATI, NULL, _gloffset_SampleMapATI), + NAME_FUNC_OFFSET(12614, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, _gloffset_SetFragmentShaderConstantATI), + NAME_FUNC_OFFSET(12645, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(12665, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(12686, gl_dispatch_stub_737, gl_dispatch_stub_737, NULL, _gloffset_ActiveStencilFaceEXT), + NAME_FUNC_OFFSET(12709, gl_dispatch_stub_738, gl_dispatch_stub_738, NULL, _gloffset_BindVertexArrayAPPLE), + NAME_FUNC_OFFSET(12732, gl_dispatch_stub_739, gl_dispatch_stub_739, NULL, _gloffset_DeleteVertexArraysAPPLE), + NAME_FUNC_OFFSET(12758, gl_dispatch_stub_740, gl_dispatch_stub_740, NULL, _gloffset_GenVertexArraysAPPLE), + NAME_FUNC_OFFSET(12781, gl_dispatch_stub_741, gl_dispatch_stub_741, NULL, _gloffset_IsVertexArrayAPPLE), + NAME_FUNC_OFFSET(12802, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, _gloffset_GetProgramNamedParameterdvNV), + NAME_FUNC_OFFSET(12833, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, _gloffset_GetProgramNamedParameterfvNV), + NAME_FUNC_OFFSET(12864, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, _gloffset_ProgramNamedParameter4dNV), + NAME_FUNC_OFFSET(12892, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, _gloffset_ProgramNamedParameter4dvNV), + NAME_FUNC_OFFSET(12921, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, _gloffset_ProgramNamedParameter4fNV), + NAME_FUNC_OFFSET(12949, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, _gloffset_ProgramNamedParameter4fvNV), + NAME_FUNC_OFFSET(12978, gl_dispatch_stub_748, gl_dispatch_stub_748, NULL, _gloffset_DepthBoundsEXT), + NAME_FUNC_OFFSET(12995, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(13022, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), + NAME_FUNC_OFFSET(13043, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), + NAME_FUNC_OFFSET(13065, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), + NAME_FUNC_OFFSET(13093, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), + NAME_FUNC_OFFSET(13117, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), + NAME_FUNC_OFFSET(13142, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), + NAME_FUNC_OFFSET(13171, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), + NAME_FUNC_OFFSET(13197, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), + NAME_FUNC_OFFSET(13223, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), + NAME_FUNC_OFFSET(13249, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), + NAME_FUNC_OFFSET(13270, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), + NAME_FUNC_OFFSET(13292, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), + NAME_FUNC_OFFSET(13312, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), + NAME_FUNC_OFFSET(13353, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), + NAME_FUNC_OFFSET(13385, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), + NAME_FUNC_OFFSET(13404, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), + NAME_FUNC_OFFSET(13424, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), + NAME_FUNC_OFFSET(13449, gl_dispatch_stub_767, gl_dispatch_stub_767, NULL, _gloffset_BlitFramebufferEXT), + NAME_FUNC_OFFSET(13470, gl_dispatch_stub_768, gl_dispatch_stub_768, NULL, _gloffset_ProgramEnvParameters4fvEXT), + NAME_FUNC_OFFSET(13499, gl_dispatch_stub_769, gl_dispatch_stub_769, NULL, _gloffset_ProgramLocalParameters4fvEXT), + NAME_FUNC_OFFSET(13530, gl_dispatch_stub_770, gl_dispatch_stub_770, NULL, _gloffset_GetQueryObjecti64vEXT), + NAME_FUNC_OFFSET(13554, gl_dispatch_stub_771, gl_dispatch_stub_771, NULL, _gloffset_GetQueryObjectui64vEXT), + NAME_FUNC_OFFSET(13579, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), + NAME_FUNC_OFFSET(13597, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), + NAME_FUNC_OFFSET(13614, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), + NAME_FUNC_OFFSET(13630, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), + NAME_FUNC_OFFSET(13655, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), + NAME_FUNC_OFFSET(13675, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), + NAME_FUNC_OFFSET(13695, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), + NAME_FUNC_OFFSET(13718, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), + NAME_FUNC_OFFSET(13741, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), + NAME_FUNC_OFFSET(13761, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), + NAME_FUNC_OFFSET(13778, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), + NAME_FUNC_OFFSET(13795, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), + NAME_FUNC_OFFSET(13810, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), + NAME_FUNC_OFFSET(13834, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), + NAME_FUNC_OFFSET(13853, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), + NAME_FUNC_OFFSET(13872, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), + NAME_FUNC_OFFSET(13888, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), + NAME_FUNC_OFFSET(13907, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), + NAME_FUNC_OFFSET(13930, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(13946, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(13962, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), + NAME_FUNC_OFFSET(13989, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), + NAME_FUNC_OFFSET(14016, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), + NAME_FUNC_OFFSET(14036, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(14055, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(14074, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14104, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14134, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14164, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14194, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), + NAME_FUNC_OFFSET(14213, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), + NAME_FUNC_OFFSET(14236, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), + NAME_FUNC_OFFSET(14261, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), + NAME_FUNC_OFFSET(14286, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), + NAME_FUNC_OFFSET(14313, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), + NAME_FUNC_OFFSET(14341, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), + NAME_FUNC_OFFSET(14368, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), + NAME_FUNC_OFFSET(14396, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), + NAME_FUNC_OFFSET(14425, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), + NAME_FUNC_OFFSET(14454, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), + NAME_FUNC_OFFSET(14480, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), + NAME_FUNC_OFFSET(14511, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), + NAME_FUNC_OFFSET(14542, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), + NAME_FUNC_OFFSET(14566, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), + NAME_FUNC_OFFSET(14589, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), + NAME_FUNC_OFFSET(14607, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), + NAME_FUNC_OFFSET(14636, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), + NAME_FUNC_OFFSET(14665, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), + NAME_FUNC_OFFSET(14680, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), + NAME_FUNC_OFFSET(14706, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), + NAME_FUNC_OFFSET(14732, glHistogram, glHistogram, NULL, _gloffset_Histogram), + NAME_FUNC_OFFSET(14747, glMinmax, glMinmax, NULL, _gloffset_Minmax), + NAME_FUNC_OFFSET(14759, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), + NAME_FUNC_OFFSET(14779, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), + NAME_FUNC_OFFSET(14796, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), + NAME_FUNC_OFFSET(14812, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), + NAME_FUNC_OFFSET(14831, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), + NAME_FUNC_OFFSET(14854, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), + NAME_FUNC_OFFSET(14870, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), + NAME_FUNC_OFFSET(14892, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), + NAME_FUNC_OFFSET(14910, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), + NAME_FUNC_OFFSET(14929, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), + NAME_FUNC_OFFSET(14947, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), + NAME_FUNC_OFFSET(14966, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), + NAME_FUNC_OFFSET(14984, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), + NAME_FUNC_OFFSET(15003, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), + NAME_FUNC_OFFSET(15021, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), + NAME_FUNC_OFFSET(15040, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), + NAME_FUNC_OFFSET(15058, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), + NAME_FUNC_OFFSET(15077, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), + NAME_FUNC_OFFSET(15095, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), + NAME_FUNC_OFFSET(15114, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), + NAME_FUNC_OFFSET(15132, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), + NAME_FUNC_OFFSET(15151, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), + NAME_FUNC_OFFSET(15169, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), + NAME_FUNC_OFFSET(15188, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), + NAME_FUNC_OFFSET(15206, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), + NAME_FUNC_OFFSET(15225, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), + NAME_FUNC_OFFSET(15243, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), + NAME_FUNC_OFFSET(15262, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), + NAME_FUNC_OFFSET(15280, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), + NAME_FUNC_OFFSET(15299, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), + NAME_FUNC_OFFSET(15317, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), + NAME_FUNC_OFFSET(15336, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), + NAME_FUNC_OFFSET(15354, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), + NAME_FUNC_OFFSET(15373, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), + NAME_FUNC_OFFSET(15391, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), + NAME_FUNC_OFFSET(15410, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), + NAME_FUNC_OFFSET(15428, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), + NAME_FUNC_OFFSET(15447, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), + NAME_FUNC_OFFSET(15465, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), + NAME_FUNC_OFFSET(15484, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET(15507, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET(15530, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET(15553, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET(15576, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET(15593, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET(15616, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET(15639, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET(15662, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET(15688, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET(15714, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET(15740, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET(15764, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET(15791, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET(15817, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET(15837, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET(15857, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET(15877, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET(15894, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET(15912, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET(15929, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET(15947, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET(15964, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET(15982, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET(15999, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET(16017, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET(16034, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET(16052, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET(16069, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET(16087, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET(16104, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET(16122, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET(16139, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET(16157, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET(16174, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET(16192, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET(16211, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET(16230, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET(16249, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET(16268, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET(16288, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET(16308, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET(16328, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET(16345, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET(16363, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET(16380, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET(16398, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET(16415, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET(16433, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET(16455, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET(16468, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET(16481, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET(16497, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET(16513, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET(16526, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET(16549, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET(16569, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET(16588, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET(16599, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET(16611, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET(16625, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET(16638, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET(16654, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET(16665, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET(16678, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET(16697, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET(16717, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET(16730, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET(16740, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET(16756, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET(16775, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET(16793, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET(16814, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET(16829, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET(16844, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET(16858, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET(16873, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET(16885, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET(16898, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET(16910, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET(16923, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET(16935, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET(16948, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET(16960, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET(16973, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET(16985, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET(16998, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET(17010, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET(17023, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET(17035, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET(17048, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET(17060, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET(17073, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET(17092, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET(17111, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET(17130, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET(17143, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET(17161, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET(17182, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET(17200, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET(17220, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(17234, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(17251, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET(17267, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET(17286, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17304, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17325, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17347, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17366, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17388, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17411, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET(17430, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET(17450, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET(17469, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET(17489, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET(17508, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET(17528, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET(17547, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET(17567, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET(17586, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET(17606, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET(17626, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET(17647, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET(17667, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET(17688, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET(17708, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET(17729, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET(17753, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET(17771, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET(17791, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET(17809, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET(17821, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET(17834, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET(17846, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET(17859, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(17879, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(17903, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(17917, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(17934, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(17949, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(17967, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(17981, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(17998, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(18013, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(18031, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(18045, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(18062, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(18077, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(18095, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(18109, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(18126, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(18141, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(18159, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(18173, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(18190, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(18205, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(18223, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(18237, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(18254, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(18269, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(18287, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(18301, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(18318, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(18333, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(18351, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(18365, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(18382, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(18397, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(18415, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(18432, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(18452, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(18469, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(18498, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(18513, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(18531, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(18550, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(18574, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) }; diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index a2c2d29105..d864cd22aa 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -557,6 +557,29 @@ static const char enum_string_table[] = "GL_GENERATE_MIPMAP_SGIS\0" "GL_GEQUAL\0" "GL_GL_BLEND_EQUATION_RGB\0" + "GL_GL_COMPRESSED_SLUMINANCE\0" + "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0" + "GL_GL_COMPRESSED_SRGB\0" + "GL_GL_COMPRESSED_SRGB_ALPHA\0" + "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0" + "GL_GL_FLOAT_MAT2x3\0" + "GL_GL_FLOAT_MAT2x4\0" + "GL_GL_FLOAT_MAT3x2\0" + "GL_GL_FLOAT_MAT3x4\0" + "GL_GL_FLOAT_MAT4x2\0" + "GL_GL_FLOAT_MAT4x3\0" + "GL_GL_PIXEL_PACK_BUFFER\0" + "GL_GL_PIXEL_PACK_BUFFER_BINDING\0" + "GL_GL_PIXEL_UNPACK_BUFFER\0" + "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0" + "GL_GL_SLUMINANCE\0" + "GL_GL_SLUMINANCE8\0" + "GL_GL_SLUMINANCE8_ALPHA8\0" + "GL_GL_SLUMINANCE_ALPHA\0" + "GL_GL_SRGB\0" + "GL_GL_SRGB8\0" + "GL_GL_SRGB8_ALPHA8\0" + "GL_GL_SRGB_ALPHA\0" "GL_GREATER\0" "GL_GREEN\0" "GL_GREEN_BIAS\0" @@ -1751,7 +1774,7 @@ static const char enum_string_table[] = "GL_ZOOM_Y\0" ; -static const enum_elt all_enums[1714] = +static const enum_elt all_enums[1737] = { { 0, 0x00000600 }, /* GL_2D */ { 6, 0x00001407 }, /* GL_2_BYTES */ @@ -2275,1277 +2298,1301 @@ static const enum_elt all_enums[1714] = { 10644, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */ { 10668, 0x00000206 }, /* GL_GEQUAL */ { 10678, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */ - { 10703, 0x00000204 }, /* GL_GREATER */ - { 10714, 0x00001904 }, /* GL_GREEN */ - { 10723, 0x00000D19 }, /* GL_GREEN_BIAS */ - { 10737, 0x00000D53 }, /* GL_GREEN_BITS */ - { 10751, 0x00000D18 }, /* GL_GREEN_SCALE */ - { 10766, 0x00008000 }, /* GL_HINT_BIT */ - { 10778, 0x00008024 }, /* GL_HISTOGRAM */ - { 10791, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ - { 10815, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ - { 10843, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ - { 10866, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ - { 10893, 0x00008024 }, /* GL_HISTOGRAM_EXT */ - { 10910, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ - { 10930, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ - { 10954, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ - { 10978, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ - { 11006, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - { 11034, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ - { 11066, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ - { 11088, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ - { 11114, 0x0000802D }, /* GL_HISTOGRAM_SINK */ - { 11132, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ - { 11154, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ - { 11173, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ - { 11196, 0x0000862A }, /* GL_IDENTITY_NV */ - { 11211, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ - { 11231, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - { 11271, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - { 11309, 0x00001E02 }, /* GL_INCR */ - { 11317, 0x00008507 }, /* GL_INCR_WRAP */ - { 11330, 0x00008507 }, /* GL_INCR_WRAP_EXT */ - { 11347, 0x00008077 }, /* GL_INDEX_ARRAY */ - { 11362, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - { 11392, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ - { 11426, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ - { 11449, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ - { 11471, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ - { 11491, 0x00000D51 }, /* GL_INDEX_BITS */ - { 11505, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ - { 11526, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ - { 11544, 0x00000C30 }, /* GL_INDEX_MODE */ - { 11558, 0x00000D13 }, /* GL_INDEX_OFFSET */ - { 11574, 0x00000D12 }, /* GL_INDEX_SHIFT */ - { 11589, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ - { 11608, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */ - { 11627, 0x00001404 }, /* GL_INT */ - { 11634, 0x00008049 }, /* GL_INTENSITY */ - { 11647, 0x0000804C }, /* GL_INTENSITY12 */ - { 11662, 0x0000804C }, /* GL_INTENSITY12_EXT */ - { 11681, 0x0000804D }, /* GL_INTENSITY16 */ - { 11696, 0x0000804D }, /* GL_INTENSITY16_EXT */ - { 11715, 0x0000804A }, /* GL_INTENSITY4 */ - { 11729, 0x0000804A }, /* GL_INTENSITY4_EXT */ - { 11747, 0x0000804B }, /* GL_INTENSITY8 */ - { 11761, 0x0000804B }, /* GL_INTENSITY8_EXT */ - { 11779, 0x00008049 }, /* GL_INTENSITY_EXT */ - { 11796, 0x00008575 }, /* GL_INTERPOLATE */ - { 11811, 0x00008575 }, /* GL_INTERPOLATE_ARB */ - { 11830, 0x00008575 }, /* GL_INTERPOLATE_EXT */ - { 11849, 0x00008B53 }, /* GL_INT_VEC2 */ - { 11861, 0x00008B53 }, /* GL_INT_VEC2_ARB */ - { 11877, 0x00008B54 }, /* GL_INT_VEC3 */ - { 11889, 0x00008B54 }, /* GL_INT_VEC3_ARB */ - { 11905, 0x00008B55 }, /* GL_INT_VEC4 */ - { 11917, 0x00008B55 }, /* GL_INT_VEC4_ARB */ - { 11933, 0x00000500 }, /* GL_INVALID_ENUM */ - { 11949, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ - { 11986, 0x00000502 }, /* GL_INVALID_OPERATION */ - { 12007, 0x00000501 }, /* GL_INVALID_VALUE */ - { 12024, 0x0000862B }, /* GL_INVERSE_NV */ - { 12038, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ - { 12062, 0x0000150A }, /* GL_INVERT */ - { 12072, 0x00001E00 }, /* GL_KEEP */ - { 12080, 0x00000406 }, /* GL_LEFT */ - { 12088, 0x00000203 }, /* GL_LEQUAL */ - { 12098, 0x00000201 }, /* GL_LESS */ - { 12106, 0x00004000 }, /* GL_LIGHT0 */ - { 12116, 0x00004001 }, /* GL_LIGHT1 */ - { 12126, 0x00004002 }, /* GL_LIGHT2 */ - { 12136, 0x00004003 }, /* GL_LIGHT3 */ - { 12146, 0x00004004 }, /* GL_LIGHT4 */ - { 12156, 0x00004005 }, /* GL_LIGHT5 */ - { 12166, 0x00004006 }, /* GL_LIGHT6 */ - { 12176, 0x00004007 }, /* GL_LIGHT7 */ - { 12186, 0x00000B50 }, /* GL_LIGHTING */ - { 12198, 0x00000040 }, /* GL_LIGHTING_BIT */ - { 12214, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ - { 12237, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - { 12266, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ - { 12299, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - { 12327, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ - { 12351, 0x00001B01 }, /* GL_LINE */ - { 12359, 0x00002601 }, /* GL_LINEAR */ - { 12369, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ - { 12391, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - { 12421, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - { 12452, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ - { 12476, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ - { 12501, 0x00000001 }, /* GL_LINES */ - { 12510, 0x00000004 }, /* GL_LINE_BIT */ - { 12522, 0x00000002 }, /* GL_LINE_LOOP */ - { 12535, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ - { 12555, 0x00000B20 }, /* GL_LINE_SMOOTH */ - { 12570, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ - { 12590, 0x00000B24 }, /* GL_LINE_STIPPLE */ - { 12606, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ - { 12630, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ - { 12653, 0x00000003 }, /* GL_LINE_STRIP */ - { 12667, 0x00000702 }, /* GL_LINE_TOKEN */ - { 12681, 0x00000B21 }, /* GL_LINE_WIDTH */ - { 12695, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ - { 12721, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ - { 12741, 0x00008B82 }, /* GL_LINK_STATUS */ - { 12756, 0x00000B32 }, /* GL_LIST_BASE */ - { 12769, 0x00020000 }, /* GL_LIST_BIT */ - { 12781, 0x00000B33 }, /* GL_LIST_INDEX */ - { 12795, 0x00000B30 }, /* GL_LIST_MODE */ - { 12808, 0x00000101 }, /* GL_LOAD */ - { 12816, 0x00000BF1 }, /* GL_LOGIC_OP */ - { 12828, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ - { 12845, 0x00008CA1 }, /* GL_LOWER_LEFT */ - { 12859, 0x00001909 }, /* GL_LUMINANCE */ - { 12872, 0x00008041 }, /* GL_LUMINANCE12 */ - { 12887, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ - { 12910, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ - { 12937, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ - { 12959, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ - { 12985, 0x00008041 }, /* GL_LUMINANCE12_EXT */ - { 13004, 0x00008042 }, /* GL_LUMINANCE16 */ - { 13019, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ - { 13042, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ - { 13069, 0x00008042 }, /* GL_LUMINANCE16_EXT */ - { 13088, 0x0000803F }, /* GL_LUMINANCE4 */ - { 13102, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ - { 13123, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ - { 13148, 0x0000803F }, /* GL_LUMINANCE4_EXT */ - { 13166, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ - { 13187, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ - { 13212, 0x00008040 }, /* GL_LUMINANCE8 */ - { 13226, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ - { 13247, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ - { 13272, 0x00008040 }, /* GL_LUMINANCE8_EXT */ - { 13290, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ - { 13309, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ - { 13325, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ - { 13345, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ - { 13367, 0x00000D91 }, /* GL_MAP1_INDEX */ - { 13381, 0x00000D92 }, /* GL_MAP1_NORMAL */ - { 13396, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ - { 13420, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ - { 13444, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ - { 13468, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ - { 13492, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ - { 13509, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ - { 13526, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - { 13554, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - { 13583, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - { 13612, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - { 13641, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - { 13670, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - { 13699, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - { 13728, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - { 13756, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - { 13784, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - { 13812, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - { 13840, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - { 13868, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - { 13896, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - { 13924, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - { 13952, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - { 13980, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ - { 13996, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ - { 14016, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ - { 14038, 0x00000DB1 }, /* GL_MAP2_INDEX */ - { 14052, 0x00000DB2 }, /* GL_MAP2_NORMAL */ - { 14067, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ - { 14091, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ - { 14115, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ - { 14139, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ - { 14163, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ - { 14180, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ - { 14197, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - { 14225, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - { 14254, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - { 14283, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - { 14312, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - { 14341, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - { 14370, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - { 14399, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - { 14427, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - { 14455, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - { 14483, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - { 14511, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - { 14539, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - { 14567, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ - { 14595, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - { 14623, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - { 14651, 0x00000D10 }, /* GL_MAP_COLOR */ - { 14664, 0x00000D11 }, /* GL_MAP_STENCIL */ - { 14679, 0x000088C0 }, /* GL_MATRIX0_ARB */ - { 14694, 0x00008630 }, /* GL_MATRIX0_NV */ - { 14708, 0x000088CA }, /* GL_MATRIX10_ARB */ - { 14724, 0x000088CB }, /* GL_MATRIX11_ARB */ - { 14740, 0x000088CC }, /* GL_MATRIX12_ARB */ - { 14756, 0x000088CD }, /* GL_MATRIX13_ARB */ - { 14772, 0x000088CE }, /* GL_MATRIX14_ARB */ - { 14788, 0x000088CF }, /* GL_MATRIX15_ARB */ - { 14804, 0x000088D0 }, /* GL_MATRIX16_ARB */ - { 14820, 0x000088D1 }, /* GL_MATRIX17_ARB */ - { 14836, 0x000088D2 }, /* GL_MATRIX18_ARB */ - { 14852, 0x000088D3 }, /* GL_MATRIX19_ARB */ - { 14868, 0x000088C1 }, /* GL_MATRIX1_ARB */ - { 14883, 0x00008631 }, /* GL_MATRIX1_NV */ - { 14897, 0x000088D4 }, /* GL_MATRIX20_ARB */ - { 14913, 0x000088D5 }, /* GL_MATRIX21_ARB */ - { 14929, 0x000088D6 }, /* GL_MATRIX22_ARB */ - { 14945, 0x000088D7 }, /* GL_MATRIX23_ARB */ - { 14961, 0x000088D8 }, /* GL_MATRIX24_ARB */ - { 14977, 0x000088D9 }, /* GL_MATRIX25_ARB */ - { 14993, 0x000088DA }, /* GL_MATRIX26_ARB */ - { 15009, 0x000088DB }, /* GL_MATRIX27_ARB */ - { 15025, 0x000088DC }, /* GL_MATRIX28_ARB */ - { 15041, 0x000088DD }, /* GL_MATRIX29_ARB */ - { 15057, 0x000088C2 }, /* GL_MATRIX2_ARB */ - { 15072, 0x00008632 }, /* GL_MATRIX2_NV */ - { 15086, 0x000088DE }, /* GL_MATRIX30_ARB */ - { 15102, 0x000088DF }, /* GL_MATRIX31_ARB */ - { 15118, 0x000088C3 }, /* GL_MATRIX3_ARB */ - { 15133, 0x00008633 }, /* GL_MATRIX3_NV */ - { 15147, 0x000088C4 }, /* GL_MATRIX4_ARB */ - { 15162, 0x00008634 }, /* GL_MATRIX4_NV */ - { 15176, 0x000088C5 }, /* GL_MATRIX5_ARB */ - { 15191, 0x00008635 }, /* GL_MATRIX5_NV */ - { 15205, 0x000088C6 }, /* GL_MATRIX6_ARB */ - { 15220, 0x00008636 }, /* GL_MATRIX6_NV */ - { 15234, 0x000088C7 }, /* GL_MATRIX7_ARB */ - { 15249, 0x00008637 }, /* GL_MATRIX7_NV */ - { 15263, 0x000088C8 }, /* GL_MATRIX8_ARB */ - { 15278, 0x000088C9 }, /* GL_MATRIX9_ARB */ - { 15293, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ - { 15319, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - { 15353, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - { 15384, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - { 15417, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - { 15448, 0x00000BA0 }, /* GL_MATRIX_MODE */ - { 15463, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ - { 15485, 0x00008008 }, /* GL_MAX */ - { 15492, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ - { 15515, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ - { 15541, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - { 15574, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - { 15600, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 15634, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ - { 15653, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ - { 15682, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - { 15714, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 15750, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ - { 15786, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ - { 15826, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ - { 15852, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ - { 15882, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ - { 15907, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ - { 15936, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - { 15965, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ - { 15998, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */ - { 16018, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ - { 16042, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ - { 16066, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ - { 16090, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ - { 16115, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ - { 16133, 0x00008008 }, /* GL_MAX_EXT */ - { 16144, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ - { 16179, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ - { 16218, 0x00000D31 }, /* GL_MAX_LIGHTS */ - { 16232, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ - { 16252, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - { 16290, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - { 16319, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ - { 16343, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ - { 16371, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ - { 16394, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 16431, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 16467, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - { 16494, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - { 16523, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - { 16557, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ - { 16593, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - { 16620, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - { 16652, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - { 16688, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - { 16717, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - { 16746, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ - { 16774, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - { 16812, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 16856, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 16899, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 16933, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 16972, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 17009, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 17047, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 17090, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 17133, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - { 17163, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - { 17194, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 17230, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 17266, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ - { 17296, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ - { 17330, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ - { 17363, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ - { 17392, 0x00008504 }, /* GL_MAX_SHININESS_NV */ - { 17412, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ - { 17436, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */ - { 17458, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ - { 17484, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */ - { 17511, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ - { 17542, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ - { 17566, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - { 17600, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ - { 17620, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ - { 17647, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ - { 17668, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ - { 17693, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ - { 17718, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ - { 17753, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */ - { 17775, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ - { 17801, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */ - { 17823, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ - { 17849, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ - { 17883, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ - { 17921, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ - { 17954, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ - { 17991, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ - { 18015, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ - { 18036, 0x00008007 }, /* GL_MIN */ - { 18043, 0x0000802E }, /* GL_MINMAX */ - { 18053, 0x0000802E }, /* GL_MINMAX_EXT */ - { 18067, 0x0000802F }, /* GL_MINMAX_FORMAT */ - { 18084, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ - { 18105, 0x00008030 }, /* GL_MINMAX_SINK */ - { 18120, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ - { 18139, 0x00008007 }, /* GL_MIN_EXT */ - { 18150, 0x00008370 }, /* GL_MIRRORED_REPEAT */ - { 18169, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ - { 18192, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ - { 18215, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ - { 18235, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ - { 18255, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - { 18285, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ - { 18313, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - { 18341, 0x00001700 }, /* GL_MODELVIEW */ - { 18354, 0x00001700 }, /* GL_MODELVIEW0_ARB */ - { 18372, 0x0000872A }, /* GL_MODELVIEW10_ARB */ - { 18391, 0x0000872B }, /* GL_MODELVIEW11_ARB */ - { 18410, 0x0000872C }, /* GL_MODELVIEW12_ARB */ - { 18429, 0x0000872D }, /* GL_MODELVIEW13_ARB */ - { 18448, 0x0000872E }, /* GL_MODELVIEW14_ARB */ - { 18467, 0x0000872F }, /* GL_MODELVIEW15_ARB */ - { 18486, 0x00008730 }, /* GL_MODELVIEW16_ARB */ - { 18505, 0x00008731 }, /* GL_MODELVIEW17_ARB */ - { 18524, 0x00008732 }, /* GL_MODELVIEW18_ARB */ - { 18543, 0x00008733 }, /* GL_MODELVIEW19_ARB */ - { 18562, 0x0000850A }, /* GL_MODELVIEW1_ARB */ - { 18580, 0x00008734 }, /* GL_MODELVIEW20_ARB */ - { 18599, 0x00008735 }, /* GL_MODELVIEW21_ARB */ - { 18618, 0x00008736 }, /* GL_MODELVIEW22_ARB */ - { 18637, 0x00008737 }, /* GL_MODELVIEW23_ARB */ - { 18656, 0x00008738 }, /* GL_MODELVIEW24_ARB */ - { 18675, 0x00008739 }, /* GL_MODELVIEW25_ARB */ - { 18694, 0x0000873A }, /* GL_MODELVIEW26_ARB */ - { 18713, 0x0000873B }, /* GL_MODELVIEW27_ARB */ - { 18732, 0x0000873C }, /* GL_MODELVIEW28_ARB */ - { 18751, 0x0000873D }, /* GL_MODELVIEW29_ARB */ - { 18770, 0x00008722 }, /* GL_MODELVIEW2_ARB */ - { 18788, 0x0000873E }, /* GL_MODELVIEW30_ARB */ - { 18807, 0x0000873F }, /* GL_MODELVIEW31_ARB */ - { 18826, 0x00008723 }, /* GL_MODELVIEW3_ARB */ - { 18844, 0x00008724 }, /* GL_MODELVIEW4_ARB */ - { 18862, 0x00008725 }, /* GL_MODELVIEW5_ARB */ - { 18880, 0x00008726 }, /* GL_MODELVIEW6_ARB */ - { 18898, 0x00008727 }, /* GL_MODELVIEW7_ARB */ - { 18916, 0x00008728 }, /* GL_MODELVIEW8_ARB */ - { 18934, 0x00008729 }, /* GL_MODELVIEW9_ARB */ - { 18952, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ - { 18972, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ - { 18999, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ - { 19024, 0x00002100 }, /* GL_MODULATE */ - { 19036, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ - { 19056, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ - { 19083, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ - { 19108, 0x00000103 }, /* GL_MULT */ - { 19116, 0x0000809D }, /* GL_MULTISAMPLE */ - { 19131, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ - { 19151, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ - { 19170, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ - { 19189, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ - { 19213, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ - { 19236, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - { 19266, 0x00002A25 }, /* GL_N3F_V3F */ - { 19277, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ - { 19297, 0x0000150E }, /* GL_NAND */ - { 19305, 0x00002600 }, /* GL_NEAREST */ - { 19316, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - { 19347, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - { 19379, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ - { 19404, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ - { 19430, 0x00000200 }, /* GL_NEVER */ - { 19439, 0x00001102 }, /* GL_NICEST */ - { 19449, 0x00000000 }, /* GL_NONE */ - { 19457, 0x00001505 }, /* GL_NOOP */ - { 19465, 0x00001508 }, /* GL_NOR */ - { 19472, 0x00000BA1 }, /* GL_NORMALIZE */ - { 19485, 0x00008075 }, /* GL_NORMAL_ARRAY */ - { 19501, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - { 19532, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ - { 19567, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ - { 19591, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ - { 19614, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ - { 19635, 0x00008511 }, /* GL_NORMAL_MAP */ - { 19649, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ - { 19667, 0x00008511 }, /* GL_NORMAL_MAP_NV */ - { 19684, 0x00000205 }, /* GL_NOTEQUAL */ - { 19696, 0x00000000 }, /* GL_NO_ERROR */ - { 19708, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - { 19742, 0x000086A2 }, /* GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB */ - { 19780, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ - { 19812, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ - { 19854, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ - { 19884, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ - { 19924, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ - { 19955, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ - { 19984, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ - { 20012, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ - { 20042, 0x00002401 }, /* GL_OBJECT_LINEAR */ - { 20059, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ - { 20085, 0x00002501 }, /* GL_OBJECT_PLANE */ - { 20101, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ - { 20136, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ - { 20158, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ - { 20177, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ - { 20207, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ - { 20228, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ - { 20256, 0x00000001 }, /* GL_ONE */ - { 20263, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ - { 20291, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ - { 20323, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ - { 20351, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ - { 20383, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ - { 20406, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ - { 20429, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ - { 20452, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ - { 20475, 0x00008598 }, /* GL_OPERAND0_ALPHA */ - { 20493, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ - { 20515, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ - { 20537, 0x00008590 }, /* GL_OPERAND0_RGB */ - { 20553, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ - { 20573, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ - { 20593, 0x00008599 }, /* GL_OPERAND1_ALPHA */ - { 20611, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ - { 20633, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ - { 20655, 0x00008591 }, /* GL_OPERAND1_RGB */ - { 20671, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ - { 20691, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ - { 20711, 0x0000859A }, /* GL_OPERAND2_ALPHA */ - { 20729, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ - { 20751, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ - { 20773, 0x00008592 }, /* GL_OPERAND2_RGB */ - { 20789, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ - { 20809, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ - { 20829, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ - { 20850, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ - { 20869, 0x00001507 }, /* GL_OR */ - { 20875, 0x00000A01 }, /* GL_ORDER */ - { 20884, 0x0000150D }, /* GL_OR_INVERTED */ - { 20899, 0x0000150B }, /* GL_OR_REVERSE */ - { 20913, 0x00000505 }, /* GL_OUT_OF_MEMORY */ - { 20930, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ - { 20948, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ - { 20969, 0x00008758 }, /* GL_PACK_INVERT_MESA */ - { 20989, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ - { 21007, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ - { 21026, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ - { 21046, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ - { 21066, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ - { 21084, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ - { 21103, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ - { 21128, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ - { 21152, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ - { 21173, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ - { 21195, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ - { 21217, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ - { 21242, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ - { 21266, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ - { 21287, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ - { 21309, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ - { 21331, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ - { 21353, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ - { 21384, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ - { 21404, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - { 21429, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ - { 21449, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - { 21474, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ - { 21494, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - { 21519, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ - { 21539, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - { 21564, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ - { 21584, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - { 21609, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ - { 21629, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - { 21654, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ - { 21674, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - { 21699, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ - { 21719, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - { 21744, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ - { 21764, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - { 21789, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ - { 21809, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - { 21834, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ - { 21852, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ - { 21885, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ - { 21910, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ - { 21945, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ - { 21972, 0x00001B00 }, /* GL_POINT */ - { 21981, 0x00000000 }, /* GL_POINTS */ - { 21991, 0x00000002 }, /* GL_POINT_BIT */ - { 22004, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ - { 22034, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ - { 22068, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ - { 22102, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ - { 22137, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ - { 22166, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ - { 22199, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ - { 22232, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ - { 22266, 0x00000B11 }, /* GL_POINT_SIZE */ - { 22280, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ - { 22306, 0x00008127 }, /* GL_POINT_SIZE_MAX */ - { 22324, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ - { 22346, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ - { 22368, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ - { 22391, 0x00008126 }, /* GL_POINT_SIZE_MIN */ - { 22409, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ - { 22431, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ - { 22453, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ - { 22476, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ - { 22496, 0x00000B10 }, /* GL_POINT_SMOOTH */ - { 22512, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ - { 22533, 0x00008861 }, /* GL_POINT_SPRITE */ - { 22549, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ - { 22569, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ - { 22598, 0x00008861 }, /* GL_POINT_SPRITE_NV */ - { 22617, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ - { 22643, 0x00000701 }, /* GL_POINT_TOKEN */ - { 22658, 0x00000009 }, /* GL_POLYGON */ - { 22669, 0x00000008 }, /* GL_POLYGON_BIT */ - { 22684, 0x00000B40 }, /* GL_POLYGON_MODE */ - { 22700, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ - { 22723, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ - { 22748, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ - { 22771, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ - { 22794, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ - { 22818, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ - { 22842, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ - { 22860, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ - { 22883, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ - { 22902, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ - { 22925, 0x00000703 }, /* GL_POLYGON_TOKEN */ - { 22942, 0x00001203 }, /* GL_POSITION */ - { 22954, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - { 22986, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ - { 23022, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - { 23055, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ - { 23092, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - { 23123, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ - { 23158, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - { 23190, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ - { 23226, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - { 23259, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - { 23291, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ - { 23327, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - { 23360, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ - { 23397, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - { 23427, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ - { 23461, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - { 23492, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ - { 23527, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - { 23558, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ - { 23593, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - { 23625, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ - { 23661, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - { 23691, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ - { 23725, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - { 23756, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ - { 23791, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - { 23823, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - { 23854, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ - { 23889, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - { 23921, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ - { 23957, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ - { 23986, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ - { 24019, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ - { 24049, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ - { 24083, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - { 24122, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - { 24155, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - { 24195, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - { 24229, 0x00008578 }, /* GL_PREVIOUS */ - { 24241, 0x00008578 }, /* GL_PREVIOUS_ARB */ - { 24257, 0x00008578 }, /* GL_PREVIOUS_EXT */ - { 24273, 0x00008577 }, /* GL_PRIMARY_COLOR */ - { 24290, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ - { 24311, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ - { 24332, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 24365, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 24397, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ - { 24420, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ - { 24443, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ - { 24473, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ - { 24502, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ - { 24530, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ - { 24552, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - { 24580, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - { 24608, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ - { 24630, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ - { 24651, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 24691, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 24730, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 24760, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 24795, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 24828, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 24862, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 24901, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 24940, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ - { 24962, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ - { 24988, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ - { 25012, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ - { 25035, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ - { 25057, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ - { 25078, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ - { 25099, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ - { 25126, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 25158, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 25190, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - { 25225, 0x00001701 }, /* GL_PROJECTION */ - { 25239, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ - { 25260, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ - { 25286, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ - { 25307, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ - { 25326, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ - { 25349, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - { 25388, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - { 25426, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ - { 25446, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ - { 25470, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ - { 25490, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ - { 25514, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ - { 25534, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - { 25567, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ - { 25593, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ - { 25623, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - { 25654, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ - { 25684, 0x00002003 }, /* GL_Q */ - { 25689, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ - { 25714, 0x00000007 }, /* GL_QUADS */ - { 25723, 0x00008614 }, /* GL_QUAD_MESH_SUN */ - { 25740, 0x00000008 }, /* GL_QUAD_STRIP */ - { 25754, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ - { 25776, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ - { 25802, 0x00008866 }, /* GL_QUERY_RESULT */ - { 25818, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ - { 25838, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ - { 25864, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ - { 25894, 0x00002002 }, /* GL_R */ - { 25899, 0x00002A10 }, /* GL_R3_G3_B2 */ - { 25911, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - { 25944, 0x00000C02 }, /* GL_READ_BUFFER */ - { 25959, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ - { 25991, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ - { 26015, 0x000088B8 }, /* GL_READ_ONLY */ - { 26028, 0x000088B8 }, /* GL_READ_ONLY_ARB */ - { 26045, 0x000088BA }, /* GL_READ_WRITE */ - { 26059, 0x000088BA }, /* GL_READ_WRITE_ARB */ - { 26077, 0x00001903 }, /* GL_RED */ - { 26084, 0x00008016 }, /* GL_REDUCE */ - { 26094, 0x00008016 }, /* GL_REDUCE_EXT */ - { 26108, 0x00000D15 }, /* GL_RED_BIAS */ - { 26120, 0x00000D52 }, /* GL_RED_BITS */ - { 26132, 0x00000D14 }, /* GL_RED_SCALE */ - { 26145, 0x00008512 }, /* GL_REFLECTION_MAP */ - { 26163, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ - { 26185, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ - { 26206, 0x00001C00 }, /* GL_RENDER */ - { 26216, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ - { 26244, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ - { 26264, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ - { 26291, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ - { 26327, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ - { 26353, 0x00001F01 }, /* GL_RENDERER */ - { 26365, 0x00000C40 }, /* GL_RENDER_MODE */ - { 26380, 0x00002901 }, /* GL_REPEAT */ - { 26390, 0x00001E01 }, /* GL_REPLACE */ - { 26401, 0x00008062 }, /* GL_REPLACE_EXT */ - { 26416, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ - { 26439, 0x0000803A }, /* GL_RESCALE_NORMAL */ - { 26457, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ - { 26479, 0x00000102 }, /* GL_RETURN */ - { 26489, 0x00001907 }, /* GL_RGB */ - { 26496, 0x00008052 }, /* GL_RGB10 */ - { 26505, 0x00008059 }, /* GL_RGB10_A2 */ - { 26517, 0x00008059 }, /* GL_RGB10_A2_EXT */ - { 26533, 0x00008052 }, /* GL_RGB10_EXT */ - { 26546, 0x00008053 }, /* GL_RGB12 */ - { 26555, 0x00008053 }, /* GL_RGB12_EXT */ - { 26568, 0x00008054 }, /* GL_RGB16 */ - { 26577, 0x00008054 }, /* GL_RGB16_EXT */ - { 26590, 0x0000804E }, /* GL_RGB2_EXT */ - { 26602, 0x0000804F }, /* GL_RGB4 */ - { 26610, 0x0000804F }, /* GL_RGB4_EXT */ - { 26622, 0x000083A1 }, /* GL_RGB4_S3TC */ - { 26635, 0x00008050 }, /* GL_RGB5 */ - { 26643, 0x00008057 }, /* GL_RGB5_A1 */ - { 26654, 0x00008057 }, /* GL_RGB5_A1_EXT */ - { 26669, 0x00008050 }, /* GL_RGB5_EXT */ - { 26681, 0x00008051 }, /* GL_RGB8 */ - { 26689, 0x00008051 }, /* GL_RGB8_EXT */ - { 26701, 0x00001908 }, /* GL_RGBA */ - { 26709, 0x0000805A }, /* GL_RGBA12 */ - { 26719, 0x0000805A }, /* GL_RGBA12_EXT */ - { 26733, 0x0000805B }, /* GL_RGBA16 */ - { 26743, 0x0000805B }, /* GL_RGBA16_EXT */ - { 26757, 0x00008055 }, /* GL_RGBA2 */ - { 26766, 0x00008055 }, /* GL_RGBA2_EXT */ - { 26779, 0x00008056 }, /* GL_RGBA4 */ - { 26788, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ - { 26807, 0x00008056 }, /* GL_RGBA4_EXT */ - { 26820, 0x000083A3 }, /* GL_RGBA4_S3TC */ - { 26834, 0x00008058 }, /* GL_RGBA8 */ - { 26843, 0x00008058 }, /* GL_RGBA8_EXT */ - { 26856, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ - { 26874, 0x00000C31 }, /* GL_RGBA_MODE */ - { 26887, 0x000083A2 }, /* GL_RGBA_S3TC */ - { 26900, 0x000083A0 }, /* GL_RGB_S3TC */ - { 26912, 0x00008573 }, /* GL_RGB_SCALE */ - { 26925, 0x00008573 }, /* GL_RGB_SCALE_ARB */ - { 26942, 0x00008573 }, /* GL_RGB_SCALE_EXT */ - { 26959, 0x00000407 }, /* GL_RIGHT */ - { 26968, 0x00002000 }, /* GL_S */ - { 26973, 0x00008B5D }, /* GL_SAMPLER_1D */ - { 26987, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */ - { 27008, 0x00008B5E }, /* GL_SAMPLER_2D */ - { 27022, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */ - { 27043, 0x00008B5F }, /* GL_SAMPLER_3D */ - { 27057, 0x00008B60 }, /* GL_SAMPLER_CUBE */ - { 27073, 0x000080A9 }, /* GL_SAMPLES */ - { 27084, 0x000086B4 }, /* GL_SAMPLES_3DFX */ - { 27100, 0x000080A9 }, /* GL_SAMPLES_ARB */ - { 27115, 0x00008914 }, /* GL_SAMPLES_PASSED */ - { 27133, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ - { 27155, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - { 27183, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ - { 27215, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ - { 27238, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ - { 27265, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ - { 27283, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ - { 27306, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ - { 27328, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ - { 27347, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ - { 27370, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ - { 27396, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ - { 27426, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ - { 27451, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ - { 27480, 0x00080000 }, /* GL_SCISSOR_BIT */ - { 27495, 0x00000C10 }, /* GL_SCISSOR_BOX */ - { 27510, 0x00000C11 }, /* GL_SCISSOR_TEST */ - { 27526, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ - { 27551, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - { 27591, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 27635, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - { 27668, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - { 27698, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - { 27730, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - { 27760, 0x00001C02 }, /* GL_SELECT */ - { 27770, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ - { 27798, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ - { 27823, 0x00008012 }, /* GL_SEPARABLE_2D */ - { 27839, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ - { 27866, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ - { 27897, 0x0000150F }, /* GL_SET */ - { 27904, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ - { 27925, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */ - { 27949, 0x00008B4F }, /* GL_SHADER_TYPE */ - { 27964, 0x00000B54 }, /* GL_SHADE_MODEL */ - { 27979, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */ - { 28007, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ - { 28030, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - { 28060, 0x00001601 }, /* GL_SHININESS */ - { 28073, 0x00001402 }, /* GL_SHORT */ - { 28082, 0x000081F9 }, /* GL_SINGLE_COLOR */ - { 28098, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ - { 28118, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ - { 28137, 0x00001D01 }, /* GL_SMOOTH */ - { 28147, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ - { 28180, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ - { 28207, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ - { 28240, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ - { 28267, 0x00008588 }, /* GL_SOURCE0_ALPHA */ - { 28284, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ - { 28305, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ - { 28326, 0x00008580 }, /* GL_SOURCE0_RGB */ - { 28341, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ - { 28360, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ - { 28379, 0x00008589 }, /* GL_SOURCE1_ALPHA */ - { 28396, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ - { 28417, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ - { 28438, 0x00008581 }, /* GL_SOURCE1_RGB */ - { 28453, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ - { 28472, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ - { 28491, 0x0000858A }, /* GL_SOURCE2_ALPHA */ - { 28508, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ - { 28529, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ - { 28550, 0x00008582 }, /* GL_SOURCE2_RGB */ - { 28565, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ - { 28584, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ - { 28603, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ - { 28623, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ - { 28641, 0x00001202 }, /* GL_SPECULAR */ - { 28653, 0x00002402 }, /* GL_SPHERE_MAP */ - { 28667, 0x00001206 }, /* GL_SPOT_CUTOFF */ - { 28682, 0x00001204 }, /* GL_SPOT_DIRECTION */ - { 28700, 0x00001205 }, /* GL_SPOT_EXPONENT */ - { 28717, 0x00008588 }, /* GL_SRC0_ALPHA */ - { 28731, 0x00008580 }, /* GL_SRC0_RGB */ - { 28743, 0x00008589 }, /* GL_SRC1_ALPHA */ - { 28757, 0x00008581 }, /* GL_SRC1_RGB */ - { 28769, 0x0000858A }, /* GL_SRC2_ALPHA */ - { 28783, 0x00008582 }, /* GL_SRC2_RGB */ - { 28795, 0x00000302 }, /* GL_SRC_ALPHA */ - { 28808, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ - { 28830, 0x00000300 }, /* GL_SRC_COLOR */ - { 28843, 0x00000503 }, /* GL_STACK_OVERFLOW */ - { 28861, 0x00000504 }, /* GL_STACK_UNDERFLOW */ - { 28880, 0x000088E6 }, /* GL_STATIC_COPY */ - { 28895, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ - { 28914, 0x000088E4 }, /* GL_STATIC_DRAW */ - { 28929, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ - { 28948, 0x000088E5 }, /* GL_STATIC_READ */ - { 28963, 0x000088E5 }, /* GL_STATIC_READ_ARB */ - { 28982, 0x00001802 }, /* GL_STENCIL */ - { 28993, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ - { 29019, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */ - { 29040, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */ - { 29061, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ - { 29093, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ - { 29125, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */ - { 29145, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */ - { 29172, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */ - { 29198, 0x00000D57 }, /* GL_STENCIL_BITS */ - { 29214, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ - { 29236, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ - { 29259, 0x00000B94 }, /* GL_STENCIL_FAIL */ - { 29275, 0x00000B92 }, /* GL_STENCIL_FUNC */ - { 29291, 0x00001901 }, /* GL_STENCIL_INDEX */ - { 29308, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ - { 29331, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ - { 29353, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ - { 29375, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ - { 29397, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ - { 29418, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ - { 29445, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ - { 29472, 0x00000B97 }, /* GL_STENCIL_REF */ - { 29487, 0x00000B90 }, /* GL_STENCIL_TEST */ - { 29503, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ - { 29532, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ - { 29554, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ - { 29575, 0x00000C33 }, /* GL_STEREO */ - { 29585, 0x000088E2 }, /* GL_STREAM_COPY */ - { 29600, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ - { 29619, 0x000088E0 }, /* GL_STREAM_DRAW */ - { 29634, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ - { 29653, 0x000088E1 }, /* GL_STREAM_READ */ - { 29668, 0x000088E1 }, /* GL_STREAM_READ_ARB */ - { 29687, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ - { 29704, 0x000084E7 }, /* GL_SUBTRACT */ - { 29716, 0x000084E7 }, /* GL_SUBTRACT_ARB */ - { 29732, 0x00002001 }, /* GL_T */ - { 29737, 0x00002A2A }, /* GL_T2F_C3F_V3F */ - { 29752, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ - { 29771, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ - { 29787, 0x00002A2B }, /* GL_T2F_N3F_V3F */ - { 29802, 0x00002A27 }, /* GL_T2F_V3F */ - { 29813, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ - { 29832, 0x00002A28 }, /* GL_T4F_V4F */ - { 29843, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ - { 29866, 0x00001702 }, /* GL_TEXTURE */ - { 29877, 0x000084C0 }, /* GL_TEXTURE0 */ - { 29889, 0x000084C0 }, /* GL_TEXTURE0_ARB */ - { 29905, 0x000084C1 }, /* GL_TEXTURE1 */ - { 29917, 0x000084CA }, /* GL_TEXTURE10 */ - { 29930, 0x000084CA }, /* GL_TEXTURE10_ARB */ - { 29947, 0x000084CB }, /* GL_TEXTURE11 */ - { 29960, 0x000084CB }, /* GL_TEXTURE11_ARB */ - { 29977, 0x000084CC }, /* GL_TEXTURE12 */ - { 29990, 0x000084CC }, /* GL_TEXTURE12_ARB */ - { 30007, 0x000084CD }, /* GL_TEXTURE13 */ - { 30020, 0x000084CD }, /* GL_TEXTURE13_ARB */ - { 30037, 0x000084CE }, /* GL_TEXTURE14 */ - { 30050, 0x000084CE }, /* GL_TEXTURE14_ARB */ - { 30067, 0x000084CF }, /* GL_TEXTURE15 */ - { 30080, 0x000084CF }, /* GL_TEXTURE15_ARB */ - { 30097, 0x000084D0 }, /* GL_TEXTURE16 */ - { 30110, 0x000084D0 }, /* GL_TEXTURE16_ARB */ - { 30127, 0x000084D1 }, /* GL_TEXTURE17 */ - { 30140, 0x000084D1 }, /* GL_TEXTURE17_ARB */ - { 30157, 0x000084D2 }, /* GL_TEXTURE18 */ - { 30170, 0x000084D2 }, /* GL_TEXTURE18_ARB */ - { 30187, 0x000084D3 }, /* GL_TEXTURE19 */ - { 30200, 0x000084D3 }, /* GL_TEXTURE19_ARB */ - { 30217, 0x000084C1 }, /* GL_TEXTURE1_ARB */ - { 30233, 0x000084C2 }, /* GL_TEXTURE2 */ - { 30245, 0x000084D4 }, /* GL_TEXTURE20 */ - { 30258, 0x000084D4 }, /* GL_TEXTURE20_ARB */ - { 30275, 0x000084D5 }, /* GL_TEXTURE21 */ - { 30288, 0x000084D5 }, /* GL_TEXTURE21_ARB */ - { 30305, 0x000084D6 }, /* GL_TEXTURE22 */ - { 30318, 0x000084D6 }, /* GL_TEXTURE22_ARB */ - { 30335, 0x000084D7 }, /* GL_TEXTURE23 */ - { 30348, 0x000084D7 }, /* GL_TEXTURE23_ARB */ - { 30365, 0x000084D8 }, /* GL_TEXTURE24 */ - { 30378, 0x000084D8 }, /* GL_TEXTURE24_ARB */ - { 30395, 0x000084D9 }, /* GL_TEXTURE25 */ - { 30408, 0x000084D9 }, /* GL_TEXTURE25_ARB */ - { 30425, 0x000084DA }, /* GL_TEXTURE26 */ - { 30438, 0x000084DA }, /* GL_TEXTURE26_ARB */ - { 30455, 0x000084DB }, /* GL_TEXTURE27 */ - { 30468, 0x000084DB }, /* GL_TEXTURE27_ARB */ - { 30485, 0x000084DC }, /* GL_TEXTURE28 */ - { 30498, 0x000084DC }, /* GL_TEXTURE28_ARB */ - { 30515, 0x000084DD }, /* GL_TEXTURE29 */ - { 30528, 0x000084DD }, /* GL_TEXTURE29_ARB */ - { 30545, 0x000084C2 }, /* GL_TEXTURE2_ARB */ - { 30561, 0x000084C3 }, /* GL_TEXTURE3 */ - { 30573, 0x000084DE }, /* GL_TEXTURE30 */ - { 30586, 0x000084DE }, /* GL_TEXTURE30_ARB */ - { 30603, 0x000084DF }, /* GL_TEXTURE31 */ - { 30616, 0x000084DF }, /* GL_TEXTURE31_ARB */ - { 30633, 0x000084C3 }, /* GL_TEXTURE3_ARB */ - { 30649, 0x000084C4 }, /* GL_TEXTURE4 */ - { 30661, 0x000084C4 }, /* GL_TEXTURE4_ARB */ - { 30677, 0x000084C5 }, /* GL_TEXTURE5 */ - { 30689, 0x000084C5 }, /* GL_TEXTURE5_ARB */ - { 30705, 0x000084C6 }, /* GL_TEXTURE6 */ - { 30717, 0x000084C6 }, /* GL_TEXTURE6_ARB */ - { 30733, 0x000084C7 }, /* GL_TEXTURE7 */ - { 30745, 0x000084C7 }, /* GL_TEXTURE7_ARB */ - { 30761, 0x000084C8 }, /* GL_TEXTURE8 */ - { 30773, 0x000084C8 }, /* GL_TEXTURE8_ARB */ - { 30789, 0x000084C9 }, /* GL_TEXTURE9 */ - { 30801, 0x000084C9 }, /* GL_TEXTURE9_ARB */ - { 30817, 0x00000DE0 }, /* GL_TEXTURE_1D */ - { 30831, 0x00000DE1 }, /* GL_TEXTURE_2D */ - { 30845, 0x0000806F }, /* GL_TEXTURE_3D */ - { 30859, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ - { 30881, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ - { 30907, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ - { 30929, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ - { 30951, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ - { 30973, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ - { 30995, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ - { 31023, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ - { 31055, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - { 31088, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ - { 31120, 0x00040000 }, /* GL_TEXTURE_BIT */ - { 31135, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ - { 31156, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ - { 31181, 0x00001005 }, /* GL_TEXTURE_BORDER */ - { 31199, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ - { 31223, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - { 31254, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - { 31284, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - { 31314, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - { 31349, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - { 31380, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 31418, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ - { 31445, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - { 31477, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - { 31511, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ - { 31535, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ - { 31563, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ - { 31587, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ - { 31615, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - { 31648, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ - { 31672, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ - { 31694, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ - { 31716, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ - { 31742, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ - { 31776, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - { 31809, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ - { 31846, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ - { 31874, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ - { 31906, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ - { 31929, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - { 31967, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ - { 32009, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - { 32040, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - { 32068, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - { 32098, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - { 32126, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ - { 32146, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ - { 32170, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - { 32201, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ - { 32236, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - { 32267, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ - { 32302, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - { 32333, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ - { 32368, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - { 32399, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ - { 32434, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - { 32465, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ - { 32500, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - { 32531, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ - { 32566, 0x00008071 }, /* GL_TEXTURE_DEPTH */ - { 32583, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ - { 32605, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ - { 32631, 0x00002300 }, /* GL_TEXTURE_ENV */ - { 32646, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ - { 32667, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ - { 32687, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ - { 32713, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ - { 32733, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ - { 32750, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ - { 32767, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ - { 32784, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ - { 32801, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ - { 32826, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ - { 32848, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ - { 32874, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ - { 32892, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ - { 32918, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ - { 32944, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ - { 32974, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ - { 33001, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ - { 33026, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ - { 33046, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ - { 33070, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - { 33097, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - { 33124, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - { 33151, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ - { 33177, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ - { 33207, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ - { 33229, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ - { 33247, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - { 33277, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - { 33305, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - { 33333, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - { 33361, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ - { 33382, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ - { 33401, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ - { 33423, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ - { 33442, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ - { 33462, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ - { 33487, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ - { 33511, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ - { 33531, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ - { 33555, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ - { 33575, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ - { 33598, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ - { 33623, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - { 33657, 0x00001000 }, /* GL_TEXTURE_WIDTH */ - { 33674, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ - { 33692, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ - { 33710, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ - { 33728, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ - { 33748, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ - { 33767, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - { 33796, 0x00001000 }, /* GL_TRANSFORM_BIT */ - { 33813, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ - { 33839, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ - { 33869, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - { 33901, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - { 33931, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ - { 33965, 0x0000862C }, /* GL_TRANSPOSE_NV */ - { 33981, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - { 34012, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ - { 34047, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - { 34075, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ - { 34107, 0x00000004 }, /* GL_TRIANGLES */ - { 34120, 0x00000006 }, /* GL_TRIANGLE_FAN */ - { 34136, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ - { 34157, 0x00000005 }, /* GL_TRIANGLE_STRIP */ - { 34175, 0x00000001 }, /* GL_TRUE */ - { 34183, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ - { 34203, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ - { 34226, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ - { 34246, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ - { 34267, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ - { 34289, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ - { 34311, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ - { 34331, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ - { 34352, 0x00001401 }, /* GL_UNSIGNED_BYTE */ - { 34369, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - { 34396, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ - { 34419, 0x00001405 }, /* GL_UNSIGNED_INT */ - { 34435, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ - { 34462, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ - { 34486, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - { 34517, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ - { 34541, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - { 34569, 0x00001403 }, /* GL_UNSIGNED_SHORT */ - { 34587, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - { 34617, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - { 34643, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - { 34673, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - { 34699, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ - { 34723, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - { 34751, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - { 34779, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ - { 34806, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - { 34838, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ - { 34869, 0x00008CA2 }, /* GL_UPPER_LEFT */ - { 34883, 0x00002A20 }, /* GL_V2F */ - { 34890, 0x00002A21 }, /* GL_V3F */ - { 34897, 0x00008B83 }, /* GL_VALIDATE_STATUS */ - { 34916, 0x00001F00 }, /* GL_VENDOR */ - { 34926, 0x00001F02 }, /* GL_VERSION */ - { 34937, 0x00008074 }, /* GL_VERTEX_ARRAY */ - { 34953, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - { 34983, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - { 35014, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ - { 35049, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ - { 35073, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ - { 35094, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ - { 35117, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ - { 35138, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - { 35165, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - { 35193, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - { 35221, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - { 35249, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - { 35277, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - { 35305, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - { 35333, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - { 35360, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - { 35387, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - { 35414, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - { 35441, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - { 35468, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - { 35495, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - { 35522, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - { 35549, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - { 35576, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - { 35614, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ - { 35656, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - { 35687, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ - { 35722, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ - { 35756, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ - { 35794, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - { 35825, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ - { 35860, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - { 35888, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ - { 35920, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - { 35950, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ - { 35984, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ - { 36012, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ - { 36044, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ - { 36064, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ - { 36086, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ - { 36115, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ - { 36136, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - { 36165, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ - { 36198, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ - { 36230, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - { 36257, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ - { 36288, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - { 36318, 0x00008B31 }, /* GL_VERTEX_SHADER */ - { 36335, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ - { 36356, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ - { 36383, 0x00000BA2 }, /* GL_VIEWPORT */ - { 36395, 0x00000800 }, /* GL_VIEWPORT_BIT */ - { 36411, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ - { 36431, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - { 36462, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ - { 36497, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - { 36525, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - { 36550, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - { 36577, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - { 36602, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ - { 36626, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ - { 36645, 0x000088B9 }, /* GL_WRITE_ONLY */ - { 36659, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ - { 36677, 0x00001506 }, /* GL_XOR */ - { 36684, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ - { 36703, 0x00008757 }, /* GL_YCBCR_MESA */ - { 36717, 0x00000000 }, /* GL_ZERO */ - { 36725, 0x00000D16 }, /* GL_ZOOM_X */ - { 36735, 0x00000D17 }, /* GL_ZOOM_Y */ + { 10703, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */ + { 10731, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */ + { 10765, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */ + { 10787, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */ + { 10815, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */ + { 10852, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */ + { 10871, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */ + { 10890, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */ + { 10909, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */ + { 10928, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */ + { 10947, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */ + { 10966, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */ + { 10990, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */ + { 11022, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */ + { 11048, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */ + { 11082, 0x00008C46 }, /* GL_GL_SLUMINANCE */ + { 11099, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */ + { 11117, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */ + { 11142, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */ + { 11165, 0x00008C40 }, /* GL_GL_SRGB */ + { 11176, 0x00008C41 }, /* GL_GL_SRGB8 */ + { 11188, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */ + { 11207, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */ + { 11224, 0x00000204 }, /* GL_GREATER */ + { 11235, 0x00001904 }, /* GL_GREEN */ + { 11244, 0x00000D19 }, /* GL_GREEN_BIAS */ + { 11258, 0x00000D53 }, /* GL_GREEN_BITS */ + { 11272, 0x00000D18 }, /* GL_GREEN_SCALE */ + { 11287, 0x00008000 }, /* GL_HINT_BIT */ + { 11299, 0x00008024 }, /* GL_HISTOGRAM */ + { 11312, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ + { 11336, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ + { 11364, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ + { 11387, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ + { 11414, 0x00008024 }, /* GL_HISTOGRAM_EXT */ + { 11431, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ + { 11451, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ + { 11475, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ + { 11499, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ + { 11527, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ + { 11555, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ + { 11587, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ + { 11609, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ + { 11635, 0x0000802D }, /* GL_HISTOGRAM_SINK */ + { 11653, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ + { 11675, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ + { 11694, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ + { 11717, 0x0000862A }, /* GL_IDENTITY_NV */ + { 11732, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ + { 11752, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ + { 11792, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ + { 11830, 0x00001E02 }, /* GL_INCR */ + { 11838, 0x00008507 }, /* GL_INCR_WRAP */ + { 11851, 0x00008507 }, /* GL_INCR_WRAP_EXT */ + { 11868, 0x00008077 }, /* GL_INDEX_ARRAY */ + { 11883, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ + { 11913, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ + { 11947, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ + { 11970, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ + { 11992, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ + { 12012, 0x00000D51 }, /* GL_INDEX_BITS */ + { 12026, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ + { 12047, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ + { 12065, 0x00000C30 }, /* GL_INDEX_MODE */ + { 12079, 0x00000D13 }, /* GL_INDEX_OFFSET */ + { 12095, 0x00000D12 }, /* GL_INDEX_SHIFT */ + { 12110, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ + { 12129, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */ + { 12148, 0x00001404 }, /* GL_INT */ + { 12155, 0x00008049 }, /* GL_INTENSITY */ + { 12168, 0x0000804C }, /* GL_INTENSITY12 */ + { 12183, 0x0000804C }, /* GL_INTENSITY12_EXT */ + { 12202, 0x0000804D }, /* GL_INTENSITY16 */ + { 12217, 0x0000804D }, /* GL_INTENSITY16_EXT */ + { 12236, 0x0000804A }, /* GL_INTENSITY4 */ + { 12250, 0x0000804A }, /* GL_INTENSITY4_EXT */ + { 12268, 0x0000804B }, /* GL_INTENSITY8 */ + { 12282, 0x0000804B }, /* GL_INTENSITY8_EXT */ + { 12300, 0x00008049 }, /* GL_INTENSITY_EXT */ + { 12317, 0x00008575 }, /* GL_INTERPOLATE */ + { 12332, 0x00008575 }, /* GL_INTERPOLATE_ARB */ + { 12351, 0x00008575 }, /* GL_INTERPOLATE_EXT */ + { 12370, 0x00008B53 }, /* GL_INT_VEC2 */ + { 12382, 0x00008B53 }, /* GL_INT_VEC2_ARB */ + { 12398, 0x00008B54 }, /* GL_INT_VEC3 */ + { 12410, 0x00008B54 }, /* GL_INT_VEC3_ARB */ + { 12426, 0x00008B55 }, /* GL_INT_VEC4 */ + { 12438, 0x00008B55 }, /* GL_INT_VEC4_ARB */ + { 12454, 0x00000500 }, /* GL_INVALID_ENUM */ + { 12470, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ + { 12507, 0x00000502 }, /* GL_INVALID_OPERATION */ + { 12528, 0x00000501 }, /* GL_INVALID_VALUE */ + { 12545, 0x0000862B }, /* GL_INVERSE_NV */ + { 12559, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ + { 12583, 0x0000150A }, /* GL_INVERT */ + { 12593, 0x00001E00 }, /* GL_KEEP */ + { 12601, 0x00000406 }, /* GL_LEFT */ + { 12609, 0x00000203 }, /* GL_LEQUAL */ + { 12619, 0x00000201 }, /* GL_LESS */ + { 12627, 0x00004000 }, /* GL_LIGHT0 */ + { 12637, 0x00004001 }, /* GL_LIGHT1 */ + { 12647, 0x00004002 }, /* GL_LIGHT2 */ + { 12657, 0x00004003 }, /* GL_LIGHT3 */ + { 12667, 0x00004004 }, /* GL_LIGHT4 */ + { 12677, 0x00004005 }, /* GL_LIGHT5 */ + { 12687, 0x00004006 }, /* GL_LIGHT6 */ + { 12697, 0x00004007 }, /* GL_LIGHT7 */ + { 12707, 0x00000B50 }, /* GL_LIGHTING */ + { 12719, 0x00000040 }, /* GL_LIGHTING_BIT */ + { 12735, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ + { 12758, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ + { 12787, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ + { 12820, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ + { 12848, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ + { 12872, 0x00001B01 }, /* GL_LINE */ + { 12880, 0x00002601 }, /* GL_LINEAR */ + { 12890, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ + { 12912, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ + { 12942, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ + { 12973, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ + { 12997, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ + { 13022, 0x00000001 }, /* GL_LINES */ + { 13031, 0x00000004 }, /* GL_LINE_BIT */ + { 13043, 0x00000002 }, /* GL_LINE_LOOP */ + { 13056, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ + { 13076, 0x00000B20 }, /* GL_LINE_SMOOTH */ + { 13091, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ + { 13111, 0x00000B24 }, /* GL_LINE_STIPPLE */ + { 13127, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ + { 13151, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ + { 13174, 0x00000003 }, /* GL_LINE_STRIP */ + { 13188, 0x00000702 }, /* GL_LINE_TOKEN */ + { 13202, 0x00000B21 }, /* GL_LINE_WIDTH */ + { 13216, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ + { 13242, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ + { 13262, 0x00008B82 }, /* GL_LINK_STATUS */ + { 13277, 0x00000B32 }, /* GL_LIST_BASE */ + { 13290, 0x00020000 }, /* GL_LIST_BIT */ + { 13302, 0x00000B33 }, /* GL_LIST_INDEX */ + { 13316, 0x00000B30 }, /* GL_LIST_MODE */ + { 13329, 0x00000101 }, /* GL_LOAD */ + { 13337, 0x00000BF1 }, /* GL_LOGIC_OP */ + { 13349, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ + { 13366, 0x00008CA1 }, /* GL_LOWER_LEFT */ + { 13380, 0x00001909 }, /* GL_LUMINANCE */ + { 13393, 0x00008041 }, /* GL_LUMINANCE12 */ + { 13408, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ + { 13431, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ + { 13458, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ + { 13480, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ + { 13506, 0x00008041 }, /* GL_LUMINANCE12_EXT */ + { 13525, 0x00008042 }, /* GL_LUMINANCE16 */ + { 13540, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ + { 13563, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ + { 13590, 0x00008042 }, /* GL_LUMINANCE16_EXT */ + { 13609, 0x0000803F }, /* GL_LUMINANCE4 */ + { 13623, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ + { 13644, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ + { 13669, 0x0000803F }, /* GL_LUMINANCE4_EXT */ + { 13687, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ + { 13708, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ + { 13733, 0x00008040 }, /* GL_LUMINANCE8 */ + { 13747, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ + { 13768, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ + { 13793, 0x00008040 }, /* GL_LUMINANCE8_EXT */ + { 13811, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ + { 13830, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ + { 13846, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ + { 13866, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ + { 13888, 0x00000D91 }, /* GL_MAP1_INDEX */ + { 13902, 0x00000D92 }, /* GL_MAP1_NORMAL */ + { 13917, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ + { 13941, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ + { 13965, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ + { 13989, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ + { 14013, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ + { 14030, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ + { 14047, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ + { 14075, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ + { 14104, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ + { 14133, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ + { 14162, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ + { 14191, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ + { 14220, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ + { 14249, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ + { 14277, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ + { 14305, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ + { 14333, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ + { 14361, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ + { 14389, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ + { 14417, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ + { 14445, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ + { 14473, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ + { 14501, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ + { 14517, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ + { 14537, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ + { 14559, 0x00000DB1 }, /* GL_MAP2_INDEX */ + { 14573, 0x00000DB2 }, /* GL_MAP2_NORMAL */ + { 14588, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ + { 14612, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ + { 14636, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ + { 14660, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ + { 14684, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ + { 14701, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ + { 14718, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ + { 14746, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ + { 14775, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ + { 14804, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ + { 14833, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ + { 14862, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ + { 14891, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ + { 14920, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ + { 14948, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ + { 14976, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ + { 15004, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ + { 15032, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ + { 15060, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ + { 15088, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ + { 15116, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ + { 15144, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ + { 15172, 0x00000D10 }, /* GL_MAP_COLOR */ + { 15185, 0x00000D11 }, /* GL_MAP_STENCIL */ + { 15200, 0x000088C0 }, /* GL_MATRIX0_ARB */ + { 15215, 0x00008630 }, /* GL_MATRIX0_NV */ + { 15229, 0x000088CA }, /* GL_MATRIX10_ARB */ + { 15245, 0x000088CB }, /* GL_MATRIX11_ARB */ + { 15261, 0x000088CC }, /* GL_MATRIX12_ARB */ + { 15277, 0x000088CD }, /* GL_MATRIX13_ARB */ + { 15293, 0x000088CE }, /* GL_MATRIX14_ARB */ + { 15309, 0x000088CF }, /* GL_MATRIX15_ARB */ + { 15325, 0x000088D0 }, /* GL_MATRIX16_ARB */ + { 15341, 0x000088D1 }, /* GL_MATRIX17_ARB */ + { 15357, 0x000088D2 }, /* GL_MATRIX18_ARB */ + { 15373, 0x000088D3 }, /* GL_MATRIX19_ARB */ + { 15389, 0x000088C1 }, /* GL_MATRIX1_ARB */ + { 15404, 0x00008631 }, /* GL_MATRIX1_NV */ + { 15418, 0x000088D4 }, /* GL_MATRIX20_ARB */ + { 15434, 0x000088D5 }, /* GL_MATRIX21_ARB */ + { 15450, 0x000088D6 }, /* GL_MATRIX22_ARB */ + { 15466, 0x000088D7 }, /* GL_MATRIX23_ARB */ + { 15482, 0x000088D8 }, /* GL_MATRIX24_ARB */ + { 15498, 0x000088D9 }, /* GL_MATRIX25_ARB */ + { 15514, 0x000088DA }, /* GL_MATRIX26_ARB */ + { 15530, 0x000088DB }, /* GL_MATRIX27_ARB */ + { 15546, 0x000088DC }, /* GL_MATRIX28_ARB */ + { 15562, 0x000088DD }, /* GL_MATRIX29_ARB */ + { 15578, 0x000088C2 }, /* GL_MATRIX2_ARB */ + { 15593, 0x00008632 }, /* GL_MATRIX2_NV */ + { 15607, 0x000088DE }, /* GL_MATRIX30_ARB */ + { 15623, 0x000088DF }, /* GL_MATRIX31_ARB */ + { 15639, 0x000088C3 }, /* GL_MATRIX3_ARB */ + { 15654, 0x00008633 }, /* GL_MATRIX3_NV */ + { 15668, 0x000088C4 }, /* GL_MATRIX4_ARB */ + { 15683, 0x00008634 }, /* GL_MATRIX4_NV */ + { 15697, 0x000088C5 }, /* GL_MATRIX5_ARB */ + { 15712, 0x00008635 }, /* GL_MATRIX5_NV */ + { 15726, 0x000088C6 }, /* GL_MATRIX6_ARB */ + { 15741, 0x00008636 }, /* GL_MATRIX6_NV */ + { 15755, 0x000088C7 }, /* GL_MATRIX7_ARB */ + { 15770, 0x00008637 }, /* GL_MATRIX7_NV */ + { 15784, 0x000088C8 }, /* GL_MATRIX8_ARB */ + { 15799, 0x000088C9 }, /* GL_MATRIX9_ARB */ + { 15814, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ + { 15840, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ + { 15874, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ + { 15905, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ + { 15938, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ + { 15969, 0x00000BA0 }, /* GL_MATRIX_MODE */ + { 15984, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ + { 16006, 0x00008008 }, /* GL_MAX */ + { 16013, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ + { 16036, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ + { 16062, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ + { 16095, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ + { 16121, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + { 16155, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ + { 16174, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ + { 16203, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ + { 16235, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ + { 16271, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ + { 16307, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ + { 16347, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ + { 16373, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ + { 16403, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ + { 16428, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ + { 16457, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ + { 16486, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ + { 16519, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */ + { 16539, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ + { 16563, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ + { 16587, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ + { 16611, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ + { 16636, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ + { 16654, 0x00008008 }, /* GL_MAX_EXT */ + { 16665, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ + { 16700, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ + { 16739, 0x00000D31 }, /* GL_MAX_LIGHTS */ + { 16753, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ + { 16773, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ + { 16811, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ + { 16840, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ + { 16864, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ + { 16892, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ + { 16915, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ + { 16952, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ + { 16988, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ + { 17015, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ + { 17044, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ + { 17078, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ + { 17114, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ + { 17141, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ + { 17173, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ + { 17209, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ + { 17238, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ + { 17267, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ + { 17295, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ + { 17333, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + { 17377, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + { 17420, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ + { 17454, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + { 17493, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ + { 17530, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ + { 17568, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + { 17611, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + { 17654, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ + { 17684, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ + { 17715, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ + { 17751, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ + { 17787, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ + { 17817, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ + { 17851, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ + { 17884, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ + { 17913, 0x00008504 }, /* GL_MAX_SHININESS_NV */ + { 17933, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ + { 17957, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */ + { 17979, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ + { 18005, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */ + { 18032, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ + { 18063, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ + { 18087, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ + { 18121, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ + { 18141, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ + { 18168, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ + { 18189, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ + { 18214, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ + { 18239, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ + { 18274, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */ + { 18296, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ + { 18322, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */ + { 18344, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ + { 18370, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ + { 18404, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ + { 18442, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ + { 18475, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ + { 18512, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ + { 18536, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ + { 18557, 0x00008007 }, /* GL_MIN */ + { 18564, 0x0000802E }, /* GL_MINMAX */ + { 18574, 0x0000802E }, /* GL_MINMAX_EXT */ + { 18588, 0x0000802F }, /* GL_MINMAX_FORMAT */ + { 18605, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ + { 18626, 0x00008030 }, /* GL_MINMAX_SINK */ + { 18641, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ + { 18660, 0x00008007 }, /* GL_MIN_EXT */ + { 18671, 0x00008370 }, /* GL_MIRRORED_REPEAT */ + { 18690, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ + { 18713, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ + { 18736, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ + { 18756, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ + { 18776, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ + { 18806, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ + { 18834, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ + { 18862, 0x00001700 }, /* GL_MODELVIEW */ + { 18875, 0x00001700 }, /* GL_MODELVIEW0_ARB */ + { 18893, 0x0000872A }, /* GL_MODELVIEW10_ARB */ + { 18912, 0x0000872B }, /* GL_MODELVIEW11_ARB */ + { 18931, 0x0000872C }, /* GL_MODELVIEW12_ARB */ + { 18950, 0x0000872D }, /* GL_MODELVIEW13_ARB */ + { 18969, 0x0000872E }, /* GL_MODELVIEW14_ARB */ + { 18988, 0x0000872F }, /* GL_MODELVIEW15_ARB */ + { 19007, 0x00008730 }, /* GL_MODELVIEW16_ARB */ + { 19026, 0x00008731 }, /* GL_MODELVIEW17_ARB */ + { 19045, 0x00008732 }, /* GL_MODELVIEW18_ARB */ + { 19064, 0x00008733 }, /* GL_MODELVIEW19_ARB */ + { 19083, 0x0000850A }, /* GL_MODELVIEW1_ARB */ + { 19101, 0x00008734 }, /* GL_MODELVIEW20_ARB */ + { 19120, 0x00008735 }, /* GL_MODELVIEW21_ARB */ + { 19139, 0x00008736 }, /* GL_MODELVIEW22_ARB */ + { 19158, 0x00008737 }, /* GL_MODELVIEW23_ARB */ + { 19177, 0x00008738 }, /* GL_MODELVIEW24_ARB */ + { 19196, 0x00008739 }, /* GL_MODELVIEW25_ARB */ + { 19215, 0x0000873A }, /* GL_MODELVIEW26_ARB */ + { 19234, 0x0000873B }, /* GL_MODELVIEW27_ARB */ + { 19253, 0x0000873C }, /* GL_MODELVIEW28_ARB */ + { 19272, 0x0000873D }, /* GL_MODELVIEW29_ARB */ + { 19291, 0x00008722 }, /* GL_MODELVIEW2_ARB */ + { 19309, 0x0000873E }, /* GL_MODELVIEW30_ARB */ + { 19328, 0x0000873F }, /* GL_MODELVIEW31_ARB */ + { 19347, 0x00008723 }, /* GL_MODELVIEW3_ARB */ + { 19365, 0x00008724 }, /* GL_MODELVIEW4_ARB */ + { 19383, 0x00008725 }, /* GL_MODELVIEW5_ARB */ + { 19401, 0x00008726 }, /* GL_MODELVIEW6_ARB */ + { 19419, 0x00008727 }, /* GL_MODELVIEW7_ARB */ + { 19437, 0x00008728 }, /* GL_MODELVIEW8_ARB */ + { 19455, 0x00008729 }, /* GL_MODELVIEW9_ARB */ + { 19473, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ + { 19493, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ + { 19520, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ + { 19545, 0x00002100 }, /* GL_MODULATE */ + { 19557, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ + { 19577, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ + { 19604, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ + { 19629, 0x00000103 }, /* GL_MULT */ + { 19637, 0x0000809D }, /* GL_MULTISAMPLE */ + { 19652, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ + { 19672, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ + { 19691, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ + { 19710, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ + { 19734, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ + { 19757, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ + { 19787, 0x00002A25 }, /* GL_N3F_V3F */ + { 19798, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ + { 19818, 0x0000150E }, /* GL_NAND */ + { 19826, 0x00002600 }, /* GL_NEAREST */ + { 19837, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ + { 19868, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ + { 19900, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ + { 19925, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ + { 19951, 0x00000200 }, /* GL_NEVER */ + { 19960, 0x00001102 }, /* GL_NICEST */ + { 19970, 0x00000000 }, /* GL_NONE */ + { 19978, 0x00001505 }, /* GL_NOOP */ + { 19986, 0x00001508 }, /* GL_NOR */ + { 19993, 0x00000BA1 }, /* GL_NORMALIZE */ + { 20006, 0x00008075 }, /* GL_NORMAL_ARRAY */ + { 20022, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ + { 20053, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ + { 20088, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ + { 20112, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ + { 20135, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ + { 20156, 0x00008511 }, /* GL_NORMAL_MAP */ + { 20170, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ + { 20188, 0x00008511 }, /* GL_NORMAL_MAP_NV */ + { 20205, 0x00000205 }, /* GL_NOTEQUAL */ + { 20217, 0x00000000 }, /* GL_NO_ERROR */ + { 20229, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ + { 20263, 0x000086A2 }, /* GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB */ + { 20301, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ + { 20333, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ + { 20375, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ + { 20405, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ + { 20445, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ + { 20476, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ + { 20505, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ + { 20533, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ + { 20563, 0x00002401 }, /* GL_OBJECT_LINEAR */ + { 20580, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ + { 20606, 0x00002501 }, /* GL_OBJECT_PLANE */ + { 20622, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ + { 20657, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ + { 20679, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ + { 20698, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ + { 20728, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ + { 20749, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ + { 20777, 0x00000001 }, /* GL_ONE */ + { 20784, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ + { 20812, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ + { 20844, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ + { 20872, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ + { 20904, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ + { 20927, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ + { 20950, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ + { 20973, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ + { 20996, 0x00008598 }, /* GL_OPERAND0_ALPHA */ + { 21014, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ + { 21036, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ + { 21058, 0x00008590 }, /* GL_OPERAND0_RGB */ + { 21074, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ + { 21094, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ + { 21114, 0x00008599 }, /* GL_OPERAND1_ALPHA */ + { 21132, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ + { 21154, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ + { 21176, 0x00008591 }, /* GL_OPERAND1_RGB */ + { 21192, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ + { 21212, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ + { 21232, 0x0000859A }, /* GL_OPERAND2_ALPHA */ + { 21250, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ + { 21272, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ + { 21294, 0x00008592 }, /* GL_OPERAND2_RGB */ + { 21310, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ + { 21330, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ + { 21350, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ + { 21371, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ + { 21390, 0x00001507 }, /* GL_OR */ + { 21396, 0x00000A01 }, /* GL_ORDER */ + { 21405, 0x0000150D }, /* GL_OR_INVERTED */ + { 21420, 0x0000150B }, /* GL_OR_REVERSE */ + { 21434, 0x00000505 }, /* GL_OUT_OF_MEMORY */ + { 21451, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ + { 21469, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ + { 21490, 0x00008758 }, /* GL_PACK_INVERT_MESA */ + { 21510, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ + { 21528, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ + { 21547, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ + { 21567, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ + { 21587, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ + { 21605, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ + { 21624, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ + { 21649, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ + { 21673, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ + { 21694, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ + { 21716, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ + { 21738, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ + { 21763, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ + { 21787, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ + { 21808, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ + { 21830, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ + { 21852, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ + { 21874, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ + { 21905, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ + { 21925, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ + { 21950, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ + { 21970, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ + { 21995, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ + { 22015, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ + { 22040, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ + { 22060, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ + { 22085, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ + { 22105, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ + { 22130, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ + { 22150, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ + { 22175, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ + { 22195, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ + { 22220, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ + { 22240, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ + { 22265, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ + { 22285, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ + { 22310, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ + { 22330, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ + { 22355, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ + { 22373, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ + { 22406, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ + { 22431, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ + { 22466, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ + { 22493, 0x00001B00 }, /* GL_POINT */ + { 22502, 0x00000000 }, /* GL_POINTS */ + { 22512, 0x00000002 }, /* GL_POINT_BIT */ + { 22525, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ + { 22555, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ + { 22589, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ + { 22623, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ + { 22658, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ + { 22687, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ + { 22720, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ + { 22753, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ + { 22787, 0x00000B11 }, /* GL_POINT_SIZE */ + { 22801, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ + { 22827, 0x00008127 }, /* GL_POINT_SIZE_MAX */ + { 22845, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ + { 22867, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ + { 22889, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ + { 22912, 0x00008126 }, /* GL_POINT_SIZE_MIN */ + { 22930, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ + { 22952, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ + { 22974, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ + { 22997, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ + { 23017, 0x00000B10 }, /* GL_POINT_SMOOTH */ + { 23033, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ + { 23054, 0x00008861 }, /* GL_POINT_SPRITE */ + { 23070, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ + { 23090, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ + { 23119, 0x00008861 }, /* GL_POINT_SPRITE_NV */ + { 23138, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ + { 23164, 0x00000701 }, /* GL_POINT_TOKEN */ + { 23179, 0x00000009 }, /* GL_POLYGON */ + { 23190, 0x00000008 }, /* GL_POLYGON_BIT */ + { 23205, 0x00000B40 }, /* GL_POLYGON_MODE */ + { 23221, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ + { 23244, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ + { 23269, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ + { 23292, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ + { 23315, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ + { 23339, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ + { 23363, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ + { 23381, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ + { 23404, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ + { 23423, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ + { 23446, 0x00000703 }, /* GL_POLYGON_TOKEN */ + { 23463, 0x00001203 }, /* GL_POSITION */ + { 23475, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ + { 23507, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ + { 23543, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ + { 23576, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ + { 23613, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ + { 23644, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ + { 23679, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ + { 23711, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ + { 23747, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ + { 23780, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ + { 23812, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ + { 23848, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ + { 23881, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ + { 23918, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ + { 23948, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ + { 23982, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ + { 24013, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ + { 24048, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ + { 24079, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ + { 24114, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ + { 24146, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ + { 24182, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ + { 24212, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ + { 24246, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ + { 24277, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ + { 24312, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ + { 24344, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ + { 24375, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ + { 24410, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ + { 24442, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ + { 24478, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ + { 24507, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ + { 24540, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ + { 24570, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ + { 24604, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ + { 24643, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ + { 24676, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ + { 24716, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ + { 24750, 0x00008578 }, /* GL_PREVIOUS */ + { 24762, 0x00008578 }, /* GL_PREVIOUS_ARB */ + { 24778, 0x00008578 }, /* GL_PREVIOUS_EXT */ + { 24794, 0x00008577 }, /* GL_PRIMARY_COLOR */ + { 24811, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ + { 24832, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ + { 24853, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ + { 24886, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ + { 24918, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ + { 24941, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ + { 24964, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ + { 24994, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ + { 25023, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ + { 25051, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ + { 25073, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ + { 25101, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ + { 25129, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ + { 25151, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ + { 25172, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + { 25212, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + { 25251, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ + { 25281, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + { 25316, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ + { 25349, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ + { 25383, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + { 25422, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + { 25461, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ + { 25483, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ + { 25509, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ + { 25533, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ + { 25556, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ + { 25578, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ + { 25599, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ + { 25620, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ + { 25647, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ + { 25679, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ + { 25711, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ + { 25746, 0x00001701 }, /* GL_PROJECTION */ + { 25760, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ + { 25781, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ + { 25807, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ + { 25828, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ + { 25847, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ + { 25870, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ + { 25909, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ + { 25947, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ + { 25967, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ + { 25991, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ + { 26011, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ + { 26035, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ + { 26055, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ + { 26088, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ + { 26114, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ + { 26144, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ + { 26175, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ + { 26205, 0x00002003 }, /* GL_Q */ + { 26210, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ + { 26235, 0x00000007 }, /* GL_QUADS */ + { 26244, 0x00008614 }, /* GL_QUAD_MESH_SUN */ + { 26261, 0x00000008 }, /* GL_QUAD_STRIP */ + { 26275, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ + { 26297, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ + { 26323, 0x00008866 }, /* GL_QUERY_RESULT */ + { 26339, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ + { 26359, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ + { 26385, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ + { 26415, 0x00002002 }, /* GL_R */ + { 26420, 0x00002A10 }, /* GL_R3_G3_B2 */ + { 26432, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ + { 26465, 0x00000C02 }, /* GL_READ_BUFFER */ + { 26480, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ + { 26512, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ + { 26536, 0x000088B8 }, /* GL_READ_ONLY */ + { 26549, 0x000088B8 }, /* GL_READ_ONLY_ARB */ + { 26566, 0x000088BA }, /* GL_READ_WRITE */ + { 26580, 0x000088BA }, /* GL_READ_WRITE_ARB */ + { 26598, 0x00001903 }, /* GL_RED */ + { 26605, 0x00008016 }, /* GL_REDUCE */ + { 26615, 0x00008016 }, /* GL_REDUCE_EXT */ + { 26629, 0x00000D15 }, /* GL_RED_BIAS */ + { 26641, 0x00000D52 }, /* GL_RED_BITS */ + { 26653, 0x00000D14 }, /* GL_RED_SCALE */ + { 26666, 0x00008512 }, /* GL_REFLECTION_MAP */ + { 26684, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ + { 26706, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ + { 26727, 0x00001C00 }, /* GL_RENDER */ + { 26737, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ + { 26765, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ + { 26785, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ + { 26812, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ + { 26848, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ + { 26874, 0x00001F01 }, /* GL_RENDERER */ + { 26886, 0x00000C40 }, /* GL_RENDER_MODE */ + { 26901, 0x00002901 }, /* GL_REPEAT */ + { 26911, 0x00001E01 }, /* GL_REPLACE */ + { 26922, 0x00008062 }, /* GL_REPLACE_EXT */ + { 26937, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ + { 26960, 0x0000803A }, /* GL_RESCALE_NORMAL */ + { 26978, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ + { 27000, 0x00000102 }, /* GL_RETURN */ + { 27010, 0x00001907 }, /* GL_RGB */ + { 27017, 0x00008052 }, /* GL_RGB10 */ + { 27026, 0x00008059 }, /* GL_RGB10_A2 */ + { 27038, 0x00008059 }, /* GL_RGB10_A2_EXT */ + { 27054, 0x00008052 }, /* GL_RGB10_EXT */ + { 27067, 0x00008053 }, /* GL_RGB12 */ + { 27076, 0x00008053 }, /* GL_RGB12_EXT */ + { 27089, 0x00008054 }, /* GL_RGB16 */ + { 27098, 0x00008054 }, /* GL_RGB16_EXT */ + { 27111, 0x0000804E }, /* GL_RGB2_EXT */ + { 27123, 0x0000804F }, /* GL_RGB4 */ + { 27131, 0x0000804F }, /* GL_RGB4_EXT */ + { 27143, 0x000083A1 }, /* GL_RGB4_S3TC */ + { 27156, 0x00008050 }, /* GL_RGB5 */ + { 27164, 0x00008057 }, /* GL_RGB5_A1 */ + { 27175, 0x00008057 }, /* GL_RGB5_A1_EXT */ + { 27190, 0x00008050 }, /* GL_RGB5_EXT */ + { 27202, 0x00008051 }, /* GL_RGB8 */ + { 27210, 0x00008051 }, /* GL_RGB8_EXT */ + { 27222, 0x00001908 }, /* GL_RGBA */ + { 27230, 0x0000805A }, /* GL_RGBA12 */ + { 27240, 0x0000805A }, /* GL_RGBA12_EXT */ + { 27254, 0x0000805B }, /* GL_RGBA16 */ + { 27264, 0x0000805B }, /* GL_RGBA16_EXT */ + { 27278, 0x00008055 }, /* GL_RGBA2 */ + { 27287, 0x00008055 }, /* GL_RGBA2_EXT */ + { 27300, 0x00008056 }, /* GL_RGBA4 */ + { 27309, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ + { 27328, 0x00008056 }, /* GL_RGBA4_EXT */ + { 27341, 0x000083A3 }, /* GL_RGBA4_S3TC */ + { 27355, 0x00008058 }, /* GL_RGBA8 */ + { 27364, 0x00008058 }, /* GL_RGBA8_EXT */ + { 27377, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ + { 27395, 0x00000C31 }, /* GL_RGBA_MODE */ + { 27408, 0x000083A2 }, /* GL_RGBA_S3TC */ + { 27421, 0x000083A0 }, /* GL_RGB_S3TC */ + { 27433, 0x00008573 }, /* GL_RGB_SCALE */ + { 27446, 0x00008573 }, /* GL_RGB_SCALE_ARB */ + { 27463, 0x00008573 }, /* GL_RGB_SCALE_EXT */ + { 27480, 0x00000407 }, /* GL_RIGHT */ + { 27489, 0x00002000 }, /* GL_S */ + { 27494, 0x00008B5D }, /* GL_SAMPLER_1D */ + { 27508, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */ + { 27529, 0x00008B5E }, /* GL_SAMPLER_2D */ + { 27543, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */ + { 27564, 0x00008B5F }, /* GL_SAMPLER_3D */ + { 27578, 0x00008B60 }, /* GL_SAMPLER_CUBE */ + { 27594, 0x000080A9 }, /* GL_SAMPLES */ + { 27605, 0x000086B4 }, /* GL_SAMPLES_3DFX */ + { 27621, 0x000080A9 }, /* GL_SAMPLES_ARB */ + { 27636, 0x00008914 }, /* GL_SAMPLES_PASSED */ + { 27654, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ + { 27676, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ + { 27704, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ + { 27736, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ + { 27759, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ + { 27786, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ + { 27804, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ + { 27827, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ + { 27849, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ + { 27868, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ + { 27891, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ + { 27917, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ + { 27947, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ + { 27972, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ + { 28001, 0x00080000 }, /* GL_SCISSOR_BIT */ + { 28016, 0x00000C10 }, /* GL_SCISSOR_BOX */ + { 28031, 0x00000C11 }, /* GL_SCISSOR_TEST */ + { 28047, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ + { 28072, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ + { 28112, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ + { 28156, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ + { 28189, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ + { 28219, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ + { 28251, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ + { 28281, 0x00001C02 }, /* GL_SELECT */ + { 28291, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ + { 28319, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ + { 28344, 0x00008012 }, /* GL_SEPARABLE_2D */ + { 28360, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ + { 28387, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ + { 28418, 0x0000150F }, /* GL_SET */ + { 28425, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ + { 28446, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */ + { 28470, 0x00008B4F }, /* GL_SHADER_TYPE */ + { 28485, 0x00000B54 }, /* GL_SHADE_MODEL */ + { 28500, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */ + { 28528, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ + { 28551, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ + { 28581, 0x00001601 }, /* GL_SHININESS */ + { 28594, 0x00001402 }, /* GL_SHORT */ + { 28603, 0x000081F9 }, /* GL_SINGLE_COLOR */ + { 28619, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ + { 28639, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ + { 28658, 0x00001D01 }, /* GL_SMOOTH */ + { 28668, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ + { 28701, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ + { 28728, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ + { 28761, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ + { 28788, 0x00008588 }, /* GL_SOURCE0_ALPHA */ + { 28805, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ + { 28826, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ + { 28847, 0x00008580 }, /* GL_SOURCE0_RGB */ + { 28862, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ + { 28881, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ + { 28900, 0x00008589 }, /* GL_SOURCE1_ALPHA */ + { 28917, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ + { 28938, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ + { 28959, 0x00008581 }, /* GL_SOURCE1_RGB */ + { 28974, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ + { 28993, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ + { 29012, 0x0000858A }, /* GL_SOURCE2_ALPHA */ + { 29029, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ + { 29050, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ + { 29071, 0x00008582 }, /* GL_SOURCE2_RGB */ + { 29086, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ + { 29105, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ + { 29124, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ + { 29144, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ + { 29162, 0x00001202 }, /* GL_SPECULAR */ + { 29174, 0x00002402 }, /* GL_SPHERE_MAP */ + { 29188, 0x00001206 }, /* GL_SPOT_CUTOFF */ + { 29203, 0x00001204 }, /* GL_SPOT_DIRECTION */ + { 29221, 0x00001205 }, /* GL_SPOT_EXPONENT */ + { 29238, 0x00008588 }, /* GL_SRC0_ALPHA */ + { 29252, 0x00008580 }, /* GL_SRC0_RGB */ + { 29264, 0x00008589 }, /* GL_SRC1_ALPHA */ + { 29278, 0x00008581 }, /* GL_SRC1_RGB */ + { 29290, 0x0000858A }, /* GL_SRC2_ALPHA */ + { 29304, 0x00008582 }, /* GL_SRC2_RGB */ + { 29316, 0x00000302 }, /* GL_SRC_ALPHA */ + { 29329, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ + { 29351, 0x00000300 }, /* GL_SRC_COLOR */ + { 29364, 0x00000503 }, /* GL_STACK_OVERFLOW */ + { 29382, 0x00000504 }, /* GL_STACK_UNDERFLOW */ + { 29401, 0x000088E6 }, /* GL_STATIC_COPY */ + { 29416, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ + { 29435, 0x000088E4 }, /* GL_STATIC_DRAW */ + { 29450, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ + { 29469, 0x000088E5 }, /* GL_STATIC_READ */ + { 29484, 0x000088E5 }, /* GL_STATIC_READ_ARB */ + { 29503, 0x00001802 }, /* GL_STENCIL */ + { 29514, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ + { 29540, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */ + { 29561, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */ + { 29582, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ + { 29614, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ + { 29646, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */ + { 29666, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */ + { 29693, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */ + { 29719, 0x00000D57 }, /* GL_STENCIL_BITS */ + { 29735, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ + { 29757, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ + { 29780, 0x00000B94 }, /* GL_STENCIL_FAIL */ + { 29796, 0x00000B92 }, /* GL_STENCIL_FUNC */ + { 29812, 0x00001901 }, /* GL_STENCIL_INDEX */ + { 29829, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ + { 29852, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ + { 29874, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ + { 29896, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ + { 29918, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ + { 29939, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ + { 29966, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ + { 29993, 0x00000B97 }, /* GL_STENCIL_REF */ + { 30008, 0x00000B90 }, /* GL_STENCIL_TEST */ + { 30024, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ + { 30053, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ + { 30075, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ + { 30096, 0x00000C33 }, /* GL_STEREO */ + { 30106, 0x000088E2 }, /* GL_STREAM_COPY */ + { 30121, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ + { 30140, 0x000088E0 }, /* GL_STREAM_DRAW */ + { 30155, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ + { 30174, 0x000088E1 }, /* GL_STREAM_READ */ + { 30189, 0x000088E1 }, /* GL_STREAM_READ_ARB */ + { 30208, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ + { 30225, 0x000084E7 }, /* GL_SUBTRACT */ + { 30237, 0x000084E7 }, /* GL_SUBTRACT_ARB */ + { 30253, 0x00002001 }, /* GL_T */ + { 30258, 0x00002A2A }, /* GL_T2F_C3F_V3F */ + { 30273, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ + { 30292, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ + { 30308, 0x00002A2B }, /* GL_T2F_N3F_V3F */ + { 30323, 0x00002A27 }, /* GL_T2F_V3F */ + { 30334, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ + { 30353, 0x00002A28 }, /* GL_T4F_V4F */ + { 30364, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ + { 30387, 0x00001702 }, /* GL_TEXTURE */ + { 30398, 0x000084C0 }, /* GL_TEXTURE0 */ + { 30410, 0x000084C0 }, /* GL_TEXTURE0_ARB */ + { 30426, 0x000084C1 }, /* GL_TEXTURE1 */ + { 30438, 0x000084CA }, /* GL_TEXTURE10 */ + { 30451, 0x000084CA }, /* GL_TEXTURE10_ARB */ + { 30468, 0x000084CB }, /* GL_TEXTURE11 */ + { 30481, 0x000084CB }, /* GL_TEXTURE11_ARB */ + { 30498, 0x000084CC }, /* GL_TEXTURE12 */ + { 30511, 0x000084CC }, /* GL_TEXTURE12_ARB */ + { 30528, 0x000084CD }, /* GL_TEXTURE13 */ + { 30541, 0x000084CD }, /* GL_TEXTURE13_ARB */ + { 30558, 0x000084CE }, /* GL_TEXTURE14 */ + { 30571, 0x000084CE }, /* GL_TEXTURE14_ARB */ + { 30588, 0x000084CF }, /* GL_TEXTURE15 */ + { 30601, 0x000084CF }, /* GL_TEXTURE15_ARB */ + { 30618, 0x000084D0 }, /* GL_TEXTURE16 */ + { 30631, 0x000084D0 }, /* GL_TEXTURE16_ARB */ + { 30648, 0x000084D1 }, /* GL_TEXTURE17 */ + { 30661, 0x000084D1 }, /* GL_TEXTURE17_ARB */ + { 30678, 0x000084D2 }, /* GL_TEXTURE18 */ + { 30691, 0x000084D2 }, /* GL_TEXTURE18_ARB */ + { 30708, 0x000084D3 }, /* GL_TEXTURE19 */ + { 30721, 0x000084D3 }, /* GL_TEXTURE19_ARB */ + { 30738, 0x000084C1 }, /* GL_TEXTURE1_ARB */ + { 30754, 0x000084C2 }, /* GL_TEXTURE2 */ + { 30766, 0x000084D4 }, /* GL_TEXTURE20 */ + { 30779, 0x000084D4 }, /* GL_TEXTURE20_ARB */ + { 30796, 0x000084D5 }, /* GL_TEXTURE21 */ + { 30809, 0x000084D5 }, /* GL_TEXTURE21_ARB */ + { 30826, 0x000084D6 }, /* GL_TEXTURE22 */ + { 30839, 0x000084D6 }, /* GL_TEXTURE22_ARB */ + { 30856, 0x000084D7 }, /* GL_TEXTURE23 */ + { 30869, 0x000084D7 }, /* GL_TEXTURE23_ARB */ + { 30886, 0x000084D8 }, /* GL_TEXTURE24 */ + { 30899, 0x000084D8 }, /* GL_TEXTURE24_ARB */ + { 30916, 0x000084D9 }, /* GL_TEXTURE25 */ + { 30929, 0x000084D9 }, /* GL_TEXTURE25_ARB */ + { 30946, 0x000084DA }, /* GL_TEXTURE26 */ + { 30959, 0x000084DA }, /* GL_TEXTURE26_ARB */ + { 30976, 0x000084DB }, /* GL_TEXTURE27 */ + { 30989, 0x000084DB }, /* GL_TEXTURE27_ARB */ + { 31006, 0x000084DC }, /* GL_TEXTURE28 */ + { 31019, 0x000084DC }, /* GL_TEXTURE28_ARB */ + { 31036, 0x000084DD }, /* GL_TEXTURE29 */ + { 31049, 0x000084DD }, /* GL_TEXTURE29_ARB */ + { 31066, 0x000084C2 }, /* GL_TEXTURE2_ARB */ + { 31082, 0x000084C3 }, /* GL_TEXTURE3 */ + { 31094, 0x000084DE }, /* GL_TEXTURE30 */ + { 31107, 0x000084DE }, /* GL_TEXTURE30_ARB */ + { 31124, 0x000084DF }, /* GL_TEXTURE31 */ + { 31137, 0x000084DF }, /* GL_TEXTURE31_ARB */ + { 31154, 0x000084C3 }, /* GL_TEXTURE3_ARB */ + { 31170, 0x000084C4 }, /* GL_TEXTURE4 */ + { 31182, 0x000084C4 }, /* GL_TEXTURE4_ARB */ + { 31198, 0x000084C5 }, /* GL_TEXTURE5 */ + { 31210, 0x000084C5 }, /* GL_TEXTURE5_ARB */ + { 31226, 0x000084C6 }, /* GL_TEXTURE6 */ + { 31238, 0x000084C6 }, /* GL_TEXTURE6_ARB */ + { 31254, 0x000084C7 }, /* GL_TEXTURE7 */ + { 31266, 0x000084C7 }, /* GL_TEXTURE7_ARB */ + { 31282, 0x000084C8 }, /* GL_TEXTURE8 */ + { 31294, 0x000084C8 }, /* GL_TEXTURE8_ARB */ + { 31310, 0x000084C9 }, /* GL_TEXTURE9 */ + { 31322, 0x000084C9 }, /* GL_TEXTURE9_ARB */ + { 31338, 0x00000DE0 }, /* GL_TEXTURE_1D */ + { 31352, 0x00000DE1 }, /* GL_TEXTURE_2D */ + { 31366, 0x0000806F }, /* GL_TEXTURE_3D */ + { 31380, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ + { 31402, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ + { 31428, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ + { 31450, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ + { 31472, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ + { 31494, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ + { 31516, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ + { 31544, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ + { 31576, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ + { 31609, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ + { 31641, 0x00040000 }, /* GL_TEXTURE_BIT */ + { 31656, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ + { 31677, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ + { 31702, 0x00001005 }, /* GL_TEXTURE_BORDER */ + { 31720, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ + { 31744, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ + { 31775, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ + { 31805, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ + { 31835, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ + { 31870, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ + { 31901, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + { 31939, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ + { 31966, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ + { 31998, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ + { 32032, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ + { 32056, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ + { 32084, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ + { 32108, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ + { 32136, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ + { 32169, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ + { 32193, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ + { 32215, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ + { 32237, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ + { 32263, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ + { 32297, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ + { 32330, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ + { 32367, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ + { 32395, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ + { 32427, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ + { 32450, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ + { 32488, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ + { 32530, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ + { 32561, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ + { 32589, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ + { 32619, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ + { 32647, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ + { 32667, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ + { 32691, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ + { 32722, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ + { 32757, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ + { 32788, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ + { 32823, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ + { 32854, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ + { 32889, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ + { 32920, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ + { 32955, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ + { 32986, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ + { 33021, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ + { 33052, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ + { 33087, 0x00008071 }, /* GL_TEXTURE_DEPTH */ + { 33104, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ + { 33126, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ + { 33152, 0x00002300 }, /* GL_TEXTURE_ENV */ + { 33167, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ + { 33188, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ + { 33208, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ + { 33234, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ + { 33254, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ + { 33271, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ + { 33288, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ + { 33305, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ + { 33322, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ + { 33347, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ + { 33369, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ + { 33395, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ + { 33413, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ + { 33439, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ + { 33465, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ + { 33495, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ + { 33522, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ + { 33547, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ + { 33567, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ + { 33591, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ + { 33618, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ + { 33645, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ + { 33672, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ + { 33698, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ + { 33728, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ + { 33750, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ + { 33768, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ + { 33798, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ + { 33826, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ + { 33854, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ + { 33882, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ + { 33903, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ + { 33922, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ + { 33944, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ + { 33963, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ + { 33983, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ + { 34008, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ + { 34032, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ + { 34052, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ + { 34076, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ + { 34096, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ + { 34119, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ + { 34144, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ + { 34178, 0x00001000 }, /* GL_TEXTURE_WIDTH */ + { 34195, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ + { 34213, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ + { 34231, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ + { 34249, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ + { 34269, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ + { 34288, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + { 34317, 0x00001000 }, /* GL_TRANSFORM_BIT */ + { 34334, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ + { 34360, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ + { 34390, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + { 34422, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + { 34452, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ + { 34486, 0x0000862C }, /* GL_TRANSPOSE_NV */ + { 34502, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + { 34533, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ + { 34568, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + { 34596, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ + { 34628, 0x00000004 }, /* GL_TRIANGLES */ + { 34641, 0x00000006 }, /* GL_TRIANGLE_FAN */ + { 34657, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ + { 34678, 0x00000005 }, /* GL_TRIANGLE_STRIP */ + { 34696, 0x00000001 }, /* GL_TRUE */ + { 34704, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ + { 34724, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ + { 34747, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ + { 34767, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ + { 34788, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ + { 34810, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ + { 34832, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ + { 34852, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ + { 34873, 0x00001401 }, /* GL_UNSIGNED_BYTE */ + { 34890, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + { 34917, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ + { 34940, 0x00001405 }, /* GL_UNSIGNED_INT */ + { 34956, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ + { 34983, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ + { 35007, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + { 35038, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ + { 35062, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + { 35090, 0x00001403 }, /* GL_UNSIGNED_SHORT */ + { 35108, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + { 35138, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + { 35164, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + { 35194, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + { 35220, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ + { 35244, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + { 35272, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + { 35300, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ + { 35327, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + { 35359, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ + { 35390, 0x00008CA2 }, /* GL_UPPER_LEFT */ + { 35404, 0x00002A20 }, /* GL_V2F */ + { 35411, 0x00002A21 }, /* GL_V3F */ + { 35418, 0x00008B83 }, /* GL_VALIDATE_STATUS */ + { 35437, 0x00001F00 }, /* GL_VENDOR */ + { 35447, 0x00001F02 }, /* GL_VERSION */ + { 35458, 0x00008074 }, /* GL_VERTEX_ARRAY */ + { 35474, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ + { 35504, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + { 35535, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ + { 35570, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ + { 35594, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ + { 35615, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ + { 35638, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ + { 35659, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + { 35686, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + { 35714, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + { 35742, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + { 35770, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + { 35798, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + { 35826, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + { 35854, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + { 35881, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + { 35908, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + { 35935, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + { 35962, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + { 35989, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + { 36016, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + { 36043, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + { 36070, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + { 36097, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + { 36135, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ + { 36177, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + { 36208, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ + { 36243, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + { 36277, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ + { 36315, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + { 36346, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ + { 36381, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + { 36409, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ + { 36441, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + { 36471, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ + { 36505, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + { 36533, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ + { 36565, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ + { 36585, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ + { 36607, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ + { 36636, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ + { 36657, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + { 36686, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ + { 36719, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ + { 36751, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + { 36778, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ + { 36809, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ + { 36839, 0x00008B31 }, /* GL_VERTEX_SHADER */ + { 36856, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ + { 36877, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ + { 36904, 0x00000BA2 }, /* GL_VIEWPORT */ + { 36916, 0x00000800 }, /* GL_VIEWPORT_BIT */ + { 36932, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ + { 36952, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + { 36983, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ + { 37018, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + { 37046, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + { 37071, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + { 37098, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + { 37123, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ + { 37147, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ + { 37166, 0x000088B9 }, /* GL_WRITE_ONLY */ + { 37180, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ + { 37198, 0x00001506 }, /* GL_XOR */ + { 37205, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ + { 37224, 0x00008757 }, /* GL_YCBCR_MESA */ + { 37238, 0x00000000 }, /* GL_ZERO */ + { 37246, 0x00000D16 }, /* GL_ZOOM_X */ + { 37256, 0x00000D17 }, /* GL_ZOOM_Y */ }; -static const unsigned reduced_enums[1258] = +static const unsigned reduced_enums[1277] = { + 30, /* GL_ALL_CLIENT_ATTRIB_BITS */ 435, /* GL_FALSE */ - 620, /* GL_LINES */ - 622, /* GL_LINE_LOOP */ - 629, /* GL_LINE_STRIP */ - 1605, /* GL_TRIANGLES */ - 1608, /* GL_TRIANGLE_STRIP */ - 1606, /* GL_TRIANGLE_FAN */ - 1183, /* GL_QUADS */ - 1185, /* GL_QUAD_STRIP */ - 1073, /* GL_POLYGON */ - 1085, /* GL_POLYGON_STIPPLE_BIT */ - 1038, /* GL_PIXEL_MODE_BIT */ - 607, /* GL_LIGHTING_BIT */ + 643, /* GL_LINES */ + 645, /* GL_LINE_LOOP */ + 652, /* GL_LINE_STRIP */ + 1628, /* GL_TRIANGLES */ + 1631, /* GL_TRIANGLE_STRIP */ + 1629, /* GL_TRIANGLE_FAN */ + 1206, /* GL_QUADS */ + 1208, /* GL_QUAD_STRIP */ + 1096, /* GL_POLYGON */ + 1108, /* GL_POLYGON_STIPPLE_BIT */ + 1061, /* GL_PIXEL_MODE_BIT */ + 630, /* GL_LIGHTING_BIT */ 457, /* GL_FOG_BIT */ 8, /* GL_ACCUM */ - 639, /* GL_LOAD */ - 1225, /* GL_RETURN */ - 911, /* GL_MULT */ + 662, /* GL_LOAD */ + 1248, /* GL_RETURN */ + 934, /* GL_MULT */ 23, /* GL_ADD */ - 927, /* GL_NEVER */ - 597, /* GL_LESS */ + 950, /* GL_NEVER */ + 620, /* GL_LESS */ 425, /* GL_EQUAL */ - 596, /* GL_LEQUAL */ - 522, /* GL_GREATER */ - 942, /* GL_NOTEQUAL */ + 619, /* GL_LEQUAL */ + 545, /* GL_GREATER */ + 965, /* GL_NOTEQUAL */ 520, /* GL_GEQUAL */ 46, /* GL_ALWAYS */ - 1358, /* GL_SRC_COLOR */ - 971, /* GL_ONE_MINUS_SRC_COLOR */ - 1356, /* GL_SRC_ALPHA */ - 970, /* GL_ONE_MINUS_SRC_ALPHA */ + 1381, /* GL_SRC_COLOR */ + 994, /* GL_ONE_MINUS_SRC_COLOR */ + 1379, /* GL_SRC_ALPHA */ + 993, /* GL_ONE_MINUS_SRC_ALPHA */ 405, /* GL_DST_ALPHA */ - 968, /* GL_ONE_MINUS_DST_ALPHA */ + 991, /* GL_ONE_MINUS_DST_ALPHA */ 406, /* GL_DST_COLOR */ - 969, /* GL_ONE_MINUS_DST_COLOR */ - 1357, /* GL_SRC_ALPHA_SATURATE */ + 992, /* GL_ONE_MINUS_DST_COLOR */ + 1380, /* GL_SRC_ALPHA_SATURATE */ 508, /* GL_FRONT_LEFT */ 509, /* GL_FRONT_RIGHT */ 69, /* GL_BACK_LEFT */ 70, /* GL_BACK_RIGHT */ 505, /* GL_FRONT */ 68, /* GL_BACK */ - 595, /* GL_LEFT */ - 1265, /* GL_RIGHT */ + 618, /* GL_LEFT */ + 1288, /* GL_RIGHT */ 506, /* GL_FRONT_AND_BACK */ 63, /* GL_AUX0 */ 64, /* GL_AUX1 */ 65, /* GL_AUX2 */ 66, /* GL_AUX3 */ - 587, /* GL_INVALID_ENUM */ - 590, /* GL_INVALID_VALUE */ - 589, /* GL_INVALID_OPERATION */ - 1359, /* GL_STACK_OVERFLOW */ - 1360, /* GL_STACK_UNDERFLOW */ - 996, /* GL_OUT_OF_MEMORY */ - 588, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ + 610, /* GL_INVALID_ENUM */ + 613, /* GL_INVALID_VALUE */ + 612, /* GL_INVALID_OPERATION */ + 1382, /* GL_STACK_OVERFLOW */ + 1383, /* GL_STACK_UNDERFLOW */ + 1019, /* GL_OUT_OF_MEMORY */ + 611, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ 0, /* GL_2D */ 2, /* GL_3D */ 3, /* GL_3D_COLOR */ 4, /* GL_3D_COLOR_TEXTURE */ 6, /* GL_4D_COLOR_TEXTURE */ - 1016, /* GL_PASS_THROUGH_TOKEN */ - 1072, /* GL_POINT_TOKEN */ - 630, /* GL_LINE_TOKEN */ - 1086, /* GL_POLYGON_TOKEN */ + 1039, /* GL_PASS_THROUGH_TOKEN */ + 1095, /* GL_POINT_TOKEN */ + 653, /* GL_LINE_TOKEN */ + 1109, /* GL_POLYGON_TOKEN */ 74, /* GL_BITMAP_TOKEN */ 404, /* GL_DRAW_PIXEL_TOKEN */ 270, /* GL_COPY_PIXEL_TOKEN */ - 623, /* GL_LINE_RESET_TOKEN */ + 646, /* GL_LINE_RESET_TOKEN */ 428, /* GL_EXP */ 429, /* GL_EXP2 */ 303, /* GL_CW */ 116, /* GL_CCW */ 137, /* GL_COEFF */ - 993, /* GL_ORDER */ + 1016, /* GL_ORDER */ 343, /* GL_DOMAIN */ 278, /* GL_CURRENT_COLOR */ 281, /* GL_CURRENT_INDEX */ @@ -3557,33 +3604,33 @@ static const unsigned reduced_enums[1258] = 295, /* GL_CURRENT_RASTER_POSITION */ 296, /* GL_CURRENT_RASTER_POSITION_VALID */ 293, /* GL_CURRENT_RASTER_DISTANCE */ - 1065, /* GL_POINT_SMOOTH */ - 1054, /* GL_POINT_SIZE */ - 1064, /* GL_POINT_SIZE_RANGE */ - 1055, /* GL_POINT_SIZE_GRANULARITY */ - 624, /* GL_LINE_SMOOTH */ - 631, /* GL_LINE_WIDTH */ - 633, /* GL_LINE_WIDTH_RANGE */ - 632, /* GL_LINE_WIDTH_GRANULARITY */ - 626, /* GL_LINE_STIPPLE */ - 627, /* GL_LINE_STIPPLE_PATTERN */ - 628, /* GL_LINE_STIPPLE_REPEAT */ - 638, /* GL_LIST_MODE */ - 796, /* GL_MAX_LIST_NESTING */ - 635, /* GL_LIST_BASE */ - 637, /* GL_LIST_INDEX */ - 1075, /* GL_POLYGON_MODE */ - 1082, /* GL_POLYGON_SMOOTH */ - 1084, /* GL_POLYGON_STIPPLE */ + 1088, /* GL_POINT_SMOOTH */ + 1077, /* GL_POINT_SIZE */ + 1087, /* GL_POINT_SIZE_RANGE */ + 1078, /* GL_POINT_SIZE_GRANULARITY */ + 647, /* GL_LINE_SMOOTH */ + 654, /* GL_LINE_WIDTH */ + 656, /* GL_LINE_WIDTH_RANGE */ + 655, /* GL_LINE_WIDTH_GRANULARITY */ + 649, /* GL_LINE_STIPPLE */ + 650, /* GL_LINE_STIPPLE_PATTERN */ + 651, /* GL_LINE_STIPPLE_REPEAT */ + 661, /* GL_LIST_MODE */ + 819, /* GL_MAX_LIST_NESTING */ + 658, /* GL_LIST_BASE */ + 660, /* GL_LIST_INDEX */ + 1098, /* GL_POLYGON_MODE */ + 1105, /* GL_POLYGON_SMOOTH */ + 1107, /* GL_POLYGON_STIPPLE */ 413, /* GL_EDGE_FLAG */ 271, /* GL_CULL_FACE */ 272, /* GL_CULL_FACE_MODE */ 507, /* GL_FRONT_FACE */ - 606, /* GL_LIGHTING */ - 611, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - 612, /* GL_LIGHT_MODEL_TWO_SIDE */ - 608, /* GL_LIGHT_MODEL_AMBIENT */ - 1311, /* GL_SHADE_MODEL */ + 629, /* GL_LIGHTING */ + 634, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ + 635, /* GL_LIGHT_MODEL_TWO_SIDE */ + 631, /* GL_LIGHT_MODEL_AMBIENT */ + 1334, /* GL_SHADE_MODEL */ 168, /* GL_COLOR_MATERIAL_FACE */ 169, /* GL_COLOR_MATERIAL_PARAMETER */ 167, /* GL_COLOR_MATERIAL */ @@ -3600,24 +3647,24 @@ static const unsigned reduced_enums[1258] = 320, /* GL_DEPTH_CLEAR_VALUE */ 331, /* GL_DEPTH_FUNC */ 12, /* GL_ACCUM_CLEAR_VALUE */ - 1390, /* GL_STENCIL_TEST */ - 1378, /* GL_STENCIL_CLEAR_VALUE */ - 1380, /* GL_STENCIL_FUNC */ - 1392, /* GL_STENCIL_VALUE_MASK */ - 1379, /* GL_STENCIL_FAIL */ - 1387, /* GL_STENCIL_PASS_DEPTH_FAIL */ - 1388, /* GL_STENCIL_PASS_DEPTH_PASS */ - 1389, /* GL_STENCIL_REF */ - 1393, /* GL_STENCIL_WRITEMASK */ - 766, /* GL_MATRIX_MODE */ - 932, /* GL_NORMALIZE */ - 1695, /* GL_VIEWPORT */ - 906, /* GL_MODELVIEW_STACK_DEPTH */ - 1165, /* GL_PROJECTION_STACK_DEPTH */ - 1584, /* GL_TEXTURE_STACK_DEPTH */ - 904, /* GL_MODELVIEW_MATRIX */ - 1164, /* GL_PROJECTION_MATRIX */ - 1569, /* GL_TEXTURE_MATRIX */ + 1413, /* GL_STENCIL_TEST */ + 1401, /* GL_STENCIL_CLEAR_VALUE */ + 1403, /* GL_STENCIL_FUNC */ + 1415, /* GL_STENCIL_VALUE_MASK */ + 1402, /* GL_STENCIL_FAIL */ + 1410, /* GL_STENCIL_PASS_DEPTH_FAIL */ + 1411, /* GL_STENCIL_PASS_DEPTH_PASS */ + 1412, /* GL_STENCIL_REF */ + 1416, /* GL_STENCIL_WRITEMASK */ + 789, /* GL_MATRIX_MODE */ + 955, /* GL_NORMALIZE */ + 1718, /* GL_VIEWPORT */ + 929, /* GL_MODELVIEW_STACK_DEPTH */ + 1188, /* GL_PROJECTION_STACK_DEPTH */ + 1607, /* GL_TEXTURE_STACK_DEPTH */ + 927, /* GL_MODELVIEW_MATRIX */ + 1187, /* GL_PROJECTION_MATRIX */ + 1592, /* GL_TEXTURE_MATRIX */ 61, /* GL_ATTRIB_STACK_DEPTH */ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ 43, /* GL_ALPHA_TEST */ @@ -3627,161 +3674,161 @@ static const unsigned reduced_enums[1258] = 78, /* GL_BLEND_DST */ 86, /* GL_BLEND_SRC */ 75, /* GL_BLEND */ - 641, /* GL_LOGIC_OP_MODE */ - 561, /* GL_INDEX_LOGIC_OP */ + 664, /* GL_LOGIC_OP_MODE */ + 584, /* GL_INDEX_LOGIC_OP */ 166, /* GL_COLOR_LOGIC_OP */ 67, /* GL_AUX_BUFFERS */ 353, /* GL_DRAW_BUFFER */ - 1195, /* GL_READ_BUFFER */ - 1292, /* GL_SCISSOR_BOX */ - 1293, /* GL_SCISSOR_TEST */ - 560, /* GL_INDEX_CLEAR_VALUE */ - 565, /* GL_INDEX_WRITEMASK */ + 1218, /* GL_READ_BUFFER */ + 1315, /* GL_SCISSOR_BOX */ + 1316, /* GL_SCISSOR_TEST */ + 583, /* GL_INDEX_CLEAR_VALUE */ + 588, /* GL_INDEX_WRITEMASK */ 163, /* GL_COLOR_CLEAR_VALUE */ 205, /* GL_COLOR_WRITEMASK */ - 562, /* GL_INDEX_MODE */ - 1259, /* GL_RGBA_MODE */ + 585, /* GL_INDEX_MODE */ + 1282, /* GL_RGBA_MODE */ 352, /* GL_DOUBLEBUFFER */ - 1394, /* GL_STEREO */ - 1218, /* GL_RENDER_MODE */ - 1017, /* GL_PERSPECTIVE_CORRECTION_HINT */ - 1066, /* GL_POINT_SMOOTH_HINT */ - 625, /* GL_LINE_SMOOTH_HINT */ - 1083, /* GL_POLYGON_SMOOTH_HINT */ + 1417, /* GL_STEREO */ + 1241, /* GL_RENDER_MODE */ + 1040, /* GL_PERSPECTIVE_CORRECTION_HINT */ + 1089, /* GL_POINT_SMOOTH_HINT */ + 648, /* GL_LINE_SMOOTH_HINT */ + 1106, /* GL_POLYGON_SMOOTH_HINT */ 477, /* GL_FOG_HINT */ - 1550, /* GL_TEXTURE_GEN_S */ - 1551, /* GL_TEXTURE_GEN_T */ - 1549, /* GL_TEXTURE_GEN_R */ - 1548, /* GL_TEXTURE_GEN_Q */ - 1030, /* GL_PIXEL_MAP_I_TO_I */ - 1036, /* GL_PIXEL_MAP_S_TO_S */ - 1032, /* GL_PIXEL_MAP_I_TO_R */ - 1028, /* GL_PIXEL_MAP_I_TO_G */ - 1026, /* GL_PIXEL_MAP_I_TO_B */ - 1024, /* GL_PIXEL_MAP_I_TO_A */ - 1034, /* GL_PIXEL_MAP_R_TO_R */ - 1022, /* GL_PIXEL_MAP_G_TO_G */ - 1020, /* GL_PIXEL_MAP_B_TO_B */ - 1018, /* GL_PIXEL_MAP_A_TO_A */ - 1031, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - 1037, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - 1033, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - 1029, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - 1027, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - 1025, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - 1035, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - 1023, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - 1021, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - 1019, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - 1617, /* GL_UNPACK_SWAP_BYTES */ - 1612, /* GL_UNPACK_LSB_FIRST */ - 1613, /* GL_UNPACK_ROW_LENGTH */ - 1616, /* GL_UNPACK_SKIP_ROWS */ - 1615, /* GL_UNPACK_SKIP_PIXELS */ - 1610, /* GL_UNPACK_ALIGNMENT */ - 1005, /* GL_PACK_SWAP_BYTES */ - 1000, /* GL_PACK_LSB_FIRST */ - 1001, /* GL_PACK_ROW_LENGTH */ - 1004, /* GL_PACK_SKIP_ROWS */ - 1003, /* GL_PACK_SKIP_PIXELS */ - 997, /* GL_PACK_ALIGNMENT */ - 719, /* GL_MAP_COLOR */ - 720, /* GL_MAP_STENCIL */ - 564, /* GL_INDEX_SHIFT */ - 563, /* GL_INDEX_OFFSET */ - 1207, /* GL_RED_SCALE */ - 1205, /* GL_RED_BIAS */ - 1712, /* GL_ZOOM_X */ - 1713, /* GL_ZOOM_Y */ - 526, /* GL_GREEN_SCALE */ - 524, /* GL_GREEN_BIAS */ + 1573, /* GL_TEXTURE_GEN_S */ + 1574, /* GL_TEXTURE_GEN_T */ + 1572, /* GL_TEXTURE_GEN_R */ + 1571, /* GL_TEXTURE_GEN_Q */ + 1053, /* GL_PIXEL_MAP_I_TO_I */ + 1059, /* GL_PIXEL_MAP_S_TO_S */ + 1055, /* GL_PIXEL_MAP_I_TO_R */ + 1051, /* GL_PIXEL_MAP_I_TO_G */ + 1049, /* GL_PIXEL_MAP_I_TO_B */ + 1047, /* GL_PIXEL_MAP_I_TO_A */ + 1057, /* GL_PIXEL_MAP_R_TO_R */ + 1045, /* GL_PIXEL_MAP_G_TO_G */ + 1043, /* GL_PIXEL_MAP_B_TO_B */ + 1041, /* GL_PIXEL_MAP_A_TO_A */ + 1054, /* GL_PIXEL_MAP_I_TO_I_SIZE */ + 1060, /* GL_PIXEL_MAP_S_TO_S_SIZE */ + 1056, /* GL_PIXEL_MAP_I_TO_R_SIZE */ + 1052, /* GL_PIXEL_MAP_I_TO_G_SIZE */ + 1050, /* GL_PIXEL_MAP_I_TO_B_SIZE */ + 1048, /* GL_PIXEL_MAP_I_TO_A_SIZE */ + 1058, /* GL_PIXEL_MAP_R_TO_R_SIZE */ + 1046, /* GL_PIXEL_MAP_G_TO_G_SIZE */ + 1044, /* GL_PIXEL_MAP_B_TO_B_SIZE */ + 1042, /* GL_PIXEL_MAP_A_TO_A_SIZE */ + 1640, /* GL_UNPACK_SWAP_BYTES */ + 1635, /* GL_UNPACK_LSB_FIRST */ + 1636, /* GL_UNPACK_ROW_LENGTH */ + 1639, /* GL_UNPACK_SKIP_ROWS */ + 1638, /* GL_UNPACK_SKIP_PIXELS */ + 1633, /* GL_UNPACK_ALIGNMENT */ + 1028, /* GL_PACK_SWAP_BYTES */ + 1023, /* GL_PACK_LSB_FIRST */ + 1024, /* GL_PACK_ROW_LENGTH */ + 1027, /* GL_PACK_SKIP_ROWS */ + 1026, /* GL_PACK_SKIP_PIXELS */ + 1020, /* GL_PACK_ALIGNMENT */ + 742, /* GL_MAP_COLOR */ + 743, /* GL_MAP_STENCIL */ + 587, /* GL_INDEX_SHIFT */ + 586, /* GL_INDEX_OFFSET */ + 1230, /* GL_RED_SCALE */ + 1228, /* GL_RED_BIAS */ + 1735, /* GL_ZOOM_X */ + 1736, /* GL_ZOOM_Y */ + 549, /* GL_GREEN_SCALE */ + 547, /* GL_GREEN_BIAS */ 92, /* GL_BLUE_SCALE */ 90, /* GL_BLUE_BIAS */ 42, /* GL_ALPHA_SCALE */ 40, /* GL_ALPHA_BIAS */ 333, /* GL_DEPTH_SCALE */ 314, /* GL_DEPTH_BIAS */ - 791, /* GL_MAX_EVAL_ORDER */ - 795, /* GL_MAX_LIGHTS */ - 774, /* GL_MAX_CLIP_PLANES */ - 839, /* GL_MAX_TEXTURE_SIZE */ - 801, /* GL_MAX_PIXEL_MAP_TABLE */ - 770, /* GL_MAX_ATTRIB_STACK_DEPTH */ - 798, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - 799, /* GL_MAX_NAME_STACK_DEPTH */ - 827, /* GL_MAX_PROJECTION_STACK_DEPTH */ - 840, /* GL_MAX_TEXTURE_STACK_DEPTH */ - 854, /* GL_MAX_VIEWPORT_DIMS */ - 771, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - 1401, /* GL_SUBPIXEL_BITS */ - 559, /* GL_INDEX_BITS */ - 1206, /* GL_RED_BITS */ - 525, /* GL_GREEN_BITS */ + 814, /* GL_MAX_EVAL_ORDER */ + 818, /* GL_MAX_LIGHTS */ + 797, /* GL_MAX_CLIP_PLANES */ + 862, /* GL_MAX_TEXTURE_SIZE */ + 824, /* GL_MAX_PIXEL_MAP_TABLE */ + 793, /* GL_MAX_ATTRIB_STACK_DEPTH */ + 821, /* GL_MAX_MODELVIEW_STACK_DEPTH */ + 822, /* GL_MAX_NAME_STACK_DEPTH */ + 850, /* GL_MAX_PROJECTION_STACK_DEPTH */ + 863, /* GL_MAX_TEXTURE_STACK_DEPTH */ + 877, /* GL_MAX_VIEWPORT_DIMS */ + 794, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ + 1424, /* GL_SUBPIXEL_BITS */ + 582, /* GL_INDEX_BITS */ + 1229, /* GL_RED_BITS */ + 548, /* GL_GREEN_BITS */ 91, /* GL_BLUE_BITS */ 41, /* GL_ALPHA_BITS */ 315, /* GL_DEPTH_BITS */ - 1376, /* GL_STENCIL_BITS */ + 1399, /* GL_STENCIL_BITS */ 14, /* GL_ACCUM_RED_BITS */ 13, /* GL_ACCUM_GREEN_BITS */ 10, /* GL_ACCUM_BLUE_BITS */ 9, /* GL_ACCUM_ALPHA_BITS */ - 920, /* GL_NAME_STACK_DEPTH */ + 943, /* GL_NAME_STACK_DEPTH */ 62, /* GL_AUTO_NORMAL */ - 665, /* GL_MAP1_COLOR_4 */ - 668, /* GL_MAP1_INDEX */ - 669, /* GL_MAP1_NORMAL */ - 670, /* GL_MAP1_TEXTURE_COORD_1 */ - 671, /* GL_MAP1_TEXTURE_COORD_2 */ - 672, /* GL_MAP1_TEXTURE_COORD_3 */ - 673, /* GL_MAP1_TEXTURE_COORD_4 */ - 674, /* GL_MAP1_VERTEX_3 */ - 675, /* GL_MAP1_VERTEX_4 */ - 692, /* GL_MAP2_COLOR_4 */ - 695, /* GL_MAP2_INDEX */ - 696, /* GL_MAP2_NORMAL */ - 697, /* GL_MAP2_TEXTURE_COORD_1 */ - 698, /* GL_MAP2_TEXTURE_COORD_2 */ - 699, /* GL_MAP2_TEXTURE_COORD_3 */ - 700, /* GL_MAP2_TEXTURE_COORD_4 */ - 701, /* GL_MAP2_VERTEX_3 */ - 702, /* GL_MAP2_VERTEX_4 */ - 666, /* GL_MAP1_GRID_DOMAIN */ - 667, /* GL_MAP1_GRID_SEGMENTS */ - 693, /* GL_MAP2_GRID_DOMAIN */ - 694, /* GL_MAP2_GRID_SEGMENTS */ - 1478, /* GL_TEXTURE_1D */ - 1479, /* GL_TEXTURE_2D */ + 688, /* GL_MAP1_COLOR_4 */ + 691, /* GL_MAP1_INDEX */ + 692, /* GL_MAP1_NORMAL */ + 693, /* GL_MAP1_TEXTURE_COORD_1 */ + 694, /* GL_MAP1_TEXTURE_COORD_2 */ + 695, /* GL_MAP1_TEXTURE_COORD_3 */ + 696, /* GL_MAP1_TEXTURE_COORD_4 */ + 697, /* GL_MAP1_VERTEX_3 */ + 698, /* GL_MAP1_VERTEX_4 */ + 715, /* GL_MAP2_COLOR_4 */ + 718, /* GL_MAP2_INDEX */ + 719, /* GL_MAP2_NORMAL */ + 720, /* GL_MAP2_TEXTURE_COORD_1 */ + 721, /* GL_MAP2_TEXTURE_COORD_2 */ + 722, /* GL_MAP2_TEXTURE_COORD_3 */ + 723, /* GL_MAP2_TEXTURE_COORD_4 */ + 724, /* GL_MAP2_VERTEX_3 */ + 725, /* GL_MAP2_VERTEX_4 */ + 689, /* GL_MAP1_GRID_DOMAIN */ + 690, /* GL_MAP1_GRID_SEGMENTS */ + 716, /* GL_MAP2_GRID_DOMAIN */ + 717, /* GL_MAP2_GRID_SEGMENTS */ + 1501, /* GL_TEXTURE_1D */ + 1502, /* GL_TEXTURE_2D */ 438, /* GL_FEEDBACK_BUFFER_POINTER */ 439, /* GL_FEEDBACK_BUFFER_SIZE */ 440, /* GL_FEEDBACK_BUFFER_TYPE */ - 1302, /* GL_SELECTION_BUFFER_POINTER */ - 1303, /* GL_SELECTION_BUFFER_SIZE */ - 1587, /* GL_TEXTURE_WIDTH */ - 1555, /* GL_TEXTURE_HEIGHT */ - 1511, /* GL_TEXTURE_COMPONENTS */ - 1495, /* GL_TEXTURE_BORDER_COLOR */ - 1494, /* GL_TEXTURE_BORDER */ + 1325, /* GL_SELECTION_BUFFER_POINTER */ + 1326, /* GL_SELECTION_BUFFER_SIZE */ + 1610, /* GL_TEXTURE_WIDTH */ + 1578, /* GL_TEXTURE_HEIGHT */ + 1534, /* GL_TEXTURE_COMPONENTS */ + 1518, /* GL_TEXTURE_BORDER_COLOR */ + 1517, /* GL_TEXTURE_BORDER */ 344, /* GL_DONT_CARE */ 436, /* GL_FASTEST */ - 928, /* GL_NICEST */ + 951, /* GL_NICEST */ 47, /* GL_AMBIENT */ 341, /* GL_DIFFUSE */ - 1345, /* GL_SPECULAR */ - 1087, /* GL_POSITION */ - 1348, /* GL_SPOT_DIRECTION */ - 1349, /* GL_SPOT_EXPONENT */ - 1347, /* GL_SPOT_CUTOFF */ + 1368, /* GL_SPECULAR */ + 1110, /* GL_POSITION */ + 1371, /* GL_SPOT_DIRECTION */ + 1372, /* GL_SPOT_EXPONENT */ + 1370, /* GL_SPOT_CUTOFF */ 244, /* GL_CONSTANT_ATTENUATION */ - 615, /* GL_LINEAR_ATTENUATION */ - 1182, /* GL_QUADRATIC_ATTENUATION */ + 638, /* GL_LINEAR_ATTENUATION */ + 1205, /* GL_QUADRATIC_ATTENUATION */ 218, /* GL_COMPILE */ 219, /* GL_COMPILE_AND_EXECUTE */ 111, /* GL_BYTE */ - 1618, /* GL_UNSIGNED_BYTE */ - 1316, /* GL_SHORT */ - 1627, /* GL_UNSIGNED_SHORT */ - 567, /* GL_INT */ - 1621, /* GL_UNSIGNED_INT */ + 1641, /* GL_UNSIGNED_BYTE */ + 1339, /* GL_SHORT */ + 1650, /* GL_UNSIGNED_SHORT */ + 590, /* GL_INT */ + 1644, /* GL_UNSIGNED_INT */ 443, /* GL_FLOAT */ 1, /* GL_2_BYTES */ 5, /* GL_3_BYTES */ @@ -3792,284 +3839,284 @@ static const unsigned reduced_enums[1258] = 51, /* GL_AND_REVERSE */ 268, /* GL_COPY */ 50, /* GL_AND_INVERTED */ - 930, /* GL_NOOP */ - 1708, /* GL_XOR */ - 992, /* GL_OR */ - 931, /* GL_NOR */ + 953, /* GL_NOOP */ + 1731, /* GL_XOR */ + 1015, /* GL_OR */ + 954, /* GL_NOR */ 426, /* GL_EQUIV */ - 593, /* GL_INVERT */ - 995, /* GL_OR_REVERSE */ + 616, /* GL_INVERT */ + 1018, /* GL_OR_REVERSE */ 269, /* GL_COPY_INVERTED */ - 994, /* GL_OR_INVERTED */ - 921, /* GL_NAND */ - 1307, /* GL_SET */ + 1017, /* GL_OR_INVERTED */ + 944, /* GL_NAND */ + 1330, /* GL_SET */ 423, /* GL_EMISSION */ - 1315, /* GL_SHININESS */ + 1338, /* GL_SHININESS */ 48, /* GL_AMBIENT_AND_DIFFUSE */ 165, /* GL_COLOR_INDEXES */ - 871, /* GL_MODELVIEW */ - 1163, /* GL_PROJECTION */ - 1413, /* GL_TEXTURE */ + 894, /* GL_MODELVIEW */ + 1186, /* GL_PROJECTION */ + 1436, /* GL_TEXTURE */ 138, /* GL_COLOR */ 312, /* GL_DEPTH */ - 1367, /* GL_STENCIL */ + 1390, /* GL_STENCIL */ 164, /* GL_COLOR_INDEX */ - 1381, /* GL_STENCIL_INDEX */ + 1404, /* GL_STENCIL_INDEX */ 321, /* GL_DEPTH_COMPONENT */ - 1202, /* GL_RED */ - 523, /* GL_GREEN */ + 1225, /* GL_RED */ + 546, /* GL_GREEN */ 89, /* GL_BLUE */ 31, /* GL_ALPHA */ - 1226, /* GL_RGB */ - 1245, /* GL_RGBA */ - 643, /* GL_LUMINANCE */ - 664, /* GL_LUMINANCE_ALPHA */ + 1249, /* GL_RGB */ + 1268, /* GL_RGBA */ + 666, /* GL_LUMINANCE */ + 687, /* GL_LUMINANCE_ALPHA */ 73, /* GL_BITMAP */ - 1043, /* GL_POINT */ - 613, /* GL_LINE */ + 1066, /* GL_POINT */ + 636, /* GL_LINE */ 441, /* GL_FILL */ - 1211, /* GL_RENDER */ + 1234, /* GL_RENDER */ 437, /* GL_FEEDBACK */ - 1301, /* GL_SELECT */ + 1324, /* GL_SELECT */ 442, /* GL_FLAT */ - 1320, /* GL_SMOOTH */ - 594, /* GL_KEEP */ - 1220, /* GL_REPLACE */ - 550, /* GL_INCR */ + 1343, /* GL_SMOOTH */ + 617, /* GL_KEEP */ + 1243, /* GL_REPLACE */ + 573, /* GL_INCR */ 308, /* GL_DECR */ - 1642, /* GL_VENDOR */ - 1217, /* GL_RENDERER */ - 1643, /* GL_VERSION */ + 1665, /* GL_VENDOR */ + 1240, /* GL_RENDERER */ + 1666, /* GL_VERSION */ 430, /* GL_EXTENSIONS */ - 1266, /* GL_S */ - 1404, /* GL_T */ - 1192, /* GL_R */ - 1181, /* GL_Q */ - 907, /* GL_MODULATE */ + 1289, /* GL_S */ + 1427, /* GL_T */ + 1215, /* GL_R */ + 1204, /* GL_Q */ + 930, /* GL_MODULATE */ 307, /* GL_DECAL */ - 1545, /* GL_TEXTURE_ENV_MODE */ - 1544, /* GL_TEXTURE_ENV_COLOR */ - 1543, /* GL_TEXTURE_ENV */ + 1568, /* GL_TEXTURE_ENV_MODE */ + 1567, /* GL_TEXTURE_ENV_COLOR */ + 1566, /* GL_TEXTURE_ENV */ 431, /* GL_EYE_LINEAR */ - 954, /* GL_OBJECT_LINEAR */ - 1346, /* GL_SPHERE_MAP */ - 1547, /* GL_TEXTURE_GEN_MODE */ - 956, /* GL_OBJECT_PLANE */ + 977, /* GL_OBJECT_LINEAR */ + 1369, /* GL_SPHERE_MAP */ + 1570, /* GL_TEXTURE_GEN_MODE */ + 979, /* GL_OBJECT_PLANE */ 432, /* GL_EYE_PLANE */ - 922, /* GL_NEAREST */ - 614, /* GL_LINEAR */ - 926, /* GL_NEAREST_MIPMAP_NEAREST */ - 619, /* GL_LINEAR_MIPMAP_NEAREST */ - 925, /* GL_NEAREST_MIPMAP_LINEAR */ - 618, /* GL_LINEAR_MIPMAP_LINEAR */ - 1568, /* GL_TEXTURE_MAG_FILTER */ - 1576, /* GL_TEXTURE_MIN_FILTER */ - 1589, /* GL_TEXTURE_WRAP_S */ - 1590, /* GL_TEXTURE_WRAP_T */ + 945, /* GL_NEAREST */ + 637, /* GL_LINEAR */ + 949, /* GL_NEAREST_MIPMAP_NEAREST */ + 642, /* GL_LINEAR_MIPMAP_NEAREST */ + 948, /* GL_NEAREST_MIPMAP_LINEAR */ + 641, /* GL_LINEAR_MIPMAP_LINEAR */ + 1591, /* GL_TEXTURE_MAG_FILTER */ + 1599, /* GL_TEXTURE_MIN_FILTER */ + 1612, /* GL_TEXTURE_WRAP_S */ + 1613, /* GL_TEXTURE_WRAP_T */ 117, /* GL_CLAMP */ - 1219, /* GL_REPEAT */ - 1081, /* GL_POLYGON_OFFSET_UNITS */ - 1080, /* GL_POLYGON_OFFSET_POINT */ - 1079, /* GL_POLYGON_OFFSET_LINE */ - 1193, /* GL_R3_G3_B2 */ - 1639, /* GL_V2F */ - 1640, /* GL_V3F */ + 1242, /* GL_REPEAT */ + 1104, /* GL_POLYGON_OFFSET_UNITS */ + 1103, /* GL_POLYGON_OFFSET_POINT */ + 1102, /* GL_POLYGON_OFFSET_LINE */ + 1216, /* GL_R3_G3_B2 */ + 1662, /* GL_V2F */ + 1663, /* GL_V3F */ 114, /* GL_C4UB_V2F */ 115, /* GL_C4UB_V3F */ 112, /* GL_C3F_V3F */ - 919, /* GL_N3F_V3F */ + 942, /* GL_N3F_V3F */ 113, /* GL_C4F_N3F_V3F */ - 1409, /* GL_T2F_V3F */ - 1411, /* GL_T4F_V4F */ - 1407, /* GL_T2F_C4UB_V3F */ - 1405, /* GL_T2F_C3F_V3F */ - 1408, /* GL_T2F_N3F_V3F */ - 1406, /* GL_T2F_C4F_N3F_V3F */ - 1410, /* GL_T4F_C4F_N3F_V4F */ + 1432, /* GL_T2F_V3F */ + 1434, /* GL_T4F_V4F */ + 1430, /* GL_T2F_C4UB_V3F */ + 1428, /* GL_T2F_C3F_V3F */ + 1431, /* GL_T2F_N3F_V3F */ + 1429, /* GL_T2F_C4F_N3F_V3F */ + 1433, /* GL_T4F_C4F_N3F_V4F */ 130, /* GL_CLIP_PLANE0 */ 131, /* GL_CLIP_PLANE1 */ 132, /* GL_CLIP_PLANE2 */ 133, /* GL_CLIP_PLANE3 */ 134, /* GL_CLIP_PLANE4 */ 135, /* GL_CLIP_PLANE5 */ - 598, /* GL_LIGHT0 */ - 599, /* GL_LIGHT1 */ - 600, /* GL_LIGHT2 */ - 601, /* GL_LIGHT3 */ - 602, /* GL_LIGHT4 */ - 603, /* GL_LIGHT5 */ - 604, /* GL_LIGHT6 */ - 605, /* GL_LIGHT7 */ - 527, /* GL_HINT_BIT */ + 621, /* GL_LIGHT0 */ + 622, /* GL_LIGHT1 */ + 623, /* GL_LIGHT2 */ + 624, /* GL_LIGHT3 */ + 625, /* GL_LIGHT4 */ + 626, /* GL_LIGHT5 */ + 627, /* GL_LIGHT6 */ + 628, /* GL_LIGHT7 */ + 550, /* GL_HINT_BIT */ 246, /* GL_CONSTANT_COLOR */ - 966, /* GL_ONE_MINUS_CONSTANT_COLOR */ + 989, /* GL_ONE_MINUS_CONSTANT_COLOR */ 241, /* GL_CONSTANT_ALPHA */ - 964, /* GL_ONE_MINUS_CONSTANT_ALPHA */ + 987, /* GL_ONE_MINUS_CONSTANT_ALPHA */ 76, /* GL_BLEND_COLOR */ 510, /* GL_FUNC_ADD */ - 855, /* GL_MIN */ - 768, /* GL_MAX */ + 878, /* GL_MIN */ + 791, /* GL_MAX */ 81, /* GL_BLEND_EQUATION */ 514, /* GL_FUNC_SUBTRACT */ 512, /* GL_FUNC_REVERSE_SUBTRACT */ 249, /* GL_CONVOLUTION_1D */ 250, /* GL_CONVOLUTION_2D */ - 1304, /* GL_SEPARABLE_2D */ + 1327, /* GL_SEPARABLE_2D */ 253, /* GL_CONVOLUTION_BORDER_MODE */ 257, /* GL_CONVOLUTION_FILTER_SCALE */ 255, /* GL_CONVOLUTION_FILTER_BIAS */ - 1203, /* GL_REDUCE */ + 1226, /* GL_REDUCE */ 259, /* GL_CONVOLUTION_FORMAT */ 263, /* GL_CONVOLUTION_WIDTH */ 261, /* GL_CONVOLUTION_HEIGHT */ - 782, /* GL_MAX_CONVOLUTION_WIDTH */ - 780, /* GL_MAX_CONVOLUTION_HEIGHT */ - 1120, /* GL_POST_CONVOLUTION_RED_SCALE */ - 1116, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - 1111, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - 1107, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - 1118, /* GL_POST_CONVOLUTION_RED_BIAS */ - 1114, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - 1109, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - 1105, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - 528, /* GL_HISTOGRAM */ - 1167, /* GL_PROXY_HISTOGRAM */ - 544, /* GL_HISTOGRAM_WIDTH */ - 534, /* GL_HISTOGRAM_FORMAT */ - 540, /* GL_HISTOGRAM_RED_SIZE */ - 536, /* GL_HISTOGRAM_GREEN_SIZE */ - 531, /* GL_HISTOGRAM_BLUE_SIZE */ - 529, /* GL_HISTOGRAM_ALPHA_SIZE */ - 538, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - 542, /* GL_HISTOGRAM_SINK */ - 856, /* GL_MINMAX */ - 858, /* GL_MINMAX_FORMAT */ - 860, /* GL_MINMAX_SINK */ - 1412, /* GL_TABLE_TOO_LARGE_EXT */ - 1620, /* GL_UNSIGNED_BYTE_3_3_2 */ - 1629, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - 1631, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - 1625, /* GL_UNSIGNED_INT_8_8_8_8 */ - 1622, /* GL_UNSIGNED_INT_10_10_10_2 */ - 1078, /* GL_POLYGON_OFFSET_FILL */ - 1077, /* GL_POLYGON_OFFSET_FACTOR */ - 1076, /* GL_POLYGON_OFFSET_BIAS */ - 1223, /* GL_RESCALE_NORMAL */ + 805, /* GL_MAX_CONVOLUTION_WIDTH */ + 803, /* GL_MAX_CONVOLUTION_HEIGHT */ + 1143, /* GL_POST_CONVOLUTION_RED_SCALE */ + 1139, /* GL_POST_CONVOLUTION_GREEN_SCALE */ + 1134, /* GL_POST_CONVOLUTION_BLUE_SCALE */ + 1130, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ + 1141, /* GL_POST_CONVOLUTION_RED_BIAS */ + 1137, /* GL_POST_CONVOLUTION_GREEN_BIAS */ + 1132, /* GL_POST_CONVOLUTION_BLUE_BIAS */ + 1128, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ + 551, /* GL_HISTOGRAM */ + 1190, /* GL_PROXY_HISTOGRAM */ + 567, /* GL_HISTOGRAM_WIDTH */ + 557, /* GL_HISTOGRAM_FORMAT */ + 563, /* GL_HISTOGRAM_RED_SIZE */ + 559, /* GL_HISTOGRAM_GREEN_SIZE */ + 554, /* GL_HISTOGRAM_BLUE_SIZE */ + 552, /* GL_HISTOGRAM_ALPHA_SIZE */ + 561, /* GL_HISTOGRAM_LUMINANCE_SIZE */ + 565, /* GL_HISTOGRAM_SINK */ + 879, /* GL_MINMAX */ + 881, /* GL_MINMAX_FORMAT */ + 883, /* GL_MINMAX_SINK */ + 1435, /* GL_TABLE_TOO_LARGE_EXT */ + 1643, /* GL_UNSIGNED_BYTE_3_3_2 */ + 1652, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + 1654, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + 1648, /* GL_UNSIGNED_INT_8_8_8_8 */ + 1645, /* GL_UNSIGNED_INT_10_10_10_2 */ + 1101, /* GL_POLYGON_OFFSET_FILL */ + 1100, /* GL_POLYGON_OFFSET_FACTOR */ + 1099, /* GL_POLYGON_OFFSET_BIAS */ + 1246, /* GL_RESCALE_NORMAL */ 36, /* GL_ALPHA4 */ 38, /* GL_ALPHA8 */ 32, /* GL_ALPHA12 */ 34, /* GL_ALPHA16 */ - 654, /* GL_LUMINANCE4 */ - 660, /* GL_LUMINANCE8 */ - 644, /* GL_LUMINANCE12 */ - 650, /* GL_LUMINANCE16 */ - 655, /* GL_LUMINANCE4_ALPHA4 */ - 658, /* GL_LUMINANCE6_ALPHA2 */ - 661, /* GL_LUMINANCE8_ALPHA8 */ - 647, /* GL_LUMINANCE12_ALPHA4 */ - 645, /* GL_LUMINANCE12_ALPHA12 */ - 651, /* GL_LUMINANCE16_ALPHA16 */ - 568, /* GL_INTENSITY */ - 573, /* GL_INTENSITY4 */ - 575, /* GL_INTENSITY8 */ - 569, /* GL_INTENSITY12 */ - 571, /* GL_INTENSITY16 */ - 1235, /* GL_RGB2_EXT */ - 1236, /* GL_RGB4 */ - 1239, /* GL_RGB5 */ - 1243, /* GL_RGB8 */ - 1227, /* GL_RGB10 */ - 1231, /* GL_RGB12 */ - 1233, /* GL_RGB16 */ - 1250, /* GL_RGBA2 */ - 1252, /* GL_RGBA4 */ - 1240, /* GL_RGB5_A1 */ - 1256, /* GL_RGBA8 */ - 1228, /* GL_RGB10_A2 */ - 1246, /* GL_RGBA12 */ - 1248, /* GL_RGBA16 */ - 1581, /* GL_TEXTURE_RED_SIZE */ - 1553, /* GL_TEXTURE_GREEN_SIZE */ - 1492, /* GL_TEXTURE_BLUE_SIZE */ - 1481, /* GL_TEXTURE_ALPHA_SIZE */ - 1566, /* GL_TEXTURE_LUMINANCE_SIZE */ - 1557, /* GL_TEXTURE_INTENSITY_SIZE */ - 1221, /* GL_REPLACE_EXT */ - 1171, /* GL_PROXY_TEXTURE_1D */ - 1173, /* GL_PROXY_TEXTURE_2D */ - 1585, /* GL_TEXTURE_TOO_LARGE_EXT */ - 1578, /* GL_TEXTURE_PRIORITY */ - 1583, /* GL_TEXTURE_RESIDENT */ - 1484, /* GL_TEXTURE_BINDING_1D */ - 1485, /* GL_TEXTURE_BINDING_2D */ - 1486, /* GL_TEXTURE_BINDING_3D */ - 1002, /* GL_PACK_SKIP_IMAGES */ - 998, /* GL_PACK_IMAGE_HEIGHT */ - 1614, /* GL_UNPACK_SKIP_IMAGES */ - 1611, /* GL_UNPACK_IMAGE_HEIGHT */ - 1480, /* GL_TEXTURE_3D */ - 1175, /* GL_PROXY_TEXTURE_3D */ - 1540, /* GL_TEXTURE_DEPTH */ - 1588, /* GL_TEXTURE_WRAP_R */ - 769, /* GL_MAX_3D_TEXTURE_SIZE */ - 1644, /* GL_VERTEX_ARRAY */ - 933, /* GL_NORMAL_ARRAY */ + 677, /* GL_LUMINANCE4 */ + 683, /* GL_LUMINANCE8 */ + 667, /* GL_LUMINANCE12 */ + 673, /* GL_LUMINANCE16 */ + 678, /* GL_LUMINANCE4_ALPHA4 */ + 681, /* GL_LUMINANCE6_ALPHA2 */ + 684, /* GL_LUMINANCE8_ALPHA8 */ + 670, /* GL_LUMINANCE12_ALPHA4 */ + 668, /* GL_LUMINANCE12_ALPHA12 */ + 674, /* GL_LUMINANCE16_ALPHA16 */ + 591, /* GL_INTENSITY */ + 596, /* GL_INTENSITY4 */ + 598, /* GL_INTENSITY8 */ + 592, /* GL_INTENSITY12 */ + 594, /* GL_INTENSITY16 */ + 1258, /* GL_RGB2_EXT */ + 1259, /* GL_RGB4 */ + 1262, /* GL_RGB5 */ + 1266, /* GL_RGB8 */ + 1250, /* GL_RGB10 */ + 1254, /* GL_RGB12 */ + 1256, /* GL_RGB16 */ + 1273, /* GL_RGBA2 */ + 1275, /* GL_RGBA4 */ + 1263, /* GL_RGB5_A1 */ + 1279, /* GL_RGBA8 */ + 1251, /* GL_RGB10_A2 */ + 1269, /* GL_RGBA12 */ + 1271, /* GL_RGBA16 */ + 1604, /* GL_TEXTURE_RED_SIZE */ + 1576, /* GL_TEXTURE_GREEN_SIZE */ + 1515, /* GL_TEXTURE_BLUE_SIZE */ + 1504, /* GL_TEXTURE_ALPHA_SIZE */ + 1589, /* GL_TEXTURE_LUMINANCE_SIZE */ + 1580, /* GL_TEXTURE_INTENSITY_SIZE */ + 1244, /* GL_REPLACE_EXT */ + 1194, /* GL_PROXY_TEXTURE_1D */ + 1196, /* GL_PROXY_TEXTURE_2D */ + 1608, /* GL_TEXTURE_TOO_LARGE_EXT */ + 1601, /* GL_TEXTURE_PRIORITY */ + 1606, /* GL_TEXTURE_RESIDENT */ + 1507, /* GL_TEXTURE_BINDING_1D */ + 1508, /* GL_TEXTURE_BINDING_2D */ + 1509, /* GL_TEXTURE_BINDING_3D */ + 1025, /* GL_PACK_SKIP_IMAGES */ + 1021, /* GL_PACK_IMAGE_HEIGHT */ + 1637, /* GL_UNPACK_SKIP_IMAGES */ + 1634, /* GL_UNPACK_IMAGE_HEIGHT */ + 1503, /* GL_TEXTURE_3D */ + 1198, /* GL_PROXY_TEXTURE_3D */ + 1563, /* GL_TEXTURE_DEPTH */ + 1611, /* GL_TEXTURE_WRAP_R */ + 792, /* GL_MAX_3D_TEXTURE_SIZE */ + 1667, /* GL_VERTEX_ARRAY */ + 956, /* GL_NORMAL_ARRAY */ 139, /* GL_COLOR_ARRAY */ - 553, /* GL_INDEX_ARRAY */ - 1519, /* GL_TEXTURE_COORD_ARRAY */ + 576, /* GL_INDEX_ARRAY */ + 1542, /* GL_TEXTURE_COORD_ARRAY */ 414, /* GL_EDGE_FLAG_ARRAY */ - 1649, /* GL_VERTEX_ARRAY_SIZE */ - 1651, /* GL_VERTEX_ARRAY_TYPE */ - 1650, /* GL_VERTEX_ARRAY_STRIDE */ - 938, /* GL_NORMAL_ARRAY_TYPE */ - 937, /* GL_NORMAL_ARRAY_STRIDE */ + 1672, /* GL_VERTEX_ARRAY_SIZE */ + 1674, /* GL_VERTEX_ARRAY_TYPE */ + 1673, /* GL_VERTEX_ARRAY_STRIDE */ + 961, /* GL_NORMAL_ARRAY_TYPE */ + 960, /* GL_NORMAL_ARRAY_STRIDE */ 143, /* GL_COLOR_ARRAY_SIZE */ 145, /* GL_COLOR_ARRAY_TYPE */ 144, /* GL_COLOR_ARRAY_STRIDE */ - 558, /* GL_INDEX_ARRAY_TYPE */ - 557, /* GL_INDEX_ARRAY_STRIDE */ - 1523, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - 1525, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - 1524, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ + 581, /* GL_INDEX_ARRAY_TYPE */ + 580, /* GL_INDEX_ARRAY_STRIDE */ + 1546, /* GL_TEXTURE_COORD_ARRAY_SIZE */ + 1548, /* GL_TEXTURE_COORD_ARRAY_TYPE */ + 1547, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ 418, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - 1648, /* GL_VERTEX_ARRAY_POINTER */ - 936, /* GL_NORMAL_ARRAY_POINTER */ + 1671, /* GL_VERTEX_ARRAY_POINTER */ + 959, /* GL_NORMAL_ARRAY_POINTER */ 142, /* GL_COLOR_ARRAY_POINTER */ - 556, /* GL_INDEX_ARRAY_POINTER */ - 1522, /* GL_TEXTURE_COORD_ARRAY_POINTER */ + 579, /* GL_INDEX_ARRAY_POINTER */ + 1545, /* GL_TEXTURE_COORD_ARRAY_POINTER */ 417, /* GL_EDGE_FLAG_ARRAY_POINTER */ - 912, /* GL_MULTISAMPLE */ - 1278, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - 1280, /* GL_SAMPLE_ALPHA_TO_ONE */ - 1285, /* GL_SAMPLE_COVERAGE */ - 1282, /* GL_SAMPLE_BUFFERS */ - 1273, /* GL_SAMPLES */ - 1289, /* GL_SAMPLE_COVERAGE_VALUE */ - 1287, /* GL_SAMPLE_COVERAGE_INVERT */ + 935, /* GL_MULTISAMPLE */ + 1301, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ + 1303, /* GL_SAMPLE_ALPHA_TO_ONE */ + 1308, /* GL_SAMPLE_COVERAGE */ + 1305, /* GL_SAMPLE_BUFFERS */ + 1296, /* GL_SAMPLES */ + 1312, /* GL_SAMPLE_COVERAGE_VALUE */ + 1310, /* GL_SAMPLE_COVERAGE_INVERT */ 170, /* GL_COLOR_MATRIX */ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */ - 776, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - 1103, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - 1099, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - 1094, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - 1090, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - 1101, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - 1097, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - 1092, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - 1088, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - 1502, /* GL_TEXTURE_COLOR_TABLE_SGI */ - 1176, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - 1504, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ + 799, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ + 1126, /* GL_POST_COLOR_MATRIX_RED_SCALE */ + 1122, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ + 1117, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ + 1113, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ + 1124, /* GL_POST_COLOR_MATRIX_RED_BIAS */ + 1120, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ + 1115, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ + 1111, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ + 1525, /* GL_TEXTURE_COLOR_TABLE_SGI */ + 1199, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ + 1527, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ 80, /* GL_BLEND_DST_RGB */ 88, /* GL_BLEND_SRC_RGB */ 79, /* GL_BLEND_DST_ALPHA */ 87, /* GL_BLEND_SRC_ALPHA */ 176, /* GL_COLOR_TABLE */ - 1113, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - 1096, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - 1166, /* GL_PROXY_COLOR_TABLE */ - 1170, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - 1169, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ + 1136, /* GL_POST_CONVOLUTION_COLOR_TABLE */ + 1119, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ + 1189, /* GL_PROXY_COLOR_TABLE */ + 1193, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ + 1192, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ 200, /* GL_COLOR_TABLE_SCALE */ 180, /* GL_COLOR_TABLE_BIAS */ 185, /* GL_COLOR_TABLE_FORMAT */ @@ -4082,86 +4129,86 @@ static const unsigned reduced_enums[1258] = 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */ 71, /* GL_BGR */ 72, /* GL_BGRA */ - 790, /* GL_MAX_ELEMENTS_VERTICES */ - 789, /* GL_MAX_ELEMENTS_INDICES */ - 1556, /* GL_TEXTURE_INDEX_SIZE_EXT */ + 813, /* GL_MAX_ELEMENTS_VERTICES */ + 812, /* GL_MAX_ELEMENTS_INDICES */ + 1579, /* GL_TEXTURE_INDEX_SIZE_EXT */ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - 1060, /* GL_POINT_SIZE_MIN */ - 1056, /* GL_POINT_SIZE_MAX */ - 1050, /* GL_POINT_FADE_THRESHOLD_SIZE */ - 1046, /* GL_POINT_DISTANCE_ATTENUATION */ + 1083, /* GL_POINT_SIZE_MIN */ + 1079, /* GL_POINT_SIZE_MAX */ + 1073, /* GL_POINT_FADE_THRESHOLD_SIZE */ + 1069, /* GL_POINT_DISTANCE_ATTENUATION */ 118, /* GL_CLAMP_TO_BORDER */ 121, /* GL_CLAMP_TO_EDGE */ - 1577, /* GL_TEXTURE_MIN_LOD */ - 1575, /* GL_TEXTURE_MAX_LOD */ - 1483, /* GL_TEXTURE_BASE_LEVEL */ - 1574, /* GL_TEXTURE_MAX_LEVEL */ - 547, /* GL_IGNORE_BORDER_HP */ + 1600, /* GL_TEXTURE_MIN_LOD */ + 1598, /* GL_TEXTURE_MAX_LOD */ + 1506, /* GL_TEXTURE_BASE_LEVEL */ + 1597, /* GL_TEXTURE_MAX_LEVEL */ + 570, /* GL_IGNORE_BORDER_HP */ 245, /* GL_CONSTANT_BORDER_HP */ - 1222, /* GL_REPLICATE_BORDER_HP */ + 1245, /* GL_REPLICATE_BORDER_HP */ 251, /* GL_CONVOLUTION_BORDER_COLOR */ - 961, /* GL_OCCLUSION_TEST_HP */ - 962, /* GL_OCCLUSION_TEST_RESULT_HP */ - 616, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - 1496, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - 1498, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - 1500, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - 1501, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1499, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - 1497, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - 772, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - 773, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1123, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - 1125, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - 1122, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - 1124, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - 1564, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - 1565, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - 1563, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ + 984, /* GL_OCCLUSION_TEST_HP */ + 985, /* GL_OCCLUSION_TEST_RESULT_HP */ + 639, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ + 1519, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ + 1521, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ + 1523, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ + 1524, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + 1522, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ + 1520, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ + 795, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ + 796, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + 1146, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ + 1148, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ + 1145, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ + 1147, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ + 1587, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ + 1588, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ + 1586, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ 516, /* GL_GENERATE_MIPMAP */ 517, /* GL_GENERATE_MIPMAP_HINT */ 480, /* GL_FOG_OFFSET_SGIX */ 481, /* GL_FOG_OFFSET_VALUE_SGIX */ - 1510, /* GL_TEXTURE_COMPARE_SGIX */ - 1509, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - 1560, /* GL_TEXTURE_LEQUAL_R_SGIX */ - 1552, /* GL_TEXTURE_GEQUAL_R_SGIX */ + 1533, /* GL_TEXTURE_COMPARE_SGIX */ + 1532, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ + 1583, /* GL_TEXTURE_LEQUAL_R_SGIX */ + 1575, /* GL_TEXTURE_GEQUAL_R_SGIX */ 322, /* GL_DEPTH_COMPONENT16 */ 325, /* GL_DEPTH_COMPONENT24 */ 328, /* GL_DEPTH_COMPONENT32 */ 273, /* GL_CULL_VERTEX_EXT */ 275, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ 274, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - 1705, /* GL_WRAP_BORDER_SUN */ - 1503, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - 609, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - 1317, /* GL_SINGLE_COLOR */ - 1305, /* GL_SEPARATE_SPECULAR_COLOR */ - 1314, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - 1619, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - 1632, /* GL_UNSIGNED_SHORT_5_6_5 */ - 1633, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - 1630, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - 1628, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - 1626, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - 1624, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - 1572, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - 1573, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - 1571, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - 863, /* GL_MIRRORED_REPEAT */ - 1261, /* GL_RGB_S3TC */ - 1238, /* GL_RGB4_S3TC */ - 1260, /* GL_RGBA_S3TC */ - 1255, /* GL_RGBA4_S3TC */ - 1258, /* GL_RGBA_DXT5_S3TC */ - 1253, /* GL_RGBA4_DXT5_S3TC */ + 1728, /* GL_WRAP_BORDER_SUN */ + 1526, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ + 632, /* GL_LIGHT_MODEL_COLOR_CONTROL */ + 1340, /* GL_SINGLE_COLOR */ + 1328, /* GL_SEPARATE_SPECULAR_COLOR */ + 1337, /* GL_SHARED_TEXTURE_PALETTE_EXT */ + 1642, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + 1655, /* GL_UNSIGNED_SHORT_5_6_5 */ + 1656, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + 1653, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + 1651, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + 1649, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + 1647, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + 1595, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ + 1596, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ + 1594, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ + 886, /* GL_MIRRORED_REPEAT */ + 1284, /* GL_RGB_S3TC */ + 1261, /* GL_RGB4_S3TC */ + 1283, /* GL_RGBA_S3TC */ + 1278, /* GL_RGBA4_S3TC */ + 1281, /* GL_RGBA_DXT5_S3TC */ + 1276, /* GL_RGBA4_DXT5_S3TC */ 238, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ 233, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - 924, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - 923, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - 617, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ + 947, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ + 946, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ + 640, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ 467, /* GL_FOG_COORDINATE_SOURCE */ 459, /* GL_FOG_COORD */ 483, /* GL_FRAGMENT_DEPTH */ @@ -4172,294 +4219,295 @@ static const unsigned reduced_enums[1258] = 461, /* GL_FOG_COORDINATE_ARRAY */ 174, /* GL_COLOR_SUM */ 298, /* GL_CURRENT_SECONDARY_COLOR */ - 1298, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - 1300, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - 1299, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - 1297, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - 1294, /* GL_SECONDARY_COLOR_ARRAY */ + 1321, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ + 1323, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ + 1322, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ + 1320, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ + 1317, /* GL_SECONDARY_COLOR_ARRAY */ + 526, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */ 28, /* GL_ALIASED_POINT_SIZE_RANGE */ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */ - 1414, /* GL_TEXTURE0 */ - 1416, /* GL_TEXTURE1 */ - 1438, /* GL_TEXTURE2 */ - 1460, /* GL_TEXTURE3 */ - 1466, /* GL_TEXTURE4 */ - 1468, /* GL_TEXTURE5 */ - 1470, /* GL_TEXTURE6 */ - 1472, /* GL_TEXTURE7 */ - 1474, /* GL_TEXTURE8 */ - 1476, /* GL_TEXTURE9 */ - 1417, /* GL_TEXTURE10 */ - 1419, /* GL_TEXTURE11 */ - 1421, /* GL_TEXTURE12 */ - 1423, /* GL_TEXTURE13 */ - 1425, /* GL_TEXTURE14 */ - 1427, /* GL_TEXTURE15 */ - 1429, /* GL_TEXTURE16 */ - 1431, /* GL_TEXTURE17 */ - 1433, /* GL_TEXTURE18 */ - 1435, /* GL_TEXTURE19 */ - 1439, /* GL_TEXTURE20 */ - 1441, /* GL_TEXTURE21 */ - 1443, /* GL_TEXTURE22 */ - 1445, /* GL_TEXTURE23 */ - 1447, /* GL_TEXTURE24 */ - 1449, /* GL_TEXTURE25 */ - 1451, /* GL_TEXTURE26 */ - 1453, /* GL_TEXTURE27 */ - 1455, /* GL_TEXTURE28 */ - 1457, /* GL_TEXTURE29 */ - 1461, /* GL_TEXTURE30 */ - 1463, /* GL_TEXTURE31 */ + 1437, /* GL_TEXTURE0 */ + 1439, /* GL_TEXTURE1 */ + 1461, /* GL_TEXTURE2 */ + 1483, /* GL_TEXTURE3 */ + 1489, /* GL_TEXTURE4 */ + 1491, /* GL_TEXTURE5 */ + 1493, /* GL_TEXTURE6 */ + 1495, /* GL_TEXTURE7 */ + 1497, /* GL_TEXTURE8 */ + 1499, /* GL_TEXTURE9 */ + 1440, /* GL_TEXTURE10 */ + 1442, /* GL_TEXTURE11 */ + 1444, /* GL_TEXTURE12 */ + 1446, /* GL_TEXTURE13 */ + 1448, /* GL_TEXTURE14 */ + 1450, /* GL_TEXTURE15 */ + 1452, /* GL_TEXTURE16 */ + 1454, /* GL_TEXTURE17 */ + 1456, /* GL_TEXTURE18 */ + 1458, /* GL_TEXTURE19 */ + 1462, /* GL_TEXTURE20 */ + 1464, /* GL_TEXTURE21 */ + 1466, /* GL_TEXTURE22 */ + 1468, /* GL_TEXTURE23 */ + 1470, /* GL_TEXTURE24 */ + 1472, /* GL_TEXTURE25 */ + 1474, /* GL_TEXTURE26 */ + 1476, /* GL_TEXTURE27 */ + 1478, /* GL_TEXTURE28 */ + 1480, /* GL_TEXTURE29 */ + 1484, /* GL_TEXTURE30 */ + 1486, /* GL_TEXTURE31 */ 18, /* GL_ACTIVE_TEXTURE */ 124, /* GL_CLIENT_ACTIVE_TEXTURE */ - 841, /* GL_MAX_TEXTURE_UNITS */ - 1598, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - 1601, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - 1603, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - 1595, /* GL_TRANSPOSE_COLOR_MATRIX */ - 1402, /* GL_SUBTRACT */ - 830, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ + 864, /* GL_MAX_TEXTURE_UNITS */ + 1621, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + 1624, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + 1626, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + 1618, /* GL_TRANSPOSE_COLOR_MATRIX */ + 1425, /* GL_SUBTRACT */ + 853, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ 221, /* GL_COMPRESSED_ALPHA */ 225, /* GL_COMPRESSED_LUMINANCE */ 226, /* GL_COMPRESSED_LUMINANCE_ALPHA */ 223, /* GL_COMPRESSED_INTENSITY */ 229, /* GL_COMPRESSED_RGB */ 230, /* GL_COMPRESSED_RGBA */ - 1517, /* GL_TEXTURE_COMPRESSION_HINT */ - 1579, /* GL_TEXTURE_RECTANGLE_ARB */ - 1489, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - 1179, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - 828, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ + 1540, /* GL_TEXTURE_COMPRESSION_HINT */ + 1602, /* GL_TEXTURE_RECTANGLE_ARB */ + 1512, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ + 1202, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ + 851, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ 334, /* GL_DEPTH_STENCIL_NV */ - 1623, /* GL_UNSIGNED_INT_24_8_NV */ - 837, /* GL_MAX_TEXTURE_LOD_BIAS */ - 1570, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - 838, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - 1546, /* GL_TEXTURE_FILTER_CONTROL */ - 1561, /* GL_TEXTURE_LOD_BIAS */ + 1646, /* GL_UNSIGNED_INT_24_8_NV */ + 860, /* GL_MAX_TEXTURE_LOD_BIAS */ + 1593, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ + 861, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ + 1569, /* GL_TEXTURE_FILTER_CONTROL */ + 1584, /* GL_TEXTURE_LOD_BIAS */ 207, /* GL_COMBINE4 */ - 831, /* GL_MAX_SHININESS_NV */ - 832, /* GL_MAX_SPOT_EXPONENT_NV */ - 551, /* GL_INCR_WRAP */ + 854, /* GL_MAX_SHININESS_NV */ + 855, /* GL_MAX_SPOT_EXPONENT_NV */ + 574, /* GL_INCR_WRAP */ 309, /* GL_DECR_WRAP */ - 883, /* GL_MODELVIEW1_ARB */ - 939, /* GL_NORMAL_MAP */ - 1208, /* GL_REFLECTION_MAP */ - 1526, /* GL_TEXTURE_CUBE_MAP */ - 1487, /* GL_TEXTURE_BINDING_CUBE_MAP */ - 1534, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - 1528, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - 1536, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - 1530, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - 1538, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - 1532, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - 1177, /* GL_PROXY_TEXTURE_CUBE_MAP */ - 784, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - 918, /* GL_MULTISAMPLE_FILTER_HINT_NV */ + 906, /* GL_MODELVIEW1_ARB */ + 962, /* GL_NORMAL_MAP */ + 1231, /* GL_REFLECTION_MAP */ + 1549, /* GL_TEXTURE_CUBE_MAP */ + 1510, /* GL_TEXTURE_BINDING_CUBE_MAP */ + 1557, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ + 1551, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ + 1559, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ + 1553, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ + 1561, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ + 1555, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ + 1200, /* GL_PROXY_TEXTURE_CUBE_MAP */ + 807, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ + 941, /* GL_MULTISAMPLE_FILTER_HINT_NV */ 475, /* GL_FOG_DISTANCE_MODE_NV */ 434, /* GL_EYE_RADIAL_NV */ 433, /* GL_EYE_PLANE_ABSOLUTE_NV */ 206, /* GL_COMBINE */ 213, /* GL_COMBINE_RGB */ 208, /* GL_COMBINE_ALPHA */ - 1262, /* GL_RGB_SCALE */ + 1285, /* GL_RGB_SCALE */ 24, /* GL_ADD_SIGNED */ - 578, /* GL_INTERPOLATE */ + 601, /* GL_INTERPOLATE */ 240, /* GL_CONSTANT */ - 1129, /* GL_PRIMARY_COLOR */ - 1126, /* GL_PREVIOUS */ - 1328, /* GL_SOURCE0_RGB */ - 1334, /* GL_SOURCE1_RGB */ - 1340, /* GL_SOURCE2_RGB */ - 1344, /* GL_SOURCE3_RGB_NV */ - 1325, /* GL_SOURCE0_ALPHA */ - 1331, /* GL_SOURCE1_ALPHA */ - 1337, /* GL_SOURCE2_ALPHA */ - 1343, /* GL_SOURCE3_ALPHA_NV */ - 975, /* GL_OPERAND0_RGB */ - 981, /* GL_OPERAND1_RGB */ - 987, /* GL_OPERAND2_RGB */ - 991, /* GL_OPERAND3_RGB_NV */ - 972, /* GL_OPERAND0_ALPHA */ - 978, /* GL_OPERAND1_ALPHA */ - 984, /* GL_OPERAND2_ALPHA */ - 990, /* GL_OPERAND3_ALPHA_NV */ - 1645, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - 1709, /* GL_YCBCR_422_APPLE */ - 1634, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - 1636, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - 1319, /* GL_SLICE_ACCUM_SUN */ - 1184, /* GL_QUAD_MESH_SUN */ - 1607, /* GL_TRIANGLE_MESH_SUN */ - 1683, /* GL_VERTEX_PROGRAM_ARB */ - 1694, /* GL_VERTEX_STATE_PROGRAM_NV */ - 1670, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - 1676, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - 1678, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - 1680, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + 1152, /* GL_PRIMARY_COLOR */ + 1149, /* GL_PREVIOUS */ + 1351, /* GL_SOURCE0_RGB */ + 1357, /* GL_SOURCE1_RGB */ + 1363, /* GL_SOURCE2_RGB */ + 1367, /* GL_SOURCE3_RGB_NV */ + 1348, /* GL_SOURCE0_ALPHA */ + 1354, /* GL_SOURCE1_ALPHA */ + 1360, /* GL_SOURCE2_ALPHA */ + 1366, /* GL_SOURCE3_ALPHA_NV */ + 998, /* GL_OPERAND0_RGB */ + 1004, /* GL_OPERAND1_RGB */ + 1010, /* GL_OPERAND2_RGB */ + 1014, /* GL_OPERAND3_RGB_NV */ + 995, /* GL_OPERAND0_ALPHA */ + 1001, /* GL_OPERAND1_ALPHA */ + 1007, /* GL_OPERAND2_ALPHA */ + 1013, /* GL_OPERAND3_ALPHA_NV */ + 1668, /* GL_VERTEX_ARRAY_BINDING_APPLE */ + 1732, /* GL_YCBCR_422_APPLE */ + 1657, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + 1659, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + 1342, /* GL_SLICE_ACCUM_SUN */ + 1207, /* GL_QUAD_MESH_SUN */ + 1630, /* GL_TRIANGLE_MESH_SUN */ + 1706, /* GL_VERTEX_PROGRAM_ARB */ + 1717, /* GL_VERTEX_STATE_PROGRAM_NV */ + 1693, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + 1699, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + 1701, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + 1703, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ 300, /* GL_CURRENT_VERTEX_ATTRIB */ - 1142, /* GL_PROGRAM_LENGTH_ARB */ - 1156, /* GL_PROGRAM_STRING_ARB */ - 905, /* GL_MODELVIEW_PROJECTION_NV */ - 546, /* GL_IDENTITY_NV */ - 591, /* GL_INVERSE_NV */ - 1600, /* GL_TRANSPOSE_NV */ - 592, /* GL_INVERSE_TRANSPOSE_NV */ - 814, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - 813, /* GL_MAX_PROGRAM_MATRICES_ARB */ - 722, /* GL_MATRIX0_NV */ - 734, /* GL_MATRIX1_NV */ - 746, /* GL_MATRIX2_NV */ - 750, /* GL_MATRIX3_NV */ - 752, /* GL_MATRIX4_NV */ - 754, /* GL_MATRIX5_NV */ - 756, /* GL_MATRIX6_NV */ - 758, /* GL_MATRIX7_NV */ + 1165, /* GL_PROGRAM_LENGTH_ARB */ + 1179, /* GL_PROGRAM_STRING_ARB */ + 928, /* GL_MODELVIEW_PROJECTION_NV */ + 569, /* GL_IDENTITY_NV */ + 614, /* GL_INVERSE_NV */ + 1623, /* GL_TRANSPOSE_NV */ + 615, /* GL_INVERSE_TRANSPOSE_NV */ + 837, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ + 836, /* GL_MAX_PROGRAM_MATRICES_ARB */ + 745, /* GL_MATRIX0_NV */ + 757, /* GL_MATRIX1_NV */ + 769, /* GL_MATRIX2_NV */ + 773, /* GL_MATRIX3_NV */ + 775, /* GL_MATRIX4_NV */ + 777, /* GL_MATRIX5_NV */ + 779, /* GL_MATRIX6_NV */ + 781, /* GL_MATRIX7_NV */ 285, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ 282, /* GL_CURRENT_MATRIX_ARB */ - 1686, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - 1689, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - 1154, /* GL_PROGRAM_PARAMETER_NV */ - 1674, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - 1158, /* GL_PROGRAM_TARGET_NV */ - 1155, /* GL_PROGRAM_RESIDENT_NV */ - 1592, /* GL_TRACK_MATRIX_NV */ - 1593, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - 1684, /* GL_VERTEX_PROGRAM_BINDING_NV */ - 1136, /* GL_PROGRAM_ERROR_POSITION_ARB */ + 1709, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + 1712, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + 1177, /* GL_PROGRAM_PARAMETER_NV */ + 1697, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + 1181, /* GL_PROGRAM_TARGET_NV */ + 1178, /* GL_PROGRAM_RESIDENT_NV */ + 1615, /* GL_TRACK_MATRIX_NV */ + 1616, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + 1707, /* GL_VERTEX_PROGRAM_BINDING_NV */ + 1159, /* GL_PROGRAM_ERROR_POSITION_ARB */ 319, /* GL_DEPTH_CLAMP_NV */ - 1652, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - 1659, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - 1660, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - 1661, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - 1662, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - 1663, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - 1664, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - 1665, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - 1666, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - 1667, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - 1653, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - 1654, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - 1655, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - 1656, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - 1657, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - 1658, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - 676, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - 683, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - 684, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - 685, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - 686, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - 687, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - 688, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - 689, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - 690, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - 691, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - 677, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - 678, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - 679, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - 680, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - 681, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - 682, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - 703, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - 710, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - 711, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - 712, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - 713, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - 714, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - 715, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - 1135, /* GL_PROGRAM_BINDING_ARB */ - 717, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - 718, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - 704, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - 705, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - 706, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - 707, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - 708, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - 709, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - 1515, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - 1512, /* GL_TEXTURE_COMPRESSED */ - 944, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ + 1675, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + 1682, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + 1683, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + 1684, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + 1685, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + 1686, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + 1687, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + 1688, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + 1689, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + 1690, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + 1676, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + 1677, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + 1678, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + 1679, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + 1680, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + 1681, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + 699, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ + 706, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ + 707, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ + 708, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ + 709, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ + 710, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ + 711, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ + 712, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ + 713, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ + 714, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ + 700, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ + 701, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ + 702, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ + 703, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ + 704, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ + 705, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ + 726, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ + 733, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ + 734, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ + 735, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ + 736, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ + 737, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ + 738, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ + 1158, /* GL_PROGRAM_BINDING_ARB */ + 740, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ + 741, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ + 727, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ + 728, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ + 729, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ + 730, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ + 731, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ + 732, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ + 1538, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ + 1535, /* GL_TEXTURE_COMPRESSED */ + 967, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ 239, /* GL_COMPRESSED_TEXTURE_FORMATS */ - 853, /* GL_MAX_VERTEX_UNITS_ARB */ + 876, /* GL_MAX_VERTEX_UNITS_ARB */ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - 1704, /* GL_WEIGHT_SUM_UNITY_ARB */ - 1682, /* GL_VERTEX_BLEND_ARB */ + 1727, /* GL_WEIGHT_SUM_UNITY_ARB */ + 1705, /* GL_VERTEX_BLEND_ARB */ 302, /* GL_CURRENT_WEIGHT_ARB */ - 1703, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - 1702, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - 1701, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - 1700, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - 1697, /* GL_WEIGHT_ARRAY_ARB */ + 1726, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + 1725, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + 1724, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + 1723, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + 1720, /* GL_WEIGHT_ARRAY_ARB */ 345, /* GL_DOT3_RGB */ 346, /* GL_DOT3_RGBA */ 237, /* GL_COMPRESSED_RGB_FXT1_3DFX */ 232, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - 913, /* GL_MULTISAMPLE_3DFX */ - 1283, /* GL_SAMPLE_BUFFERS_3DFX */ - 1274, /* GL_SAMPLES_3DFX */ - 894, /* GL_MODELVIEW2_ARB */ - 897, /* GL_MODELVIEW3_ARB */ - 898, /* GL_MODELVIEW4_ARB */ - 899, /* GL_MODELVIEW5_ARB */ - 900, /* GL_MODELVIEW6_ARB */ - 901, /* GL_MODELVIEW7_ARB */ - 902, /* GL_MODELVIEW8_ARB */ - 903, /* GL_MODELVIEW9_ARB */ - 873, /* GL_MODELVIEW10_ARB */ - 874, /* GL_MODELVIEW11_ARB */ - 875, /* GL_MODELVIEW12_ARB */ - 876, /* GL_MODELVIEW13_ARB */ - 877, /* GL_MODELVIEW14_ARB */ - 878, /* GL_MODELVIEW15_ARB */ - 879, /* GL_MODELVIEW16_ARB */ - 880, /* GL_MODELVIEW17_ARB */ - 881, /* GL_MODELVIEW18_ARB */ - 882, /* GL_MODELVIEW19_ARB */ - 884, /* GL_MODELVIEW20_ARB */ - 885, /* GL_MODELVIEW21_ARB */ - 886, /* GL_MODELVIEW22_ARB */ - 887, /* GL_MODELVIEW23_ARB */ - 888, /* GL_MODELVIEW24_ARB */ - 889, /* GL_MODELVIEW25_ARB */ - 890, /* GL_MODELVIEW26_ARB */ - 891, /* GL_MODELVIEW27_ARB */ - 892, /* GL_MODELVIEW28_ARB */ - 893, /* GL_MODELVIEW29_ARB */ - 895, /* GL_MODELVIEW30_ARB */ - 896, /* GL_MODELVIEW31_ARB */ + 936, /* GL_MULTISAMPLE_3DFX */ + 1306, /* GL_SAMPLE_BUFFERS_3DFX */ + 1297, /* GL_SAMPLES_3DFX */ + 917, /* GL_MODELVIEW2_ARB */ + 920, /* GL_MODELVIEW3_ARB */ + 921, /* GL_MODELVIEW4_ARB */ + 922, /* GL_MODELVIEW5_ARB */ + 923, /* GL_MODELVIEW6_ARB */ + 924, /* GL_MODELVIEW7_ARB */ + 925, /* GL_MODELVIEW8_ARB */ + 926, /* GL_MODELVIEW9_ARB */ + 896, /* GL_MODELVIEW10_ARB */ + 897, /* GL_MODELVIEW11_ARB */ + 898, /* GL_MODELVIEW12_ARB */ + 899, /* GL_MODELVIEW13_ARB */ + 900, /* GL_MODELVIEW14_ARB */ + 901, /* GL_MODELVIEW15_ARB */ + 902, /* GL_MODELVIEW16_ARB */ + 903, /* GL_MODELVIEW17_ARB */ + 904, /* GL_MODELVIEW18_ARB */ + 905, /* GL_MODELVIEW19_ARB */ + 907, /* GL_MODELVIEW20_ARB */ + 908, /* GL_MODELVIEW21_ARB */ + 909, /* GL_MODELVIEW22_ARB */ + 910, /* GL_MODELVIEW23_ARB */ + 911, /* GL_MODELVIEW24_ARB */ + 912, /* GL_MODELVIEW25_ARB */ + 913, /* GL_MODELVIEW26_ARB */ + 914, /* GL_MODELVIEW27_ARB */ + 915, /* GL_MODELVIEW28_ARB */ + 916, /* GL_MODELVIEW29_ARB */ + 918, /* GL_MODELVIEW30_ARB */ + 919, /* GL_MODELVIEW31_ARB */ 350, /* GL_DOT3_RGB_EXT */ 348, /* GL_DOT3_RGBA_EXT */ - 867, /* GL_MIRROR_CLAMP_EXT */ - 870, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - 908, /* GL_MODULATE_ADD_ATI */ - 909, /* GL_MODULATE_SIGNED_ADD_ATI */ - 910, /* GL_MODULATE_SUBTRACT_ATI */ - 1710, /* GL_YCBCR_MESA */ - 999, /* GL_PACK_INVERT_MESA */ + 890, /* GL_MIRROR_CLAMP_EXT */ + 893, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ + 931, /* GL_MODULATE_ADD_ATI */ + 932, /* GL_MODULATE_SIGNED_ADD_ATI */ + 933, /* GL_MODULATE_SUBTRACT_ATI */ + 1733, /* GL_YCBCR_MESA */ + 1022, /* GL_PACK_INVERT_MESA */ 305, /* GL_DEBUG_OBJECT_MESA */ 306, /* GL_DEBUG_PRINT_MESA */ 304, /* GL_DEBUG_ASSERT_MESA */ 107, /* GL_BUFFER_SIZE */ 109, /* GL_BUFFER_USAGE */ - 1370, /* GL_STENCIL_BACK_FUNC */ - 1369, /* GL_STENCIL_BACK_FAIL */ - 1371, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ - 1372, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ + 1393, /* GL_STENCIL_BACK_FUNC */ + 1392, /* GL_STENCIL_BACK_FAIL */ + 1394, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ + 1395, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ 484, /* GL_FRAGMENT_PROGRAM_ARB */ - 1133, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 1161, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 1160, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - 1145, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 1151, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 1150, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 803, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 826, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 825, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - 816, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 822, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 821, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 786, /* GL_MAX_DRAW_BUFFERS */ + 1156, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ + 1184, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ + 1183, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ + 1168, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + 1174, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + 1173, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + 826, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ + 849, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ + 848, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ + 839, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + 845, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + 844, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + 809, /* GL_MAX_DRAW_BUFFERS */ 354, /* GL_DRAW_BUFFER0 */ 357, /* GL_DRAW_BUFFER1 */ 378, /* GL_DRAW_BUFFER2 */ @@ -4477,156 +4525,156 @@ static const unsigned reduced_enums[1258] = 370, /* GL_DRAW_BUFFER14 */ 373, /* GL_DRAW_BUFFER15 */ 82, /* GL_BLEND_EQUATION_ALPHA */ - 767, /* GL_MATRIX_PALETTE_ARB */ - 797, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - 800, /* GL_MAX_PALETTE_MATRICES_ARB */ + 790, /* GL_MATRIX_PALETTE_ARB */ + 820, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ + 823, /* GL_MAX_PALETTE_MATRICES_ARB */ 288, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - 761, /* GL_MATRIX_INDEX_ARRAY_ARB */ + 784, /* GL_MATRIX_INDEX_ARRAY_ARB */ 283, /* GL_CURRENT_MATRIX_INDEX_ARB */ - 763, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - 765, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - 764, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - 762, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - 1541, /* GL_TEXTURE_DEPTH_SIZE */ + 786, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ + 788, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ + 787, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ + 785, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ + 1564, /* GL_TEXTURE_DEPTH_SIZE */ 338, /* GL_DEPTH_TEXTURE_MODE */ - 1507, /* GL_TEXTURE_COMPARE_MODE */ - 1505, /* GL_TEXTURE_COMPARE_FUNC */ + 1530, /* GL_TEXTURE_COMPARE_MODE */ + 1528, /* GL_TEXTURE_COMPARE_FUNC */ 216, /* GL_COMPARE_R_TO_TEXTURE */ - 1067, /* GL_POINT_SPRITE */ + 1090, /* GL_POINT_SPRITE */ 265, /* GL_COORD_REPLACE */ - 1071, /* GL_POINT_SPRITE_R_MODE_NV */ - 1186, /* GL_QUERY_COUNTER_BITS */ + 1094, /* GL_POINT_SPRITE_R_MODE_NV */ + 1209, /* GL_QUERY_COUNTER_BITS */ 290, /* GL_CURRENT_QUERY */ - 1188, /* GL_QUERY_RESULT */ - 1190, /* GL_QUERY_RESULT_AVAILABLE */ - 847, /* GL_MAX_VERTEX_ATTRIBS */ - 1672, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + 1211, /* GL_QUERY_RESULT */ + 1213, /* GL_QUERY_RESULT_AVAILABLE */ + 870, /* GL_MAX_VERTEX_ATTRIBS */ + 1695, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ 336, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ 335, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - 833, /* GL_MAX_TEXTURE_COORDS */ - 835, /* GL_MAX_TEXTURE_IMAGE_UNITS */ - 1138, /* GL_PROGRAM_ERROR_STRING_ARB */ - 1140, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - 1139, /* GL_PROGRAM_FORMAT_ARB */ - 1586, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ + 856, /* GL_MAX_TEXTURE_COORDS */ + 858, /* GL_MAX_TEXTURE_IMAGE_UNITS */ + 1161, /* GL_PROGRAM_ERROR_STRING_ARB */ + 1163, /* GL_PROGRAM_FORMAT_ASCII_ARB */ + 1162, /* GL_PROGRAM_FORMAT_ARB */ + 1609, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ 317, /* GL_DEPTH_BOUNDS_TEST_EXT */ 316, /* GL_DEPTH_BOUNDS_EXT */ 52, /* GL_ARRAY_BUFFER */ 419, /* GL_ELEMENT_ARRAY_BUFFER */ 54, /* GL_ARRAY_BUFFER_BINDING */ 421, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - 1646, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - 934, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ + 1669, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + 957, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - 554, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - 1520, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ + 577, /* GL_INDEX_ARRAY_BUFFER_BINDING */ + 1543, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ 415, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - 1295, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ + 1318, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ 462, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - 1698, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - 1668, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - 1141, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - 809, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - 1147, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 818, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 1159, /* GL_PROGRAM_TEMPORARIES_ARB */ - 824, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - 1149, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 820, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 1153, /* GL_PROGRAM_PARAMETERS_ARB */ - 823, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - 1148, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - 819, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - 1134, /* GL_PROGRAM_ATTRIBS_ARB */ - 804, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - 1146, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - 817, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - 1132, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - 802, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - 1144, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 815, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 810, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - 806, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - 1162, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - 1597, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - 1198, /* GL_READ_ONLY */ - 1706, /* GL_WRITE_ONLY */ - 1200, /* GL_READ_WRITE */ + 1721, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + 1691, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + 1164, /* GL_PROGRAM_INSTRUCTIONS_ARB */ + 832, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ + 1170, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + 841, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + 1182, /* GL_PROGRAM_TEMPORARIES_ARB */ + 847, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ + 1172, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ + 843, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ + 1176, /* GL_PROGRAM_PARAMETERS_ARB */ + 846, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ + 1171, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ + 842, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ + 1157, /* GL_PROGRAM_ATTRIBS_ARB */ + 827, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ + 1169, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ + 840, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ + 1155, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ + 825, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ + 1167, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + 838, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + 833, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ + 829, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ + 1185, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ + 1620, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + 1221, /* GL_READ_ONLY */ + 1729, /* GL_WRITE_ONLY */ + 1223, /* GL_READ_WRITE */ 101, /* GL_BUFFER_ACCESS */ 103, /* GL_BUFFER_MAPPED */ 105, /* GL_BUFFER_MAP_POINTER */ - 1591, /* GL_TIME_ELAPSED_EXT */ - 721, /* GL_MATRIX0_ARB */ - 733, /* GL_MATRIX1_ARB */ - 745, /* GL_MATRIX2_ARB */ - 749, /* GL_MATRIX3_ARB */ - 751, /* GL_MATRIX4_ARB */ - 753, /* GL_MATRIX5_ARB */ - 755, /* GL_MATRIX6_ARB */ - 757, /* GL_MATRIX7_ARB */ - 759, /* GL_MATRIX8_ARB */ - 760, /* GL_MATRIX9_ARB */ - 723, /* GL_MATRIX10_ARB */ - 724, /* GL_MATRIX11_ARB */ - 725, /* GL_MATRIX12_ARB */ - 726, /* GL_MATRIX13_ARB */ - 727, /* GL_MATRIX14_ARB */ - 728, /* GL_MATRIX15_ARB */ - 729, /* GL_MATRIX16_ARB */ - 730, /* GL_MATRIX17_ARB */ - 731, /* GL_MATRIX18_ARB */ - 732, /* GL_MATRIX19_ARB */ - 735, /* GL_MATRIX20_ARB */ - 736, /* GL_MATRIX21_ARB */ - 737, /* GL_MATRIX22_ARB */ - 738, /* GL_MATRIX23_ARB */ - 739, /* GL_MATRIX24_ARB */ - 740, /* GL_MATRIX25_ARB */ - 741, /* GL_MATRIX26_ARB */ - 742, /* GL_MATRIX27_ARB */ - 743, /* GL_MATRIX28_ARB */ - 744, /* GL_MATRIX29_ARB */ - 747, /* GL_MATRIX30_ARB */ - 748, /* GL_MATRIX31_ARB */ - 1397, /* GL_STREAM_DRAW */ - 1399, /* GL_STREAM_READ */ - 1395, /* GL_STREAM_COPY */ - 1363, /* GL_STATIC_DRAW */ - 1365, /* GL_STATIC_READ */ - 1361, /* GL_STATIC_COPY */ + 1614, /* GL_TIME_ELAPSED_EXT */ + 744, /* GL_MATRIX0_ARB */ + 756, /* GL_MATRIX1_ARB */ + 768, /* GL_MATRIX2_ARB */ + 772, /* GL_MATRIX3_ARB */ + 774, /* GL_MATRIX4_ARB */ + 776, /* GL_MATRIX5_ARB */ + 778, /* GL_MATRIX6_ARB */ + 780, /* GL_MATRIX7_ARB */ + 782, /* GL_MATRIX8_ARB */ + 783, /* GL_MATRIX9_ARB */ + 746, /* GL_MATRIX10_ARB */ + 747, /* GL_MATRIX11_ARB */ + 748, /* GL_MATRIX12_ARB */ + 749, /* GL_MATRIX13_ARB */ + 750, /* GL_MATRIX14_ARB */ + 751, /* GL_MATRIX15_ARB */ + 752, /* GL_MATRIX16_ARB */ + 753, /* GL_MATRIX17_ARB */ + 754, /* GL_MATRIX18_ARB */ + 755, /* GL_MATRIX19_ARB */ + 758, /* GL_MATRIX20_ARB */ + 759, /* GL_MATRIX21_ARB */ + 760, /* GL_MATRIX22_ARB */ + 761, /* GL_MATRIX23_ARB */ + 762, /* GL_MATRIX24_ARB */ + 763, /* GL_MATRIX25_ARB */ + 764, /* GL_MATRIX26_ARB */ + 765, /* GL_MATRIX27_ARB */ + 766, /* GL_MATRIX28_ARB */ + 767, /* GL_MATRIX29_ARB */ + 770, /* GL_MATRIX30_ARB */ + 771, /* GL_MATRIX31_ARB */ + 1420, /* GL_STREAM_DRAW */ + 1422, /* GL_STREAM_READ */ + 1418, /* GL_STREAM_COPY */ + 1386, /* GL_STATIC_DRAW */ + 1388, /* GL_STATIC_READ */ + 1384, /* GL_STATIC_COPY */ 409, /* GL_DYNAMIC_DRAW */ 411, /* GL_DYNAMIC_READ */ 407, /* GL_DYNAMIC_COPY */ - 1040, /* GL_PIXEL_PACK_BUFFER_EXT */ - 1042, /* GL_PIXEL_UNPACK_BUFFER_EXT */ - 1039, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ - 1041, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ - 807, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ - 805, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - 808, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - 812, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - 811, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - 1391, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ + 533, /* GL_GL_PIXEL_PACK_BUFFER */ + 535, /* GL_GL_PIXEL_UNPACK_BUFFER */ + 534, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */ + 536, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */ + 830, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ + 828, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ + 831, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ + 835, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ + 834, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ + 1414, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */ - 868, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - 1276, /* GL_SAMPLES_PASSED */ + 891, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ + 1299, /* GL_SAMPLES_PASSED */ 485, /* GL_FRAGMENT_SHADER */ - 1692, /* GL_VERTEX_SHADER */ - 1152, /* GL_PROGRAM_OBJECT_ARB */ - 1308, /* GL_SHADER_OBJECT_ARB */ - 793, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ - 851, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ - 845, /* GL_MAX_VARYING_FLOATS */ - 849, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ - 778, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ - 959, /* GL_OBJECT_TYPE_ARB */ - 1310, /* GL_SHADER_TYPE */ + 1715, /* GL_VERTEX_SHADER */ + 1175, /* GL_PROGRAM_OBJECT_ARB */ + 1331, /* GL_SHADER_OBJECT_ARB */ + 816, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ + 874, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ + 868, /* GL_MAX_VARYING_FLOATS */ + 872, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ + 801, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ + 982, /* GL_OBJECT_TYPE_ARB */ + 1333, /* GL_SHADER_TYPE */ 450, /* GL_FLOAT_VEC2 */ 452, /* GL_FLOAT_VEC3 */ 454, /* GL_FLOAT_VEC4 */ - 581, /* GL_INT_VEC2 */ - 583, /* GL_INT_VEC3 */ - 585, /* GL_INT_VEC4 */ + 604, /* GL_INT_VEC2 */ + 606, /* GL_INT_VEC3 */ + 608, /* GL_INT_VEC4 */ 93, /* GL_BOOL */ 95, /* GL_BOOL_VEC2 */ 97, /* GL_BOOL_VEC3 */ @@ -4634,49 +4682,67 @@ static const unsigned reduced_enums[1258] = 444, /* GL_FLOAT_MAT2 */ 446, /* GL_FLOAT_MAT3 */ 448, /* GL_FLOAT_MAT4 */ - 1267, /* GL_SAMPLER_1D */ - 1269, /* GL_SAMPLER_2D */ - 1271, /* GL_SAMPLER_3D */ - 1272, /* GL_SAMPLER_CUBE */ - 1268, /* GL_SAMPLER_1D_SHADOW */ - 1270, /* GL_SAMPLER_2D_SHADOW */ + 1290, /* GL_SAMPLER_1D */ + 1292, /* GL_SAMPLER_2D */ + 1294, /* GL_SAMPLER_3D */ + 1295, /* GL_SAMPLER_CUBE */ + 1291, /* GL_SAMPLER_1D_SHADOW */ + 1293, /* GL_SAMPLER_2D_SHADOW */ + 527, /* GL_GL_FLOAT_MAT2x3 */ + 528, /* GL_GL_FLOAT_MAT2x4 */ + 529, /* GL_GL_FLOAT_MAT3x2 */ + 530, /* GL_GL_FLOAT_MAT3x4 */ + 531, /* GL_GL_FLOAT_MAT4x2 */ + 532, /* GL_GL_FLOAT_MAT4x3 */ 311, /* GL_DELETE_STATUS */ 220, /* GL_COMPILE_STATUS */ - 634, /* GL_LINK_STATUS */ - 1641, /* GL_VALIDATE_STATUS */ - 566, /* GL_INFO_LOG_LENGTH */ + 657, /* GL_LINK_STATUS */ + 1664, /* GL_VALIDATE_STATUS */ + 589, /* GL_INFO_LOG_LENGTH */ 56, /* GL_ATTACHED_SHADERS */ 20, /* GL_ACTIVE_UNIFORMS */ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */ - 1309, /* GL_SHADER_SOURCE_LENGTH */ + 1332, /* GL_SHADER_SOURCE_LENGTH */ 15, /* GL_ACTIVE_ATTRIBUTES */ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */ 487, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ - 1312, /* GL_SHADING_LANGUAGE_VERSION */ + 1335, /* GL_SHADING_LANGUAGE_VERSION */ 289, /* GL_CURRENT_PROGRAM */ - 1008, /* GL_PALETTE4_RGB8_OES */ - 1010, /* GL_PALETTE4_RGBA8_OES */ - 1006, /* GL_PALETTE4_R5_G6_B5_OES */ - 1009, /* GL_PALETTE4_RGBA4_OES */ - 1007, /* GL_PALETTE4_RGB5_A1_OES */ - 1013, /* GL_PALETTE8_RGB8_OES */ - 1015, /* GL_PALETTE8_RGBA8_OES */ - 1011, /* GL_PALETTE8_R5_G6_B5_OES */ - 1014, /* GL_PALETTE8_RGBA4_OES */ - 1012, /* GL_PALETTE8_RGB5_A1_OES */ - 549, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - 548, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - 1069, /* GL_POINT_SPRITE_COORD_ORIGIN */ - 642, /* GL_LOWER_LEFT */ - 1638, /* GL_UPPER_LEFT */ - 1373, /* GL_STENCIL_BACK_REF */ - 1374, /* GL_STENCIL_BACK_VALUE_MASK */ - 1375, /* GL_STENCIL_BACK_WRITEMASK */ + 1031, /* GL_PALETTE4_RGB8_OES */ + 1033, /* GL_PALETTE4_RGBA8_OES */ + 1029, /* GL_PALETTE4_R5_G6_B5_OES */ + 1032, /* GL_PALETTE4_RGBA4_OES */ + 1030, /* GL_PALETTE4_RGB5_A1_OES */ + 1036, /* GL_PALETTE8_RGB8_OES */ + 1038, /* GL_PALETTE8_RGBA8_OES */ + 1034, /* GL_PALETTE8_R5_G6_B5_OES */ + 1037, /* GL_PALETTE8_RGBA4_OES */ + 1035, /* GL_PALETTE8_RGB5_A1_OES */ + 572, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ + 571, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ + 541, /* GL_GL_SRGB */ + 542, /* GL_GL_SRGB8 */ + 544, /* GL_GL_SRGB_ALPHA */ + 543, /* GL_GL_SRGB8_ALPHA8 */ + 540, /* GL_GL_SLUMINANCE_ALPHA */ + 539, /* GL_GL_SLUMINANCE8_ALPHA8 */ + 537, /* GL_GL_SLUMINANCE */ + 538, /* GL_GL_SLUMINANCE8 */ + 524, /* GL_GL_COMPRESSED_SRGB */ + 525, /* GL_GL_COMPRESSED_SRGB_ALPHA */ + 522, /* GL_GL_COMPRESSED_SLUMINANCE */ + 523, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */ + 1092, /* GL_POINT_SPRITE_COORD_ORIGIN */ + 665, /* GL_LOWER_LEFT */ + 1661, /* GL_UPPER_LEFT */ + 1396, /* GL_STENCIL_BACK_REF */ + 1397, /* GL_STENCIL_BACK_VALUE_MASK */ + 1398, /* GL_STENCIL_BACK_WRITEMASK */ 402, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ - 1212, /* GL_RENDERBUFFER_BINDING_EXT */ - 1197, /* GL_READ_FRAMEBUFFER_EXT */ + 1235, /* GL_RENDERBUFFER_BINDING_EXT */ + 1220, /* GL_READ_FRAMEBUFFER_EXT */ 403, /* GL_DRAW_FRAMEBUFFER_EXT */ - 1196, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ + 1219, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ 488, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ @@ -4692,7 +4758,7 @@ static const unsigned reduced_enums[1258] = 502, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ 504, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ 503, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - 775, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ + 798, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ 146, /* GL_COLOR_ATTACHMENT0_EXT */ 153, /* GL_COLOR_ATTACHMENT1_EXT */ 154, /* GL_COLOR_ATTACHMENT2_EXT */ @@ -4710,25 +4776,24 @@ static const unsigned reduced_enums[1258] = 151, /* GL_COLOR_ATTACHMENT14_EXT */ 152, /* GL_COLOR_ATTACHMENT15_EXT */ 313, /* GL_DEPTH_ATTACHMENT_EXT */ - 1368, /* GL_STENCIL_ATTACHMENT_EXT */ + 1391, /* GL_STENCIL_ATTACHMENT_EXT */ 495, /* GL_FRAMEBUFFER_EXT */ - 1213, /* GL_RENDERBUFFER_EXT */ - 1216, /* GL_RENDERBUFFER_WIDTH_EXT */ - 1214, /* GL_RENDERBUFFER_HEIGHT_EXT */ - 1215, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ - 1386, /* GL_STENCIL_INDEX_EXT */ - 1383, /* GL_STENCIL_INDEX1_EXT */ - 1384, /* GL_STENCIL_INDEX4_EXT */ - 1385, /* GL_STENCIL_INDEX8_EXT */ - 1382, /* GL_STENCIL_INDEX16_EXT */ + 1236, /* GL_RENDERBUFFER_EXT */ + 1239, /* GL_RENDERBUFFER_WIDTH_EXT */ + 1237, /* GL_RENDERBUFFER_HEIGHT_EXT */ + 1238, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ + 1409, /* GL_STENCIL_INDEX_EXT */ + 1406, /* GL_STENCIL_INDEX1_EXT */ + 1407, /* GL_STENCIL_INDEX4_EXT */ + 1408, /* GL_STENCIL_INDEX8_EXT */ + 1405, /* GL_STENCIL_INDEX16_EXT */ 427, /* GL_EVAL_BIT */ - 1194, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - 636, /* GL_LIST_BIT */ - 1491, /* GL_TEXTURE_BIT */ - 1291, /* GL_SCISSOR_BIT */ + 1217, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ + 659, /* GL_LIST_BIT */ + 1514, /* GL_TEXTURE_BIT */ + 1314, /* GL_SCISSOR_BIT */ 29, /* GL_ALL_ATTRIB_BITS */ - 915, /* GL_MULTISAMPLE_BIT */ - 30, /* GL_ALL_CLIENT_ATTRIB_BITS */ + 938, /* GL_MULTISAMPLE_BIT */ }; #define Elements(x) sizeof(x)/sizeof(*x) diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S index cfaab37c41..c2a8ca6154 100644 --- a/src/mesa/sparc/glapi_sparc.S +++ b/src/mesa/sparc/glapi_sparc.S @@ -489,6 +489,12 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glStencilFuncSeparate ; .type glStencilFuncSeparate,#function .globl glStencilMaskSeparate ; .type glStencilMaskSeparate,#function .globl glStencilOpSeparate ; .type glStencilOpSeparate,#function + .globl glUniformMatrix2x3fv ; .type glUniformMatrix2x3fv,#function + .globl glUniformMatrix2x4fv ; .type glUniformMatrix2x4fv,#function + .globl glUniformMatrix3x2fv ; .type glUniformMatrix3x2fv,#function + .globl glUniformMatrix3x4fv ; .type glUniformMatrix3x4fv,#function + .globl glUniformMatrix4x2fv ; .type glUniformMatrix4x2fv,#function + .globl glUniformMatrix4x3fv ; .type glUniformMatrix4x3fv,#function .globl glLoadTransposeMatrixdARB ; .type glLoadTransposeMatrixdARB,#function .globl glLoadTransposeMatrixfARB ; .type glLoadTransposeMatrixfARB,#function .globl glMultTransposeMatrixdARB ; .type glMultTransposeMatrixdARB,#function @@ -621,14 +627,14 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glGetAttribLocationARB ; .type glGetAttribLocationARB,#function .globl glDrawBuffersARB ; .type glDrawBuffersARB,#function .globl glPolygonOffsetEXT ; .type glPolygonOffsetEXT,#function - .globl gl_dispatch_stub_556 ; .type gl_dispatch_stub_556,#function - .globl gl_dispatch_stub_557 ; .type gl_dispatch_stub_557,#function - .globl gl_dispatch_stub_558 ; .type gl_dispatch_stub_558,#function - .globl gl_dispatch_stub_559 ; .type gl_dispatch_stub_559,#function - .globl gl_dispatch_stub_560 ; .type gl_dispatch_stub_560,#function - .globl gl_dispatch_stub_561 ; .type gl_dispatch_stub_561,#function .globl gl_dispatch_stub_562 ; .type gl_dispatch_stub_562,#function .globl gl_dispatch_stub_563 ; .type gl_dispatch_stub_563,#function + .globl gl_dispatch_stub_564 ; .type gl_dispatch_stub_564,#function + .globl gl_dispatch_stub_565 ; .type gl_dispatch_stub_565,#function + .globl gl_dispatch_stub_566 ; .type gl_dispatch_stub_566,#function + .globl gl_dispatch_stub_567 ; .type gl_dispatch_stub_567,#function + .globl gl_dispatch_stub_568 ; .type gl_dispatch_stub_568,#function + .globl gl_dispatch_stub_569 ; .type gl_dispatch_stub_569,#function .globl glColorPointerEXT ; .type glColorPointerEXT,#function .globl glEdgeFlagPointerEXT ; .type glEdgeFlagPointerEXT,#function .globl glIndexPointerEXT ; .type glIndexPointerEXT,#function @@ -639,8 +645,8 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glPointParameterfvEXT ; .type glPointParameterfvEXT,#function .globl glLockArraysEXT ; .type glLockArraysEXT,#function .globl glUnlockArraysEXT ; .type glUnlockArraysEXT,#function - .globl gl_dispatch_stub_574 ; .type gl_dispatch_stub_574,#function - .globl gl_dispatch_stub_575 ; .type gl_dispatch_stub_575,#function + .globl gl_dispatch_stub_580 ; .type gl_dispatch_stub_580,#function + .globl gl_dispatch_stub_581 ; .type gl_dispatch_stub_581,#function .globl glSecondaryColor3bEXT ; .type glSecondaryColor3bEXT,#function .globl glSecondaryColor3bvEXT ; .type glSecondaryColor3bvEXT,#function .globl glSecondaryColor3dEXT ; .type glSecondaryColor3dEXT,#function @@ -665,7 +671,7 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glFogCoorddvEXT ; .type glFogCoorddvEXT,#function .globl glFogCoordfEXT ; .type glFogCoordfEXT,#function .globl glFogCoordfvEXT ; .type glFogCoordfvEXT,#function - .globl gl_dispatch_stub_600 ; .type gl_dispatch_stub_600,#function + .globl gl_dispatch_stub_606 ; .type gl_dispatch_stub_606,#function .globl glBlendFuncSeparateEXT ; .type glBlendFuncSeparateEXT,#function .globl glFlushVertexArrayRangeNV ; .type glFlushVertexArrayRangeNV,#function .globl glVertexArrayRangeNV ; .type glVertexArrayRangeNV,#function @@ -707,15 +713,15 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glWindowPos4ivMESA ; .type glWindowPos4ivMESA,#function .globl glWindowPos4sMESA ; .type glWindowPos4sMESA,#function .globl glWindowPos4svMESA ; .type glWindowPos4svMESA,#function - .globl gl_dispatch_stub_642 ; .type gl_dispatch_stub_642,#function - .globl gl_dispatch_stub_643 ; .type gl_dispatch_stub_643,#function - .globl gl_dispatch_stub_644 ; .type gl_dispatch_stub_644,#function - .globl gl_dispatch_stub_645 ; .type gl_dispatch_stub_645,#function - .globl gl_dispatch_stub_646 ; .type gl_dispatch_stub_646,#function - .globl gl_dispatch_stub_647 ; .type gl_dispatch_stub_647,#function .globl gl_dispatch_stub_648 ; .type gl_dispatch_stub_648,#function .globl gl_dispatch_stub_649 ; .type gl_dispatch_stub_649,#function .globl gl_dispatch_stub_650 ; .type gl_dispatch_stub_650,#function + .globl gl_dispatch_stub_651 ; .type gl_dispatch_stub_651,#function + .globl gl_dispatch_stub_652 ; .type gl_dispatch_stub_652,#function + .globl gl_dispatch_stub_653 ; .type gl_dispatch_stub_653,#function + .globl gl_dispatch_stub_654 ; .type gl_dispatch_stub_654,#function + .globl gl_dispatch_stub_655 ; .type gl_dispatch_stub_655,#function + .globl gl_dispatch_stub_656 ; .type gl_dispatch_stub_656,#function .globl glAreProgramsResidentNV ; .type glAreProgramsResidentNV,#function .globl glBindProgramNV ; .type glBindProgramNV,#function .globl glDeleteProgramsNV ; .type glDeleteProgramsNV,#function @@ -796,19 +802,19 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glSetFragmentShaderConstantATI ; .type glSetFragmentShaderConstantATI,#function .globl glPointParameteriNV ; .type glPointParameteriNV,#function .globl glPointParameterivNV ; .type glPointParameterivNV,#function - .globl gl_dispatch_stub_731 ; .type gl_dispatch_stub_731,#function - .globl gl_dispatch_stub_732 ; .type gl_dispatch_stub_732,#function - .globl gl_dispatch_stub_733 ; .type gl_dispatch_stub_733,#function - .globl gl_dispatch_stub_734 ; .type gl_dispatch_stub_734,#function - .globl gl_dispatch_stub_735 ; .type gl_dispatch_stub_735,#function + .globl gl_dispatch_stub_737 ; .type gl_dispatch_stub_737,#function + .globl gl_dispatch_stub_738 ; .type gl_dispatch_stub_738,#function + .globl gl_dispatch_stub_739 ; .type gl_dispatch_stub_739,#function + .globl gl_dispatch_stub_740 ; .type gl_dispatch_stub_740,#function + .globl gl_dispatch_stub_741 ; .type gl_dispatch_stub_741,#function .globl glGetProgramNamedParameterdvNV ; .type glGetProgramNamedParameterdvNV,#function .globl glGetProgramNamedParameterfvNV ; .type glGetProgramNamedParameterfvNV,#function .globl glProgramNamedParameter4dNV ; .type glProgramNamedParameter4dNV,#function .globl glProgramNamedParameter4dvNV ; .type glProgramNamedParameter4dvNV,#function .globl glProgramNamedParameter4fNV ; .type glProgramNamedParameter4fNV,#function .globl glProgramNamedParameter4fvNV ; .type glProgramNamedParameter4fvNV,#function - .globl gl_dispatch_stub_742 ; .type gl_dispatch_stub_742,#function - .globl gl_dispatch_stub_743 ; .type gl_dispatch_stub_743,#function + .globl gl_dispatch_stub_748 ; .type gl_dispatch_stub_748,#function + .globl gl_dispatch_stub_749 ; .type gl_dispatch_stub_749,#function .globl glBindFramebufferEXT ; .type glBindFramebufferEXT,#function .globl glBindRenderbufferEXT ; .type glBindRenderbufferEXT,#function .globl glCheckFramebufferStatusEXT ; .type glCheckFramebufferStatusEXT,#function @@ -826,11 +832,11 @@ __glapi_sparc_icache_flush: /* %o0 = insn_addr */ .globl glIsFramebufferEXT ; .type glIsFramebufferEXT,#function .globl glIsRenderbufferEXT ; .type glIsRenderbufferEXT,#function .globl glRenderbufferStorageEXT ; .type glRenderbufferStorageEXT,#function - .globl gl_dispatch_stub_761 ; .type gl_dispatch_stub_761,#function - .globl gl_dispatch_stub_762 ; .type gl_dispatch_stub_762,#function - .globl gl_dispatch_stub_763 ; .type gl_dispatch_stub_763,#function - .globl gl_dispatch_stub_764 ; .type gl_dispatch_stub_764,#function - .globl gl_dispatch_stub_765 ; .type gl_dispatch_stub_765,#function + .globl gl_dispatch_stub_767 ; .type gl_dispatch_stub_767,#function + .globl gl_dispatch_stub_768 ; .type gl_dispatch_stub_768,#function + .globl gl_dispatch_stub_769 ; .type gl_dispatch_stub_769,#function + .globl gl_dispatch_stub_770 ; .type gl_dispatch_stub_770,#function + .globl gl_dispatch_stub_771 ; .type gl_dispatch_stub_771,#function .globl _mesa_sparc_glapi_begin ; .type _mesa_sparc_glapi_begin,#function _mesa_sparc_glapi_begin: @@ -1258,6 +1264,12 @@ _mesa_sparc_glapi_begin: GL_STUB(glStencilFuncSeparate, _gloffset_StencilFuncSeparate) GL_STUB(glStencilMaskSeparate, _gloffset_StencilMaskSeparate) GL_STUB(glStencilOpSeparate, _gloffset_StencilOpSeparate) + GL_STUB(glUniformMatrix2x3fv, _gloffset_UniformMatrix2x3fv) + GL_STUB(glUniformMatrix2x4fv, _gloffset_UniformMatrix2x4fv) + GL_STUB(glUniformMatrix3x2fv, _gloffset_UniformMatrix3x2fv) + GL_STUB(glUniformMatrix3x4fv, _gloffset_UniformMatrix3x4fv) + GL_STUB(glUniformMatrix4x2fv, _gloffset_UniformMatrix4x2fv) + GL_STUB(glUniformMatrix4x3fv, _gloffset_UniformMatrix4x3fv) GL_STUB(glLoadTransposeMatrixdARB, _gloffset_LoadTransposeMatrixdARB) GL_STUB(glLoadTransposeMatrixfARB, _gloffset_LoadTransposeMatrixfARB) GL_STUB(glMultTransposeMatrixdARB, _gloffset_MultTransposeMatrixdARB) @@ -1390,14 +1402,14 @@ _mesa_sparc_glapi_begin: GL_STUB(glGetAttribLocationARB, _gloffset_GetAttribLocationARB) GL_STUB(glDrawBuffersARB, _gloffset_DrawBuffersARB) GL_STUB(glPolygonOffsetEXT, _gloffset_PolygonOffsetEXT) - GL_STUB(gl_dispatch_stub_556, _gloffset__dispatch_stub_556) - GL_STUB(gl_dispatch_stub_557, _gloffset__dispatch_stub_557) - GL_STUB(gl_dispatch_stub_558, _gloffset__dispatch_stub_558) - GL_STUB(gl_dispatch_stub_559, _gloffset__dispatch_stub_559) - GL_STUB(gl_dispatch_stub_560, _gloffset__dispatch_stub_560) - GL_STUB(gl_dispatch_stub_561, _gloffset__dispatch_stub_561) GL_STUB(gl_dispatch_stub_562, _gloffset__dispatch_stub_562) GL_STUB(gl_dispatch_stub_563, _gloffset__dispatch_stub_563) + GL_STUB(gl_dispatch_stub_564, _gloffset__dispatch_stub_564) + GL_STUB(gl_dispatch_stub_565, _gloffset__dispatch_stub_565) + GL_STUB(gl_dispatch_stub_566, _gloffset__dispatch_stub_566) + GL_STUB(gl_dispatch_stub_567, _gloffset__dispatch_stub_567) + GL_STUB(gl_dispatch_stub_568, _gloffset__dispatch_stub_568) + GL_STUB(gl_dispatch_stub_569, _gloffset__dispatch_stub_569) GL_STUB(glColorPointerEXT, _gloffset_ColorPointerEXT) GL_STUB(glEdgeFlagPointerEXT, _gloffset_EdgeFlagPointerEXT) GL_STUB(glIndexPointerEXT, _gloffset_IndexPointerEXT) @@ -1408,8 +1420,8 @@ _mesa_sparc_glapi_begin: GL_STUB(glPointParameterfvEXT, _gloffset_PointParameterfvEXT) GL_STUB(glLockArraysEXT, _gloffset_LockArraysEXT) GL_STUB(glUnlockArraysEXT, _gloffset_UnlockArraysEXT) - GL_STUB(gl_dispatch_stub_574, _gloffset__dispatch_stub_574) - GL_STUB(gl_dispatch_stub_575, _gloffset__dispatch_stub_575) + GL_STUB(gl_dispatch_stub_580, _gloffset__dispatch_stub_580) + GL_STUB(gl_dispatch_stub_581, _gloffset__dispatch_stub_581) GL_STUB(glSecondaryColor3bEXT, _gloffset_SecondaryColor3bEXT) GL_STUB(glSecondaryColor3bvEXT, _gloffset_SecondaryColor3bvEXT) GL_STUB(glSecondaryColor3dEXT, _gloffset_SecondaryColor3dEXT) @@ -1434,7 +1446,7 @@ _mesa_sparc_glapi_begin: GL_STUB(glFogCoorddvEXT, _gloffset_FogCoorddvEXT) GL_STUB(glFogCoordfEXT, _gloffset_FogCoordfEXT) GL_STUB(glFogCoordfvEXT, _gloffset_FogCoordfvEXT) - GL_STUB(gl_dispatch_stub_600, _gloffset__dispatch_stub_600) + GL_STUB(gl_dispatch_stub_606, _gloffset__dispatch_stub_606) GL_STUB(glBlendFuncSeparateEXT, _gloffset_BlendFuncSeparateEXT) GL_STUB(glFlushVertexArrayRangeNV, _gloffset_FlushVertexArrayRangeNV) GL_STUB(glVertexArrayRangeNV, _gloffset_VertexArrayRangeNV) @@ -1476,15 +1488,15 @@ _mesa_sparc_glapi_begin: GL_STUB(glWindowPos4ivMESA, _gloffset_WindowPos4ivMESA) GL_STUB(glWindowPos4sMESA, _gloffset_WindowPos4sMESA) GL_STUB(glWindowPos4svMESA, _gloffset_WindowPos4svMESA) - GL_STUB(gl_dispatch_stub_642, _gloffset__dispatch_stub_642) - GL_STUB(gl_dispatch_stub_643, _gloffset__dispatch_stub_643) - GL_STUB(gl_dispatch_stub_644, _gloffset__dispatch_stub_644) - GL_STUB(gl_dispatch_stub_645, _gloffset__dispatch_stub_645) - GL_STUB(gl_dispatch_stub_646, _gloffset__dispatch_stub_646) - GL_STUB(gl_dispatch_stub_647, _gloffset__dispatch_stub_647) GL_STUB(gl_dispatch_stub_648, _gloffset__dispatch_stub_648) GL_STUB(gl_dispatch_stub_649, _gloffset__dispatch_stub_649) GL_STUB(gl_dispatch_stub_650, _gloffset__dispatch_stub_650) + GL_STUB(gl_dispatch_stub_651, _gloffset__dispatch_stub_651) + GL_STUB(gl_dispatch_stub_652, _gloffset__dispatch_stub_652) + GL_STUB(gl_dispatch_stub_653, _gloffset__dispatch_stub_653) + GL_STUB(gl_dispatch_stub_654, _gloffset__dispatch_stub_654) + GL_STUB(gl_dispatch_stub_655, _gloffset__dispatch_stub_655) + GL_STUB(gl_dispatch_stub_656, _gloffset__dispatch_stub_656) GL_STUB(glAreProgramsResidentNV, _gloffset_AreProgramsResidentNV) GL_STUB(glBindProgramNV, _gloffset_BindProgramNV) GL_STUB(glDeleteProgramsNV, _gloffset_DeleteProgramsNV) @@ -1565,19 +1577,19 @@ _mesa_sparc_glapi_begin: GL_STUB(glSetFragmentShaderConstantATI, _gloffset_SetFragmentShaderConstantATI) GL_STUB(glPointParameteriNV, _gloffset_PointParameteriNV) GL_STUB(glPointParameterivNV, _gloffset_PointParameterivNV) - GL_STUB(gl_dispatch_stub_731, _gloffset__dispatch_stub_731) - GL_STUB(gl_dispatch_stub_732, _gloffset__dispatch_stub_732) - GL_STUB(gl_dispatch_stub_733, _gloffset__dispatch_stub_733) - GL_STUB(gl_dispatch_stub_734, _gloffset__dispatch_stub_734) - GL_STUB(gl_dispatch_stub_735, _gloffset__dispatch_stub_735) + GL_STUB(gl_dispatch_stub_737, _gloffset__dispatch_stub_737) + GL_STUB(gl_dispatch_stub_738, _gloffset__dispatch_stub_738) + GL_STUB(gl_dispatch_stub_739, _gloffset__dispatch_stub_739) + GL_STUB(gl_dispatch_stub_740, _gloffset__dispatch_stub_740) + GL_STUB(gl_dispatch_stub_741, _gloffset__dispatch_stub_741) GL_STUB(glGetProgramNamedParameterdvNV, _gloffset_GetProgramNamedParameterdvNV) GL_STUB(glGetProgramNamedParameterfvNV, _gloffset_GetProgramNamedParameterfvNV) GL_STUB(glProgramNamedParameter4dNV, _gloffset_ProgramNamedParameter4dNV) GL_STUB(glProgramNamedParameter4dvNV, _gloffset_ProgramNamedParameter4dvNV) GL_STUB(glProgramNamedParameter4fNV, _gloffset_ProgramNamedParameter4fNV) GL_STUB(glProgramNamedParameter4fvNV, _gloffset_ProgramNamedParameter4fvNV) - GL_STUB(gl_dispatch_stub_742, _gloffset__dispatch_stub_742) - GL_STUB(gl_dispatch_stub_743, _gloffset__dispatch_stub_743) + GL_STUB(gl_dispatch_stub_748, _gloffset__dispatch_stub_748) + GL_STUB(gl_dispatch_stub_749, _gloffset__dispatch_stub_749) GL_STUB(glBindFramebufferEXT, _gloffset_BindFramebufferEXT) GL_STUB(glBindRenderbufferEXT, _gloffset_BindRenderbufferEXT) GL_STUB(glCheckFramebufferStatusEXT, _gloffset_CheckFramebufferStatusEXT) @@ -1595,11 +1607,11 @@ _mesa_sparc_glapi_begin: GL_STUB(glIsFramebufferEXT, _gloffset_IsFramebufferEXT) GL_STUB(glIsRenderbufferEXT, _gloffset_IsRenderbufferEXT) GL_STUB(glRenderbufferStorageEXT, _gloffset_RenderbufferStorageEXT) - GL_STUB(gl_dispatch_stub_761, _gloffset__dispatch_stub_761) - GL_STUB(gl_dispatch_stub_762, _gloffset__dispatch_stub_762) - GL_STUB(gl_dispatch_stub_763, _gloffset__dispatch_stub_763) - GL_STUB(gl_dispatch_stub_764, _gloffset__dispatch_stub_764) - GL_STUB(gl_dispatch_stub_765, _gloffset__dispatch_stub_765) + GL_STUB(gl_dispatch_stub_767, _gloffset__dispatch_stub_767) + GL_STUB(gl_dispatch_stub_768, _gloffset__dispatch_stub_768) + GL_STUB(gl_dispatch_stub_769, _gloffset__dispatch_stub_769) + GL_STUB(gl_dispatch_stub_770, _gloffset__dispatch_stub_770) + GL_STUB(gl_dispatch_stub_771, _gloffset__dispatch_stub_771) .globl _mesa_sparc_glapi_end ; .type _mesa_sparc_glapi_end,#function _mesa_sparc_glapi_end: diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S index 6aa0c14b63..1d95829134 100644 --- a/src/mesa/x86-64/glapi_x86-64.S +++ b/src/mesa/x86-64/glapi_x86-64.S @@ -15730,16 +15730,24 @@ GL_PREFIX(StencilOpSeparate): .size GL_PREFIX(StencilOpSeparate), .-GL_PREFIX(StencilOpSeparate) .p2align 4,,15 - .globl GL_PREFIX(LoadTransposeMatrixdARB) - .type GL_PREFIX(LoadTransposeMatrixdARB), @function -GL_PREFIX(LoadTransposeMatrixdARB): + .globl GL_PREFIX(UniformMatrix2x3fv) + .type GL_PREFIX(UniformMatrix2x3fv), @function +GL_PREFIX(UniformMatrix2x3fv): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT movq 3392(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3392(%rax), %r11 jmp *%r11 @@ -15751,24 +15759,40 @@ GL_PREFIX(LoadTransposeMatrixdARB): jmp *%r11 1: pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3392(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadTransposeMatrixdARB), .-GL_PREFIX(LoadTransposeMatrixdARB) + .size GL_PREFIX(UniformMatrix2x3fv), .-GL_PREFIX(UniformMatrix2x3fv) .p2align 4,,15 - .globl GL_PREFIX(LoadTransposeMatrixfARB) - .type GL_PREFIX(LoadTransposeMatrixfARB), @function -GL_PREFIX(LoadTransposeMatrixfARB): + .globl GL_PREFIX(UniformMatrix2x4fv) + .type GL_PREFIX(UniformMatrix2x4fv), @function +GL_PREFIX(UniformMatrix2x4fv): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT movq 3400(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3400(%rax), %r11 jmp *%r11 @@ -15780,24 +15804,40 @@ GL_PREFIX(LoadTransposeMatrixfARB): jmp *%r11 1: pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3400(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadTransposeMatrixfARB), .-GL_PREFIX(LoadTransposeMatrixfARB) + .size GL_PREFIX(UniformMatrix2x4fv), .-GL_PREFIX(UniformMatrix2x4fv) .p2align 4,,15 - .globl GL_PREFIX(MultTransposeMatrixdARB) - .type GL_PREFIX(MultTransposeMatrixdARB), @function -GL_PREFIX(MultTransposeMatrixdARB): + .globl GL_PREFIX(UniformMatrix3x2fv) + .type GL_PREFIX(UniformMatrix3x2fv), @function +GL_PREFIX(UniformMatrix3x2fv): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT movq 3408(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3408(%rax), %r11 jmp *%r11 @@ -15809,24 +15849,40 @@ GL_PREFIX(MultTransposeMatrixdARB): jmp *%r11 1: pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3408(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultTransposeMatrixdARB), .-GL_PREFIX(MultTransposeMatrixdARB) + .size GL_PREFIX(UniformMatrix3x2fv), .-GL_PREFIX(UniformMatrix3x2fv) .p2align 4,,15 - .globl GL_PREFIX(MultTransposeMatrixfARB) - .type GL_PREFIX(MultTransposeMatrixfARB), @function -GL_PREFIX(MultTransposeMatrixfARB): + .globl GL_PREFIX(UniformMatrix3x4fv) + .type GL_PREFIX(UniformMatrix3x4fv), @function +GL_PREFIX(UniformMatrix3x4fv): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT movq 3416(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3416(%rax), %r11 jmp *%r11 @@ -15838,17 +15894,25 @@ GL_PREFIX(MultTransposeMatrixfARB): jmp *%r11 1: pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi popq %rdi movq 3416(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultTransposeMatrixfARB), .-GL_PREFIX(MultTransposeMatrixfARB) + .size GL_PREFIX(UniformMatrix3x4fv), .-GL_PREFIX(UniformMatrix3x4fv) .p2align 4,,15 - .globl GL_PREFIX(SampleCoverageARB) - .type GL_PREFIX(SampleCoverageARB), @function -GL_PREFIX(SampleCoverageARB): + .globl GL_PREFIX(UniformMatrix4x2fv) + .type GL_PREFIX(UniformMatrix4x2fv), @function +GL_PREFIX(UniformMatrix4x2fv): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT movq 3424(%rax), %r11 @@ -15856,9 +15920,13 @@ GL_PREFIX(SampleCoverageARB): #elif defined(PTHREADS) pushq %rdi pushq %rsi + pushq %rdx + pushq %rcx pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp + popq %rcx + popq %rdx popq %rsi popq %rdi movq 3424(%rax), %r11 @@ -15872,13 +15940,215 @@ GL_PREFIX(SampleCoverageARB): 1: pushq %rdi pushq %rsi + pushq %rdx + pushq %rcx pushq %rbp call _glapi_get_dispatch popq %rbp + popq %rcx + popq %rdx popq %rsi popq %rdi movq 3424(%rax), %r11 jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(UniformMatrix4x2fv), .-GL_PREFIX(UniformMatrix4x2fv) + + .p2align 4,,15 + .globl GL_PREFIX(UniformMatrix4x3fv) + .type GL_PREFIX(UniformMatrix4x3fv), @function +GL_PREFIX(UniformMatrix4x3fv): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3432(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3432(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3432(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rdx + pushq %rcx + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rcx + popq %rdx + popq %rsi + popq %rdi + movq 3432(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(UniformMatrix4x3fv), .-GL_PREFIX(UniformMatrix4x3fv) + + .p2align 4,,15 + .globl GL_PREFIX(LoadTransposeMatrixdARB) + .type GL_PREFIX(LoadTransposeMatrixdARB), @function +GL_PREFIX(LoadTransposeMatrixdARB): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3440(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3440(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3440(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3440(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(LoadTransposeMatrixdARB), .-GL_PREFIX(LoadTransposeMatrixdARB) + + .p2align 4,,15 + .globl GL_PREFIX(LoadTransposeMatrixfARB) + .type GL_PREFIX(LoadTransposeMatrixfARB), @function +GL_PREFIX(LoadTransposeMatrixfARB): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3448(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3448(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3448(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3448(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(LoadTransposeMatrixfARB), .-GL_PREFIX(LoadTransposeMatrixfARB) + + .p2align 4,,15 + .globl GL_PREFIX(MultTransposeMatrixdARB) + .type GL_PREFIX(MultTransposeMatrixdARB), @function +GL_PREFIX(MultTransposeMatrixdARB): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3456(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3456(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3456(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3456(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(MultTransposeMatrixdARB), .-GL_PREFIX(MultTransposeMatrixdARB) + + .p2align 4,,15 + .globl GL_PREFIX(MultTransposeMatrixfARB) + .type GL_PREFIX(MultTransposeMatrixfARB), @function +GL_PREFIX(MultTransposeMatrixfARB): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3464(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + call _x86_64_get_dispatch@PLT + popq %rdi + movq 3464(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3464(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + call _glapi_get_dispatch + popq %rdi + movq 3464(%rax), %r11 + jmp *%r11 +#endif /* defined(GLX_USE_TLS) */ + .size GL_PREFIX(MultTransposeMatrixfARB), .-GL_PREFIX(MultTransposeMatrixfARB) + + .p2align 4,,15 + .globl GL_PREFIX(SampleCoverageARB) + .type GL_PREFIX(SampleCoverageARB), @function +GL_PREFIX(SampleCoverageARB): +#if defined(GLX_USE_TLS) + call _x86_64_get_dispatch@PLT + movq 3472(%rax), %r11 + jmp *%r11 +#elif defined(PTHREADS) + pushq %rdi + pushq %rsi + pushq %rbp + call _x86_64_get_dispatch@PLT + popq %rbp + popq %rsi + popq %rdi + movq 3472(%rax), %r11 + jmp *%r11 +#else + movq _glapi_Dispatch(%rip), %rax + testq %rax, %rax + je 1f + movq 3472(%rax), %r11 + jmp *%r11 +1: + pushq %rdi + pushq %rsi + pushq %rbp + call _glapi_get_dispatch + popq %rbp + popq %rsi + popq %rdi + movq 3472(%rax), %r11 + jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SampleCoverageARB), .-GL_PREFIX(SampleCoverageARB) @@ -15888,7 +16158,7 @@ GL_PREFIX(SampleCoverageARB): GL_PREFIX(CompressedTexImage1DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3432(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15906,13 +16176,13 @@ GL_PREFIX(CompressedTexImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3432(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3432(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15930,7 +16200,7 @@ GL_PREFIX(CompressedTexImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3432(%rax), %r11 + movq 3480(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexImage1DARB), .-GL_PREFIX(CompressedTexImage1DARB) @@ -15941,7 +16211,7 @@ GL_PREFIX(CompressedTexImage1DARB): GL_PREFIX(CompressedTexImage2DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3440(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -15959,13 +16229,13 @@ GL_PREFIX(CompressedTexImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3440(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3440(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -15983,7 +16253,7 @@ GL_PREFIX(CompressedTexImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3440(%rax), %r11 + movq 3488(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexImage2DARB), .-GL_PREFIX(CompressedTexImage2DARB) @@ -15994,7 +16264,7 @@ GL_PREFIX(CompressedTexImage2DARB): GL_PREFIX(CompressedTexImage3DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3448(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16012,13 +16282,13 @@ GL_PREFIX(CompressedTexImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3448(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3448(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16036,7 +16306,7 @@ GL_PREFIX(CompressedTexImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3448(%rax), %r11 + movq 3496(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexImage3DARB), .-GL_PREFIX(CompressedTexImage3DARB) @@ -16047,7 +16317,7 @@ GL_PREFIX(CompressedTexImage3DARB): GL_PREFIX(CompressedTexSubImage1DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3456(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16065,13 +16335,13 @@ GL_PREFIX(CompressedTexSubImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3456(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3456(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16089,7 +16359,7 @@ GL_PREFIX(CompressedTexSubImage1DARB): popq %rdx popq %rsi popq %rdi - movq 3456(%rax), %r11 + movq 3504(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexSubImage1DARB), .-GL_PREFIX(CompressedTexSubImage1DARB) @@ -16100,7 +16370,7 @@ GL_PREFIX(CompressedTexSubImage1DARB): GL_PREFIX(CompressedTexSubImage2DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3464(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16118,13 +16388,13 @@ GL_PREFIX(CompressedTexSubImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3464(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3464(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16142,7 +16412,7 @@ GL_PREFIX(CompressedTexSubImage2DARB): popq %rdx popq %rsi popq %rdi - movq 3464(%rax), %r11 + movq 3512(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexSubImage2DARB), .-GL_PREFIX(CompressedTexSubImage2DARB) @@ -16153,7 +16423,7 @@ GL_PREFIX(CompressedTexSubImage2DARB): GL_PREFIX(CompressedTexSubImage3DARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3472(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16171,13 +16441,13 @@ GL_PREFIX(CompressedTexSubImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3472(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3472(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16195,7 +16465,7 @@ GL_PREFIX(CompressedTexSubImage3DARB): popq %rdx popq %rsi popq %rdi - movq 3472(%rax), %r11 + movq 3520(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompressedTexSubImage3DARB), .-GL_PREFIX(CompressedTexSubImage3DARB) @@ -16206,7 +16476,7 @@ GL_PREFIX(CompressedTexSubImage3DARB): GL_PREFIX(GetCompressedTexImageARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3480(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16216,13 +16486,13 @@ GL_PREFIX(GetCompressedTexImageARB): popq %rdx popq %rsi popq %rdi - movq 3480(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3480(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16232,7 +16502,7 @@ GL_PREFIX(GetCompressedTexImageARB): popq %rdx popq %rsi popq %rdi - movq 3480(%rax), %r11 + movq 3528(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCompressedTexImageARB), .-GL_PREFIX(GetCompressedTexImageARB) @@ -16243,25 +16513,25 @@ GL_PREFIX(GetCompressedTexImageARB): GL_PREFIX(DisableVertexAttribArrayARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3488(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3488(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3488(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3488(%rax), %r11 + movq 3536(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DisableVertexAttribArrayARB), .-GL_PREFIX(DisableVertexAttribArrayARB) @@ -16272,25 +16542,25 @@ GL_PREFIX(DisableVertexAttribArrayARB): GL_PREFIX(EnableVertexAttribArrayARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3496(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 3496(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3496(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 3496(%rax), %r11 + movq 3544(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EnableVertexAttribArrayARB), .-GL_PREFIX(EnableVertexAttribArrayARB) @@ -16301,7 +16571,7 @@ GL_PREFIX(EnableVertexAttribArrayARB): GL_PREFIX(GetProgramEnvParameterdvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3504(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16311,13 +16581,13 @@ GL_PREFIX(GetProgramEnvParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3504(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3504(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16327,7 +16597,7 @@ GL_PREFIX(GetProgramEnvParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3504(%rax), %r11 + movq 3552(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramEnvParameterdvARB), .-GL_PREFIX(GetProgramEnvParameterdvARB) @@ -16338,7 +16608,7 @@ GL_PREFIX(GetProgramEnvParameterdvARB): GL_PREFIX(GetProgramEnvParameterfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3512(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16348,13 +16618,13 @@ GL_PREFIX(GetProgramEnvParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3512(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3512(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16364,7 +16634,7 @@ GL_PREFIX(GetProgramEnvParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3512(%rax), %r11 + movq 3560(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramEnvParameterfvARB), .-GL_PREFIX(GetProgramEnvParameterfvARB) @@ -16375,7 +16645,7 @@ GL_PREFIX(GetProgramEnvParameterfvARB): GL_PREFIX(GetProgramLocalParameterdvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3520(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16385,13 +16655,13 @@ GL_PREFIX(GetProgramLocalParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3520(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3520(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16401,7 +16671,7 @@ GL_PREFIX(GetProgramLocalParameterdvARB): popq %rdx popq %rsi popq %rdi - movq 3520(%rax), %r11 + movq 3568(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramLocalParameterdvARB), .-GL_PREFIX(GetProgramLocalParameterdvARB) @@ -16412,7 +16682,7 @@ GL_PREFIX(GetProgramLocalParameterdvARB): GL_PREFIX(GetProgramLocalParameterfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3528(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16422,13 +16692,13 @@ GL_PREFIX(GetProgramLocalParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3528(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3528(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16438,7 +16708,7 @@ GL_PREFIX(GetProgramLocalParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 3528(%rax), %r11 + movq 3576(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramLocalParameterfvARB), .-GL_PREFIX(GetProgramLocalParameterfvARB) @@ -16449,7 +16719,7 @@ GL_PREFIX(GetProgramLocalParameterfvARB): GL_PREFIX(GetProgramStringARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3536(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16459,13 +16729,13 @@ GL_PREFIX(GetProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3536(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3536(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16475,7 +16745,7 @@ GL_PREFIX(GetProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3536(%rax), %r11 + movq 3584(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramStringARB), .-GL_PREFIX(GetProgramStringARB) @@ -16486,7 +16756,7 @@ GL_PREFIX(GetProgramStringARB): GL_PREFIX(GetProgramivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3544(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16496,13 +16766,13 @@ GL_PREFIX(GetProgramivARB): popq %rdx popq %rsi popq %rdi - movq 3544(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3544(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16512,7 +16782,7 @@ GL_PREFIX(GetProgramivARB): popq %rdx popq %rsi popq %rdi - movq 3544(%rax), %r11 + movq 3592(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramivARB), .-GL_PREFIX(GetProgramivARB) @@ -16523,7 +16793,7 @@ GL_PREFIX(GetProgramivARB): GL_PREFIX(GetVertexAttribdvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3552(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16533,13 +16803,13 @@ GL_PREFIX(GetVertexAttribdvARB): popq %rdx popq %rsi popq %rdi - movq 3552(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3552(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16549,7 +16819,7 @@ GL_PREFIX(GetVertexAttribdvARB): popq %rdx popq %rsi popq %rdi - movq 3552(%rax), %r11 + movq 3600(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribdvARB), .-GL_PREFIX(GetVertexAttribdvARB) @@ -16560,7 +16830,7 @@ GL_PREFIX(GetVertexAttribdvARB): GL_PREFIX(GetVertexAttribfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3560(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16570,13 +16840,13 @@ GL_PREFIX(GetVertexAttribfvARB): popq %rdx popq %rsi popq %rdi - movq 3560(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3560(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16586,7 +16856,7 @@ GL_PREFIX(GetVertexAttribfvARB): popq %rdx popq %rsi popq %rdi - movq 3560(%rax), %r11 + movq 3608(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribfvARB), .-GL_PREFIX(GetVertexAttribfvARB) @@ -16597,7 +16867,7 @@ GL_PREFIX(GetVertexAttribfvARB): GL_PREFIX(GetVertexAttribivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3568(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16607,13 +16877,13 @@ GL_PREFIX(GetVertexAttribivARB): popq %rdx popq %rsi popq %rdi - movq 3568(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3568(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16623,7 +16893,7 @@ GL_PREFIX(GetVertexAttribivARB): popq %rdx popq %rsi popq %rdi - movq 3568(%rax), %r11 + movq 3616(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribivARB), .-GL_PREFIX(GetVertexAttribivARB) @@ -16634,7 +16904,7 @@ GL_PREFIX(GetVertexAttribivARB): GL_PREFIX(ProgramEnvParameter4dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3576(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16652,13 +16922,13 @@ GL_PREFIX(ProgramEnvParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3576(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3576(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16676,7 +16946,7 @@ GL_PREFIX(ProgramEnvParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3576(%rax), %r11 + movq 3624(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4dARB), .-GL_PREFIX(ProgramEnvParameter4dARB) @@ -16687,7 +16957,7 @@ GL_PREFIX(ProgramEnvParameter4dARB): GL_PREFIX(ProgramEnvParameter4dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3584(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16697,13 +16967,13 @@ GL_PREFIX(ProgramEnvParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3584(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3584(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16713,7 +16983,7 @@ GL_PREFIX(ProgramEnvParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3584(%rax), %r11 + movq 3632(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4dvARB), .-GL_PREFIX(ProgramEnvParameter4dvARB) @@ -16724,7 +16994,7 @@ GL_PREFIX(ProgramEnvParameter4dvARB): GL_PREFIX(ProgramEnvParameter4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3592(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16742,13 +17012,13 @@ GL_PREFIX(ProgramEnvParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3592(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3592(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16766,7 +17036,7 @@ GL_PREFIX(ProgramEnvParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3592(%rax), %r11 + movq 3640(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4fARB), .-GL_PREFIX(ProgramEnvParameter4fARB) @@ -16777,7 +17047,7 @@ GL_PREFIX(ProgramEnvParameter4fARB): GL_PREFIX(ProgramEnvParameter4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3600(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16787,13 +17057,13 @@ GL_PREFIX(ProgramEnvParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3600(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3600(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16803,7 +17073,7 @@ GL_PREFIX(ProgramEnvParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3600(%rax), %r11 + movq 3648(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramEnvParameter4fvARB), .-GL_PREFIX(ProgramEnvParameter4fvARB) @@ -16814,7 +17084,7 @@ GL_PREFIX(ProgramEnvParameter4fvARB): GL_PREFIX(ProgramLocalParameter4dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3608(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16832,13 +17102,13 @@ GL_PREFIX(ProgramLocalParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3608(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3608(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16856,7 +17126,7 @@ GL_PREFIX(ProgramLocalParameter4dARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3608(%rax), %r11 + movq 3656(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4dARB), .-GL_PREFIX(ProgramLocalParameter4dARB) @@ -16867,7 +17137,7 @@ GL_PREFIX(ProgramLocalParameter4dARB): GL_PREFIX(ProgramLocalParameter4dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3616(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16877,13 +17147,13 @@ GL_PREFIX(ProgramLocalParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3616(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3616(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16893,7 +17163,7 @@ GL_PREFIX(ProgramLocalParameter4dvARB): popq %rdx popq %rsi popq %rdi - movq 3616(%rax), %r11 + movq 3664(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4dvARB), .-GL_PREFIX(ProgramLocalParameter4dvARB) @@ -16904,7 +17174,7 @@ GL_PREFIX(ProgramLocalParameter4dvARB): GL_PREFIX(ProgramLocalParameter4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3624(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -16922,13 +17192,13 @@ GL_PREFIX(ProgramLocalParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3624(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3624(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -16946,7 +17216,7 @@ GL_PREFIX(ProgramLocalParameter4fARB): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 3624(%rax), %r11 + movq 3672(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4fARB), .-GL_PREFIX(ProgramLocalParameter4fARB) @@ -16957,7 +17227,7 @@ GL_PREFIX(ProgramLocalParameter4fARB): GL_PREFIX(ProgramLocalParameter4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3632(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -16967,13 +17237,13 @@ GL_PREFIX(ProgramLocalParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3632(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3632(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -16983,7 +17253,7 @@ GL_PREFIX(ProgramLocalParameter4fvARB): popq %rdx popq %rsi popq %rdi - movq 3632(%rax), %r11 + movq 3680(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramLocalParameter4fvARB), .-GL_PREFIX(ProgramLocalParameter4fvARB) @@ -16994,7 +17264,7 @@ GL_PREFIX(ProgramLocalParameter4fvARB): GL_PREFIX(ProgramStringARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3640(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17008,13 +17278,13 @@ GL_PREFIX(ProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3640(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3640(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17028,7 +17298,7 @@ GL_PREFIX(ProgramStringARB): popq %rdx popq %rsi popq %rdi - movq 3640(%rax), %r11 + movq 3688(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramStringARB), .-GL_PREFIX(ProgramStringARB) @@ -17039,7 +17309,7 @@ GL_PREFIX(ProgramStringARB): GL_PREFIX(VertexAttrib1dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3648(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -17049,13 +17319,13 @@ GL_PREFIX(VertexAttrib1dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3648(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3648(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -17065,7 +17335,7 @@ GL_PREFIX(VertexAttrib1dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3648(%rax), %r11 + movq 3696(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dARB), .-GL_PREFIX(VertexAttrib1dARB) @@ -17076,7 +17346,7 @@ GL_PREFIX(VertexAttrib1dARB): GL_PREFIX(VertexAttrib1dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3656(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17086,13 +17356,13 @@ GL_PREFIX(VertexAttrib1dvARB): popq %rbp popq %rsi popq %rdi - movq 3656(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3656(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17102,7 +17372,7 @@ GL_PREFIX(VertexAttrib1dvARB): popq %rbp popq %rsi popq %rdi - movq 3656(%rax), %r11 + movq 3704(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dvARB), .-GL_PREFIX(VertexAttrib1dvARB) @@ -17113,7 +17383,7 @@ GL_PREFIX(VertexAttrib1dvARB): GL_PREFIX(VertexAttrib1fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3664(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -17123,13 +17393,13 @@ GL_PREFIX(VertexAttrib1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3664(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3664(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -17139,7 +17409,7 @@ GL_PREFIX(VertexAttrib1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3664(%rax), %r11 + movq 3712(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fARB), .-GL_PREFIX(VertexAttrib1fARB) @@ -17150,7 +17420,7 @@ GL_PREFIX(VertexAttrib1fARB): GL_PREFIX(VertexAttrib1fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3672(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17160,13 +17430,13 @@ GL_PREFIX(VertexAttrib1fvARB): popq %rbp popq %rsi popq %rdi - movq 3672(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3672(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17176,7 +17446,7 @@ GL_PREFIX(VertexAttrib1fvARB): popq %rbp popq %rsi popq %rdi - movq 3672(%rax), %r11 + movq 3720(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fvARB), .-GL_PREFIX(VertexAttrib1fvARB) @@ -17187,7 +17457,7 @@ GL_PREFIX(VertexAttrib1fvARB): GL_PREFIX(VertexAttrib1sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3680(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17197,13 +17467,13 @@ GL_PREFIX(VertexAttrib1sARB): popq %rbp popq %rsi popq %rdi - movq 3680(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3680(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17213,7 +17483,7 @@ GL_PREFIX(VertexAttrib1sARB): popq %rbp popq %rsi popq %rdi - movq 3680(%rax), %r11 + movq 3728(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1sARB), .-GL_PREFIX(VertexAttrib1sARB) @@ -17224,7 +17494,7 @@ GL_PREFIX(VertexAttrib1sARB): GL_PREFIX(VertexAttrib1svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3688(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17234,13 +17504,13 @@ GL_PREFIX(VertexAttrib1svARB): popq %rbp popq %rsi popq %rdi - movq 3688(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3688(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17250,7 +17520,7 @@ GL_PREFIX(VertexAttrib1svARB): popq %rbp popq %rsi popq %rdi - movq 3688(%rax), %r11 + movq 3736(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1svARB), .-GL_PREFIX(VertexAttrib1svARB) @@ -17261,7 +17531,7 @@ GL_PREFIX(VertexAttrib1svARB): GL_PREFIX(VertexAttrib2dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3696(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -17273,13 +17543,13 @@ GL_PREFIX(VertexAttrib2dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3696(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3696(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -17291,7 +17561,7 @@ GL_PREFIX(VertexAttrib2dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3696(%rax), %r11 + movq 3744(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dARB), .-GL_PREFIX(VertexAttrib2dARB) @@ -17302,7 +17572,7 @@ GL_PREFIX(VertexAttrib2dARB): GL_PREFIX(VertexAttrib2dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3704(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17312,13 +17582,13 @@ GL_PREFIX(VertexAttrib2dvARB): popq %rbp popq %rsi popq %rdi - movq 3704(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3704(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17328,7 +17598,7 @@ GL_PREFIX(VertexAttrib2dvARB): popq %rbp popq %rsi popq %rdi - movq 3704(%rax), %r11 + movq 3752(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dvARB), .-GL_PREFIX(VertexAttrib2dvARB) @@ -17339,7 +17609,7 @@ GL_PREFIX(VertexAttrib2dvARB): GL_PREFIX(VertexAttrib2fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3712(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -17351,13 +17621,13 @@ GL_PREFIX(VertexAttrib2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3712(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3712(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -17369,7 +17639,7 @@ GL_PREFIX(VertexAttrib2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 3712(%rax), %r11 + movq 3760(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fARB), .-GL_PREFIX(VertexAttrib2fARB) @@ -17380,7 +17650,7 @@ GL_PREFIX(VertexAttrib2fARB): GL_PREFIX(VertexAttrib2fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3720(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17390,13 +17660,13 @@ GL_PREFIX(VertexAttrib2fvARB): popq %rbp popq %rsi popq %rdi - movq 3720(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3720(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17406,7 +17676,7 @@ GL_PREFIX(VertexAttrib2fvARB): popq %rbp popq %rsi popq %rdi - movq 3720(%rax), %r11 + movq 3768(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fvARB), .-GL_PREFIX(VertexAttrib2fvARB) @@ -17417,7 +17687,7 @@ GL_PREFIX(VertexAttrib2fvARB): GL_PREFIX(VertexAttrib2sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3728(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17427,13 +17697,13 @@ GL_PREFIX(VertexAttrib2sARB): popq %rdx popq %rsi popq %rdi - movq 3728(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3728(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17443,7 +17713,7 @@ GL_PREFIX(VertexAttrib2sARB): popq %rdx popq %rsi popq %rdi - movq 3728(%rax), %r11 + movq 3776(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2sARB), .-GL_PREFIX(VertexAttrib2sARB) @@ -17454,7 +17724,7 @@ GL_PREFIX(VertexAttrib2sARB): GL_PREFIX(VertexAttrib2svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3736(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17464,13 +17734,13 @@ GL_PREFIX(VertexAttrib2svARB): popq %rbp popq %rsi popq %rdi - movq 3736(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3736(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17480,7 +17750,7 @@ GL_PREFIX(VertexAttrib2svARB): popq %rbp popq %rsi popq %rdi - movq 3736(%rax), %r11 + movq 3784(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2svARB), .-GL_PREFIX(VertexAttrib2svARB) @@ -17491,7 +17761,7 @@ GL_PREFIX(VertexAttrib2svARB): GL_PREFIX(VertexAttrib3dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3744(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -17505,13 +17775,13 @@ GL_PREFIX(VertexAttrib3dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3744(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3744(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -17525,7 +17795,7 @@ GL_PREFIX(VertexAttrib3dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3744(%rax), %r11 + movq 3792(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dARB), .-GL_PREFIX(VertexAttrib3dARB) @@ -17536,7 +17806,7 @@ GL_PREFIX(VertexAttrib3dARB): GL_PREFIX(VertexAttrib3dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3752(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17546,13 +17816,13 @@ GL_PREFIX(VertexAttrib3dvARB): popq %rbp popq %rsi popq %rdi - movq 3752(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3752(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17562,7 +17832,7 @@ GL_PREFIX(VertexAttrib3dvARB): popq %rbp popq %rsi popq %rdi - movq 3752(%rax), %r11 + movq 3800(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dvARB), .-GL_PREFIX(VertexAttrib3dvARB) @@ -17573,7 +17843,7 @@ GL_PREFIX(VertexAttrib3dvARB): GL_PREFIX(VertexAttrib3fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3760(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -17587,13 +17857,13 @@ GL_PREFIX(VertexAttrib3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3760(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3760(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -17607,7 +17877,7 @@ GL_PREFIX(VertexAttrib3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3760(%rax), %r11 + movq 3808(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fARB), .-GL_PREFIX(VertexAttrib3fARB) @@ -17618,7 +17888,7 @@ GL_PREFIX(VertexAttrib3fARB): GL_PREFIX(VertexAttrib3fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3768(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17628,13 +17898,13 @@ GL_PREFIX(VertexAttrib3fvARB): popq %rbp popq %rsi popq %rdi - movq 3768(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3768(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17644,7 +17914,7 @@ GL_PREFIX(VertexAttrib3fvARB): popq %rbp popq %rsi popq %rdi - movq 3768(%rax), %r11 + movq 3816(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fvARB), .-GL_PREFIX(VertexAttrib3fvARB) @@ -17655,7 +17925,7 @@ GL_PREFIX(VertexAttrib3fvARB): GL_PREFIX(VertexAttrib3sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3776(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17669,13 +17939,13 @@ GL_PREFIX(VertexAttrib3sARB): popq %rdx popq %rsi popq %rdi - movq 3776(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3776(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17689,7 +17959,7 @@ GL_PREFIX(VertexAttrib3sARB): popq %rdx popq %rsi popq %rdi - movq 3776(%rax), %r11 + movq 3824(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3sARB), .-GL_PREFIX(VertexAttrib3sARB) @@ -17700,7 +17970,7 @@ GL_PREFIX(VertexAttrib3sARB): GL_PREFIX(VertexAttrib3svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3784(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17710,13 +17980,13 @@ GL_PREFIX(VertexAttrib3svARB): popq %rbp popq %rsi popq %rdi - movq 3784(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3784(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17726,7 +17996,7 @@ GL_PREFIX(VertexAttrib3svARB): popq %rbp popq %rsi popq %rdi - movq 3784(%rax), %r11 + movq 3832(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3svARB), .-GL_PREFIX(VertexAttrib3svARB) @@ -17737,7 +18007,7 @@ GL_PREFIX(VertexAttrib3svARB): GL_PREFIX(VertexAttrib4NbvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3792(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17747,13 +18017,13 @@ GL_PREFIX(VertexAttrib4NbvARB): popq %rbp popq %rsi popq %rdi - movq 3792(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3792(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17763,7 +18033,7 @@ GL_PREFIX(VertexAttrib4NbvARB): popq %rbp popq %rsi popq %rdi - movq 3792(%rax), %r11 + movq 3840(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NbvARB), .-GL_PREFIX(VertexAttrib4NbvARB) @@ -17774,7 +18044,7 @@ GL_PREFIX(VertexAttrib4NbvARB): GL_PREFIX(VertexAttrib4NivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3800(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17784,13 +18054,13 @@ GL_PREFIX(VertexAttrib4NivARB): popq %rbp popq %rsi popq %rdi - movq 3800(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3800(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17800,7 +18070,7 @@ GL_PREFIX(VertexAttrib4NivARB): popq %rbp popq %rsi popq %rdi - movq 3800(%rax), %r11 + movq 3848(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NivARB), .-GL_PREFIX(VertexAttrib4NivARB) @@ -17811,7 +18081,7 @@ GL_PREFIX(VertexAttrib4NivARB): GL_PREFIX(VertexAttrib4NsvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3808(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17821,13 +18091,13 @@ GL_PREFIX(VertexAttrib4NsvARB): popq %rbp popq %rsi popq %rdi - movq 3808(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3808(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17837,7 +18107,7 @@ GL_PREFIX(VertexAttrib4NsvARB): popq %rbp popq %rsi popq %rdi - movq 3808(%rax), %r11 + movq 3856(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NsvARB), .-GL_PREFIX(VertexAttrib4NsvARB) @@ -17848,7 +18118,7 @@ GL_PREFIX(VertexAttrib4NsvARB): GL_PREFIX(VertexAttrib4NubARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3816(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17862,13 +18132,13 @@ GL_PREFIX(VertexAttrib4NubARB): popq %rdx popq %rsi popq %rdi - movq 3816(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3816(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17882,7 +18152,7 @@ GL_PREFIX(VertexAttrib4NubARB): popq %rdx popq %rsi popq %rdi - movq 3816(%rax), %r11 + movq 3864(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NubARB), .-GL_PREFIX(VertexAttrib4NubARB) @@ -17893,7 +18163,7 @@ GL_PREFIX(VertexAttrib4NubARB): GL_PREFIX(VertexAttrib4NubvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3824(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17903,13 +18173,13 @@ GL_PREFIX(VertexAttrib4NubvARB): popq %rbp popq %rsi popq %rdi - movq 3824(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3824(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17919,7 +18189,7 @@ GL_PREFIX(VertexAttrib4NubvARB): popq %rbp popq %rsi popq %rdi - movq 3824(%rax), %r11 + movq 3872(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NubvARB), .-GL_PREFIX(VertexAttrib4NubvARB) @@ -17930,7 +18200,7 @@ GL_PREFIX(VertexAttrib4NubvARB): GL_PREFIX(VertexAttrib4NuivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3832(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17940,13 +18210,13 @@ GL_PREFIX(VertexAttrib4NuivARB): popq %rbp popq %rsi popq %rdi - movq 3832(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3832(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17956,7 +18226,7 @@ GL_PREFIX(VertexAttrib4NuivARB): popq %rbp popq %rsi popq %rdi - movq 3832(%rax), %r11 + movq 3880(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NuivARB), .-GL_PREFIX(VertexAttrib4NuivARB) @@ -17967,7 +18237,7 @@ GL_PREFIX(VertexAttrib4NuivARB): GL_PREFIX(VertexAttrib4NusvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3840(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -17977,13 +18247,13 @@ GL_PREFIX(VertexAttrib4NusvARB): popq %rbp popq %rsi popq %rdi - movq 3840(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3840(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -17993,7 +18263,7 @@ GL_PREFIX(VertexAttrib4NusvARB): popq %rbp popq %rsi popq %rdi - movq 3840(%rax), %r11 + movq 3888(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4NusvARB), .-GL_PREFIX(VertexAttrib4NusvARB) @@ -18004,7 +18274,7 @@ GL_PREFIX(VertexAttrib4NusvARB): GL_PREFIX(VertexAttrib4bvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3848(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18014,13 +18284,13 @@ GL_PREFIX(VertexAttrib4bvARB): popq %rbp popq %rsi popq %rdi - movq 3848(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3848(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18030,7 +18300,7 @@ GL_PREFIX(VertexAttrib4bvARB): popq %rbp popq %rsi popq %rdi - movq 3848(%rax), %r11 + movq 3896(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4bvARB), .-GL_PREFIX(VertexAttrib4bvARB) @@ -18041,7 +18311,7 @@ GL_PREFIX(VertexAttrib4bvARB): GL_PREFIX(VertexAttrib4dARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3856(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -18057,13 +18327,13 @@ GL_PREFIX(VertexAttrib4dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3856(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3856(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -18079,7 +18349,7 @@ GL_PREFIX(VertexAttrib4dARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3856(%rax), %r11 + movq 3904(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dARB), .-GL_PREFIX(VertexAttrib4dARB) @@ -18090,7 +18360,7 @@ GL_PREFIX(VertexAttrib4dARB): GL_PREFIX(VertexAttrib4dvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3864(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18100,13 +18370,13 @@ GL_PREFIX(VertexAttrib4dvARB): popq %rbp popq %rsi popq %rdi - movq 3864(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3864(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18116,7 +18386,7 @@ GL_PREFIX(VertexAttrib4dvARB): popq %rbp popq %rsi popq %rdi - movq 3864(%rax), %r11 + movq 3912(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dvARB), .-GL_PREFIX(VertexAttrib4dvARB) @@ -18127,7 +18397,7 @@ GL_PREFIX(VertexAttrib4dvARB): GL_PREFIX(VertexAttrib4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3872(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -18143,13 +18413,13 @@ GL_PREFIX(VertexAttrib4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3872(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3872(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -18165,7 +18435,7 @@ GL_PREFIX(VertexAttrib4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 3872(%rax), %r11 + movq 3920(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fARB), .-GL_PREFIX(VertexAttrib4fARB) @@ -18176,7 +18446,7 @@ GL_PREFIX(VertexAttrib4fARB): GL_PREFIX(VertexAttrib4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3880(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18186,13 +18456,13 @@ GL_PREFIX(VertexAttrib4fvARB): popq %rbp popq %rsi popq %rdi - movq 3880(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3880(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18202,7 +18472,7 @@ GL_PREFIX(VertexAttrib4fvARB): popq %rbp popq %rsi popq %rdi - movq 3880(%rax), %r11 + movq 3928(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fvARB), .-GL_PREFIX(VertexAttrib4fvARB) @@ -18213,7 +18483,7 @@ GL_PREFIX(VertexAttrib4fvARB): GL_PREFIX(VertexAttrib4ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3888(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18223,13 +18493,13 @@ GL_PREFIX(VertexAttrib4ivARB): popq %rbp popq %rsi popq %rdi - movq 3888(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3888(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18239,7 +18509,7 @@ GL_PREFIX(VertexAttrib4ivARB): popq %rbp popq %rsi popq %rdi - movq 3888(%rax), %r11 + movq 3936(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ivARB), .-GL_PREFIX(VertexAttrib4ivARB) @@ -18250,7 +18520,7 @@ GL_PREFIX(VertexAttrib4ivARB): GL_PREFIX(VertexAttrib4sARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3896(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18264,13 +18534,13 @@ GL_PREFIX(VertexAttrib4sARB): popq %rdx popq %rsi popq %rdi - movq 3896(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3896(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18284,7 +18554,7 @@ GL_PREFIX(VertexAttrib4sARB): popq %rdx popq %rsi popq %rdi - movq 3896(%rax), %r11 + movq 3944(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4sARB), .-GL_PREFIX(VertexAttrib4sARB) @@ -18295,7 +18565,7 @@ GL_PREFIX(VertexAttrib4sARB): GL_PREFIX(VertexAttrib4svARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3904(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18305,13 +18575,13 @@ GL_PREFIX(VertexAttrib4svARB): popq %rbp popq %rsi popq %rdi - movq 3904(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3904(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18321,7 +18591,7 @@ GL_PREFIX(VertexAttrib4svARB): popq %rbp popq %rsi popq %rdi - movq 3904(%rax), %r11 + movq 3952(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4svARB), .-GL_PREFIX(VertexAttrib4svARB) @@ -18332,7 +18602,7 @@ GL_PREFIX(VertexAttrib4svARB): GL_PREFIX(VertexAttrib4ubvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3912(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18342,13 +18612,13 @@ GL_PREFIX(VertexAttrib4ubvARB): popq %rbp popq %rsi popq %rdi - movq 3912(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3912(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18358,7 +18628,7 @@ GL_PREFIX(VertexAttrib4ubvARB): popq %rbp popq %rsi popq %rdi - movq 3912(%rax), %r11 + movq 3960(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ubvARB), .-GL_PREFIX(VertexAttrib4ubvARB) @@ -18369,7 +18639,7 @@ GL_PREFIX(VertexAttrib4ubvARB): GL_PREFIX(VertexAttrib4uivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3920(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18379,13 +18649,13 @@ GL_PREFIX(VertexAttrib4uivARB): popq %rbp popq %rsi popq %rdi - movq 3920(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3920(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18395,7 +18665,7 @@ GL_PREFIX(VertexAttrib4uivARB): popq %rbp popq %rsi popq %rdi - movq 3920(%rax), %r11 + movq 3968(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4uivARB), .-GL_PREFIX(VertexAttrib4uivARB) @@ -18406,7 +18676,7 @@ GL_PREFIX(VertexAttrib4uivARB): GL_PREFIX(VertexAttrib4usvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3928(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18416,13 +18686,13 @@ GL_PREFIX(VertexAttrib4usvARB): popq %rbp popq %rsi popq %rdi - movq 3928(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3928(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18432,7 +18702,7 @@ GL_PREFIX(VertexAttrib4usvARB): popq %rbp popq %rsi popq %rdi - movq 3928(%rax), %r11 + movq 3976(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4usvARB), .-GL_PREFIX(VertexAttrib4usvARB) @@ -18443,7 +18713,7 @@ GL_PREFIX(VertexAttrib4usvARB): GL_PREFIX(VertexAttribPointerARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3936(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18461,13 +18731,13 @@ GL_PREFIX(VertexAttribPointerARB): popq %rdx popq %rsi popq %rdi - movq 3936(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3936(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18485,7 +18755,7 @@ GL_PREFIX(VertexAttribPointerARB): popq %rdx popq %rsi popq %rdi - movq 3936(%rax), %r11 + movq 3984(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribPointerARB), .-GL_PREFIX(VertexAttribPointerARB) @@ -18496,7 +18766,7 @@ GL_PREFIX(VertexAttribPointerARB): GL_PREFIX(BindBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3944(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18506,13 +18776,13 @@ GL_PREFIX(BindBufferARB): popq %rbp popq %rsi popq %rdi - movq 3944(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3944(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18522,7 +18792,7 @@ GL_PREFIX(BindBufferARB): popq %rbp popq %rsi popq %rdi - movq 3944(%rax), %r11 + movq 3992(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindBufferARB), .-GL_PREFIX(BindBufferARB) @@ -18533,7 +18803,7 @@ GL_PREFIX(BindBufferARB): GL_PREFIX(BufferDataARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3952(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18547,13 +18817,13 @@ GL_PREFIX(BufferDataARB): popq %rdx popq %rsi popq %rdi - movq 3952(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3952(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18567,7 +18837,7 @@ GL_PREFIX(BufferDataARB): popq %rdx popq %rsi popq %rdi - movq 3952(%rax), %r11 + movq 4000(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BufferDataARB), .-GL_PREFIX(BufferDataARB) @@ -18578,7 +18848,7 @@ GL_PREFIX(BufferDataARB): GL_PREFIX(BufferSubDataARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3960(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18592,13 +18862,13 @@ GL_PREFIX(BufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 3960(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3960(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18612,7 +18882,7 @@ GL_PREFIX(BufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 3960(%rax), %r11 + movq 4008(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BufferSubDataARB), .-GL_PREFIX(BufferSubDataARB) @@ -18623,7 +18893,7 @@ GL_PREFIX(BufferSubDataARB): GL_PREFIX(DeleteBuffersARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3968(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18633,13 +18903,13 @@ GL_PREFIX(DeleteBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3968(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3968(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18649,7 +18919,7 @@ GL_PREFIX(DeleteBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3968(%rax), %r11 + movq 4016(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteBuffersARB), .-GL_PREFIX(DeleteBuffersARB) @@ -18660,7 +18930,7 @@ GL_PREFIX(DeleteBuffersARB): GL_PREFIX(GenBuffersARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3976(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18670,13 +18940,13 @@ GL_PREFIX(GenBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3976(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3976(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18686,7 +18956,7 @@ GL_PREFIX(GenBuffersARB): popq %rbp popq %rsi popq %rdi - movq 3976(%rax), %r11 + movq 4024(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenBuffersARB), .-GL_PREFIX(GenBuffersARB) @@ -18697,7 +18967,7 @@ GL_PREFIX(GenBuffersARB): GL_PREFIX(GetBufferParameterivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3984(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18707,13 +18977,13 @@ GL_PREFIX(GetBufferParameterivARB): popq %rdx popq %rsi popq %rdi - movq 3984(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3984(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18723,7 +18993,7 @@ GL_PREFIX(GetBufferParameterivARB): popq %rdx popq %rsi popq %rdi - movq 3984(%rax), %r11 + movq 4032(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetBufferParameterivARB), .-GL_PREFIX(GetBufferParameterivARB) @@ -18734,7 +19004,7 @@ GL_PREFIX(GetBufferParameterivARB): GL_PREFIX(GetBufferPointervARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 3992(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18744,13 +19014,13 @@ GL_PREFIX(GetBufferPointervARB): popq %rdx popq %rsi popq %rdi - movq 3992(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 3992(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18760,7 +19030,7 @@ GL_PREFIX(GetBufferPointervARB): popq %rdx popq %rsi popq %rdi - movq 3992(%rax), %r11 + movq 4040(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetBufferPointervARB), .-GL_PREFIX(GetBufferPointervARB) @@ -18771,7 +19041,7 @@ GL_PREFIX(GetBufferPointervARB): GL_PREFIX(GetBufferSubDataARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4000(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18785,13 +19055,13 @@ GL_PREFIX(GetBufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 4000(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4000(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18805,7 +19075,7 @@ GL_PREFIX(GetBufferSubDataARB): popq %rdx popq %rsi popq %rdi - movq 4000(%rax), %r11 + movq 4048(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetBufferSubDataARB), .-GL_PREFIX(GetBufferSubDataARB) @@ -18816,25 +19086,25 @@ GL_PREFIX(GetBufferSubDataARB): GL_PREFIX(IsBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4008(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4008(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4008(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4008(%rax), %r11 + movq 4056(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsBufferARB), .-GL_PREFIX(IsBufferARB) @@ -18845,7 +19115,7 @@ GL_PREFIX(IsBufferARB): GL_PREFIX(MapBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4016(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18855,13 +19125,13 @@ GL_PREFIX(MapBufferARB): popq %rbp popq %rsi popq %rdi - movq 4016(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4016(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18871,7 +19141,7 @@ GL_PREFIX(MapBufferARB): popq %rbp popq %rsi popq %rdi - movq 4016(%rax), %r11 + movq 4064(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MapBufferARB), .-GL_PREFIX(MapBufferARB) @@ -18882,25 +19152,25 @@ GL_PREFIX(MapBufferARB): GL_PREFIX(UnmapBufferARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4024(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4024(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4024(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4024(%rax), %r11 + movq 4072(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UnmapBufferARB), .-GL_PREFIX(UnmapBufferARB) @@ -18911,7 +19181,7 @@ GL_PREFIX(UnmapBufferARB): GL_PREFIX(BeginQueryARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4032(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18921,13 +19191,13 @@ GL_PREFIX(BeginQueryARB): popq %rbp popq %rsi popq %rdi - movq 4032(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4032(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18937,7 +19207,7 @@ GL_PREFIX(BeginQueryARB): popq %rbp popq %rsi popq %rdi - movq 4032(%rax), %r11 + movq 4080(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BeginQueryARB), .-GL_PREFIX(BeginQueryARB) @@ -18948,7 +19218,7 @@ GL_PREFIX(BeginQueryARB): GL_PREFIX(DeleteQueriesARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4040(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -18958,13 +19228,13 @@ GL_PREFIX(DeleteQueriesARB): popq %rbp popq %rsi popq %rdi - movq 4040(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4040(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -18974,7 +19244,7 @@ GL_PREFIX(DeleteQueriesARB): popq %rbp popq %rsi popq %rdi - movq 4040(%rax), %r11 + movq 4088(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteQueriesARB), .-GL_PREFIX(DeleteQueriesARB) @@ -18985,25 +19255,25 @@ GL_PREFIX(DeleteQueriesARB): GL_PREFIX(EndQueryARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4048(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4048(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4048(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4048(%rax), %r11 + movq 4096(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EndQueryARB), .-GL_PREFIX(EndQueryARB) @@ -19014,7 +19284,7 @@ GL_PREFIX(EndQueryARB): GL_PREFIX(GenQueriesARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4056(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19024,13 +19294,13 @@ GL_PREFIX(GenQueriesARB): popq %rbp popq %rsi popq %rdi - movq 4056(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4056(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19040,7 +19310,7 @@ GL_PREFIX(GenQueriesARB): popq %rbp popq %rsi popq %rdi - movq 4056(%rax), %r11 + movq 4104(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenQueriesARB), .-GL_PREFIX(GenQueriesARB) @@ -19051,7 +19321,7 @@ GL_PREFIX(GenQueriesARB): GL_PREFIX(GetQueryObjectivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4064(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19061,13 +19331,13 @@ GL_PREFIX(GetQueryObjectivARB): popq %rdx popq %rsi popq %rdi - movq 4064(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4064(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19077,7 +19347,7 @@ GL_PREFIX(GetQueryObjectivARB): popq %rdx popq %rsi popq %rdi - movq 4064(%rax), %r11 + movq 4112(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetQueryObjectivARB), .-GL_PREFIX(GetQueryObjectivARB) @@ -19088,7 +19358,7 @@ GL_PREFIX(GetQueryObjectivARB): GL_PREFIX(GetQueryObjectuivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4072(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19098,13 +19368,13 @@ GL_PREFIX(GetQueryObjectuivARB): popq %rdx popq %rsi popq %rdi - movq 4072(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4072(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19114,7 +19384,7 @@ GL_PREFIX(GetQueryObjectuivARB): popq %rdx popq %rsi popq %rdi - movq 4072(%rax), %r11 + movq 4120(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetQueryObjectuivARB), .-GL_PREFIX(GetQueryObjectuivARB) @@ -19125,7 +19395,7 @@ GL_PREFIX(GetQueryObjectuivARB): GL_PREFIX(GetQueryivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4080(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19135,13 +19405,13 @@ GL_PREFIX(GetQueryivARB): popq %rdx popq %rsi popq %rdi - movq 4080(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4080(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19151,7 +19421,7 @@ GL_PREFIX(GetQueryivARB): popq %rdx popq %rsi popq %rdi - movq 4080(%rax), %r11 + movq 4128(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetQueryivARB), .-GL_PREFIX(GetQueryivARB) @@ -19162,25 +19432,25 @@ GL_PREFIX(GetQueryivARB): GL_PREFIX(IsQueryARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4088(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4088(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4088(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4088(%rax), %r11 + movq 4136(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsQueryARB), .-GL_PREFIX(IsQueryARB) @@ -19191,7 +19461,7 @@ GL_PREFIX(IsQueryARB): GL_PREFIX(AttachObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4096(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19201,13 +19471,13 @@ GL_PREFIX(AttachObjectARB): popq %rbp popq %rsi popq %rdi - movq 4096(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4096(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19217,7 +19487,7 @@ GL_PREFIX(AttachObjectARB): popq %rbp popq %rsi popq %rdi - movq 4096(%rax), %r11 + movq 4144(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AttachObjectARB), .-GL_PREFIX(AttachObjectARB) @@ -19228,25 +19498,25 @@ GL_PREFIX(AttachObjectARB): GL_PREFIX(CompileShaderARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4104(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4104(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4104(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4104(%rax), %r11 + movq 4152(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CompileShaderARB), .-GL_PREFIX(CompileShaderARB) @@ -19257,25 +19527,25 @@ GL_PREFIX(CompileShaderARB): GL_PREFIX(CreateProgramObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4112(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4112(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4112(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4112(%rax), %r11 + movq 4160(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CreateProgramObjectARB), .-GL_PREFIX(CreateProgramObjectARB) @@ -19286,25 +19556,25 @@ GL_PREFIX(CreateProgramObjectARB): GL_PREFIX(CreateShaderObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4120(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4120(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4120(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4120(%rax), %r11 + movq 4168(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CreateShaderObjectARB), .-GL_PREFIX(CreateShaderObjectARB) @@ -19315,25 +19585,25 @@ GL_PREFIX(CreateShaderObjectARB): GL_PREFIX(DeleteObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4128(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4128(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4128(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4128(%rax), %r11 + movq 4176(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteObjectARB), .-GL_PREFIX(DeleteObjectARB) @@ -19344,7 +19614,7 @@ GL_PREFIX(DeleteObjectARB): GL_PREFIX(DetachObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4136(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19354,13 +19624,13 @@ GL_PREFIX(DetachObjectARB): popq %rbp popq %rsi popq %rdi - movq 4136(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4136(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19370,7 +19640,7 @@ GL_PREFIX(DetachObjectARB): popq %rbp popq %rsi popq %rdi - movq 4136(%rax), %r11 + movq 4184(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DetachObjectARB), .-GL_PREFIX(DetachObjectARB) @@ -19381,7 +19651,7 @@ GL_PREFIX(DetachObjectARB): GL_PREFIX(GetActiveUniformARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4144(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19399,13 +19669,13 @@ GL_PREFIX(GetActiveUniformARB): popq %rdx popq %rsi popq %rdi - movq 4144(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4144(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19423,7 +19693,7 @@ GL_PREFIX(GetActiveUniformARB): popq %rdx popq %rsi popq %rdi - movq 4144(%rax), %r11 + movq 4192(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetActiveUniformARB), .-GL_PREFIX(GetActiveUniformARB) @@ -19434,7 +19704,7 @@ GL_PREFIX(GetActiveUniformARB): GL_PREFIX(GetAttachedObjectsARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4152(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19448,13 +19718,13 @@ GL_PREFIX(GetAttachedObjectsARB): popq %rdx popq %rsi popq %rdi - movq 4152(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4152(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19468,7 +19738,7 @@ GL_PREFIX(GetAttachedObjectsARB): popq %rdx popq %rsi popq %rdi - movq 4152(%rax), %r11 + movq 4200(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetAttachedObjectsARB), .-GL_PREFIX(GetAttachedObjectsARB) @@ -19479,25 +19749,25 @@ GL_PREFIX(GetAttachedObjectsARB): GL_PREFIX(GetHandleARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4160(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4160(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4160(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4160(%rax), %r11 + movq 4208(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetHandleARB), .-GL_PREFIX(GetHandleARB) @@ -19508,7 +19778,7 @@ GL_PREFIX(GetHandleARB): GL_PREFIX(GetInfoLogARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4168(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19522,13 +19792,13 @@ GL_PREFIX(GetInfoLogARB): popq %rdx popq %rsi popq %rdi - movq 4168(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4168(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19542,7 +19812,7 @@ GL_PREFIX(GetInfoLogARB): popq %rdx popq %rsi popq %rdi - movq 4168(%rax), %r11 + movq 4216(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetInfoLogARB), .-GL_PREFIX(GetInfoLogARB) @@ -19553,7 +19823,7 @@ GL_PREFIX(GetInfoLogARB): GL_PREFIX(GetObjectParameterfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4176(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19563,13 +19833,13 @@ GL_PREFIX(GetObjectParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 4176(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4176(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19579,7 +19849,7 @@ GL_PREFIX(GetObjectParameterfvARB): popq %rdx popq %rsi popq %rdi - movq 4176(%rax), %r11 + movq 4224(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetObjectParameterfvARB), .-GL_PREFIX(GetObjectParameterfvARB) @@ -19590,7 +19860,7 @@ GL_PREFIX(GetObjectParameterfvARB): GL_PREFIX(GetObjectParameterivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4184(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19600,13 +19870,13 @@ GL_PREFIX(GetObjectParameterivARB): popq %rdx popq %rsi popq %rdi - movq 4184(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4184(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19616,7 +19886,7 @@ GL_PREFIX(GetObjectParameterivARB): popq %rdx popq %rsi popq %rdi - movq 4184(%rax), %r11 + movq 4232(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetObjectParameterivARB), .-GL_PREFIX(GetObjectParameterivARB) @@ -19627,7 +19897,7 @@ GL_PREFIX(GetObjectParameterivARB): GL_PREFIX(GetShaderSourceARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4192(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19641,13 +19911,13 @@ GL_PREFIX(GetShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4192(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4192(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19661,7 +19931,7 @@ GL_PREFIX(GetShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4192(%rax), %r11 + movq 4240(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetShaderSourceARB), .-GL_PREFIX(GetShaderSourceARB) @@ -19672,7 +19942,7 @@ GL_PREFIX(GetShaderSourceARB): GL_PREFIX(GetUniformLocationARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4200(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19682,13 +19952,13 @@ GL_PREFIX(GetUniformLocationARB): popq %rbp popq %rsi popq %rdi - movq 4200(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4200(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19698,7 +19968,7 @@ GL_PREFIX(GetUniformLocationARB): popq %rbp popq %rsi popq %rdi - movq 4200(%rax), %r11 + movq 4248(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetUniformLocationARB), .-GL_PREFIX(GetUniformLocationARB) @@ -19709,7 +19979,7 @@ GL_PREFIX(GetUniformLocationARB): GL_PREFIX(GetUniformfvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4208(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19719,13 +19989,13 @@ GL_PREFIX(GetUniformfvARB): popq %rdx popq %rsi popq %rdi - movq 4208(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4208(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19735,7 +20005,7 @@ GL_PREFIX(GetUniformfvARB): popq %rdx popq %rsi popq %rdi - movq 4208(%rax), %r11 + movq 4256(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetUniformfvARB), .-GL_PREFIX(GetUniformfvARB) @@ -19746,7 +20016,7 @@ GL_PREFIX(GetUniformfvARB): GL_PREFIX(GetUniformivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4216(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19756,13 +20026,13 @@ GL_PREFIX(GetUniformivARB): popq %rdx popq %rsi popq %rdi - movq 4216(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4216(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19772,7 +20042,7 @@ GL_PREFIX(GetUniformivARB): popq %rdx popq %rsi popq %rdi - movq 4216(%rax), %r11 + movq 4264(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetUniformivARB), .-GL_PREFIX(GetUniformivARB) @@ -19783,25 +20053,25 @@ GL_PREFIX(GetUniformivARB): GL_PREFIX(LinkProgramARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4224(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4224(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4224(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4224(%rax), %r11 + movq 4272(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LinkProgramARB), .-GL_PREFIX(LinkProgramARB) @@ -19812,7 +20082,7 @@ GL_PREFIX(LinkProgramARB): GL_PREFIX(ShaderSourceARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4232(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19826,13 +20096,13 @@ GL_PREFIX(ShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4232(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4232(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19846,7 +20116,7 @@ GL_PREFIX(ShaderSourceARB): popq %rdx popq %rsi popq %rdi - movq 4232(%rax), %r11 + movq 4280(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ShaderSourceARB), .-GL_PREFIX(ShaderSourceARB) @@ -19857,7 +20127,7 @@ GL_PREFIX(ShaderSourceARB): GL_PREFIX(Uniform1fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4240(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -19867,13 +20137,13 @@ GL_PREFIX(Uniform1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4240(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4240(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -19883,7 +20153,7 @@ GL_PREFIX(Uniform1fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4240(%rax), %r11 + movq 4288(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1fARB), .-GL_PREFIX(Uniform1fARB) @@ -19894,7 +20164,7 @@ GL_PREFIX(Uniform1fARB): GL_PREFIX(Uniform1fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4248(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19904,13 +20174,13 @@ GL_PREFIX(Uniform1fvARB): popq %rdx popq %rsi popq %rdi - movq 4248(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4248(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19920,7 +20190,7 @@ GL_PREFIX(Uniform1fvARB): popq %rdx popq %rsi popq %rdi - movq 4248(%rax), %r11 + movq 4296(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1fvARB), .-GL_PREFIX(Uniform1fvARB) @@ -19931,7 +20201,7 @@ GL_PREFIX(Uniform1fvARB): GL_PREFIX(Uniform1iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4256(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19941,13 +20211,13 @@ GL_PREFIX(Uniform1iARB): popq %rbp popq %rsi popq %rdi - movq 4256(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4256(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19957,7 +20227,7 @@ GL_PREFIX(Uniform1iARB): popq %rbp popq %rsi popq %rdi - movq 4256(%rax), %r11 + movq 4304(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1iARB), .-GL_PREFIX(Uniform1iARB) @@ -19968,7 +20238,7 @@ GL_PREFIX(Uniform1iARB): GL_PREFIX(Uniform1ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4264(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -19978,13 +20248,13 @@ GL_PREFIX(Uniform1ivARB): popq %rdx popq %rsi popq %rdi - movq 4264(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4264(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -19994,7 +20264,7 @@ GL_PREFIX(Uniform1ivARB): popq %rdx popq %rsi popq %rdi - movq 4264(%rax), %r11 + movq 4312(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform1ivARB), .-GL_PREFIX(Uniform1ivARB) @@ -20005,7 +20275,7 @@ GL_PREFIX(Uniform1ivARB): GL_PREFIX(Uniform2fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4272(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -20017,13 +20287,13 @@ GL_PREFIX(Uniform2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4272(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4272(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -20035,7 +20305,7 @@ GL_PREFIX(Uniform2fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4272(%rax), %r11 + movq 4320(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2fARB), .-GL_PREFIX(Uniform2fARB) @@ -20046,7 +20316,7 @@ GL_PREFIX(Uniform2fARB): GL_PREFIX(Uniform2fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4280(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20056,13 +20326,13 @@ GL_PREFIX(Uniform2fvARB): popq %rdx popq %rsi popq %rdi - movq 4280(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4280(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20072,7 +20342,7 @@ GL_PREFIX(Uniform2fvARB): popq %rdx popq %rsi popq %rdi - movq 4280(%rax), %r11 + movq 4328(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2fvARB), .-GL_PREFIX(Uniform2fvARB) @@ -20083,7 +20353,7 @@ GL_PREFIX(Uniform2fvARB): GL_PREFIX(Uniform2iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4288(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20093,13 +20363,13 @@ GL_PREFIX(Uniform2iARB): popq %rdx popq %rsi popq %rdi - movq 4288(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4288(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20109,7 +20379,7 @@ GL_PREFIX(Uniform2iARB): popq %rdx popq %rsi popq %rdi - movq 4288(%rax), %r11 + movq 4336(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2iARB), .-GL_PREFIX(Uniform2iARB) @@ -20120,7 +20390,7 @@ GL_PREFIX(Uniform2iARB): GL_PREFIX(Uniform2ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4296(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20130,13 +20400,13 @@ GL_PREFIX(Uniform2ivARB): popq %rdx popq %rsi popq %rdi - movq 4296(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4296(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20146,7 +20416,7 @@ GL_PREFIX(Uniform2ivARB): popq %rdx popq %rsi popq %rdi - movq 4296(%rax), %r11 + movq 4344(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform2ivARB), .-GL_PREFIX(Uniform2ivARB) @@ -20157,7 +20427,7 @@ GL_PREFIX(Uniform2ivARB): GL_PREFIX(Uniform3fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4304(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -20171,13 +20441,13 @@ GL_PREFIX(Uniform3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4304(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4304(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -20191,7 +20461,7 @@ GL_PREFIX(Uniform3fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4304(%rax), %r11 + movq 4352(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3fARB), .-GL_PREFIX(Uniform3fARB) @@ -20202,7 +20472,7 @@ GL_PREFIX(Uniform3fARB): GL_PREFIX(Uniform3fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4312(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20212,13 +20482,13 @@ GL_PREFIX(Uniform3fvARB): popq %rdx popq %rsi popq %rdi - movq 4312(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4312(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20228,7 +20498,7 @@ GL_PREFIX(Uniform3fvARB): popq %rdx popq %rsi popq %rdi - movq 4312(%rax), %r11 + movq 4360(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3fvARB), .-GL_PREFIX(Uniform3fvARB) @@ -20239,7 +20509,7 @@ GL_PREFIX(Uniform3fvARB): GL_PREFIX(Uniform3iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4320(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20253,13 +20523,13 @@ GL_PREFIX(Uniform3iARB): popq %rdx popq %rsi popq %rdi - movq 4320(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4320(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20273,7 +20543,7 @@ GL_PREFIX(Uniform3iARB): popq %rdx popq %rsi popq %rdi - movq 4320(%rax), %r11 + movq 4368(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3iARB), .-GL_PREFIX(Uniform3iARB) @@ -20284,7 +20554,7 @@ GL_PREFIX(Uniform3iARB): GL_PREFIX(Uniform3ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4328(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20294,13 +20564,13 @@ GL_PREFIX(Uniform3ivARB): popq %rdx popq %rsi popq %rdi - movq 4328(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4328(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20310,7 +20580,7 @@ GL_PREFIX(Uniform3ivARB): popq %rdx popq %rsi popq %rdi - movq 4328(%rax), %r11 + movq 4376(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform3ivARB), .-GL_PREFIX(Uniform3ivARB) @@ -20321,7 +20591,7 @@ GL_PREFIX(Uniform3ivARB): GL_PREFIX(Uniform4fARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4336(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -20337,13 +20607,13 @@ GL_PREFIX(Uniform4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4336(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4336(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -20359,7 +20629,7 @@ GL_PREFIX(Uniform4fARB): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 4336(%rax), %r11 + movq 4384(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4fARB), .-GL_PREFIX(Uniform4fARB) @@ -20370,7 +20640,7 @@ GL_PREFIX(Uniform4fARB): GL_PREFIX(Uniform4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4344(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20380,13 +20650,13 @@ GL_PREFIX(Uniform4fvARB): popq %rdx popq %rsi popq %rdi - movq 4344(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4344(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20396,7 +20666,7 @@ GL_PREFIX(Uniform4fvARB): popq %rdx popq %rsi popq %rdi - movq 4344(%rax), %r11 + movq 4392(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4fvARB), .-GL_PREFIX(Uniform4fvARB) @@ -20407,7 +20677,7 @@ GL_PREFIX(Uniform4fvARB): GL_PREFIX(Uniform4iARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4352(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20421,13 +20691,13 @@ GL_PREFIX(Uniform4iARB): popq %rdx popq %rsi popq %rdi - movq 4352(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4352(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20441,7 +20711,7 @@ GL_PREFIX(Uniform4iARB): popq %rdx popq %rsi popq %rdi - movq 4352(%rax), %r11 + movq 4400(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4iARB), .-GL_PREFIX(Uniform4iARB) @@ -20452,7 +20722,7 @@ GL_PREFIX(Uniform4iARB): GL_PREFIX(Uniform4ivARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4360(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20462,13 +20732,13 @@ GL_PREFIX(Uniform4ivARB): popq %rdx popq %rsi popq %rdi - movq 4360(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4360(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20478,7 +20748,7 @@ GL_PREFIX(Uniform4ivARB): popq %rdx popq %rsi popq %rdi - movq 4360(%rax), %r11 + movq 4408(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(Uniform4ivARB), .-GL_PREFIX(Uniform4ivARB) @@ -20489,7 +20759,7 @@ GL_PREFIX(Uniform4ivARB): GL_PREFIX(UniformMatrix2fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4368(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20503,13 +20773,13 @@ GL_PREFIX(UniformMatrix2fvARB): popq %rdx popq %rsi popq %rdi - movq 4368(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4368(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20523,7 +20793,7 @@ GL_PREFIX(UniformMatrix2fvARB): popq %rdx popq %rsi popq %rdi - movq 4368(%rax), %r11 + movq 4416(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UniformMatrix2fvARB), .-GL_PREFIX(UniformMatrix2fvARB) @@ -20534,7 +20804,7 @@ GL_PREFIX(UniformMatrix2fvARB): GL_PREFIX(UniformMatrix3fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4376(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20548,13 +20818,13 @@ GL_PREFIX(UniformMatrix3fvARB): popq %rdx popq %rsi popq %rdi - movq 4376(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4376(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20568,7 +20838,7 @@ GL_PREFIX(UniformMatrix3fvARB): popq %rdx popq %rsi popq %rdi - movq 4376(%rax), %r11 + movq 4424(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UniformMatrix3fvARB), .-GL_PREFIX(UniformMatrix3fvARB) @@ -20579,7 +20849,7 @@ GL_PREFIX(UniformMatrix3fvARB): GL_PREFIX(UniformMatrix4fvARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4384(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20593,13 +20863,13 @@ GL_PREFIX(UniformMatrix4fvARB): popq %rdx popq %rsi popq %rdi - movq 4384(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4384(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20613,7 +20883,7 @@ GL_PREFIX(UniformMatrix4fvARB): popq %rdx popq %rsi popq %rdi - movq 4384(%rax), %r11 + movq 4432(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UniformMatrix4fvARB), .-GL_PREFIX(UniformMatrix4fvARB) @@ -20624,25 +20894,25 @@ GL_PREFIX(UniformMatrix4fvARB): GL_PREFIX(UseProgramObjectARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4392(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4392(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4392(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4392(%rax), %r11 + movq 4440(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UseProgramObjectARB), .-GL_PREFIX(UseProgramObjectARB) @@ -20653,25 +20923,25 @@ GL_PREFIX(UseProgramObjectARB): GL_PREFIX(ValidateProgramARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4400(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4400(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4400(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4400(%rax), %r11 + movq 4448(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ValidateProgramARB), .-GL_PREFIX(ValidateProgramARB) @@ -20682,7 +20952,7 @@ GL_PREFIX(ValidateProgramARB): GL_PREFIX(BindAttribLocationARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4408(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20692,13 +20962,13 @@ GL_PREFIX(BindAttribLocationARB): popq %rdx popq %rsi popq %rdi - movq 4408(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4408(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20708,7 +20978,7 @@ GL_PREFIX(BindAttribLocationARB): popq %rdx popq %rsi popq %rdi - movq 4408(%rax), %r11 + movq 4456(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindAttribLocationARB), .-GL_PREFIX(BindAttribLocationARB) @@ -20719,7 +20989,7 @@ GL_PREFIX(BindAttribLocationARB): GL_PREFIX(GetActiveAttribARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4416(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20737,13 +21007,13 @@ GL_PREFIX(GetActiveAttribARB): popq %rdx popq %rsi popq %rdi - movq 4416(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4416(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20761,7 +21031,7 @@ GL_PREFIX(GetActiveAttribARB): popq %rdx popq %rsi popq %rdi - movq 4416(%rax), %r11 + movq 4464(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetActiveAttribARB), .-GL_PREFIX(GetActiveAttribARB) @@ -20772,7 +21042,7 @@ GL_PREFIX(GetActiveAttribARB): GL_PREFIX(GetAttribLocationARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4424(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20782,13 +21052,13 @@ GL_PREFIX(GetAttribLocationARB): popq %rbp popq %rsi popq %rdi - movq 4424(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4424(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20798,7 +21068,7 @@ GL_PREFIX(GetAttribLocationARB): popq %rbp popq %rsi popq %rdi - movq 4424(%rax), %r11 + movq 4472(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetAttribLocationARB), .-GL_PREFIX(GetAttribLocationARB) @@ -20809,7 +21079,7 @@ GL_PREFIX(GetAttribLocationARB): GL_PREFIX(DrawBuffersARB): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4432(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20819,13 +21089,13 @@ GL_PREFIX(DrawBuffersARB): popq %rbp popq %rsi popq %rdi - movq 4432(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4432(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20835,7 +21105,7 @@ GL_PREFIX(DrawBuffersARB): popq %rbp popq %rsi popq %rdi - movq 4432(%rax), %r11 + movq 4480(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DrawBuffersARB), .-GL_PREFIX(DrawBuffersARB) @@ -20846,7 +21116,7 @@ GL_PREFIX(DrawBuffersARB): GL_PREFIX(PolygonOffsetEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4440(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -20856,13 +21126,13 @@ GL_PREFIX(PolygonOffsetEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4440(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4440(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -20872,19 +21142,19 @@ GL_PREFIX(PolygonOffsetEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4440(%rax), %r11 + movq 4488(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PolygonOffsetEXT), .-GL_PREFIX(PolygonOffsetEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_556) - .type GL_PREFIX(_dispatch_stub_556), @function - HIDDEN(GL_PREFIX(_dispatch_stub_556)) -GL_PREFIX(_dispatch_stub_556): + .globl GL_PREFIX(_dispatch_stub_562) + .type GL_PREFIX(_dispatch_stub_562), @function + HIDDEN(GL_PREFIX(_dispatch_stub_562)) +GL_PREFIX(_dispatch_stub_562): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4448(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20894,13 +21164,13 @@ GL_PREFIX(_dispatch_stub_556): popq %rbp popq %rsi popq %rdi - movq 4448(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4448(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20910,19 +21180,19 @@ GL_PREFIX(_dispatch_stub_556): popq %rbp popq %rsi popq %rdi - movq 4448(%rax), %r11 + movq 4496(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_556), .-GL_PREFIX(_dispatch_stub_556) + .size GL_PREFIX(_dispatch_stub_562), .-GL_PREFIX(_dispatch_stub_562) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_557) - .type GL_PREFIX(_dispatch_stub_557), @function - HIDDEN(GL_PREFIX(_dispatch_stub_557)) -GL_PREFIX(_dispatch_stub_557): + .globl GL_PREFIX(_dispatch_stub_563) + .type GL_PREFIX(_dispatch_stub_563), @function + HIDDEN(GL_PREFIX(_dispatch_stub_563)) +GL_PREFIX(_dispatch_stub_563): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4456(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -20932,13 +21202,13 @@ GL_PREFIX(_dispatch_stub_557): popq %rbp popq %rsi popq %rdi - movq 4456(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4456(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -20948,19 +21218,19 @@ GL_PREFIX(_dispatch_stub_557): popq %rbp popq %rsi popq %rdi - movq 4456(%rax), %r11 + movq 4504(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_557), .-GL_PREFIX(_dispatch_stub_557) + .size GL_PREFIX(_dispatch_stub_563), .-GL_PREFIX(_dispatch_stub_563) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_558) - .type GL_PREFIX(_dispatch_stub_558), @function - HIDDEN(GL_PREFIX(_dispatch_stub_558)) -GL_PREFIX(_dispatch_stub_558): + .globl GL_PREFIX(_dispatch_stub_564) + .type GL_PREFIX(_dispatch_stub_564), @function + HIDDEN(GL_PREFIX(_dispatch_stub_564)) +GL_PREFIX(_dispatch_stub_564): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4464(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -20970,13 +21240,13 @@ GL_PREFIX(_dispatch_stub_558): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4464(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4464(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -20986,19 +21256,19 @@ GL_PREFIX(_dispatch_stub_558): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4464(%rax), %r11 + movq 4512(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_558), .-GL_PREFIX(_dispatch_stub_558) + .size GL_PREFIX(_dispatch_stub_564), .-GL_PREFIX(_dispatch_stub_564) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_559) - .type GL_PREFIX(_dispatch_stub_559), @function - HIDDEN(GL_PREFIX(_dispatch_stub_559)) -GL_PREFIX(_dispatch_stub_559): + .globl GL_PREFIX(_dispatch_stub_565) + .type GL_PREFIX(_dispatch_stub_565), @function + HIDDEN(GL_PREFIX(_dispatch_stub_565)) +GL_PREFIX(_dispatch_stub_565): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4472(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21008,13 +21278,13 @@ GL_PREFIX(_dispatch_stub_559): popq %rbp popq %rsi popq %rdi - movq 4472(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4472(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21024,19 +21294,19 @@ GL_PREFIX(_dispatch_stub_559): popq %rbp popq %rsi popq %rdi - movq 4472(%rax), %r11 + movq 4520(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_559), .-GL_PREFIX(_dispatch_stub_559) + .size GL_PREFIX(_dispatch_stub_565), .-GL_PREFIX(_dispatch_stub_565) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_560) - .type GL_PREFIX(_dispatch_stub_560), @function - HIDDEN(GL_PREFIX(_dispatch_stub_560)) -GL_PREFIX(_dispatch_stub_560): + .globl GL_PREFIX(_dispatch_stub_566) + .type GL_PREFIX(_dispatch_stub_566), @function + HIDDEN(GL_PREFIX(_dispatch_stub_566)) +GL_PREFIX(_dispatch_stub_566): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4480(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21046,13 +21316,13 @@ GL_PREFIX(_dispatch_stub_560): popq %rbp popq %rsi popq %rdi - movq 4480(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4480(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21062,19 +21332,19 @@ GL_PREFIX(_dispatch_stub_560): popq %rbp popq %rsi popq %rdi - movq 4480(%rax), %r11 + movq 4528(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_560), .-GL_PREFIX(_dispatch_stub_560) + .size GL_PREFIX(_dispatch_stub_566), .-GL_PREFIX(_dispatch_stub_566) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_561) - .type GL_PREFIX(_dispatch_stub_561), @function - HIDDEN(GL_PREFIX(_dispatch_stub_561)) -GL_PREFIX(_dispatch_stub_561): + .globl GL_PREFIX(_dispatch_stub_567) + .type GL_PREFIX(_dispatch_stub_567), @function + HIDDEN(GL_PREFIX(_dispatch_stub_567)) +GL_PREFIX(_dispatch_stub_567): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4488(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21084,13 +21354,13 @@ GL_PREFIX(_dispatch_stub_561): popq %rbp popq %rsi popq %rdi - movq 4488(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4488(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21100,19 +21370,19 @@ GL_PREFIX(_dispatch_stub_561): popq %rbp popq %rsi popq %rdi - movq 4488(%rax), %r11 + movq 4536(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_561), .-GL_PREFIX(_dispatch_stub_561) + .size GL_PREFIX(_dispatch_stub_567), .-GL_PREFIX(_dispatch_stub_567) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_562) - .type GL_PREFIX(_dispatch_stub_562), @function - HIDDEN(GL_PREFIX(_dispatch_stub_562)) -GL_PREFIX(_dispatch_stub_562): + .globl GL_PREFIX(_dispatch_stub_568) + .type GL_PREFIX(_dispatch_stub_568), @function + HIDDEN(GL_PREFIX(_dispatch_stub_568)) +GL_PREFIX(_dispatch_stub_568): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4496(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21122,13 +21392,13 @@ GL_PREFIX(_dispatch_stub_562): popq %rbp popq %rsi popq %rdi - movq 4496(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4496(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21138,40 +21408,40 @@ GL_PREFIX(_dispatch_stub_562): popq %rbp popq %rsi popq %rdi - movq 4496(%rax), %r11 + movq 4544(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_562), .-GL_PREFIX(_dispatch_stub_562) + .size GL_PREFIX(_dispatch_stub_568), .-GL_PREFIX(_dispatch_stub_568) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_563) - .type GL_PREFIX(_dispatch_stub_563), @function - HIDDEN(GL_PREFIX(_dispatch_stub_563)) -GL_PREFIX(_dispatch_stub_563): + .globl GL_PREFIX(_dispatch_stub_569) + .type GL_PREFIX(_dispatch_stub_569), @function + HIDDEN(GL_PREFIX(_dispatch_stub_569)) +GL_PREFIX(_dispatch_stub_569): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4504(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4504(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4504(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4504(%rax), %r11 + movq 4552(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_563), .-GL_PREFIX(_dispatch_stub_563) + .size GL_PREFIX(_dispatch_stub_569), .-GL_PREFIX(_dispatch_stub_569) .p2align 4,,15 .globl GL_PREFIX(ColorPointerEXT) @@ -21179,7 +21449,7 @@ GL_PREFIX(_dispatch_stub_563): GL_PREFIX(ColorPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4512(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21193,13 +21463,13 @@ GL_PREFIX(ColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4512(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4512(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21213,7 +21483,7 @@ GL_PREFIX(ColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4512(%rax), %r11 + movq 4560(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorPointerEXT), .-GL_PREFIX(ColorPointerEXT) @@ -21224,7 +21494,7 @@ GL_PREFIX(ColorPointerEXT): GL_PREFIX(EdgeFlagPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4520(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21234,13 +21504,13 @@ GL_PREFIX(EdgeFlagPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4520(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4520(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21250,7 +21520,7 @@ GL_PREFIX(EdgeFlagPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4520(%rax), %r11 + movq 4568(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EdgeFlagPointerEXT), .-GL_PREFIX(EdgeFlagPointerEXT) @@ -21261,7 +21531,7 @@ GL_PREFIX(EdgeFlagPointerEXT): GL_PREFIX(IndexPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4528(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21275,13 +21545,13 @@ GL_PREFIX(IndexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4528(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4528(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21295,7 +21565,7 @@ GL_PREFIX(IndexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4528(%rax), %r11 + movq 4576(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IndexPointerEXT), .-GL_PREFIX(IndexPointerEXT) @@ -21306,7 +21576,7 @@ GL_PREFIX(IndexPointerEXT): GL_PREFIX(NormalPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4536(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21320,13 +21590,13 @@ GL_PREFIX(NormalPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4536(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4536(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21340,7 +21610,7 @@ GL_PREFIX(NormalPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4536(%rax), %r11 + movq 4584(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(NormalPointerEXT), .-GL_PREFIX(NormalPointerEXT) @@ -21351,7 +21621,7 @@ GL_PREFIX(NormalPointerEXT): GL_PREFIX(TexCoordPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4544(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21365,13 +21635,13 @@ GL_PREFIX(TexCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4544(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4544(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21385,7 +21655,7 @@ GL_PREFIX(TexCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4544(%rax), %r11 + movq 4592(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(TexCoordPointerEXT), .-GL_PREFIX(TexCoordPointerEXT) @@ -21396,7 +21666,7 @@ GL_PREFIX(TexCoordPointerEXT): GL_PREFIX(VertexPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4552(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21410,13 +21680,13 @@ GL_PREFIX(VertexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4552(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4552(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21430,7 +21700,7 @@ GL_PREFIX(VertexPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4552(%rax), %r11 + movq 4600(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexPointerEXT), .-GL_PREFIX(VertexPointerEXT) @@ -21441,7 +21711,7 @@ GL_PREFIX(VertexPointerEXT): GL_PREFIX(PointParameterfEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4560(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -21451,13 +21721,13 @@ GL_PREFIX(PointParameterfEXT): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4560(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4560(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -21467,7 +21737,7 @@ GL_PREFIX(PointParameterfEXT): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4560(%rax), %r11 + movq 4608(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameterfEXT), .-GL_PREFIX(PointParameterfEXT) @@ -21478,7 +21748,7 @@ GL_PREFIX(PointParameterfEXT): GL_PREFIX(PointParameterfvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4568(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21488,13 +21758,13 @@ GL_PREFIX(PointParameterfvEXT): popq %rbp popq %rsi popq %rdi - movq 4568(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4568(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21504,7 +21774,7 @@ GL_PREFIX(PointParameterfvEXT): popq %rbp popq %rsi popq %rdi - movq 4568(%rax), %r11 + movq 4616(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameterfvEXT), .-GL_PREFIX(PointParameterfvEXT) @@ -21515,7 +21785,7 @@ GL_PREFIX(PointParameterfvEXT): GL_PREFIX(LockArraysEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4576(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21525,13 +21795,13 @@ GL_PREFIX(LockArraysEXT): popq %rbp popq %rsi popq %rdi - movq 4576(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4576(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21541,7 +21811,7 @@ GL_PREFIX(LockArraysEXT): popq %rbp popq %rsi popq %rdi - movq 4576(%rax), %r11 + movq 4624(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LockArraysEXT), .-GL_PREFIX(LockArraysEXT) @@ -21552,37 +21822,37 @@ GL_PREFIX(LockArraysEXT): GL_PREFIX(UnlockArraysEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4584(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4584(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4584(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4584(%rax), %r11 + movq 4632(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(UnlockArraysEXT), .-GL_PREFIX(UnlockArraysEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_574) - .type GL_PREFIX(_dispatch_stub_574), @function - HIDDEN(GL_PREFIX(_dispatch_stub_574)) -GL_PREFIX(_dispatch_stub_574): + .globl GL_PREFIX(_dispatch_stub_580) + .type GL_PREFIX(_dispatch_stub_580), @function + HIDDEN(GL_PREFIX(_dispatch_stub_580)) +GL_PREFIX(_dispatch_stub_580): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4592(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21592,13 +21862,13 @@ GL_PREFIX(_dispatch_stub_574): popq %rbp popq %rsi popq %rdi - movq 4592(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4592(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21608,19 +21878,19 @@ GL_PREFIX(_dispatch_stub_574): popq %rbp popq %rsi popq %rdi - movq 4592(%rax), %r11 + movq 4640(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_574), .-GL_PREFIX(_dispatch_stub_574) + .size GL_PREFIX(_dispatch_stub_580), .-GL_PREFIX(_dispatch_stub_580) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_575) - .type GL_PREFIX(_dispatch_stub_575), @function - HIDDEN(GL_PREFIX(_dispatch_stub_575)) -GL_PREFIX(_dispatch_stub_575): + .globl GL_PREFIX(_dispatch_stub_581) + .type GL_PREFIX(_dispatch_stub_581), @function + HIDDEN(GL_PREFIX(_dispatch_stub_581)) +GL_PREFIX(_dispatch_stub_581): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4600(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21630,13 +21900,13 @@ GL_PREFIX(_dispatch_stub_575): popq %rbp popq %rsi popq %rdi - movq 4600(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4600(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21646,10 +21916,10 @@ GL_PREFIX(_dispatch_stub_575): popq %rbp popq %rsi popq %rdi - movq 4600(%rax), %r11 + movq 4648(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_575), .-GL_PREFIX(_dispatch_stub_575) + .size GL_PREFIX(_dispatch_stub_581), .-GL_PREFIX(_dispatch_stub_581) .p2align 4,,15 .globl GL_PREFIX(SecondaryColor3bEXT) @@ -21657,7 +21927,7 @@ GL_PREFIX(_dispatch_stub_575): GL_PREFIX(SecondaryColor3bEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4608(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21667,13 +21937,13 @@ GL_PREFIX(SecondaryColor3bEXT): popq %rdx popq %rsi popq %rdi - movq 4608(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4608(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21683,7 +21953,7 @@ GL_PREFIX(SecondaryColor3bEXT): popq %rdx popq %rsi popq %rdi - movq 4608(%rax), %r11 + movq 4656(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3bEXT), .-GL_PREFIX(SecondaryColor3bEXT) @@ -21694,25 +21964,25 @@ GL_PREFIX(SecondaryColor3bEXT): GL_PREFIX(SecondaryColor3bvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4616(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4616(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4616(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4616(%rax), %r11 + movq 4664(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3bvEXT), .-GL_PREFIX(SecondaryColor3bvEXT) @@ -21723,7 +21993,7 @@ GL_PREFIX(SecondaryColor3bvEXT): GL_PREFIX(SecondaryColor3dEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4624(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -21735,13 +22005,13 @@ GL_PREFIX(SecondaryColor3dEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4624(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4624(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -21753,7 +22023,7 @@ GL_PREFIX(SecondaryColor3dEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4624(%rax), %r11 + movq 4672(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3dEXT), .-GL_PREFIX(SecondaryColor3dEXT) @@ -21764,25 +22034,25 @@ GL_PREFIX(SecondaryColor3dEXT): GL_PREFIX(SecondaryColor3dvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4632(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4632(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4632(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4632(%rax), %r11 + movq 4680(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3dvEXT), .-GL_PREFIX(SecondaryColor3dvEXT) @@ -21793,7 +22063,7 @@ GL_PREFIX(SecondaryColor3dvEXT): GL_PREFIX(SecondaryColor3fEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4640(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -21805,13 +22075,13 @@ GL_PREFIX(SecondaryColor3fEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4640(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4640(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -21823,7 +22093,7 @@ GL_PREFIX(SecondaryColor3fEXT): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4640(%rax), %r11 + movq 4688(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3fEXT), .-GL_PREFIX(SecondaryColor3fEXT) @@ -21834,25 +22104,25 @@ GL_PREFIX(SecondaryColor3fEXT): GL_PREFIX(SecondaryColor3fvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4648(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4648(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4648(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4648(%rax), %r11 + movq 4696(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3fvEXT), .-GL_PREFIX(SecondaryColor3fvEXT) @@ -21863,7 +22133,7 @@ GL_PREFIX(SecondaryColor3fvEXT): GL_PREFIX(SecondaryColor3iEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4656(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21873,13 +22143,13 @@ GL_PREFIX(SecondaryColor3iEXT): popq %rdx popq %rsi popq %rdi - movq 4656(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4656(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21889,7 +22159,7 @@ GL_PREFIX(SecondaryColor3iEXT): popq %rdx popq %rsi popq %rdi - movq 4656(%rax), %r11 + movq 4704(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3iEXT), .-GL_PREFIX(SecondaryColor3iEXT) @@ -21900,25 +22170,25 @@ GL_PREFIX(SecondaryColor3iEXT): GL_PREFIX(SecondaryColor3ivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4664(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4664(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4664(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4664(%rax), %r11 + movq 4712(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3ivEXT), .-GL_PREFIX(SecondaryColor3ivEXT) @@ -21929,7 +22199,7 @@ GL_PREFIX(SecondaryColor3ivEXT): GL_PREFIX(SecondaryColor3sEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4672(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -21939,13 +22209,13 @@ GL_PREFIX(SecondaryColor3sEXT): popq %rdx popq %rsi popq %rdi - movq 4672(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4672(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -21955,7 +22225,7 @@ GL_PREFIX(SecondaryColor3sEXT): popq %rdx popq %rsi popq %rdi - movq 4672(%rax), %r11 + movq 4720(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3sEXT), .-GL_PREFIX(SecondaryColor3sEXT) @@ -21966,25 +22236,25 @@ GL_PREFIX(SecondaryColor3sEXT): GL_PREFIX(SecondaryColor3svEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4680(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4680(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4680(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4680(%rax), %r11 + movq 4728(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3svEXT), .-GL_PREFIX(SecondaryColor3svEXT) @@ -21995,7 +22265,7 @@ GL_PREFIX(SecondaryColor3svEXT): GL_PREFIX(SecondaryColor3ubEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4688(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22005,13 +22275,13 @@ GL_PREFIX(SecondaryColor3ubEXT): popq %rdx popq %rsi popq %rdi - movq 4688(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4688(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22021,7 +22291,7 @@ GL_PREFIX(SecondaryColor3ubEXT): popq %rdx popq %rsi popq %rdi - movq 4688(%rax), %r11 + movq 4736(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3ubEXT), .-GL_PREFIX(SecondaryColor3ubEXT) @@ -22032,25 +22302,25 @@ GL_PREFIX(SecondaryColor3ubEXT): GL_PREFIX(SecondaryColor3ubvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4696(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4696(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4696(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4696(%rax), %r11 + movq 4744(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3ubvEXT), .-GL_PREFIX(SecondaryColor3ubvEXT) @@ -22061,7 +22331,7 @@ GL_PREFIX(SecondaryColor3ubvEXT): GL_PREFIX(SecondaryColor3uiEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4704(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22071,13 +22341,13 @@ GL_PREFIX(SecondaryColor3uiEXT): popq %rdx popq %rsi popq %rdi - movq 4704(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4704(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22087,7 +22357,7 @@ GL_PREFIX(SecondaryColor3uiEXT): popq %rdx popq %rsi popq %rdi - movq 4704(%rax), %r11 + movq 4752(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3uiEXT), .-GL_PREFIX(SecondaryColor3uiEXT) @@ -22098,25 +22368,25 @@ GL_PREFIX(SecondaryColor3uiEXT): GL_PREFIX(SecondaryColor3uivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4712(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4712(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4712(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4712(%rax), %r11 + movq 4760(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3uivEXT), .-GL_PREFIX(SecondaryColor3uivEXT) @@ -22127,7 +22397,7 @@ GL_PREFIX(SecondaryColor3uivEXT): GL_PREFIX(SecondaryColor3usEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4720(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22137,13 +22407,13 @@ GL_PREFIX(SecondaryColor3usEXT): popq %rdx popq %rsi popq %rdi - movq 4720(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4720(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22153,7 +22423,7 @@ GL_PREFIX(SecondaryColor3usEXT): popq %rdx popq %rsi popq %rdi - movq 4720(%rax), %r11 + movq 4768(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3usEXT), .-GL_PREFIX(SecondaryColor3usEXT) @@ -22164,25 +22434,25 @@ GL_PREFIX(SecondaryColor3usEXT): GL_PREFIX(SecondaryColor3usvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4728(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4728(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4728(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4728(%rax), %r11 + movq 4776(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColor3usvEXT), .-GL_PREFIX(SecondaryColor3usvEXT) @@ -22193,7 +22463,7 @@ GL_PREFIX(SecondaryColor3usvEXT): GL_PREFIX(SecondaryColorPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4736(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22207,13 +22477,13 @@ GL_PREFIX(SecondaryColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4736(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4736(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22227,7 +22497,7 @@ GL_PREFIX(SecondaryColorPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4736(%rax), %r11 + movq 4784(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SecondaryColorPointerEXT), .-GL_PREFIX(SecondaryColorPointerEXT) @@ -22238,7 +22508,7 @@ GL_PREFIX(SecondaryColorPointerEXT): GL_PREFIX(MultiDrawArraysEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4744(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22252,13 +22522,13 @@ GL_PREFIX(MultiDrawArraysEXT): popq %rdx popq %rsi popq %rdi - movq 4744(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4744(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22272,7 +22542,7 @@ GL_PREFIX(MultiDrawArraysEXT): popq %rdx popq %rsi popq %rdi - movq 4744(%rax), %r11 + movq 4792(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultiDrawArraysEXT), .-GL_PREFIX(MultiDrawArraysEXT) @@ -22283,7 +22553,7 @@ GL_PREFIX(MultiDrawArraysEXT): GL_PREFIX(MultiDrawElementsEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4752(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22297,13 +22567,13 @@ GL_PREFIX(MultiDrawElementsEXT): popq %rdx popq %rsi popq %rdi - movq 4752(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4752(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22317,7 +22587,7 @@ GL_PREFIX(MultiDrawElementsEXT): popq %rdx popq %rsi popq %rdi - movq 4752(%rax), %r11 + movq 4800(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(MultiDrawElementsEXT), .-GL_PREFIX(MultiDrawElementsEXT) @@ -22328,7 +22598,7 @@ GL_PREFIX(MultiDrawElementsEXT): GL_PREFIX(FogCoordPointerEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4760(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22338,13 +22608,13 @@ GL_PREFIX(FogCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4760(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4760(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22354,7 +22624,7 @@ GL_PREFIX(FogCoordPointerEXT): popq %rdx popq %rsi popq %rdi - movq 4760(%rax), %r11 + movq 4808(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoordPointerEXT), .-GL_PREFIX(FogCoordPointerEXT) @@ -22365,7 +22635,7 @@ GL_PREFIX(FogCoordPointerEXT): GL_PREFIX(FogCoorddEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4768(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $8, %rsp @@ -22373,13 +22643,13 @@ GL_PREFIX(FogCoorddEXT): call _x86_64_get_dispatch@PLT movq (%rsp), %xmm0 addq $8, %rsp - movq 4768(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4768(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 1: subq $8, %rsp @@ -22387,7 +22657,7 @@ GL_PREFIX(FogCoorddEXT): call _glapi_get_dispatch movq (%rsp), %xmm0 addq $8, %rsp - movq 4768(%rax), %r11 + movq 4816(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoorddEXT), .-GL_PREFIX(FogCoorddEXT) @@ -22398,25 +22668,25 @@ GL_PREFIX(FogCoorddEXT): GL_PREFIX(FogCoorddvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4776(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4776(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4776(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4776(%rax), %r11 + movq 4824(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoorddvEXT), .-GL_PREFIX(FogCoorddvEXT) @@ -22427,7 +22697,7 @@ GL_PREFIX(FogCoorddvEXT): GL_PREFIX(FogCoordfEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4784(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $8, %rsp @@ -22435,13 +22705,13 @@ GL_PREFIX(FogCoordfEXT): call _x86_64_get_dispatch@PLT movq (%rsp), %xmm0 addq $8, %rsp - movq 4784(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4784(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 1: subq $8, %rsp @@ -22449,7 +22719,7 @@ GL_PREFIX(FogCoordfEXT): call _glapi_get_dispatch movq (%rsp), %xmm0 addq $8, %rsp - movq 4784(%rax), %r11 + movq 4832(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoordfEXT), .-GL_PREFIX(FogCoordfEXT) @@ -22460,58 +22730,58 @@ GL_PREFIX(FogCoordfEXT): GL_PREFIX(FogCoordfvEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4792(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4792(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4792(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4792(%rax), %r11 + movq 4840(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FogCoordfvEXT), .-GL_PREFIX(FogCoordfvEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_600) - .type GL_PREFIX(_dispatch_stub_600), @function - HIDDEN(GL_PREFIX(_dispatch_stub_600)) -GL_PREFIX(_dispatch_stub_600): + .globl GL_PREFIX(_dispatch_stub_606) + .type GL_PREFIX(_dispatch_stub_606), @function + HIDDEN(GL_PREFIX(_dispatch_stub_606)) +GL_PREFIX(_dispatch_stub_606): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4800(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4800(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4800(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4800(%rax), %r11 + movq 4848(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_600), .-GL_PREFIX(_dispatch_stub_600) + .size GL_PREFIX(_dispatch_stub_606), .-GL_PREFIX(_dispatch_stub_606) .p2align 4,,15 .globl GL_PREFIX(BlendFuncSeparateEXT) @@ -22519,7 +22789,7 @@ GL_PREFIX(_dispatch_stub_600): GL_PREFIX(BlendFuncSeparateEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4808(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22533,13 +22803,13 @@ GL_PREFIX(BlendFuncSeparateEXT): popq %rdx popq %rsi popq %rdi - movq 4808(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4808(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22553,7 +22823,7 @@ GL_PREFIX(BlendFuncSeparateEXT): popq %rdx popq %rsi popq %rdi - movq 4808(%rax), %r11 + movq 4856(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BlendFuncSeparateEXT), .-GL_PREFIX(BlendFuncSeparateEXT) @@ -22564,25 +22834,25 @@ GL_PREFIX(BlendFuncSeparateEXT): GL_PREFIX(FlushVertexArrayRangeNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4816(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4816(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4816(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4816(%rax), %r11 + movq 4864(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FlushVertexArrayRangeNV), .-GL_PREFIX(FlushVertexArrayRangeNV) @@ -22593,7 +22863,7 @@ GL_PREFIX(FlushVertexArrayRangeNV): GL_PREFIX(VertexArrayRangeNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4824(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22603,13 +22873,13 @@ GL_PREFIX(VertexArrayRangeNV): popq %rbp popq %rsi popq %rdi - movq 4824(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4824(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22619,7 +22889,7 @@ GL_PREFIX(VertexArrayRangeNV): popq %rbp popq %rsi popq %rdi - movq 4824(%rax), %r11 + movq 4872(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexArrayRangeNV), .-GL_PREFIX(VertexArrayRangeNV) @@ -22630,7 +22900,7 @@ GL_PREFIX(VertexArrayRangeNV): GL_PREFIX(CombinerInputNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4832(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22648,13 +22918,13 @@ GL_PREFIX(CombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4832(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4832(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22672,7 +22942,7 @@ GL_PREFIX(CombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4832(%rax), %r11 + movq 4880(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerInputNV), .-GL_PREFIX(CombinerInputNV) @@ -22683,7 +22953,7 @@ GL_PREFIX(CombinerInputNV): GL_PREFIX(CombinerOutputNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4840(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22701,13 +22971,13 @@ GL_PREFIX(CombinerOutputNV): popq %rdx popq %rsi popq %rdi - movq 4840(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4840(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22725,7 +22995,7 @@ GL_PREFIX(CombinerOutputNV): popq %rdx popq %rsi popq %rdi - movq 4840(%rax), %r11 + movq 4888(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerOutputNV), .-GL_PREFIX(CombinerOutputNV) @@ -22736,7 +23006,7 @@ GL_PREFIX(CombinerOutputNV): GL_PREFIX(CombinerParameterfNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4848(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -22746,13 +23016,13 @@ GL_PREFIX(CombinerParameterfNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4848(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4848(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -22762,7 +23032,7 @@ GL_PREFIX(CombinerParameterfNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 4848(%rax), %r11 + movq 4896(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameterfNV), .-GL_PREFIX(CombinerParameterfNV) @@ -22773,7 +23043,7 @@ GL_PREFIX(CombinerParameterfNV): GL_PREFIX(CombinerParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4856(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22783,13 +23053,13 @@ GL_PREFIX(CombinerParameterfvNV): popq %rbp popq %rsi popq %rdi - movq 4856(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4856(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22799,7 +23069,7 @@ GL_PREFIX(CombinerParameterfvNV): popq %rbp popq %rsi popq %rdi - movq 4856(%rax), %r11 + movq 4904(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameterfvNV), .-GL_PREFIX(CombinerParameterfvNV) @@ -22810,7 +23080,7 @@ GL_PREFIX(CombinerParameterfvNV): GL_PREFIX(CombinerParameteriNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4864(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22820,13 +23090,13 @@ GL_PREFIX(CombinerParameteriNV): popq %rbp popq %rsi popq %rdi - movq 4864(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4864(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22836,7 +23106,7 @@ GL_PREFIX(CombinerParameteriNV): popq %rbp popq %rsi popq %rdi - movq 4864(%rax), %r11 + movq 4912(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameteriNV), .-GL_PREFIX(CombinerParameteriNV) @@ -22847,7 +23117,7 @@ GL_PREFIX(CombinerParameteriNV): GL_PREFIX(CombinerParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4872(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22857,13 +23127,13 @@ GL_PREFIX(CombinerParameterivNV): popq %rbp popq %rsi popq %rdi - movq 4872(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4872(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22873,7 +23143,7 @@ GL_PREFIX(CombinerParameterivNV): popq %rbp popq %rsi popq %rdi - movq 4872(%rax), %r11 + movq 4920(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CombinerParameterivNV), .-GL_PREFIX(CombinerParameterivNV) @@ -22884,7 +23154,7 @@ GL_PREFIX(CombinerParameterivNV): GL_PREFIX(FinalCombinerInputNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4880(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22898,13 +23168,13 @@ GL_PREFIX(FinalCombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4880(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4880(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22918,7 +23188,7 @@ GL_PREFIX(FinalCombinerInputNV): popq %rdx popq %rsi popq %rdi - movq 4880(%rax), %r11 + movq 4928(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FinalCombinerInputNV), .-GL_PREFIX(FinalCombinerInputNV) @@ -22929,7 +23199,7 @@ GL_PREFIX(FinalCombinerInputNV): GL_PREFIX(GetCombinerInputParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4888(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22943,13 +23213,13 @@ GL_PREFIX(GetCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4888(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4888(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -22963,7 +23233,7 @@ GL_PREFIX(GetCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4888(%rax), %r11 + movq 4936(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerInputParameterfvNV), .-GL_PREFIX(GetCombinerInputParameterfvNV) @@ -22974,7 +23244,7 @@ GL_PREFIX(GetCombinerInputParameterfvNV): GL_PREFIX(GetCombinerInputParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4896(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -22988,13 +23258,13 @@ GL_PREFIX(GetCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4896(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4896(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23008,7 +23278,7 @@ GL_PREFIX(GetCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4896(%rax), %r11 + movq 4944(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerInputParameterivNV), .-GL_PREFIX(GetCombinerInputParameterivNV) @@ -23019,7 +23289,7 @@ GL_PREFIX(GetCombinerInputParameterivNV): GL_PREFIX(GetCombinerOutputParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4904(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23033,13 +23303,13 @@ GL_PREFIX(GetCombinerOutputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4904(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4904(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23053,7 +23323,7 @@ GL_PREFIX(GetCombinerOutputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4904(%rax), %r11 + movq 4952(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerOutputParameterfvNV), .-GL_PREFIX(GetCombinerOutputParameterfvNV) @@ -23064,7 +23334,7 @@ GL_PREFIX(GetCombinerOutputParameterfvNV): GL_PREFIX(GetCombinerOutputParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4912(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23078,13 +23348,13 @@ GL_PREFIX(GetCombinerOutputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4912(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4912(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23098,7 +23368,7 @@ GL_PREFIX(GetCombinerOutputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4912(%rax), %r11 + movq 4960(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetCombinerOutputParameterivNV), .-GL_PREFIX(GetCombinerOutputParameterivNV) @@ -23109,7 +23379,7 @@ GL_PREFIX(GetCombinerOutputParameterivNV): GL_PREFIX(GetFinalCombinerInputParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4920(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23119,13 +23389,13 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4920(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4920(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23135,7 +23405,7 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 4920(%rax), %r11 + movq 4968(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetFinalCombinerInputParameterfvNV), .-GL_PREFIX(GetFinalCombinerInputParameterfvNV) @@ -23146,7 +23416,7 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV): GL_PREFIX(GetFinalCombinerInputParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4928(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23156,13 +23426,13 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4928(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4928(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23172,7 +23442,7 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV): popq %rdx popq %rsi popq %rdi - movq 4928(%rax), %r11 + movq 4976(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetFinalCombinerInputParameterivNV), .-GL_PREFIX(GetFinalCombinerInputParameterivNV) @@ -23183,25 +23453,25 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV): GL_PREFIX(ResizeBuffersMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4936(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 4936(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4936(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 4936(%rax), %r11 + movq 4984(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ResizeBuffersMESA), .-GL_PREFIX(ResizeBuffersMESA) @@ -23212,7 +23482,7 @@ GL_PREFIX(ResizeBuffersMESA): GL_PREFIX(WindowPos2dMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4944(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -23222,13 +23492,13 @@ GL_PREFIX(WindowPos2dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4944(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4944(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -23238,7 +23508,7 @@ GL_PREFIX(WindowPos2dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4944(%rax), %r11 + movq 4992(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2dMESA), .-GL_PREFIX(WindowPos2dMESA) @@ -23249,25 +23519,25 @@ GL_PREFIX(WindowPos2dMESA): GL_PREFIX(WindowPos2dvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4952(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4952(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4952(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4952(%rax), %r11 + movq 5000(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2dvMESA), .-GL_PREFIX(WindowPos2dvMESA) @@ -23278,7 +23548,7 @@ GL_PREFIX(WindowPos2dvMESA): GL_PREFIX(WindowPos2fMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4960(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -23288,13 +23558,13 @@ GL_PREFIX(WindowPos2fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4960(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4960(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -23304,7 +23574,7 @@ GL_PREFIX(WindowPos2fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 4960(%rax), %r11 + movq 5008(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2fMESA), .-GL_PREFIX(WindowPos2fMESA) @@ -23315,25 +23585,25 @@ GL_PREFIX(WindowPos2fMESA): GL_PREFIX(WindowPos2fvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4968(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4968(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4968(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4968(%rax), %r11 + movq 5016(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2fvMESA), .-GL_PREFIX(WindowPos2fvMESA) @@ -23344,7 +23614,7 @@ GL_PREFIX(WindowPos2fvMESA): GL_PREFIX(WindowPos2iMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4976(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23354,13 +23624,13 @@ GL_PREFIX(WindowPos2iMESA): popq %rbp popq %rsi popq %rdi - movq 4976(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4976(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23370,7 +23640,7 @@ GL_PREFIX(WindowPos2iMESA): popq %rbp popq %rsi popq %rdi - movq 4976(%rax), %r11 + movq 5024(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2iMESA), .-GL_PREFIX(WindowPos2iMESA) @@ -23381,25 +23651,25 @@ GL_PREFIX(WindowPos2iMESA): GL_PREFIX(WindowPos2ivMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4984(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 4984(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4984(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 4984(%rax), %r11 + movq 5032(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2ivMESA), .-GL_PREFIX(WindowPos2ivMESA) @@ -23410,7 +23680,7 @@ GL_PREFIX(WindowPos2ivMESA): GL_PREFIX(WindowPos2sMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 4992(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23420,13 +23690,13 @@ GL_PREFIX(WindowPos2sMESA): popq %rbp popq %rsi popq %rdi - movq 4992(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 4992(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23436,7 +23706,7 @@ GL_PREFIX(WindowPos2sMESA): popq %rbp popq %rsi popq %rdi - movq 4992(%rax), %r11 + movq 5040(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2sMESA), .-GL_PREFIX(WindowPos2sMESA) @@ -23447,25 +23717,25 @@ GL_PREFIX(WindowPos2sMESA): GL_PREFIX(WindowPos2svMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5000(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5000(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5000(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5000(%rax), %r11 + movq 5048(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos2svMESA), .-GL_PREFIX(WindowPos2svMESA) @@ -23476,7 +23746,7 @@ GL_PREFIX(WindowPos2svMESA): GL_PREFIX(WindowPos3dMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5008(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -23488,13 +23758,13 @@ GL_PREFIX(WindowPos3dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 5008(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5008(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -23506,7 +23776,7 @@ GL_PREFIX(WindowPos3dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 5008(%rax), %r11 + movq 5056(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3dMESA), .-GL_PREFIX(WindowPos3dMESA) @@ -23517,25 +23787,25 @@ GL_PREFIX(WindowPos3dMESA): GL_PREFIX(WindowPos3dvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5016(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5016(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5016(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5016(%rax), %r11 + movq 5064(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3dvMESA), .-GL_PREFIX(WindowPos3dvMESA) @@ -23546,7 +23816,7 @@ GL_PREFIX(WindowPos3dvMESA): GL_PREFIX(WindowPos3fMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5024(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -23558,13 +23828,13 @@ GL_PREFIX(WindowPos3fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 5024(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5024(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -23576,7 +23846,7 @@ GL_PREFIX(WindowPos3fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $24, %rsp - movq 5024(%rax), %r11 + movq 5072(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3fMESA), .-GL_PREFIX(WindowPos3fMESA) @@ -23587,25 +23857,25 @@ GL_PREFIX(WindowPos3fMESA): GL_PREFIX(WindowPos3fvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5032(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5032(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5032(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5032(%rax), %r11 + movq 5080(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3fvMESA), .-GL_PREFIX(WindowPos3fvMESA) @@ -23616,7 +23886,7 @@ GL_PREFIX(WindowPos3fvMESA): GL_PREFIX(WindowPos3iMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5040(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23626,13 +23896,13 @@ GL_PREFIX(WindowPos3iMESA): popq %rdx popq %rsi popq %rdi - movq 5040(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5040(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23642,7 +23912,7 @@ GL_PREFIX(WindowPos3iMESA): popq %rdx popq %rsi popq %rdi - movq 5040(%rax), %r11 + movq 5088(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3iMESA), .-GL_PREFIX(WindowPos3iMESA) @@ -23653,25 +23923,25 @@ GL_PREFIX(WindowPos3iMESA): GL_PREFIX(WindowPos3ivMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5048(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5048(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5048(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5048(%rax), %r11 + movq 5096(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3ivMESA), .-GL_PREFIX(WindowPos3ivMESA) @@ -23682,7 +23952,7 @@ GL_PREFIX(WindowPos3ivMESA): GL_PREFIX(WindowPos3sMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5056(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23692,13 +23962,13 @@ GL_PREFIX(WindowPos3sMESA): popq %rdx popq %rsi popq %rdi - movq 5056(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5056(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23708,7 +23978,7 @@ GL_PREFIX(WindowPos3sMESA): popq %rdx popq %rsi popq %rdi - movq 5056(%rax), %r11 + movq 5104(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3sMESA), .-GL_PREFIX(WindowPos3sMESA) @@ -23719,25 +23989,25 @@ GL_PREFIX(WindowPos3sMESA): GL_PREFIX(WindowPos3svMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5064(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5064(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5064(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5064(%rax), %r11 + movq 5112(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos3svMESA), .-GL_PREFIX(WindowPos3svMESA) @@ -23748,7 +24018,7 @@ GL_PREFIX(WindowPos3svMESA): GL_PREFIX(WindowPos4dMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5072(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -23762,13 +24032,13 @@ GL_PREFIX(WindowPos4dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 5072(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5072(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -23782,7 +24052,7 @@ GL_PREFIX(WindowPos4dMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 5072(%rax), %r11 + movq 5120(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4dMESA), .-GL_PREFIX(WindowPos4dMESA) @@ -23793,25 +24063,25 @@ GL_PREFIX(WindowPos4dMESA): GL_PREFIX(WindowPos4dvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5080(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5080(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5080(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5080(%rax), %r11 + movq 5128(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4dvMESA), .-GL_PREFIX(WindowPos4dvMESA) @@ -23822,7 +24092,7 @@ GL_PREFIX(WindowPos4dvMESA): GL_PREFIX(WindowPos4fMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5088(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -23836,13 +24106,13 @@ GL_PREFIX(WindowPos4fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 5088(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5088(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -23856,7 +24126,7 @@ GL_PREFIX(WindowPos4fMESA): movq 8(%rsp), %xmm1 movq (%rsp), %xmm0 addq $40, %rsp - movq 5088(%rax), %r11 + movq 5136(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4fMESA), .-GL_PREFIX(WindowPos4fMESA) @@ -23867,25 +24137,25 @@ GL_PREFIX(WindowPos4fMESA): GL_PREFIX(WindowPos4fvMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5096(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5096(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5096(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5096(%rax), %r11 + movq 5144(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4fvMESA), .-GL_PREFIX(WindowPos4fvMESA) @@ -23896,7 +24166,7 @@ GL_PREFIX(WindowPos4fvMESA): GL_PREFIX(WindowPos4iMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5104(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23910,13 +24180,13 @@ GL_PREFIX(WindowPos4iMESA): popq %rdx popq %rsi popq %rdi - movq 5104(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5104(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -23930,7 +24200,7 @@ GL_PREFIX(WindowPos4iMESA): popq %rdx popq %rsi popq %rdi - movq 5104(%rax), %r11 + movq 5152(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4iMESA), .-GL_PREFIX(WindowPos4iMESA) @@ -23941,25 +24211,25 @@ GL_PREFIX(WindowPos4iMESA): GL_PREFIX(WindowPos4ivMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5112(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5112(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5112(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5112(%rax), %r11 + movq 5160(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4ivMESA), .-GL_PREFIX(WindowPos4ivMESA) @@ -23970,7 +24240,7 @@ GL_PREFIX(WindowPos4ivMESA): GL_PREFIX(WindowPos4sMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5120(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -23984,13 +24254,13 @@ GL_PREFIX(WindowPos4sMESA): popq %rdx popq %rsi popq %rdi - movq 5120(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5120(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24004,7 +24274,7 @@ GL_PREFIX(WindowPos4sMESA): popq %rdx popq %rsi popq %rdi - movq 5120(%rax), %r11 + movq 5168(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4sMESA), .-GL_PREFIX(WindowPos4sMESA) @@ -24015,37 +24285,37 @@ GL_PREFIX(WindowPos4sMESA): GL_PREFIX(WindowPos4svMESA): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5128(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5128(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5128(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5128(%rax), %r11 + movq 5176(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(WindowPos4svMESA), .-GL_PREFIX(WindowPos4svMESA) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_642) - .type GL_PREFIX(_dispatch_stub_642), @function - HIDDEN(GL_PREFIX(_dispatch_stub_642)) -GL_PREFIX(_dispatch_stub_642): + .globl GL_PREFIX(_dispatch_stub_648) + .type GL_PREFIX(_dispatch_stub_648), @function + HIDDEN(GL_PREFIX(_dispatch_stub_648)) +GL_PREFIX(_dispatch_stub_648): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5136(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24059,13 +24329,13 @@ GL_PREFIX(_dispatch_stub_642): popq %rdx popq %rsi popq %rdi - movq 5136(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5136(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24079,19 +24349,19 @@ GL_PREFIX(_dispatch_stub_642): popq %rdx popq %rsi popq %rdi - movq 5136(%rax), %r11 + movq 5184(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_642), .-GL_PREFIX(_dispatch_stub_642) + .size GL_PREFIX(_dispatch_stub_648), .-GL_PREFIX(_dispatch_stub_648) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_643) - .type GL_PREFIX(_dispatch_stub_643), @function - HIDDEN(GL_PREFIX(_dispatch_stub_643)) -GL_PREFIX(_dispatch_stub_643): + .globl GL_PREFIX(_dispatch_stub_649) + .type GL_PREFIX(_dispatch_stub_649), @function + HIDDEN(GL_PREFIX(_dispatch_stub_649)) +GL_PREFIX(_dispatch_stub_649): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5144(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24109,13 +24379,13 @@ GL_PREFIX(_dispatch_stub_643): popq %rdx popq %rsi popq %rdi - movq 5144(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5144(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24133,19 +24403,19 @@ GL_PREFIX(_dispatch_stub_643): popq %rdx popq %rsi popq %rdi - movq 5144(%rax), %r11 + movq 5192(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_643), .-GL_PREFIX(_dispatch_stub_643) + .size GL_PREFIX(_dispatch_stub_649), .-GL_PREFIX(_dispatch_stub_649) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_644) - .type GL_PREFIX(_dispatch_stub_644), @function - HIDDEN(GL_PREFIX(_dispatch_stub_644)) -GL_PREFIX(_dispatch_stub_644): + .globl GL_PREFIX(_dispatch_stub_650) + .type GL_PREFIX(_dispatch_stub_650), @function + HIDDEN(GL_PREFIX(_dispatch_stub_650)) +GL_PREFIX(_dispatch_stub_650): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5152(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24155,13 +24425,13 @@ GL_PREFIX(_dispatch_stub_644): popq %rbp popq %rsi popq %rdi - movq 5152(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5152(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24171,49 +24441,49 @@ GL_PREFIX(_dispatch_stub_644): popq %rbp popq %rsi popq %rdi - movq 5152(%rax), %r11 + movq 5200(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_644), .-GL_PREFIX(_dispatch_stub_644) + .size GL_PREFIX(_dispatch_stub_650), .-GL_PREFIX(_dispatch_stub_650) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_645) - .type GL_PREFIX(_dispatch_stub_645), @function - HIDDEN(GL_PREFIX(_dispatch_stub_645)) -GL_PREFIX(_dispatch_stub_645): + .globl GL_PREFIX(_dispatch_stub_651) + .type GL_PREFIX(_dispatch_stub_651), @function + HIDDEN(GL_PREFIX(_dispatch_stub_651)) +GL_PREFIX(_dispatch_stub_651): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5160(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5160(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5160(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5160(%rax), %r11 + movq 5208(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_645), .-GL_PREFIX(_dispatch_stub_645) + .size GL_PREFIX(_dispatch_stub_651), .-GL_PREFIX(_dispatch_stub_651) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_646) - .type GL_PREFIX(_dispatch_stub_646), @function - HIDDEN(GL_PREFIX(_dispatch_stub_646)) -GL_PREFIX(_dispatch_stub_646): + .globl GL_PREFIX(_dispatch_stub_652) + .type GL_PREFIX(_dispatch_stub_652), @function + HIDDEN(GL_PREFIX(_dispatch_stub_652)) +GL_PREFIX(_dispatch_stub_652): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5168(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24223,13 +24493,13 @@ GL_PREFIX(_dispatch_stub_646): popq %rbp popq %rsi popq %rdi - movq 5168(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5168(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24239,19 +24509,19 @@ GL_PREFIX(_dispatch_stub_646): popq %rbp popq %rsi popq %rdi - movq 5168(%rax), %r11 + movq 5216(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_646), .-GL_PREFIX(_dispatch_stub_646) + .size GL_PREFIX(_dispatch_stub_652), .-GL_PREFIX(_dispatch_stub_652) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_647) - .type GL_PREFIX(_dispatch_stub_647), @function - HIDDEN(GL_PREFIX(_dispatch_stub_647)) -GL_PREFIX(_dispatch_stub_647): + .globl GL_PREFIX(_dispatch_stub_653) + .type GL_PREFIX(_dispatch_stub_653), @function + HIDDEN(GL_PREFIX(_dispatch_stub_653)) +GL_PREFIX(_dispatch_stub_653): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5176(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24261,13 +24531,13 @@ GL_PREFIX(_dispatch_stub_647): popq %rdx popq %rsi popq %rdi - movq 5176(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5176(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24277,49 +24547,49 @@ GL_PREFIX(_dispatch_stub_647): popq %rdx popq %rsi popq %rdi - movq 5176(%rax), %r11 + movq 5224(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_647), .-GL_PREFIX(_dispatch_stub_647) + .size GL_PREFIX(_dispatch_stub_653), .-GL_PREFIX(_dispatch_stub_653) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_648) - .type GL_PREFIX(_dispatch_stub_648), @function - HIDDEN(GL_PREFIX(_dispatch_stub_648)) -GL_PREFIX(_dispatch_stub_648): + .globl GL_PREFIX(_dispatch_stub_654) + .type GL_PREFIX(_dispatch_stub_654), @function + HIDDEN(GL_PREFIX(_dispatch_stub_654)) +GL_PREFIX(_dispatch_stub_654): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5184(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5184(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5184(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5184(%rax), %r11 + movq 5232(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_648), .-GL_PREFIX(_dispatch_stub_648) + .size GL_PREFIX(_dispatch_stub_654), .-GL_PREFIX(_dispatch_stub_654) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_649) - .type GL_PREFIX(_dispatch_stub_649), @function - HIDDEN(GL_PREFIX(_dispatch_stub_649)) -GL_PREFIX(_dispatch_stub_649): + .globl GL_PREFIX(_dispatch_stub_655) + .type GL_PREFIX(_dispatch_stub_655), @function + HIDDEN(GL_PREFIX(_dispatch_stub_655)) +GL_PREFIX(_dispatch_stub_655): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5192(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24329,13 +24599,13 @@ GL_PREFIX(_dispatch_stub_649): popq %rbp popq %rsi popq %rdi - movq 5192(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5192(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24345,40 +24615,40 @@ GL_PREFIX(_dispatch_stub_649): popq %rbp popq %rsi popq %rdi - movq 5192(%rax), %r11 + movq 5240(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_649), .-GL_PREFIX(_dispatch_stub_649) + .size GL_PREFIX(_dispatch_stub_655), .-GL_PREFIX(_dispatch_stub_655) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_650) - .type GL_PREFIX(_dispatch_stub_650), @function - HIDDEN(GL_PREFIX(_dispatch_stub_650)) -GL_PREFIX(_dispatch_stub_650): + .globl GL_PREFIX(_dispatch_stub_656) + .type GL_PREFIX(_dispatch_stub_656), @function + HIDDEN(GL_PREFIX(_dispatch_stub_656)) +GL_PREFIX(_dispatch_stub_656): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5200(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5200(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5200(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5200(%rax), %r11 + movq 5248(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_650), .-GL_PREFIX(_dispatch_stub_650) + .size GL_PREFIX(_dispatch_stub_656), .-GL_PREFIX(_dispatch_stub_656) .p2align 4,,15 .globl GL_PREFIX(AreProgramsResidentNV) @@ -24386,7 +24656,7 @@ GL_PREFIX(_dispatch_stub_650): GL_PREFIX(AreProgramsResidentNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5208(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24396,13 +24666,13 @@ GL_PREFIX(AreProgramsResidentNV): popq %rdx popq %rsi popq %rdi - movq 5208(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5208(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24412,7 +24682,7 @@ GL_PREFIX(AreProgramsResidentNV): popq %rdx popq %rsi popq %rdi - movq 5208(%rax), %r11 + movq 5256(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AreProgramsResidentNV), .-GL_PREFIX(AreProgramsResidentNV) @@ -24423,7 +24693,7 @@ GL_PREFIX(AreProgramsResidentNV): GL_PREFIX(BindProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5216(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24433,13 +24703,13 @@ GL_PREFIX(BindProgramNV): popq %rbp popq %rsi popq %rdi - movq 5216(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5216(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24449,7 +24719,7 @@ GL_PREFIX(BindProgramNV): popq %rbp popq %rsi popq %rdi - movq 5216(%rax), %r11 + movq 5264(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindProgramNV), .-GL_PREFIX(BindProgramNV) @@ -24460,7 +24730,7 @@ GL_PREFIX(BindProgramNV): GL_PREFIX(DeleteProgramsNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5224(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24470,13 +24740,13 @@ GL_PREFIX(DeleteProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5224(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5224(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24486,7 +24756,7 @@ GL_PREFIX(DeleteProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5224(%rax), %r11 + movq 5272(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteProgramsNV), .-GL_PREFIX(DeleteProgramsNV) @@ -24497,7 +24767,7 @@ GL_PREFIX(DeleteProgramsNV): GL_PREFIX(ExecuteProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5232(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24507,13 +24777,13 @@ GL_PREFIX(ExecuteProgramNV): popq %rdx popq %rsi popq %rdi - movq 5232(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5232(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24523,7 +24793,7 @@ GL_PREFIX(ExecuteProgramNV): popq %rdx popq %rsi popq %rdi - movq 5232(%rax), %r11 + movq 5280(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ExecuteProgramNV), .-GL_PREFIX(ExecuteProgramNV) @@ -24534,7 +24804,7 @@ GL_PREFIX(ExecuteProgramNV): GL_PREFIX(GenProgramsNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5240(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24544,13 +24814,13 @@ GL_PREFIX(GenProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5240(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5240(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24560,7 +24830,7 @@ GL_PREFIX(GenProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5240(%rax), %r11 + movq 5288(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenProgramsNV), .-GL_PREFIX(GenProgramsNV) @@ -24571,7 +24841,7 @@ GL_PREFIX(GenProgramsNV): GL_PREFIX(GetProgramParameterdvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5248(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24585,13 +24855,13 @@ GL_PREFIX(GetProgramParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5248(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5248(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24605,7 +24875,7 @@ GL_PREFIX(GetProgramParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5248(%rax), %r11 + movq 5296(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramParameterdvNV), .-GL_PREFIX(GetProgramParameterdvNV) @@ -24616,7 +24886,7 @@ GL_PREFIX(GetProgramParameterdvNV): GL_PREFIX(GetProgramParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5256(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24630,13 +24900,13 @@ GL_PREFIX(GetProgramParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5256(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5256(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24650,7 +24920,7 @@ GL_PREFIX(GetProgramParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5256(%rax), %r11 + movq 5304(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramParameterfvNV), .-GL_PREFIX(GetProgramParameterfvNV) @@ -24661,7 +24931,7 @@ GL_PREFIX(GetProgramParameterfvNV): GL_PREFIX(GetProgramStringNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5264(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24671,13 +24941,13 @@ GL_PREFIX(GetProgramStringNV): popq %rdx popq %rsi popq %rdi - movq 5264(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5264(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24687,7 +24957,7 @@ GL_PREFIX(GetProgramStringNV): popq %rdx popq %rsi popq %rdi - movq 5264(%rax), %r11 + movq 5312(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramStringNV), .-GL_PREFIX(GetProgramStringNV) @@ -24698,7 +24968,7 @@ GL_PREFIX(GetProgramStringNV): GL_PREFIX(GetProgramivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5272(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24708,13 +24978,13 @@ GL_PREFIX(GetProgramivNV): popq %rdx popq %rsi popq %rdi - movq 5272(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5272(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24724,7 +24994,7 @@ GL_PREFIX(GetProgramivNV): popq %rdx popq %rsi popq %rdi - movq 5272(%rax), %r11 + movq 5320(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramivNV), .-GL_PREFIX(GetProgramivNV) @@ -24735,7 +25005,7 @@ GL_PREFIX(GetProgramivNV): GL_PREFIX(GetTrackMatrixivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5280(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24749,13 +25019,13 @@ GL_PREFIX(GetTrackMatrixivNV): popq %rdx popq %rsi popq %rdi - movq 5280(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5280(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24769,7 +25039,7 @@ GL_PREFIX(GetTrackMatrixivNV): popq %rdx popq %rsi popq %rdi - movq 5280(%rax), %r11 + movq 5328(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetTrackMatrixivNV), .-GL_PREFIX(GetTrackMatrixivNV) @@ -24780,7 +25050,7 @@ GL_PREFIX(GetTrackMatrixivNV): GL_PREFIX(GetVertexAttribPointervNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5288(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24790,13 +25060,13 @@ GL_PREFIX(GetVertexAttribPointervNV): popq %rdx popq %rsi popq %rdi - movq 5288(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5288(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24806,7 +25076,7 @@ GL_PREFIX(GetVertexAttribPointervNV): popq %rdx popq %rsi popq %rdi - movq 5288(%rax), %r11 + movq 5336(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribPointervNV), .-GL_PREFIX(GetVertexAttribPointervNV) @@ -24817,7 +25087,7 @@ GL_PREFIX(GetVertexAttribPointervNV): GL_PREFIX(GetVertexAttribdvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5296(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24827,13 +25097,13 @@ GL_PREFIX(GetVertexAttribdvNV): popq %rdx popq %rsi popq %rdi - movq 5296(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5296(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24843,7 +25113,7 @@ GL_PREFIX(GetVertexAttribdvNV): popq %rdx popq %rsi popq %rdi - movq 5296(%rax), %r11 + movq 5344(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribdvNV), .-GL_PREFIX(GetVertexAttribdvNV) @@ -24854,7 +25124,7 @@ GL_PREFIX(GetVertexAttribdvNV): GL_PREFIX(GetVertexAttribfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5304(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24864,13 +25134,13 @@ GL_PREFIX(GetVertexAttribfvNV): popq %rdx popq %rsi popq %rdi - movq 5304(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5304(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24880,7 +25150,7 @@ GL_PREFIX(GetVertexAttribfvNV): popq %rdx popq %rsi popq %rdi - movq 5304(%rax), %r11 + movq 5352(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribfvNV), .-GL_PREFIX(GetVertexAttribfvNV) @@ -24891,7 +25161,7 @@ GL_PREFIX(GetVertexAttribfvNV): GL_PREFIX(GetVertexAttribivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5312(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24901,13 +25171,13 @@ GL_PREFIX(GetVertexAttribivNV): popq %rdx popq %rsi popq %rdi - movq 5312(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5312(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24917,7 +25187,7 @@ GL_PREFIX(GetVertexAttribivNV): popq %rdx popq %rsi popq %rdi - movq 5312(%rax), %r11 + movq 5360(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetVertexAttribivNV), .-GL_PREFIX(GetVertexAttribivNV) @@ -24928,25 +25198,25 @@ GL_PREFIX(GetVertexAttribivNV): GL_PREFIX(IsProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5320(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5320(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5320(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5320(%rax), %r11 + movq 5368(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsProgramNV), .-GL_PREFIX(IsProgramNV) @@ -24957,7 +25227,7 @@ GL_PREFIX(IsProgramNV): GL_PREFIX(LoadProgramNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5328(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -24971,13 +25241,13 @@ GL_PREFIX(LoadProgramNV): popq %rdx popq %rsi popq %rdi - movq 5328(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5328(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -24991,7 +25261,7 @@ GL_PREFIX(LoadProgramNV): popq %rdx popq %rsi popq %rdi - movq 5328(%rax), %r11 + movq 5376(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(LoadProgramNV), .-GL_PREFIX(LoadProgramNV) @@ -25002,7 +25272,7 @@ GL_PREFIX(LoadProgramNV): GL_PREFIX(ProgramParameter4dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5336(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -25020,13 +25290,13 @@ GL_PREFIX(ProgramParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5336(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5336(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -25044,7 +25314,7 @@ GL_PREFIX(ProgramParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5336(%rax), %r11 + movq 5384(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4dNV), .-GL_PREFIX(ProgramParameter4dNV) @@ -25055,7 +25325,7 @@ GL_PREFIX(ProgramParameter4dNV): GL_PREFIX(ProgramParameter4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5344(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25065,13 +25335,13 @@ GL_PREFIX(ProgramParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5344(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5344(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25081,7 +25351,7 @@ GL_PREFIX(ProgramParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5344(%rax), %r11 + movq 5392(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4dvNV), .-GL_PREFIX(ProgramParameter4dvNV) @@ -25092,7 +25362,7 @@ GL_PREFIX(ProgramParameter4dvNV): GL_PREFIX(ProgramParameter4fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5352(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -25110,13 +25380,13 @@ GL_PREFIX(ProgramParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5352(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5352(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -25134,7 +25404,7 @@ GL_PREFIX(ProgramParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5352(%rax), %r11 + movq 5400(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4fNV), .-GL_PREFIX(ProgramParameter4fNV) @@ -25145,7 +25415,7 @@ GL_PREFIX(ProgramParameter4fNV): GL_PREFIX(ProgramParameter4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5360(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25155,13 +25425,13 @@ GL_PREFIX(ProgramParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5360(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5360(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25171,7 +25441,7 @@ GL_PREFIX(ProgramParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5360(%rax), %r11 + movq 5408(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameter4fvNV), .-GL_PREFIX(ProgramParameter4fvNV) @@ -25182,7 +25452,7 @@ GL_PREFIX(ProgramParameter4fvNV): GL_PREFIX(ProgramParameters4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5368(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25196,13 +25466,13 @@ GL_PREFIX(ProgramParameters4dvNV): popq %rdx popq %rsi popq %rdi - movq 5368(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5368(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25216,7 +25486,7 @@ GL_PREFIX(ProgramParameters4dvNV): popq %rdx popq %rsi popq %rdi - movq 5368(%rax), %r11 + movq 5416(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameters4dvNV), .-GL_PREFIX(ProgramParameters4dvNV) @@ -25227,7 +25497,7 @@ GL_PREFIX(ProgramParameters4dvNV): GL_PREFIX(ProgramParameters4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5376(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25241,13 +25511,13 @@ GL_PREFIX(ProgramParameters4fvNV): popq %rdx popq %rsi popq %rdi - movq 5376(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5376(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25261,7 +25531,7 @@ GL_PREFIX(ProgramParameters4fvNV): popq %rdx popq %rsi popq %rdi - movq 5376(%rax), %r11 + movq 5424(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramParameters4fvNV), .-GL_PREFIX(ProgramParameters4fvNV) @@ -25272,7 +25542,7 @@ GL_PREFIX(ProgramParameters4fvNV): GL_PREFIX(RequestResidentProgramsNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5384(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25282,13 +25552,13 @@ GL_PREFIX(RequestResidentProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5384(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5384(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25298,7 +25568,7 @@ GL_PREFIX(RequestResidentProgramsNV): popq %rbp popq %rsi popq %rdi - movq 5384(%rax), %r11 + movq 5432(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(RequestResidentProgramsNV), .-GL_PREFIX(RequestResidentProgramsNV) @@ -25309,7 +25579,7 @@ GL_PREFIX(RequestResidentProgramsNV): GL_PREFIX(TrackMatrixNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5392(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25323,13 +25593,13 @@ GL_PREFIX(TrackMatrixNV): popq %rdx popq %rsi popq %rdi - movq 5392(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5392(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25343,7 +25613,7 @@ GL_PREFIX(TrackMatrixNV): popq %rdx popq %rsi popq %rdi - movq 5392(%rax), %r11 + movq 5440(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(TrackMatrixNV), .-GL_PREFIX(TrackMatrixNV) @@ -25354,7 +25624,7 @@ GL_PREFIX(TrackMatrixNV): GL_PREFIX(VertexAttrib1dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5400(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -25364,13 +25634,13 @@ GL_PREFIX(VertexAttrib1dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5400(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5400(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -25380,7 +25650,7 @@ GL_PREFIX(VertexAttrib1dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5400(%rax), %r11 + movq 5448(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dNV), .-GL_PREFIX(VertexAttrib1dNV) @@ -25391,7 +25661,7 @@ GL_PREFIX(VertexAttrib1dNV): GL_PREFIX(VertexAttrib1dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5408(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25401,13 +25671,13 @@ GL_PREFIX(VertexAttrib1dvNV): popq %rbp popq %rsi popq %rdi - movq 5408(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5408(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25417,7 +25687,7 @@ GL_PREFIX(VertexAttrib1dvNV): popq %rbp popq %rsi popq %rdi - movq 5408(%rax), %r11 + movq 5456(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1dvNV), .-GL_PREFIX(VertexAttrib1dvNV) @@ -25428,7 +25698,7 @@ GL_PREFIX(VertexAttrib1dvNV): GL_PREFIX(VertexAttrib1fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5416(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -25438,13 +25708,13 @@ GL_PREFIX(VertexAttrib1fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5416(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5416(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -25454,7 +25724,7 @@ GL_PREFIX(VertexAttrib1fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5416(%rax), %r11 + movq 5464(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fNV), .-GL_PREFIX(VertexAttrib1fNV) @@ -25465,7 +25735,7 @@ GL_PREFIX(VertexAttrib1fNV): GL_PREFIX(VertexAttrib1fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5424(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25475,13 +25745,13 @@ GL_PREFIX(VertexAttrib1fvNV): popq %rbp popq %rsi popq %rdi - movq 5424(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5424(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25491,7 +25761,7 @@ GL_PREFIX(VertexAttrib1fvNV): popq %rbp popq %rsi popq %rdi - movq 5424(%rax), %r11 + movq 5472(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1fvNV), .-GL_PREFIX(VertexAttrib1fvNV) @@ -25502,7 +25772,7 @@ GL_PREFIX(VertexAttrib1fvNV): GL_PREFIX(VertexAttrib1sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5432(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25512,13 +25782,13 @@ GL_PREFIX(VertexAttrib1sNV): popq %rbp popq %rsi popq %rdi - movq 5432(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5432(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25528,7 +25798,7 @@ GL_PREFIX(VertexAttrib1sNV): popq %rbp popq %rsi popq %rdi - movq 5432(%rax), %r11 + movq 5480(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1sNV), .-GL_PREFIX(VertexAttrib1sNV) @@ -25539,7 +25809,7 @@ GL_PREFIX(VertexAttrib1sNV): GL_PREFIX(VertexAttrib1svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5440(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25549,13 +25819,13 @@ GL_PREFIX(VertexAttrib1svNV): popq %rbp popq %rsi popq %rdi - movq 5440(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5440(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25565,7 +25835,7 @@ GL_PREFIX(VertexAttrib1svNV): popq %rbp popq %rsi popq %rdi - movq 5440(%rax), %r11 + movq 5488(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib1svNV), .-GL_PREFIX(VertexAttrib1svNV) @@ -25576,7 +25846,7 @@ GL_PREFIX(VertexAttrib1svNV): GL_PREFIX(VertexAttrib2dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5448(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -25588,13 +25858,13 @@ GL_PREFIX(VertexAttrib2dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5448(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5448(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -25606,7 +25876,7 @@ GL_PREFIX(VertexAttrib2dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5448(%rax), %r11 + movq 5496(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dNV), .-GL_PREFIX(VertexAttrib2dNV) @@ -25617,7 +25887,7 @@ GL_PREFIX(VertexAttrib2dNV): GL_PREFIX(VertexAttrib2dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5456(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25627,13 +25897,13 @@ GL_PREFIX(VertexAttrib2dvNV): popq %rbp popq %rsi popq %rdi - movq 5456(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5456(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25643,7 +25913,7 @@ GL_PREFIX(VertexAttrib2dvNV): popq %rbp popq %rsi popq %rdi - movq 5456(%rax), %r11 + movq 5504(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2dvNV), .-GL_PREFIX(VertexAttrib2dvNV) @@ -25654,7 +25924,7 @@ GL_PREFIX(VertexAttrib2dvNV): GL_PREFIX(VertexAttrib2fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5464(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $24, %rsp @@ -25666,13 +25936,13 @@ GL_PREFIX(VertexAttrib2fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5464(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5464(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 1: subq $24, %rsp @@ -25684,7 +25954,7 @@ GL_PREFIX(VertexAttrib2fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $24, %rsp - movq 5464(%rax), %r11 + movq 5512(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fNV), .-GL_PREFIX(VertexAttrib2fNV) @@ -25695,7 +25965,7 @@ GL_PREFIX(VertexAttrib2fNV): GL_PREFIX(VertexAttrib2fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5472(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25705,13 +25975,13 @@ GL_PREFIX(VertexAttrib2fvNV): popq %rbp popq %rsi popq %rdi - movq 5472(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5472(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25721,7 +25991,7 @@ GL_PREFIX(VertexAttrib2fvNV): popq %rbp popq %rsi popq %rdi - movq 5472(%rax), %r11 + movq 5520(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2fvNV), .-GL_PREFIX(VertexAttrib2fvNV) @@ -25732,7 +26002,7 @@ GL_PREFIX(VertexAttrib2fvNV): GL_PREFIX(VertexAttrib2sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5480(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25742,13 +26012,13 @@ GL_PREFIX(VertexAttrib2sNV): popq %rdx popq %rsi popq %rdi - movq 5480(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5480(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25758,7 +26028,7 @@ GL_PREFIX(VertexAttrib2sNV): popq %rdx popq %rsi popq %rdi - movq 5480(%rax), %r11 + movq 5528(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2sNV), .-GL_PREFIX(VertexAttrib2sNV) @@ -25769,7 +26039,7 @@ GL_PREFIX(VertexAttrib2sNV): GL_PREFIX(VertexAttrib2svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5488(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25779,13 +26049,13 @@ GL_PREFIX(VertexAttrib2svNV): popq %rbp popq %rsi popq %rdi - movq 5488(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5488(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25795,7 +26065,7 @@ GL_PREFIX(VertexAttrib2svNV): popq %rbp popq %rsi popq %rdi - movq 5488(%rax), %r11 + movq 5536(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib2svNV), .-GL_PREFIX(VertexAttrib2svNV) @@ -25806,7 +26076,7 @@ GL_PREFIX(VertexAttrib2svNV): GL_PREFIX(VertexAttrib3dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5496(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -25820,13 +26090,13 @@ GL_PREFIX(VertexAttrib3dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5496(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5496(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -25840,7 +26110,7 @@ GL_PREFIX(VertexAttrib3dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5496(%rax), %r11 + movq 5544(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dNV), .-GL_PREFIX(VertexAttrib3dNV) @@ -25851,7 +26121,7 @@ GL_PREFIX(VertexAttrib3dNV): GL_PREFIX(VertexAttrib3dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5504(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25861,13 +26131,13 @@ GL_PREFIX(VertexAttrib3dvNV): popq %rbp popq %rsi popq %rdi - movq 5504(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5504(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25877,7 +26147,7 @@ GL_PREFIX(VertexAttrib3dvNV): popq %rbp popq %rsi popq %rdi - movq 5504(%rax), %r11 + movq 5552(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3dvNV), .-GL_PREFIX(VertexAttrib3dvNV) @@ -25888,7 +26158,7 @@ GL_PREFIX(VertexAttrib3dvNV): GL_PREFIX(VertexAttrib3fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5512(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -25902,13 +26172,13 @@ GL_PREFIX(VertexAttrib3fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5512(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5512(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -25922,7 +26192,7 @@ GL_PREFIX(VertexAttrib3fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5512(%rax), %r11 + movq 5560(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fNV), .-GL_PREFIX(VertexAttrib3fNV) @@ -25933,7 +26203,7 @@ GL_PREFIX(VertexAttrib3fNV): GL_PREFIX(VertexAttrib3fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5520(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25943,13 +26213,13 @@ GL_PREFIX(VertexAttrib3fvNV): popq %rbp popq %rsi popq %rdi - movq 5520(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5520(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -25959,7 +26229,7 @@ GL_PREFIX(VertexAttrib3fvNV): popq %rbp popq %rsi popq %rdi - movq 5520(%rax), %r11 + movq 5568(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3fvNV), .-GL_PREFIX(VertexAttrib3fvNV) @@ -25970,7 +26240,7 @@ GL_PREFIX(VertexAttrib3fvNV): GL_PREFIX(VertexAttrib3sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5528(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -25984,13 +26254,13 @@ GL_PREFIX(VertexAttrib3sNV): popq %rdx popq %rsi popq %rdi - movq 5528(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5528(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26004,7 +26274,7 @@ GL_PREFIX(VertexAttrib3sNV): popq %rdx popq %rsi popq %rdi - movq 5528(%rax), %r11 + movq 5576(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3sNV), .-GL_PREFIX(VertexAttrib3sNV) @@ -26015,7 +26285,7 @@ GL_PREFIX(VertexAttrib3sNV): GL_PREFIX(VertexAttrib3svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5536(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26025,13 +26295,13 @@ GL_PREFIX(VertexAttrib3svNV): popq %rbp popq %rsi popq %rdi - movq 5536(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5536(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26041,7 +26311,7 @@ GL_PREFIX(VertexAttrib3svNV): popq %rbp popq %rsi popq %rdi - movq 5536(%rax), %r11 + movq 5584(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib3svNV), .-GL_PREFIX(VertexAttrib3svNV) @@ -26052,7 +26322,7 @@ GL_PREFIX(VertexAttrib3svNV): GL_PREFIX(VertexAttrib4dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5544(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -26068,13 +26338,13 @@ GL_PREFIX(VertexAttrib4dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5544(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5544(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -26090,7 +26360,7 @@ GL_PREFIX(VertexAttrib4dNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5544(%rax), %r11 + movq 5592(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dNV), .-GL_PREFIX(VertexAttrib4dNV) @@ -26101,7 +26371,7 @@ GL_PREFIX(VertexAttrib4dNV): GL_PREFIX(VertexAttrib4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5552(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26111,13 +26381,13 @@ GL_PREFIX(VertexAttrib4dvNV): popq %rbp popq %rsi popq %rdi - movq 5552(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5552(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26127,7 +26397,7 @@ GL_PREFIX(VertexAttrib4dvNV): popq %rbp popq %rsi popq %rdi - movq 5552(%rax), %r11 + movq 5600(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4dvNV), .-GL_PREFIX(VertexAttrib4dvNV) @@ -26138,7 +26408,7 @@ GL_PREFIX(VertexAttrib4dvNV): GL_PREFIX(VertexAttrib4fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5560(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $40, %rsp @@ -26154,13 +26424,13 @@ GL_PREFIX(VertexAttrib4fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5560(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5560(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 1: subq $40, %rsp @@ -26176,7 +26446,7 @@ GL_PREFIX(VertexAttrib4fNV): movq 8(%rsp), %xmm0 movq (%rsp), %rdi addq $40, %rsp - movq 5560(%rax), %r11 + movq 5608(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fNV), .-GL_PREFIX(VertexAttrib4fNV) @@ -26187,7 +26457,7 @@ GL_PREFIX(VertexAttrib4fNV): GL_PREFIX(VertexAttrib4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5568(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26197,13 +26467,13 @@ GL_PREFIX(VertexAttrib4fvNV): popq %rbp popq %rsi popq %rdi - movq 5568(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5568(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26213,7 +26483,7 @@ GL_PREFIX(VertexAttrib4fvNV): popq %rbp popq %rsi popq %rdi - movq 5568(%rax), %r11 + movq 5616(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4fvNV), .-GL_PREFIX(VertexAttrib4fvNV) @@ -26224,7 +26494,7 @@ GL_PREFIX(VertexAttrib4fvNV): GL_PREFIX(VertexAttrib4sNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5576(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26238,13 +26508,13 @@ GL_PREFIX(VertexAttrib4sNV): popq %rdx popq %rsi popq %rdi - movq 5576(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5576(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26258,7 +26528,7 @@ GL_PREFIX(VertexAttrib4sNV): popq %rdx popq %rsi popq %rdi - movq 5576(%rax), %r11 + movq 5624(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4sNV), .-GL_PREFIX(VertexAttrib4sNV) @@ -26269,7 +26539,7 @@ GL_PREFIX(VertexAttrib4sNV): GL_PREFIX(VertexAttrib4svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5584(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26279,13 +26549,13 @@ GL_PREFIX(VertexAttrib4svNV): popq %rbp popq %rsi popq %rdi - movq 5584(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5584(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26295,7 +26565,7 @@ GL_PREFIX(VertexAttrib4svNV): popq %rbp popq %rsi popq %rdi - movq 5584(%rax), %r11 + movq 5632(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4svNV), .-GL_PREFIX(VertexAttrib4svNV) @@ -26306,7 +26576,7 @@ GL_PREFIX(VertexAttrib4svNV): GL_PREFIX(VertexAttrib4ubNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5592(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26320,13 +26590,13 @@ GL_PREFIX(VertexAttrib4ubNV): popq %rdx popq %rsi popq %rdi - movq 5592(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5592(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26340,7 +26610,7 @@ GL_PREFIX(VertexAttrib4ubNV): popq %rdx popq %rsi popq %rdi - movq 5592(%rax), %r11 + movq 5640(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ubNV), .-GL_PREFIX(VertexAttrib4ubNV) @@ -26351,7 +26621,7 @@ GL_PREFIX(VertexAttrib4ubNV): GL_PREFIX(VertexAttrib4ubvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5600(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26361,13 +26631,13 @@ GL_PREFIX(VertexAttrib4ubvNV): popq %rbp popq %rsi popq %rdi - movq 5600(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5600(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26377,7 +26647,7 @@ GL_PREFIX(VertexAttrib4ubvNV): popq %rbp popq %rsi popq %rdi - movq 5600(%rax), %r11 + movq 5648(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttrib4ubvNV), .-GL_PREFIX(VertexAttrib4ubvNV) @@ -26388,7 +26658,7 @@ GL_PREFIX(VertexAttrib4ubvNV): GL_PREFIX(VertexAttribPointerNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5608(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26402,13 +26672,13 @@ GL_PREFIX(VertexAttribPointerNV): popq %rdx popq %rsi popq %rdi - movq 5608(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5608(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26422,7 +26692,7 @@ GL_PREFIX(VertexAttribPointerNV): popq %rdx popq %rsi popq %rdi - movq 5608(%rax), %r11 + movq 5656(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribPointerNV), .-GL_PREFIX(VertexAttribPointerNV) @@ -26433,7 +26703,7 @@ GL_PREFIX(VertexAttribPointerNV): GL_PREFIX(VertexAttribs1dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5616(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26443,13 +26713,13 @@ GL_PREFIX(VertexAttribs1dvNV): popq %rdx popq %rsi popq %rdi - movq 5616(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5616(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26459,7 +26729,7 @@ GL_PREFIX(VertexAttribs1dvNV): popq %rdx popq %rsi popq %rdi - movq 5616(%rax), %r11 + movq 5664(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs1dvNV), .-GL_PREFIX(VertexAttribs1dvNV) @@ -26470,7 +26740,7 @@ GL_PREFIX(VertexAttribs1dvNV): GL_PREFIX(VertexAttribs1fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5624(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26480,13 +26750,13 @@ GL_PREFIX(VertexAttribs1fvNV): popq %rdx popq %rsi popq %rdi - movq 5624(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5624(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26496,7 +26766,7 @@ GL_PREFIX(VertexAttribs1fvNV): popq %rdx popq %rsi popq %rdi - movq 5624(%rax), %r11 + movq 5672(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs1fvNV), .-GL_PREFIX(VertexAttribs1fvNV) @@ -26507,7 +26777,7 @@ GL_PREFIX(VertexAttribs1fvNV): GL_PREFIX(VertexAttribs1svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5632(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26517,13 +26787,13 @@ GL_PREFIX(VertexAttribs1svNV): popq %rdx popq %rsi popq %rdi - movq 5632(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5632(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26533,7 +26803,7 @@ GL_PREFIX(VertexAttribs1svNV): popq %rdx popq %rsi popq %rdi - movq 5632(%rax), %r11 + movq 5680(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs1svNV), .-GL_PREFIX(VertexAttribs1svNV) @@ -26544,7 +26814,7 @@ GL_PREFIX(VertexAttribs1svNV): GL_PREFIX(VertexAttribs2dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5640(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26554,13 +26824,13 @@ GL_PREFIX(VertexAttribs2dvNV): popq %rdx popq %rsi popq %rdi - movq 5640(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5640(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26570,7 +26840,7 @@ GL_PREFIX(VertexAttribs2dvNV): popq %rdx popq %rsi popq %rdi - movq 5640(%rax), %r11 + movq 5688(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs2dvNV), .-GL_PREFIX(VertexAttribs2dvNV) @@ -26581,7 +26851,7 @@ GL_PREFIX(VertexAttribs2dvNV): GL_PREFIX(VertexAttribs2fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5648(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26591,13 +26861,13 @@ GL_PREFIX(VertexAttribs2fvNV): popq %rdx popq %rsi popq %rdi - movq 5648(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5648(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26607,7 +26877,7 @@ GL_PREFIX(VertexAttribs2fvNV): popq %rdx popq %rsi popq %rdi - movq 5648(%rax), %r11 + movq 5696(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs2fvNV), .-GL_PREFIX(VertexAttribs2fvNV) @@ -26618,7 +26888,7 @@ GL_PREFIX(VertexAttribs2fvNV): GL_PREFIX(VertexAttribs2svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5656(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26628,13 +26898,13 @@ GL_PREFIX(VertexAttribs2svNV): popq %rdx popq %rsi popq %rdi - movq 5656(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5656(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26644,7 +26914,7 @@ GL_PREFIX(VertexAttribs2svNV): popq %rdx popq %rsi popq %rdi - movq 5656(%rax), %r11 + movq 5704(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs2svNV), .-GL_PREFIX(VertexAttribs2svNV) @@ -26655,7 +26925,7 @@ GL_PREFIX(VertexAttribs2svNV): GL_PREFIX(VertexAttribs3dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5664(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26665,13 +26935,13 @@ GL_PREFIX(VertexAttribs3dvNV): popq %rdx popq %rsi popq %rdi - movq 5664(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5664(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26681,7 +26951,7 @@ GL_PREFIX(VertexAttribs3dvNV): popq %rdx popq %rsi popq %rdi - movq 5664(%rax), %r11 + movq 5712(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs3dvNV), .-GL_PREFIX(VertexAttribs3dvNV) @@ -26692,7 +26962,7 @@ GL_PREFIX(VertexAttribs3dvNV): GL_PREFIX(VertexAttribs3fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5672(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26702,13 +26972,13 @@ GL_PREFIX(VertexAttribs3fvNV): popq %rdx popq %rsi popq %rdi - movq 5672(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5672(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26718,7 +26988,7 @@ GL_PREFIX(VertexAttribs3fvNV): popq %rdx popq %rsi popq %rdi - movq 5672(%rax), %r11 + movq 5720(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs3fvNV), .-GL_PREFIX(VertexAttribs3fvNV) @@ -26729,7 +26999,7 @@ GL_PREFIX(VertexAttribs3fvNV): GL_PREFIX(VertexAttribs3svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5680(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26739,13 +27009,13 @@ GL_PREFIX(VertexAttribs3svNV): popq %rdx popq %rsi popq %rdi - movq 5680(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5680(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26755,7 +27025,7 @@ GL_PREFIX(VertexAttribs3svNV): popq %rdx popq %rsi popq %rdi - movq 5680(%rax), %r11 + movq 5728(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs3svNV), .-GL_PREFIX(VertexAttribs3svNV) @@ -26766,7 +27036,7 @@ GL_PREFIX(VertexAttribs3svNV): GL_PREFIX(VertexAttribs4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5688(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26776,13 +27046,13 @@ GL_PREFIX(VertexAttribs4dvNV): popq %rdx popq %rsi popq %rdi - movq 5688(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5688(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26792,7 +27062,7 @@ GL_PREFIX(VertexAttribs4dvNV): popq %rdx popq %rsi popq %rdi - movq 5688(%rax), %r11 + movq 5736(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4dvNV), .-GL_PREFIX(VertexAttribs4dvNV) @@ -26803,7 +27073,7 @@ GL_PREFIX(VertexAttribs4dvNV): GL_PREFIX(VertexAttribs4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5696(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26813,13 +27083,13 @@ GL_PREFIX(VertexAttribs4fvNV): popq %rdx popq %rsi popq %rdi - movq 5696(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5696(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26829,7 +27099,7 @@ GL_PREFIX(VertexAttribs4fvNV): popq %rdx popq %rsi popq %rdi - movq 5696(%rax), %r11 + movq 5744(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4fvNV), .-GL_PREFIX(VertexAttribs4fvNV) @@ -26840,7 +27110,7 @@ GL_PREFIX(VertexAttribs4fvNV): GL_PREFIX(VertexAttribs4svNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5704(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26850,13 +27120,13 @@ GL_PREFIX(VertexAttribs4svNV): popq %rdx popq %rsi popq %rdi - movq 5704(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5704(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26866,7 +27136,7 @@ GL_PREFIX(VertexAttribs4svNV): popq %rdx popq %rsi popq %rdi - movq 5704(%rax), %r11 + movq 5752(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4svNV), .-GL_PREFIX(VertexAttribs4svNV) @@ -26877,7 +27147,7 @@ GL_PREFIX(VertexAttribs4svNV): GL_PREFIX(VertexAttribs4ubvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5712(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26887,13 +27157,13 @@ GL_PREFIX(VertexAttribs4ubvNV): popq %rdx popq %rsi popq %rdi - movq 5712(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5712(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26903,7 +27173,7 @@ GL_PREFIX(VertexAttribs4ubvNV): popq %rdx popq %rsi popq %rdi - movq 5712(%rax), %r11 + movq 5760(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(VertexAttribs4ubvNV), .-GL_PREFIX(VertexAttribs4ubvNV) @@ -26914,7 +27184,7 @@ GL_PREFIX(VertexAttribs4ubvNV): GL_PREFIX(AlphaFragmentOp1ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5720(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26932,13 +27202,13 @@ GL_PREFIX(AlphaFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5720(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5720(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -26956,7 +27226,7 @@ GL_PREFIX(AlphaFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5720(%rax), %r11 + movq 5768(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AlphaFragmentOp1ATI), .-GL_PREFIX(AlphaFragmentOp1ATI) @@ -26967,7 +27237,7 @@ GL_PREFIX(AlphaFragmentOp1ATI): GL_PREFIX(AlphaFragmentOp2ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5728(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -26985,13 +27255,13 @@ GL_PREFIX(AlphaFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5728(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5728(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27009,7 +27279,7 @@ GL_PREFIX(AlphaFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5728(%rax), %r11 + movq 5776(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AlphaFragmentOp2ATI), .-GL_PREFIX(AlphaFragmentOp2ATI) @@ -27020,7 +27290,7 @@ GL_PREFIX(AlphaFragmentOp2ATI): GL_PREFIX(AlphaFragmentOp3ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5736(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27038,13 +27308,13 @@ GL_PREFIX(AlphaFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5736(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5736(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27062,7 +27332,7 @@ GL_PREFIX(AlphaFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5736(%rax), %r11 + movq 5784(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(AlphaFragmentOp3ATI), .-GL_PREFIX(AlphaFragmentOp3ATI) @@ -27073,25 +27343,25 @@ GL_PREFIX(AlphaFragmentOp3ATI): GL_PREFIX(BeginFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5744(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 5744(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5744(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 5744(%rax), %r11 + movq 5792(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BeginFragmentShaderATI), .-GL_PREFIX(BeginFragmentShaderATI) @@ -27102,25 +27372,25 @@ GL_PREFIX(BeginFragmentShaderATI): GL_PREFIX(BindFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5752(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5752(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5752(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5752(%rax), %r11 + movq 5800(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindFragmentShaderATI), .-GL_PREFIX(BindFragmentShaderATI) @@ -27131,7 +27401,7 @@ GL_PREFIX(BindFragmentShaderATI): GL_PREFIX(ColorFragmentOp1ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5760(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27149,13 +27419,13 @@ GL_PREFIX(ColorFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5760(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5760(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27173,7 +27443,7 @@ GL_PREFIX(ColorFragmentOp1ATI): popq %rdx popq %rsi popq %rdi - movq 5760(%rax), %r11 + movq 5808(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorFragmentOp1ATI), .-GL_PREFIX(ColorFragmentOp1ATI) @@ -27184,7 +27454,7 @@ GL_PREFIX(ColorFragmentOp1ATI): GL_PREFIX(ColorFragmentOp2ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5768(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27202,13 +27472,13 @@ GL_PREFIX(ColorFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5768(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5768(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27226,7 +27496,7 @@ GL_PREFIX(ColorFragmentOp2ATI): popq %rdx popq %rsi popq %rdi - movq 5768(%rax), %r11 + movq 5816(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorFragmentOp2ATI), .-GL_PREFIX(ColorFragmentOp2ATI) @@ -27237,7 +27507,7 @@ GL_PREFIX(ColorFragmentOp2ATI): GL_PREFIX(ColorFragmentOp3ATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5776(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27255,13 +27525,13 @@ GL_PREFIX(ColorFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5776(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5776(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27279,7 +27549,7 @@ GL_PREFIX(ColorFragmentOp3ATI): popq %rdx popq %rsi popq %rdi - movq 5776(%rax), %r11 + movq 5824(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ColorFragmentOp3ATI), .-GL_PREFIX(ColorFragmentOp3ATI) @@ -27290,25 +27560,25 @@ GL_PREFIX(ColorFragmentOp3ATI): GL_PREFIX(DeleteFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5784(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5784(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5784(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5784(%rax), %r11 + movq 5832(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteFragmentShaderATI), .-GL_PREFIX(DeleteFragmentShaderATI) @@ -27319,25 +27589,25 @@ GL_PREFIX(DeleteFragmentShaderATI): GL_PREFIX(EndFragmentShaderATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5792(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rbp call _x86_64_get_dispatch@PLT popq %rbp - movq 5792(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5792(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 1: pushq %rbp call _glapi_get_dispatch popq %rbp - movq 5792(%rax), %r11 + movq 5840(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(EndFragmentShaderATI), .-GL_PREFIX(EndFragmentShaderATI) @@ -27348,25 +27618,25 @@ GL_PREFIX(EndFragmentShaderATI): GL_PREFIX(GenFragmentShadersATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5800(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5800(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5800(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5800(%rax), %r11 + movq 5848(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenFragmentShadersATI), .-GL_PREFIX(GenFragmentShadersATI) @@ -27377,7 +27647,7 @@ GL_PREFIX(GenFragmentShadersATI): GL_PREFIX(PassTexCoordATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5808(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27387,13 +27657,13 @@ GL_PREFIX(PassTexCoordATI): popq %rdx popq %rsi popq %rdi - movq 5808(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5808(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27403,7 +27673,7 @@ GL_PREFIX(PassTexCoordATI): popq %rdx popq %rsi popq %rdi - movq 5808(%rax), %r11 + movq 5856(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PassTexCoordATI), .-GL_PREFIX(PassTexCoordATI) @@ -27414,7 +27684,7 @@ GL_PREFIX(PassTexCoordATI): GL_PREFIX(SampleMapATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5816(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27424,13 +27694,13 @@ GL_PREFIX(SampleMapATI): popq %rdx popq %rsi popq %rdi - movq 5816(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5816(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27440,7 +27710,7 @@ GL_PREFIX(SampleMapATI): popq %rdx popq %rsi popq %rdi - movq 5816(%rax), %r11 + movq 5864(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SampleMapATI), .-GL_PREFIX(SampleMapATI) @@ -27451,7 +27721,7 @@ GL_PREFIX(SampleMapATI): GL_PREFIX(SetFragmentShaderConstantATI): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5824(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27461,13 +27731,13 @@ GL_PREFIX(SetFragmentShaderConstantATI): popq %rbp popq %rsi popq %rdi - movq 5824(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5824(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27477,7 +27747,7 @@ GL_PREFIX(SetFragmentShaderConstantATI): popq %rbp popq %rsi popq %rdi - movq 5824(%rax), %r11 + movq 5872(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(SetFragmentShaderConstantATI), .-GL_PREFIX(SetFragmentShaderConstantATI) @@ -27488,7 +27758,7 @@ GL_PREFIX(SetFragmentShaderConstantATI): GL_PREFIX(PointParameteriNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5832(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27498,13 +27768,13 @@ GL_PREFIX(PointParameteriNV): popq %rbp popq %rsi popq %rdi - movq 5832(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5832(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27514,7 +27784,7 @@ GL_PREFIX(PointParameteriNV): popq %rbp popq %rsi popq %rdi - movq 5832(%rax), %r11 + movq 5880(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameteriNV), .-GL_PREFIX(PointParameteriNV) @@ -27525,7 +27795,7 @@ GL_PREFIX(PointParameteriNV): GL_PREFIX(PointParameterivNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5840(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27535,13 +27805,13 @@ GL_PREFIX(PointParameterivNV): popq %rbp popq %rsi popq %rdi - movq 5840(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5840(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27551,79 +27821,79 @@ GL_PREFIX(PointParameterivNV): popq %rbp popq %rsi popq %rdi - movq 5840(%rax), %r11 + movq 5888(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(PointParameterivNV), .-GL_PREFIX(PointParameterivNV) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_731) - .type GL_PREFIX(_dispatch_stub_731), @function - HIDDEN(GL_PREFIX(_dispatch_stub_731)) -GL_PREFIX(_dispatch_stub_731): + .globl GL_PREFIX(_dispatch_stub_737) + .type GL_PREFIX(_dispatch_stub_737), @function + HIDDEN(GL_PREFIX(_dispatch_stub_737)) +GL_PREFIX(_dispatch_stub_737): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5848(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5848(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5848(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5848(%rax), %r11 + movq 5896(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_731), .-GL_PREFIX(_dispatch_stub_731) + .size GL_PREFIX(_dispatch_stub_737), .-GL_PREFIX(_dispatch_stub_737) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_732) - .type GL_PREFIX(_dispatch_stub_732), @function - HIDDEN(GL_PREFIX(_dispatch_stub_732)) -GL_PREFIX(_dispatch_stub_732): + .globl GL_PREFIX(_dispatch_stub_738) + .type GL_PREFIX(_dispatch_stub_738), @function + HIDDEN(GL_PREFIX(_dispatch_stub_738)) +GL_PREFIX(_dispatch_stub_738): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5856(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5856(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5856(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5856(%rax), %r11 + movq 5904(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_732), .-GL_PREFIX(_dispatch_stub_732) + .size GL_PREFIX(_dispatch_stub_738), .-GL_PREFIX(_dispatch_stub_738) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_733) - .type GL_PREFIX(_dispatch_stub_733), @function - HIDDEN(GL_PREFIX(_dispatch_stub_733)) -GL_PREFIX(_dispatch_stub_733): + .globl GL_PREFIX(_dispatch_stub_739) + .type GL_PREFIX(_dispatch_stub_739), @function + HIDDEN(GL_PREFIX(_dispatch_stub_739)) +GL_PREFIX(_dispatch_stub_739): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5864(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27633,13 +27903,13 @@ GL_PREFIX(_dispatch_stub_733): popq %rbp popq %rsi popq %rdi - movq 5864(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5864(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27649,19 +27919,19 @@ GL_PREFIX(_dispatch_stub_733): popq %rbp popq %rsi popq %rdi - movq 5864(%rax), %r11 + movq 5912(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_733), .-GL_PREFIX(_dispatch_stub_733) + .size GL_PREFIX(_dispatch_stub_739), .-GL_PREFIX(_dispatch_stub_739) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_734) - .type GL_PREFIX(_dispatch_stub_734), @function - HIDDEN(GL_PREFIX(_dispatch_stub_734)) -GL_PREFIX(_dispatch_stub_734): + .globl GL_PREFIX(_dispatch_stub_740) + .type GL_PREFIX(_dispatch_stub_740), @function + HIDDEN(GL_PREFIX(_dispatch_stub_740)) +GL_PREFIX(_dispatch_stub_740): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5872(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27671,13 +27941,13 @@ GL_PREFIX(_dispatch_stub_734): popq %rbp popq %rsi popq %rdi - movq 5872(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5872(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27687,40 +27957,40 @@ GL_PREFIX(_dispatch_stub_734): popq %rbp popq %rsi popq %rdi - movq 5872(%rax), %r11 + movq 5920(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_734), .-GL_PREFIX(_dispatch_stub_734) + .size GL_PREFIX(_dispatch_stub_740), .-GL_PREFIX(_dispatch_stub_740) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_735) - .type GL_PREFIX(_dispatch_stub_735), @function - HIDDEN(GL_PREFIX(_dispatch_stub_735)) -GL_PREFIX(_dispatch_stub_735): + .globl GL_PREFIX(_dispatch_stub_741) + .type GL_PREFIX(_dispatch_stub_741), @function + HIDDEN(GL_PREFIX(_dispatch_stub_741)) +GL_PREFIX(_dispatch_stub_741): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5880(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5880(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5880(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5880(%rax), %r11 + movq 5928(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_735), .-GL_PREFIX(_dispatch_stub_735) + .size GL_PREFIX(_dispatch_stub_741), .-GL_PREFIX(_dispatch_stub_741) .p2align 4,,15 .globl GL_PREFIX(GetProgramNamedParameterdvNV) @@ -27728,7 +27998,7 @@ GL_PREFIX(_dispatch_stub_735): GL_PREFIX(GetProgramNamedParameterdvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5888(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27742,13 +28012,13 @@ GL_PREFIX(GetProgramNamedParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5888(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5888(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27762,7 +28032,7 @@ GL_PREFIX(GetProgramNamedParameterdvNV): popq %rdx popq %rsi popq %rdi - movq 5888(%rax), %r11 + movq 5936(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramNamedParameterdvNV), .-GL_PREFIX(GetProgramNamedParameterdvNV) @@ -27773,7 +28043,7 @@ GL_PREFIX(GetProgramNamedParameterdvNV): GL_PREFIX(GetProgramNamedParameterfvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5896(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27787,13 +28057,13 @@ GL_PREFIX(GetProgramNamedParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5896(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5896(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27807,7 +28077,7 @@ GL_PREFIX(GetProgramNamedParameterfvNV): popq %rdx popq %rsi popq %rdi - movq 5896(%rax), %r11 + movq 5944(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetProgramNamedParameterfvNV), .-GL_PREFIX(GetProgramNamedParameterfvNV) @@ -27818,7 +28088,7 @@ GL_PREFIX(GetProgramNamedParameterfvNV): GL_PREFIX(ProgramNamedParameter4dNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5904(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -27838,13 +28108,13 @@ GL_PREFIX(ProgramNamedParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5904(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5904(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -27864,7 +28134,7 @@ GL_PREFIX(ProgramNamedParameter4dNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5904(%rax), %r11 + movq 5952(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4dNV), .-GL_PREFIX(ProgramNamedParameter4dNV) @@ -27875,7 +28145,7 @@ GL_PREFIX(ProgramNamedParameter4dNV): GL_PREFIX(ProgramNamedParameter4dvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5912(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27889,13 +28159,13 @@ GL_PREFIX(ProgramNamedParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5912(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5912(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -27909,7 +28179,7 @@ GL_PREFIX(ProgramNamedParameter4dvNV): popq %rdx popq %rsi popq %rdi - movq 5912(%rax), %r11 + movq 5960(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4dvNV), .-GL_PREFIX(ProgramNamedParameter4dvNV) @@ -27920,7 +28190,7 @@ GL_PREFIX(ProgramNamedParameter4dvNV): GL_PREFIX(ProgramNamedParameter4fNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5920(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) subq $56, %rsp @@ -27940,13 +28210,13 @@ GL_PREFIX(ProgramNamedParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5920(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5920(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 1: subq $56, %rsp @@ -27966,7 +28236,7 @@ GL_PREFIX(ProgramNamedParameter4fNV): movq 8(%rsp), %rsi movq (%rsp), %rdi addq $56, %rsp - movq 5920(%rax), %r11 + movq 5968(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4fNV), .-GL_PREFIX(ProgramNamedParameter4fNV) @@ -27977,7 +28247,7 @@ GL_PREFIX(ProgramNamedParameter4fNV): GL_PREFIX(ProgramNamedParameter4fvNV): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5928(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -27991,13 +28261,13 @@ GL_PREFIX(ProgramNamedParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5928(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5928(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28011,19 +28281,19 @@ GL_PREFIX(ProgramNamedParameter4fvNV): popq %rdx popq %rsi popq %rdi - movq 5928(%rax), %r11 + movq 5976(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(ProgramNamedParameter4fvNV), .-GL_PREFIX(ProgramNamedParameter4fvNV) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_742) - .type GL_PREFIX(_dispatch_stub_742), @function - HIDDEN(GL_PREFIX(_dispatch_stub_742)) -GL_PREFIX(_dispatch_stub_742): + .globl GL_PREFIX(_dispatch_stub_748) + .type GL_PREFIX(_dispatch_stub_748), @function + HIDDEN(GL_PREFIX(_dispatch_stub_748)) +GL_PREFIX(_dispatch_stub_748): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5936(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28033,13 +28303,13 @@ GL_PREFIX(_dispatch_stub_742): popq %rbp popq %rsi popq %rdi - movq 5936(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5936(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28049,19 +28319,19 @@ GL_PREFIX(_dispatch_stub_742): popq %rbp popq %rsi popq %rdi - movq 5936(%rax), %r11 + movq 5984(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_742), .-GL_PREFIX(_dispatch_stub_742) + .size GL_PREFIX(_dispatch_stub_748), .-GL_PREFIX(_dispatch_stub_748) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_743) - .type GL_PREFIX(_dispatch_stub_743), @function - HIDDEN(GL_PREFIX(_dispatch_stub_743)) -GL_PREFIX(_dispatch_stub_743): + .globl GL_PREFIX(_dispatch_stub_749) + .type GL_PREFIX(_dispatch_stub_749), @function + HIDDEN(GL_PREFIX(_dispatch_stub_749)) +GL_PREFIX(_dispatch_stub_749): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5944(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28071,13 +28341,13 @@ GL_PREFIX(_dispatch_stub_743): popq %rbp popq %rsi popq %rdi - movq 5944(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5944(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28087,10 +28357,10 @@ GL_PREFIX(_dispatch_stub_743): popq %rbp popq %rsi popq %rdi - movq 5944(%rax), %r11 + movq 5992(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_743), .-GL_PREFIX(_dispatch_stub_743) + .size GL_PREFIX(_dispatch_stub_749), .-GL_PREFIX(_dispatch_stub_749) .p2align 4,,15 .globl GL_PREFIX(BindFramebufferEXT) @@ -28098,7 +28368,7 @@ GL_PREFIX(_dispatch_stub_743): GL_PREFIX(BindFramebufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5952(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28108,13 +28378,13 @@ GL_PREFIX(BindFramebufferEXT): popq %rbp popq %rsi popq %rdi - movq 5952(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5952(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28124,7 +28394,7 @@ GL_PREFIX(BindFramebufferEXT): popq %rbp popq %rsi popq %rdi - movq 5952(%rax), %r11 + movq 6000(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindFramebufferEXT), .-GL_PREFIX(BindFramebufferEXT) @@ -28135,7 +28405,7 @@ GL_PREFIX(BindFramebufferEXT): GL_PREFIX(BindRenderbufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5960(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28145,13 +28415,13 @@ GL_PREFIX(BindRenderbufferEXT): popq %rbp popq %rsi popq %rdi - movq 5960(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5960(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28161,7 +28431,7 @@ GL_PREFIX(BindRenderbufferEXT): popq %rbp popq %rsi popq %rdi - movq 5960(%rax), %r11 + movq 6008(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(BindRenderbufferEXT), .-GL_PREFIX(BindRenderbufferEXT) @@ -28172,25 +28442,25 @@ GL_PREFIX(BindRenderbufferEXT): GL_PREFIX(CheckFramebufferStatusEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5968(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 5968(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5968(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 5968(%rax), %r11 + movq 6016(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(CheckFramebufferStatusEXT), .-GL_PREFIX(CheckFramebufferStatusEXT) @@ -28201,7 +28471,7 @@ GL_PREFIX(CheckFramebufferStatusEXT): GL_PREFIX(DeleteFramebuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5976(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28211,13 +28481,13 @@ GL_PREFIX(DeleteFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5976(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5976(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28227,7 +28497,7 @@ GL_PREFIX(DeleteFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5976(%rax), %r11 + movq 6024(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteFramebuffersEXT), .-GL_PREFIX(DeleteFramebuffersEXT) @@ -28238,7 +28508,7 @@ GL_PREFIX(DeleteFramebuffersEXT): GL_PREFIX(DeleteRenderbuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5984(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28248,13 +28518,13 @@ GL_PREFIX(DeleteRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5984(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5984(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28264,7 +28534,7 @@ GL_PREFIX(DeleteRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 5984(%rax), %r11 + movq 6032(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(DeleteRenderbuffersEXT), .-GL_PREFIX(DeleteRenderbuffersEXT) @@ -28275,7 +28545,7 @@ GL_PREFIX(DeleteRenderbuffersEXT): GL_PREFIX(FramebufferRenderbufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 5992(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28289,13 +28559,13 @@ GL_PREFIX(FramebufferRenderbufferEXT): popq %rdx popq %rsi popq %rdi - movq 5992(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 5992(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28309,7 +28579,7 @@ GL_PREFIX(FramebufferRenderbufferEXT): popq %rdx popq %rsi popq %rdi - movq 5992(%rax), %r11 + movq 6040(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferRenderbufferEXT), .-GL_PREFIX(FramebufferRenderbufferEXT) @@ -28320,7 +28590,7 @@ GL_PREFIX(FramebufferRenderbufferEXT): GL_PREFIX(FramebufferTexture1DEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6000(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28334,13 +28604,13 @@ GL_PREFIX(FramebufferTexture1DEXT): popq %rdx popq %rsi popq %rdi - movq 6000(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6000(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28354,7 +28624,7 @@ GL_PREFIX(FramebufferTexture1DEXT): popq %rdx popq %rsi popq %rdi - movq 6000(%rax), %r11 + movq 6048(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferTexture1DEXT), .-GL_PREFIX(FramebufferTexture1DEXT) @@ -28365,7 +28635,7 @@ GL_PREFIX(FramebufferTexture1DEXT): GL_PREFIX(FramebufferTexture2DEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6008(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28379,13 +28649,13 @@ GL_PREFIX(FramebufferTexture2DEXT): popq %rdx popq %rsi popq %rdi - movq 6008(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6008(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28399,7 +28669,7 @@ GL_PREFIX(FramebufferTexture2DEXT): popq %rdx popq %rsi popq %rdi - movq 6008(%rax), %r11 + movq 6056(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferTexture2DEXT), .-GL_PREFIX(FramebufferTexture2DEXT) @@ -28410,7 +28680,7 @@ GL_PREFIX(FramebufferTexture2DEXT): GL_PREFIX(FramebufferTexture3DEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6016(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28428,13 +28698,13 @@ GL_PREFIX(FramebufferTexture3DEXT): popq %rdx popq %rsi popq %rdi - movq 6016(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6016(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28452,7 +28722,7 @@ GL_PREFIX(FramebufferTexture3DEXT): popq %rdx popq %rsi popq %rdi - movq 6016(%rax), %r11 + movq 6064(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(FramebufferTexture3DEXT), .-GL_PREFIX(FramebufferTexture3DEXT) @@ -28463,7 +28733,7 @@ GL_PREFIX(FramebufferTexture3DEXT): GL_PREFIX(GenFramebuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6024(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28473,13 +28743,13 @@ GL_PREFIX(GenFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 6024(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6024(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28489,7 +28759,7 @@ GL_PREFIX(GenFramebuffersEXT): popq %rbp popq %rsi popq %rdi - movq 6024(%rax), %r11 + movq 6072(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenFramebuffersEXT), .-GL_PREFIX(GenFramebuffersEXT) @@ -28500,7 +28770,7 @@ GL_PREFIX(GenFramebuffersEXT): GL_PREFIX(GenRenderbuffersEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6032(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28510,13 +28780,13 @@ GL_PREFIX(GenRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 6032(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6032(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28526,7 +28796,7 @@ GL_PREFIX(GenRenderbuffersEXT): popq %rbp popq %rsi popq %rdi - movq 6032(%rax), %r11 + movq 6080(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenRenderbuffersEXT), .-GL_PREFIX(GenRenderbuffersEXT) @@ -28537,25 +28807,25 @@ GL_PREFIX(GenRenderbuffersEXT): GL_PREFIX(GenerateMipmapEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6040(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 6040(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6040(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 6040(%rax), %r11 + movq 6088(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GenerateMipmapEXT), .-GL_PREFIX(GenerateMipmapEXT) @@ -28566,7 +28836,7 @@ GL_PREFIX(GenerateMipmapEXT): GL_PREFIX(GetFramebufferAttachmentParameterivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6048(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28580,13 +28850,13 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 6048(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6048(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28600,7 +28870,7 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 6048(%rax), %r11 + movq 6096(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetFramebufferAttachmentParameterivEXT), .-GL_PREFIX(GetFramebufferAttachmentParameterivEXT) @@ -28611,7 +28881,7 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT): GL_PREFIX(GetRenderbufferParameterivEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6056(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28621,13 +28891,13 @@ GL_PREFIX(GetRenderbufferParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 6056(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6056(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28637,7 +28907,7 @@ GL_PREFIX(GetRenderbufferParameterivEXT): popq %rdx popq %rsi popq %rdi - movq 6056(%rax), %r11 + movq 6104(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(GetRenderbufferParameterivEXT), .-GL_PREFIX(GetRenderbufferParameterivEXT) @@ -28648,25 +28918,25 @@ GL_PREFIX(GetRenderbufferParameterivEXT): GL_PREFIX(IsFramebufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6064(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 6064(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6064(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 6064(%rax), %r11 + movq 6112(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsFramebufferEXT), .-GL_PREFIX(IsFramebufferEXT) @@ -28677,25 +28947,25 @@ GL_PREFIX(IsFramebufferEXT): GL_PREFIX(IsRenderbufferEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6072(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi call _x86_64_get_dispatch@PLT popq %rdi - movq 6072(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6072(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 1: pushq %rdi call _glapi_get_dispatch popq %rdi - movq 6072(%rax), %r11 + movq 6120(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(IsRenderbufferEXT), .-GL_PREFIX(IsRenderbufferEXT) @@ -28706,7 +28976,7 @@ GL_PREFIX(IsRenderbufferEXT): GL_PREFIX(RenderbufferStorageEXT): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6080(%rax), %r11 + movq 6128(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28720,13 +28990,13 @@ GL_PREFIX(RenderbufferStorageEXT): popq %rdx popq %rsi popq %rdi - movq 6080(%rax), %r11 + movq 6128(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6080(%rax), %r11 + movq 6128(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28740,19 +29010,19 @@ GL_PREFIX(RenderbufferStorageEXT): popq %rdx popq %rsi popq %rdi - movq 6080(%rax), %r11 + movq 6128(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ .size GL_PREFIX(RenderbufferStorageEXT), .-GL_PREFIX(RenderbufferStorageEXT) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_761) - .type GL_PREFIX(_dispatch_stub_761), @function - HIDDEN(GL_PREFIX(_dispatch_stub_761)) -GL_PREFIX(_dispatch_stub_761): + .globl GL_PREFIX(_dispatch_stub_767) + .type GL_PREFIX(_dispatch_stub_767), @function + HIDDEN(GL_PREFIX(_dispatch_stub_767)) +GL_PREFIX(_dispatch_stub_767): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6088(%rax), %r11 + movq 6136(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28770,13 +29040,13 @@ GL_PREFIX(_dispatch_stub_761): popq %rdx popq %rsi popq %rdi - movq 6088(%rax), %r11 + movq 6136(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6088(%rax), %r11 + movq 6136(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28794,19 +29064,19 @@ GL_PREFIX(_dispatch_stub_761): popq %rdx popq %rsi popq %rdi - movq 6088(%rax), %r11 + movq 6136(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_761), .-GL_PREFIX(_dispatch_stub_761) + .size GL_PREFIX(_dispatch_stub_767), .-GL_PREFIX(_dispatch_stub_767) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_762) - .type GL_PREFIX(_dispatch_stub_762), @function - HIDDEN(GL_PREFIX(_dispatch_stub_762)) -GL_PREFIX(_dispatch_stub_762): + .globl GL_PREFIX(_dispatch_stub_768) + .type GL_PREFIX(_dispatch_stub_768), @function + HIDDEN(GL_PREFIX(_dispatch_stub_768)) +GL_PREFIX(_dispatch_stub_768): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6096(%rax), %r11 + movq 6144(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28820,13 +29090,13 @@ GL_PREFIX(_dispatch_stub_762): popq %rdx popq %rsi popq %rdi - movq 6096(%rax), %r11 + movq 6144(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6096(%rax), %r11 + movq 6144(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28840,19 +29110,19 @@ GL_PREFIX(_dispatch_stub_762): popq %rdx popq %rsi popq %rdi - movq 6096(%rax), %r11 + movq 6144(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_762), .-GL_PREFIX(_dispatch_stub_762) + .size GL_PREFIX(_dispatch_stub_768), .-GL_PREFIX(_dispatch_stub_768) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_763) - .type GL_PREFIX(_dispatch_stub_763), @function - HIDDEN(GL_PREFIX(_dispatch_stub_763)) -GL_PREFIX(_dispatch_stub_763): + .globl GL_PREFIX(_dispatch_stub_769) + .type GL_PREFIX(_dispatch_stub_769), @function + HIDDEN(GL_PREFIX(_dispatch_stub_769)) +GL_PREFIX(_dispatch_stub_769): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6104(%rax), %r11 + movq 6152(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28866,13 +29136,13 @@ GL_PREFIX(_dispatch_stub_763): popq %rdx popq %rsi popq %rdi - movq 6104(%rax), %r11 + movq 6152(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6104(%rax), %r11 + movq 6152(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28886,19 +29156,19 @@ GL_PREFIX(_dispatch_stub_763): popq %rdx popq %rsi popq %rdi - movq 6104(%rax), %r11 + movq 6152(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_763), .-GL_PREFIX(_dispatch_stub_763) + .size GL_PREFIX(_dispatch_stub_769), .-GL_PREFIX(_dispatch_stub_769) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_764) - .type GL_PREFIX(_dispatch_stub_764), @function - HIDDEN(GL_PREFIX(_dispatch_stub_764)) -GL_PREFIX(_dispatch_stub_764): + .globl GL_PREFIX(_dispatch_stub_770) + .type GL_PREFIX(_dispatch_stub_770), @function + HIDDEN(GL_PREFIX(_dispatch_stub_770)) +GL_PREFIX(_dispatch_stub_770): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6112(%rax), %r11 + movq 6160(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28908,13 +29178,13 @@ GL_PREFIX(_dispatch_stub_764): popq %rdx popq %rsi popq %rdi - movq 6112(%rax), %r11 + movq 6160(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6112(%rax), %r11 + movq 6160(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28924,19 +29194,19 @@ GL_PREFIX(_dispatch_stub_764): popq %rdx popq %rsi popq %rdi - movq 6112(%rax), %r11 + movq 6160(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_764), .-GL_PREFIX(_dispatch_stub_764) + .size GL_PREFIX(_dispatch_stub_770), .-GL_PREFIX(_dispatch_stub_770) .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_765) - .type GL_PREFIX(_dispatch_stub_765), @function - HIDDEN(GL_PREFIX(_dispatch_stub_765)) -GL_PREFIX(_dispatch_stub_765): + .globl GL_PREFIX(_dispatch_stub_771) + .type GL_PREFIX(_dispatch_stub_771), @function + HIDDEN(GL_PREFIX(_dispatch_stub_771)) +GL_PREFIX(_dispatch_stub_771): #if defined(GLX_USE_TLS) call _x86_64_get_dispatch@PLT - movq 6120(%rax), %r11 + movq 6168(%rax), %r11 jmp *%r11 #elif defined(PTHREADS) pushq %rdi @@ -28946,13 +29216,13 @@ GL_PREFIX(_dispatch_stub_765): popq %rdx popq %rsi popq %rdi - movq 6120(%rax), %r11 + movq 6168(%rax), %r11 jmp *%r11 #else movq _glapi_Dispatch(%rip), %rax testq %rax, %rax je 1f - movq 6120(%rax), %r11 + movq 6168(%rax), %r11 jmp *%r11 1: pushq %rdi @@ -28962,10 +29232,10 @@ GL_PREFIX(_dispatch_stub_765): popq %rdx popq %rsi popq %rdi - movq 6120(%rax), %r11 + movq 6168(%rax), %r11 jmp *%r11 #endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_765), .-GL_PREFIX(_dispatch_stub_765) + .size GL_PREFIX(_dispatch_stub_771), .-GL_PREFIX(_dispatch_stub_771) .globl GL_PREFIX(ArrayElementEXT) ; .set GL_PREFIX(ArrayElementEXT), GL_PREFIX(ArrayElement) .globl GL_PREFIX(BindTextureEXT) ; .set GL_PREFIX(BindTextureEXT), GL_PREFIX(BindTexture) @@ -29210,7 +29480,7 @@ GL_PREFIX(_dispatch_stub_765): .globl GL_PREFIX(IsProgramARB) ; .set GL_PREFIX(IsProgramARB), GL_PREFIX(IsProgramNV) .globl GL_PREFIX(PointParameteri) ; .set GL_PREFIX(PointParameteri), GL_PREFIX(PointParameteriNV) .globl GL_PREFIX(PointParameteriv) ; .set GL_PREFIX(PointParameteriv), GL_PREFIX(PointParameterivNV) - .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_743) + .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_749) #if defined(GLX_USE_TLS) && defined(__linux__) .section ".note.ABI-tag", "a" diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index ebd536d086..3221dbce18 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -565,6 +565,12 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(StencilFuncSeparate, _gloffset_StencilFuncSeparate, StencilFuncSeparate@16) GL_STUB(StencilMaskSeparate, _gloffset_StencilMaskSeparate, StencilMaskSeparate@8) GL_STUB(StencilOpSeparate, _gloffset_StencilOpSeparate, StencilOpSeparate@16) + GL_STUB(UniformMatrix2x3fv, _gloffset_UniformMatrix2x3fv, UniformMatrix2x3fv@16) + GL_STUB(UniformMatrix2x4fv, _gloffset_UniformMatrix2x4fv, UniformMatrix2x4fv@16) + GL_STUB(UniformMatrix3x2fv, _gloffset_UniformMatrix3x2fv, UniformMatrix3x2fv@16) + GL_STUB(UniformMatrix3x4fv, _gloffset_UniformMatrix3x4fv, UniformMatrix3x4fv@16) + GL_STUB(UniformMatrix4x2fv, _gloffset_UniformMatrix4x2fv, UniformMatrix4x2fv@16) + GL_STUB(UniformMatrix4x3fv, _gloffset_UniformMatrix4x3fv, UniformMatrix4x3fv@16) GL_STUB(LoadTransposeMatrixdARB, _gloffset_LoadTransposeMatrixdARB, LoadTransposeMatrixdARB@4) GL_STUB(LoadTransposeMatrixfARB, _gloffset_LoadTransposeMatrixfARB, LoadTransposeMatrixfARB@4) GL_STUB(MultTransposeMatrixdARB, _gloffset_MultTransposeMatrixdARB, MultTransposeMatrixdARB@4) @@ -697,22 +703,22 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(GetAttribLocationARB, _gloffset_GetAttribLocationARB, GetAttribLocationARB@8) GL_STUB(DrawBuffersARB, _gloffset_DrawBuffersARB, DrawBuffersARB@8) GL_STUB(PolygonOffsetEXT, _gloffset_PolygonOffsetEXT, PolygonOffsetEXT@8) - GL_STUB(_dispatch_stub_556, _gloffset_GetPixelTexGenParameterfvSGIS, _dispatch_stub_556@8) - HIDDEN(GL_PREFIX(_dispatch_stub_556, _dispatch_stub_556@8)) - GL_STUB(_dispatch_stub_557, _gloffset_GetPixelTexGenParameterivSGIS, _dispatch_stub_557@8) - HIDDEN(GL_PREFIX(_dispatch_stub_557, _dispatch_stub_557@8)) - GL_STUB(_dispatch_stub_558, _gloffset_PixelTexGenParameterfSGIS, _dispatch_stub_558@8) - HIDDEN(GL_PREFIX(_dispatch_stub_558, _dispatch_stub_558@8)) - GL_STUB(_dispatch_stub_559, _gloffset_PixelTexGenParameterfvSGIS, _dispatch_stub_559@8) - HIDDEN(GL_PREFIX(_dispatch_stub_559, _dispatch_stub_559@8)) - GL_STUB(_dispatch_stub_560, _gloffset_PixelTexGenParameteriSGIS, _dispatch_stub_560@8) - HIDDEN(GL_PREFIX(_dispatch_stub_560, _dispatch_stub_560@8)) - GL_STUB(_dispatch_stub_561, _gloffset_PixelTexGenParameterivSGIS, _dispatch_stub_561@8) - HIDDEN(GL_PREFIX(_dispatch_stub_561, _dispatch_stub_561@8)) - GL_STUB(_dispatch_stub_562, _gloffset_SampleMaskSGIS, _dispatch_stub_562@8) + GL_STUB(_dispatch_stub_562, _gloffset_GetPixelTexGenParameterfvSGIS, _dispatch_stub_562@8) HIDDEN(GL_PREFIX(_dispatch_stub_562, _dispatch_stub_562@8)) - GL_STUB(_dispatch_stub_563, _gloffset_SamplePatternSGIS, _dispatch_stub_563@4) - HIDDEN(GL_PREFIX(_dispatch_stub_563, _dispatch_stub_563@4)) + GL_STUB(_dispatch_stub_563, _gloffset_GetPixelTexGenParameterivSGIS, _dispatch_stub_563@8) + HIDDEN(GL_PREFIX(_dispatch_stub_563, _dispatch_stub_563@8)) + GL_STUB(_dispatch_stub_564, _gloffset_PixelTexGenParameterfSGIS, _dispatch_stub_564@8) + HIDDEN(GL_PREFIX(_dispatch_stub_564, _dispatch_stub_564@8)) + GL_STUB(_dispatch_stub_565, _gloffset_PixelTexGenParameterfvSGIS, _dispatch_stub_565@8) + HIDDEN(GL_PREFIX(_dispatch_stub_565, _dispatch_stub_565@8)) + GL_STUB(_dispatch_stub_566, _gloffset_PixelTexGenParameteriSGIS, _dispatch_stub_566@8) + HIDDEN(GL_PREFIX(_dispatch_stub_566, _dispatch_stub_566@8)) + GL_STUB(_dispatch_stub_567, _gloffset_PixelTexGenParameterivSGIS, _dispatch_stub_567@8) + HIDDEN(GL_PREFIX(_dispatch_stub_567, _dispatch_stub_567@8)) + GL_STUB(_dispatch_stub_568, _gloffset_SampleMaskSGIS, _dispatch_stub_568@8) + HIDDEN(GL_PREFIX(_dispatch_stub_568, _dispatch_stub_568@8)) + GL_STUB(_dispatch_stub_569, _gloffset_SamplePatternSGIS, _dispatch_stub_569@4) + HIDDEN(GL_PREFIX(_dispatch_stub_569, _dispatch_stub_569@4)) GL_STUB(ColorPointerEXT, _gloffset_ColorPointerEXT, ColorPointerEXT@20) GL_STUB(EdgeFlagPointerEXT, _gloffset_EdgeFlagPointerEXT, EdgeFlagPointerEXT@12) GL_STUB(IndexPointerEXT, _gloffset_IndexPointerEXT, IndexPointerEXT@16) @@ -723,10 +729,10 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(PointParameterfvEXT, _gloffset_PointParameterfvEXT, PointParameterfvEXT@8) GL_STUB(LockArraysEXT, _gloffset_LockArraysEXT, LockArraysEXT@8) GL_STUB(UnlockArraysEXT, _gloffset_UnlockArraysEXT, UnlockArraysEXT@0) - GL_STUB(_dispatch_stub_574, _gloffset_CullParameterdvEXT, _dispatch_stub_574@8) - HIDDEN(GL_PREFIX(_dispatch_stub_574, _dispatch_stub_574@8)) - GL_STUB(_dispatch_stub_575, _gloffset_CullParameterfvEXT, _dispatch_stub_575@8) - HIDDEN(GL_PREFIX(_dispatch_stub_575, _dispatch_stub_575@8)) + GL_STUB(_dispatch_stub_580, _gloffset_CullParameterdvEXT, _dispatch_stub_580@8) + HIDDEN(GL_PREFIX(_dispatch_stub_580, _dispatch_stub_580@8)) + GL_STUB(_dispatch_stub_581, _gloffset_CullParameterfvEXT, _dispatch_stub_581@8) + HIDDEN(GL_PREFIX(_dispatch_stub_581, _dispatch_stub_581@8)) GL_STUB(SecondaryColor3bEXT, _gloffset_SecondaryColor3bEXT, SecondaryColor3bEXT@12) GL_STUB(SecondaryColor3bvEXT, _gloffset_SecondaryColor3bvEXT, SecondaryColor3bvEXT@4) GL_STUB(SecondaryColor3dEXT, _gloffset_SecondaryColor3dEXT, SecondaryColor3dEXT@24) @@ -751,8 +757,8 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(FogCoorddvEXT, _gloffset_FogCoorddvEXT, FogCoorddvEXT@4) GL_STUB(FogCoordfEXT, _gloffset_FogCoordfEXT, FogCoordfEXT@4) GL_STUB(FogCoordfvEXT, _gloffset_FogCoordfvEXT, FogCoordfvEXT@4) - GL_STUB(_dispatch_stub_600, _gloffset_PixelTexGenSGIX, _dispatch_stub_600@4) - HIDDEN(GL_PREFIX(_dispatch_stub_600, _dispatch_stub_600@4)) + GL_STUB(_dispatch_stub_606, _gloffset_PixelTexGenSGIX, _dispatch_stub_606@4) + HIDDEN(GL_PREFIX(_dispatch_stub_606, _dispatch_stub_606@4)) GL_STUB(BlendFuncSeparateEXT, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateEXT@16) GL_STUB(FlushVertexArrayRangeNV, _gloffset_FlushVertexArrayRangeNV, FlushVertexArrayRangeNV@0) GL_STUB(VertexArrayRangeNV, _gloffset_VertexArrayRangeNV, VertexArrayRangeNV@8) @@ -794,24 +800,24 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(WindowPos4ivMESA, _gloffset_WindowPos4ivMESA, WindowPos4ivMESA@4) GL_STUB(WindowPos4sMESA, _gloffset_WindowPos4sMESA, WindowPos4sMESA@16) GL_STUB(WindowPos4svMESA, _gloffset_WindowPos4svMESA, WindowPos4svMESA@4) - GL_STUB(_dispatch_stub_642, _gloffset_MultiModeDrawArraysIBM, _dispatch_stub_642@20) - HIDDEN(GL_PREFIX(_dispatch_stub_642, _dispatch_stub_642@20)) - GL_STUB(_dispatch_stub_643, _gloffset_MultiModeDrawElementsIBM, _dispatch_stub_643@24) - HIDDEN(GL_PREFIX(_dispatch_stub_643, _dispatch_stub_643@24)) - GL_STUB(_dispatch_stub_644, _gloffset_DeleteFencesNV, _dispatch_stub_644@8) - HIDDEN(GL_PREFIX(_dispatch_stub_644, _dispatch_stub_644@8)) - GL_STUB(_dispatch_stub_645, _gloffset_FinishFenceNV, _dispatch_stub_645@4) - HIDDEN(GL_PREFIX(_dispatch_stub_645, _dispatch_stub_645@4)) - GL_STUB(_dispatch_stub_646, _gloffset_GenFencesNV, _dispatch_stub_646@8) - HIDDEN(GL_PREFIX(_dispatch_stub_646, _dispatch_stub_646@8)) - GL_STUB(_dispatch_stub_647, _gloffset_GetFenceivNV, _dispatch_stub_647@12) - HIDDEN(GL_PREFIX(_dispatch_stub_647, _dispatch_stub_647@12)) - GL_STUB(_dispatch_stub_648, _gloffset_IsFenceNV, _dispatch_stub_648@4) - HIDDEN(GL_PREFIX(_dispatch_stub_648, _dispatch_stub_648@4)) - GL_STUB(_dispatch_stub_649, _gloffset_SetFenceNV, _dispatch_stub_649@8) - HIDDEN(GL_PREFIX(_dispatch_stub_649, _dispatch_stub_649@8)) - GL_STUB(_dispatch_stub_650, _gloffset_TestFenceNV, _dispatch_stub_650@4) - HIDDEN(GL_PREFIX(_dispatch_stub_650, _dispatch_stub_650@4)) + GL_STUB(_dispatch_stub_648, _gloffset_MultiModeDrawArraysIBM, _dispatch_stub_648@20) + HIDDEN(GL_PREFIX(_dispatch_stub_648, _dispatch_stub_648@20)) + GL_STUB(_dispatch_stub_649, _gloffset_MultiModeDrawElementsIBM, _dispatch_stub_649@24) + HIDDEN(GL_PREFIX(_dispatch_stub_649, _dispatch_stub_649@24)) + GL_STUB(_dispatch_stub_650, _gloffset_DeleteFencesNV, _dispatch_stub_650@8) + HIDDEN(GL_PREFIX(_dispatch_stub_650, _dispatch_stub_650@8)) + GL_STUB(_dispatch_stub_651, _gloffset_FinishFenceNV, _dispatch_stub_651@4) + HIDDEN(GL_PREFIX(_dispatch_stub_651, _dispatch_stub_651@4)) + GL_STUB(_dispatch_stub_652, _gloffset_GenFencesNV, _dispatch_stub_652@8) + HIDDEN(GL_PREFIX(_dispatch_stub_652, _dispatch_stub_652@8)) + GL_STUB(_dispatch_stub_653, _gloffset_GetFenceivNV, _dispatch_stub_653@12) + HIDDEN(GL_PREFIX(_dispatch_stub_653, _dispatch_stub_653@12)) + GL_STUB(_dispatch_stub_654, _gloffset_IsFenceNV, _dispatch_stub_654@4) + HIDDEN(GL_PREFIX(_dispatch_stub_654, _dispatch_stub_654@4)) + GL_STUB(_dispatch_stub_655, _gloffset_SetFenceNV, _dispatch_stub_655@8) + HIDDEN(GL_PREFIX(_dispatch_stub_655, _dispatch_stub_655@8)) + GL_STUB(_dispatch_stub_656, _gloffset_TestFenceNV, _dispatch_stub_656@4) + HIDDEN(GL_PREFIX(_dispatch_stub_656, _dispatch_stub_656@4)) GL_STUB(AreProgramsResidentNV, _gloffset_AreProgramsResidentNV, AreProgramsResidentNV@12) GL_STUB(BindProgramNV, _gloffset_BindProgramNV, BindProgramNV@8) GL_STUB(DeleteProgramsNV, _gloffset_DeleteProgramsNV, DeleteProgramsNV@8) @@ -892,26 +898,26 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(SetFragmentShaderConstantATI, _gloffset_SetFragmentShaderConstantATI, SetFragmentShaderConstantATI@8) GL_STUB(PointParameteriNV, _gloffset_PointParameteriNV, PointParameteriNV@8) GL_STUB(PointParameterivNV, _gloffset_PointParameterivNV, PointParameterivNV@8) - GL_STUB(_dispatch_stub_731, _gloffset_ActiveStencilFaceEXT, _dispatch_stub_731@4) - HIDDEN(GL_PREFIX(_dispatch_stub_731, _dispatch_stub_731@4)) - GL_STUB(_dispatch_stub_732, _gloffset_BindVertexArrayAPPLE, _dispatch_stub_732@4) - HIDDEN(GL_PREFIX(_dispatch_stub_732, _dispatch_stub_732@4)) - GL_STUB(_dispatch_stub_733, _gloffset_DeleteVertexArraysAPPLE, _dispatch_stub_733@8) - HIDDEN(GL_PREFIX(_dispatch_stub_733, _dispatch_stub_733@8)) - GL_STUB(_dispatch_stub_734, _gloffset_GenVertexArraysAPPLE, _dispatch_stub_734@8) - HIDDEN(GL_PREFIX(_dispatch_stub_734, _dispatch_stub_734@8)) - GL_STUB(_dispatch_stub_735, _gloffset_IsVertexArrayAPPLE, _dispatch_stub_735@4) - HIDDEN(GL_PREFIX(_dispatch_stub_735, _dispatch_stub_735@4)) + GL_STUB(_dispatch_stub_737, _gloffset_ActiveStencilFaceEXT, _dispatch_stub_737@4) + HIDDEN(GL_PREFIX(_dispatch_stub_737, _dispatch_stub_737@4)) + GL_STUB(_dispatch_stub_738, _gloffset_BindVertexArrayAPPLE, _dispatch_stub_738@4) + HIDDEN(GL_PREFIX(_dispatch_stub_738, _dispatch_stub_738@4)) + GL_STUB(_dispatch_stub_739, _gloffset_DeleteVertexArraysAPPLE, _dispatch_stub_739@8) + HIDDEN(GL_PREFIX(_dispatch_stub_739, _dispatch_stub_739@8)) + GL_STUB(_dispatch_stub_740, _gloffset_GenVertexArraysAPPLE, _dispatch_stub_740@8) + HIDDEN(GL_PREFIX(_dispatch_stub_740, _dispatch_stub_740@8)) + GL_STUB(_dispatch_stub_741, _gloffset_IsVertexArrayAPPLE, _dispatch_stub_741@4) + HIDDEN(GL_PREFIX(_dispatch_stub_741, _dispatch_stub_741@4)) GL_STUB(GetProgramNamedParameterdvNV, _gloffset_GetProgramNamedParameterdvNV, GetProgramNamedParameterdvNV@16) GL_STUB(GetProgramNamedParameterfvNV, _gloffset_GetProgramNamedParameterfvNV, GetProgramNamedParameterfvNV@16) GL_STUB(ProgramNamedParameter4dNV, _gloffset_ProgramNamedParameter4dNV, ProgramNamedParameter4dNV@44) GL_STUB(ProgramNamedParameter4dvNV, _gloffset_ProgramNamedParameter4dvNV, ProgramNamedParameter4dvNV@16) GL_STUB(ProgramNamedParameter4fNV, _gloffset_ProgramNamedParameter4fNV, ProgramNamedParameter4fNV@28) GL_STUB(ProgramNamedParameter4fvNV, _gloffset_ProgramNamedParameter4fvNV, ProgramNamedParameter4fvNV@16) - GL_STUB(_dispatch_stub_742, _gloffset_DepthBoundsEXT, _dispatch_stub_742@16) - HIDDEN(GL_PREFIX(_dispatch_stub_742, _dispatch_stub_742@16)) - GL_STUB(_dispatch_stub_743, _gloffset_BlendEquationSeparateEXT, _dispatch_stub_743@8) - HIDDEN(GL_PREFIX(_dispatch_stub_743, _dispatch_stub_743@8)) + GL_STUB(_dispatch_stub_748, _gloffset_DepthBoundsEXT, _dispatch_stub_748@16) + HIDDEN(GL_PREFIX(_dispatch_stub_748, _dispatch_stub_748@16)) + GL_STUB(_dispatch_stub_749, _gloffset_BlendEquationSeparateEXT, _dispatch_stub_749@8) + HIDDEN(GL_PREFIX(_dispatch_stub_749, _dispatch_stub_749@8)) GL_STUB(BindFramebufferEXT, _gloffset_BindFramebufferEXT, BindFramebufferEXT@8) GL_STUB(BindRenderbufferEXT, _gloffset_BindRenderbufferEXT, BindRenderbufferEXT@8) GL_STUB(CheckFramebufferStatusEXT, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4) @@ -929,16 +935,16 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(IsFramebufferEXT, _gloffset_IsFramebufferEXT, IsFramebufferEXT@4) GL_STUB(IsRenderbufferEXT, _gloffset_IsRenderbufferEXT, IsRenderbufferEXT@4) GL_STUB(RenderbufferStorageEXT, _gloffset_RenderbufferStorageEXT, RenderbufferStorageEXT@16) - GL_STUB(_dispatch_stub_761, _gloffset_BlitFramebufferEXT, _dispatch_stub_761@40) - HIDDEN(GL_PREFIX(_dispatch_stub_761, _dispatch_stub_761@40)) - GL_STUB(_dispatch_stub_762, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_762@16) - HIDDEN(GL_PREFIX(_dispatch_stub_762, _dispatch_stub_762@16)) - GL_STUB(_dispatch_stub_763, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_763@16) - HIDDEN(GL_PREFIX(_dispatch_stub_763, _dispatch_stub_763@16)) - GL_STUB(_dispatch_stub_764, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_764@12) - HIDDEN(GL_PREFIX(_dispatch_stub_764, _dispatch_stub_764@12)) - GL_STUB(_dispatch_stub_765, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_765@12) - HIDDEN(GL_PREFIX(_dispatch_stub_765, _dispatch_stub_765@12)) + GL_STUB(_dispatch_stub_767, _gloffset_BlitFramebufferEXT, _dispatch_stub_767@40) + HIDDEN(GL_PREFIX(_dispatch_stub_767, _dispatch_stub_767@40)) + GL_STUB(_dispatch_stub_768, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_768@16) + HIDDEN(GL_PREFIX(_dispatch_stub_768, _dispatch_stub_768@16)) + GL_STUB(_dispatch_stub_769, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_769@16) + HIDDEN(GL_PREFIX(_dispatch_stub_769, _dispatch_stub_769@16)) + GL_STUB(_dispatch_stub_770, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_770@12) + HIDDEN(GL_PREFIX(_dispatch_stub_770, _dispatch_stub_770@12)) + GL_STUB(_dispatch_stub_771, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_771@12) + HIDDEN(GL_PREFIX(_dispatch_stub_771, _dispatch_stub_771@12)) GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4) GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8) GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12) -- cgit v1.2.3 From c64a06291817d8667eddc538abdbf5de2f011961 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 20:25:44 +0000 Subject: plug in 2.0, 2.1 functions --- src/mesa/main/state.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index de513926de..e62fbe47d1 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -376,6 +376,32 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate); SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate); SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate); +#if FEATURE_ARB_shader_objects + SET_AttachShader(exec, _mesa_AttachShader); + SET_CreateProgram(exec, _mesa_CreateProgram); + SET_CreateShader(exec, _mesa_CreateShader); + SET_DeleteProgram(exec, _mesa_DeleteProgram); + SET_DeleteShader(exec, _mesa_DeleteShader); + SET_DetachShader(exec, _mesa_DetachShader); + SET_GetAttachedShaders(exec, _mesa_GetAttachedShaders); + SET_GetProgramiv(exec, _mesa_GetProgramiv); + SET_GetProgramInfoLog(exec, _mesa_GetProgramInfoLog); + SET_GetShaderiv(exec, _mesa_GetShaderiv); + SET_GetShaderInfoLog(exec, _mesa_GetShaderInfoLog); + SET_IsProgram(exec, _mesa_IsProgram); + SET_IsShader(exec, _mesa_IsShader); +#endif + + /* OpenGL 2.1 */ +#if FEATURE_ARB_shader_objects + SET_UniformMatrix2x3fv(exec, _mesa_UniformMatrix2x3fv); + SET_UniformMatrix3x2fv(exec, _mesa_UniformMatrix3x2fv); + SET_UniformMatrix2x4fv(exec, _mesa_UniformMatrix2x4fv); + SET_UniformMatrix4x2fv(exec, _mesa_UniformMatrix4x2fv); + SET_UniformMatrix3x4fv(exec, _mesa_UniformMatrix3x4fv); + SET_UniformMatrix4x3fv(exec, _mesa_UniformMatrix4x3fv); +#endif + /* 2. GL_EXT_blend_color */ #if 0 -- cgit v1.2.3 From 2659ee9dfb32f76ae2b93d0d7234053a246d400a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 21:30:16 +0000 Subject: Use inlined uniform() helper function in all the glUniform*() function to reduce duplicated code. Finish up _program_ReadUniform() for non-float types. Implement _mesa_GetUniformivARB(). Simplify the _program_WriteUniform() function a bit. --- src/mesa/shader/shaderobjects.c | 278 ++++++++------------------------- src/mesa/shader/shaderobjects.h | 2 +- src/mesa/shader/shaderobjects_3dlabs.c | 183 +++++++++++++++------- 3 files changed, 193 insertions(+), 270 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index b9068d4a96..9c4d8ab528 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -349,299 +349,146 @@ _mesa_ValidateProgramARB(GLhandleARB programObj) } } -GLvoid GLAPIENTRY -_mesa_Uniform1fARB(GLint location, GLfloat v0) + +/** + * Helper function for all the _mesa_Uniform*() functions below. + */ +static INLINE void +uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, + const char *caller) { GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fARB"); + GET_CURRENT_LINKED_PROGRAM(pro, caller); FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, 1, &v0, GL_FLOAT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1fARB"); - } + if (!pro) + return; + + if (!(**pro).WriteUniform(pro, location, count, values, type)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); } + GLvoid GLAPIENTRY -_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) +_mesa_Uniform1fARB(GLint location, GLfloat v0) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - GLfloat v[2]; - v[0] = v0; - v[1] = v1; + uniform(location, 1, &v0, GL_FLOAT, "glUniform1fARB"); +} - if (!(**pro).WriteUniform(pro, location, 1, v, GL_FLOAT_VEC2)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2fARB"); - } +GLvoid GLAPIENTRY +_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) +{ + GLfloat v[2]; + v[0] = v0; + v[1] = v1; + uniform(location, 1, v, GL_FLOAT_VEC2, "glUniform2fARB"); } GLvoid GLAPIENTRY _mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - GLfloat v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - - if (!(**pro).WriteUniform(pro, location, 1, v, GL_FLOAT_VEC3)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3fARB"); - } + GLfloat v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + uniform(location, 1, v, GL_FLOAT_VEC3, "glUniform3fARB"); } GLvoid GLAPIENTRY _mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - GLfloat v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - - if (!(**pro).WriteUniform(pro, location, 1, v, GL_FLOAT_VEC4)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4fARB"); - } + GLfloat v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + uniform(location, 1, v, GL_FLOAT_VEC4, "glUniform4fARB"); } GLvoid GLAPIENTRY _mesa_Uniform1iARB(GLint location, GLint v0) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1iARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, 1, &v0, GL_INT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1iARB"); - } + uniform(location, 1, &v0, GL_INT, "glUniform1iARB"); } GLvoid GLAPIENTRY _mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2iARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - GLint v[2]; - v[0] = v0; - v[1] = v1; - - if (!(**pro).WriteUniform(pro, location, 1, v, GL_INT_VEC2)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2iARB"); - } + GLint v[2]; + v[0] = v0; + v[1] = v1; + uniform(location, 1, v, GL_INT_VEC2, "glUniform2iARB"); } GLvoid GLAPIENTRY _mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3iARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - GLint v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - - if (!(**pro).WriteUniform(pro, location, 1, v, GL_INT_VEC3)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3iARB"); - } + GLint v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + uniform(location, 1, v, GL_INT_VEC3, "glUniform3iARB"); } GLvoid GLAPIENTRY _mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4iARB"); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - GLint v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - - if (!(**pro).WriteUniform(pro, location, 1, v, GL_INT_VEC4)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4iARB"); - } + GLint v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + uniform(location, 1, v, GL_INT_VEC4, "glUniform4iARB"); } GLvoid GLAPIENTRY _mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fvARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform1fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1fvARB"); - } + uniform(location, count, value, GL_FLOAT, "glUniform1fvARB"); } GLvoid GLAPIENTRY _mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fvARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform2fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT_VEC2)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2fvARB"); - } + uniform(location, count, value, GL_FLOAT_VEC2, "glUniform2fvARB"); } GLvoid GLAPIENTRY _mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fvARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform3fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT_VEC3)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3fvARB"); - } + uniform(location, count, value, GL_FLOAT_VEC3, "glUniform3fvARB"); } GLvoid GLAPIENTRY _mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fvARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform4fvARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_FLOAT_VEC4)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4fvARB"); - } + uniform(location, count, value, GL_FLOAT_VEC4, "glUniform4fvARB"); } GLvoid GLAPIENTRY _mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1ivARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform1ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_INT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform1ivARB"); - } + uniform(location, count, value, GL_INT, "glUniform1ivARB"); } GLvoid GLAPIENTRY _mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2ivARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform2ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_INT_VEC2)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform2ivARB"); - } + uniform(location, count, value, GL_INT_VEC2, "glUniform2ivARB"); } GLvoid GLAPIENTRY _mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3ivARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform3ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_INT_VEC3)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform3ivARB"); - } + uniform(location, count, value, GL_INT_VEC3, "glUniform3ivARB"); } GLvoid GLAPIENTRY _mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) { - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4ivARB"); - - if (value == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glUniform4ivARB"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (pro != NULL) { - if (!(**pro).WriteUniform(pro, location, count, value, GL_INT_VEC4)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform4ivARB"); - } + uniform(location, count, value, GL_INT_VEC4, "glUniform4ivARB"); } @@ -1015,10 +862,8 @@ _mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) GET_CURRENT_CONTEXT(ctx); GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); - /* XXX error-check location here */ - if (pro != NULL) { - if (!(**pro).ReadUniform(pro, location, 1, params)) + if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); RELEASE_PROGRAM(pro); } @@ -1031,7 +876,8 @@ _mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); if (pro != NULL) { - /* TODO */ + if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); RELEASE_PROGRAM(pro); } } diff --git a/src/mesa/shader/shaderobjects.h b/src/mesa/shader/shaderobjects.h index 3afd0c9b29..09ba807255 100644 --- a/src/mesa/shader/shaderobjects.h +++ b/src/mesa/shader/shaderobjects.h @@ -105,7 +105,7 @@ struct gl2_program_intf GLboolean (* WriteUniform) (struct gl2_program_intf **, GLint loc, GLsizei count, const GLvoid *data, GLenum type); GLboolean (* ReadUniform) (struct gl2_program_intf **, GLint loc, GLsizei count, - GLfloat *data); + GLvoid *data, GLenum type); GLvoid (* GetActiveAttrib) (struct gl2_program_intf **, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *name); GLuint (* GetActiveAttribMaxLength) (struct gl2_program_intf **); diff --git a/src/mesa/shader/shaderobjects_3dlabs.c b/src/mesa/shader/shaderobjects_3dlabs.c index 0209e868ad..3ead1a1784 100755 --- a/src/mesa/shader/shaderobjects_3dlabs.c +++ b/src/mesa/shader/shaderobjects_3dlabs.c @@ -1383,6 +1383,10 @@ _program_GetUniformLocation(struct gl2_program_intf **intf, return -1; } +/** + * Write a uniform variable into program's memory. + * \return GL_TRUE for success, GL_FALSE if error + */ static GLboolean _program_WriteUniform(struct gl2_program_intf **intf, GLint loc, GLsizei count, const GLvoid * data, GLenum type) @@ -1396,9 +1400,7 @@ _program_WriteUniform(struct gl2_program_intf **intf, GLint loc, GLboolean convert_int_to_float = GL_FALSE; GLboolean types_match = GL_FALSE; - if (loc == -1) - return GL_TRUE; - if (loc >= uniforms->count) + if (loc < 0 || loc >= uniforms->count) return GL_FALSE; uniform = &uniforms->table[loc]; @@ -1460,86 +1462,161 @@ _program_WriteUniform(struct gl2_program_intf **intf, GLint loc, break; } - if (convert_float_to_bool) { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) { + for (i = 0; i < SLANG_SHADER_MAX; i++) { + if (uniform->address[i] != ~0) { + void *dest + = &impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]; + /* total number of values to copy */ + GLuint total + = count * slang_export_data_quant_components(uniform->quant); + GLuint j; + if (convert_float_to_bool) { const GLfloat *src = (GLfloat *) (data); - GLfloat *dst = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint j; - GLuint total = - count * slang_export_data_quant_components(uniform->quant); - + GLfloat *dst = (GLfloat *) dest; for (j = 0; j < total; j++) dst[j] = src[j] != 0.0f ? 1.0f : 0.0f; + break; } - } - else if (convert_int_to_bool) { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) { - const GLuint *src = (GLuint *) (data); - GLfloat *dst = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint j; - GLuint total = - count * slang_export_data_quant_components(uniform->quant); - + else if (convert_int_to_bool) { + const GLint *src = (GLint *) (data); + GLfloat *dst = (GLfloat *) dest; for (j = 0; j < total; j++) dst[j] = src[j] ? 1.0f : 0.0f; + break; } - } - else if (convert_int_to_float) { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) { - const GLuint *src = (GLuint *) (data); - GLfloat *dst = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint j; - GLuint total = - count * slang_export_data_quant_components(uniform->quant); - + else if (convert_int_to_float) { + const GLint *src = (GLint *) (data); + GLfloat *dst = (GLfloat *) dest; for (j = 0; j < total; j++) dst[j] = (GLfloat) src[j]; + break; } - } - else { - for (i = 0; i < SLANG_SHADER_MAX; i++) - if (uniform->address[i] != ~0) { - _mesa_memcpy(&impl->_obj.prog.machines[i]-> - mem[uniform->address[i] / 4], data, - count * - slang_export_data_quant_size(uniform->quant)); + else { + _mesa_memcpy(dest, data, total * sizeof(GLfloat)); + break; } + break; + } } return GL_TRUE; } +/** + * Read a uniform variable from program's memory. + * \return GL_TRUE for success, GL_FALSE if error + */ static GLboolean _program_ReadUniform(struct gl2_program_intf **intf, GLint loc, - GLsizei count, GLfloat *data) + GLsizei count, GLvoid *data, GLenum type) { struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); const slang_uniform_bindings *uniforms = &impl->_obj.prog.uniforms; const slang_uniform_binding *uniform; - GLint i, j; + GLuint i; + GLboolean convert_bool_to_float = GL_FALSE; + GLboolean convert_bool_to_int = GL_FALSE; + GLboolean convert_float_to_int = GL_FALSE; + GLboolean types_match = GL_FALSE; if (loc < 0 || loc >= uniforms->count) return GL_FALSE; uniform = &uniforms->table[loc]; - /* loop over shader types (fragment, vertex) */ + if (slang_export_data_quant_struct(uniform->quant)) + return GL_FALSE; + + switch (slang_export_data_quant_type(uniform->quant)) { + case GL_BOOL_ARB: + types_match = (type == GL_FLOAT) || (type == GL_INT); + if (type == GL_FLOAT) + convert_bool_to_float = GL_TRUE; + else + convert_bool_to_int = GL_TRUE; + break; + case GL_BOOL_VEC2_ARB: + types_match = (type == GL_FLOAT_VEC2_ARB) || (type == GL_INT_VEC2_ARB); + if (type == GL_FLOAT_VEC2_ARB) + convert_bool_to_float = GL_TRUE; + else + convert_bool_to_int = GL_TRUE; + break; + case GL_BOOL_VEC3_ARB: + types_match = (type == GL_FLOAT_VEC3_ARB) || (type == GL_INT_VEC3_ARB); + if (type == GL_FLOAT_VEC3_ARB) + convert_bool_to_float = GL_TRUE; + else + convert_bool_to_int = GL_TRUE; + break; + case GL_BOOL_VEC4_ARB: + types_match = (type == GL_FLOAT_VEC4_ARB) || (type == GL_INT_VEC4_ARB); + if (type == GL_FLOAT_VEC4_ARB) + convert_bool_to_float = GL_TRUE; + else + convert_bool_to_int = GL_TRUE; + break; + case GL_SAMPLER_1D_ARB: + case GL_SAMPLER_2D_ARB: + case GL_SAMPLER_3D_ARB: + case GL_SAMPLER_CUBE_ARB: + case GL_SAMPLER_1D_SHADOW_ARB: + case GL_SAMPLER_2D_SHADOW_ARB: + types_match = (type == GL_INT); + break; + default: + /* uniform is a float type */ + types_match = (type == GL_FLOAT); + break; + } + + if (!types_match) + return GL_FALSE; + + switch (type) { + case GL_INT: + case GL_INT_VEC2_ARB: + case GL_INT_VEC3_ARB: + case GL_INT_VEC4_ARB: + convert_float_to_int = GL_TRUE; + break; + } + for (i = 0; i < SLANG_SHADER_MAX; i++) { if (uniform->address[i] != ~0) { - GLfloat *src = (GLfloat *) - (&impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]); - GLuint total = - count * slang_export_data_quant_components(uniform->quant); - for (j = 0; j < total; j++) - data[j] = src[j]; + /* XXX if bools are really implemented as floats, some of this + * could probably be culled out. + */ + const void *source + = &impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]; + /* total number of values to copy */ + const GLuint total + = count * slang_export_data_quant_components(uniform->quant); + GLuint j; + if (convert_bool_to_float) { + GLfloat *dst = (GLfloat *) (data); + const GLfloat *src = (GLfloat *) source; + for (j = 0; j < total; j++) + dst[j] = src[j] == 0.0 ? 0.0 : 1.0; + } + else if (convert_bool_to_int) { + GLint *dst = (GLint *) (data); + const GLfloat *src = (GLfloat *) source; + for (j = 0; j < total; j++) + dst[j] = src[j] == 0.0 ? 0 : 1; + } + else if (convert_float_to_int) { + GLint *dst = (GLint *) (data); + const GLfloat *src = (GLfloat *) source; + for (j = 0; j < total; j++) + dst[j] = (GLint) src[j]; + } + else { + /* no type conversion needed */ + _mesa_memcpy(data, source, total * sizeof(GLfloat)); + } break; - } - } + } /* if */ + } /* for */ return GL_TRUE; } -- cgit v1.2.3 From 7e6701cef10c481cad5e0d3c95046ccc8fcd4e73 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 21:51:58 +0000 Subject: Simplify GET_CURRENT_LINKED_PROGRAM() macro and calling code. --- src/mesa/shader/shaderobjects.c | 63 +++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 34 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 9c4d8ab528..1f7d0dbdb5 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -98,26 +98,24 @@ lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, struct gl2_shader_intf **x = (struct gl2_shader_intf **)\ lookup_handle (ctx, handle, UIID_SHADER, function); -#define GET_LINKED_PROGRAM(x, handle, function)\ - GET_PROGRAM(x, handle, function);\ - if (x != NULL && (**x).GetLinkStatus (x) == GL_FALSE) {\ - RELEASE_PROGRAM(x);\ - x = NULL;\ - _mesa_error (ctx, GL_INVALID_OPERATION, function);\ + +#define GET_LINKED_PROGRAM(x, handle, function) \ + GET_PROGRAM(x, handle, function); \ + if (x && (**x).GetLinkStatus(x) == GL_FALSE) { \ + RELEASE_PROGRAM(x); \ + _mesa_error(ctx, GL_INVALID_OPERATION, function); \ + x = NULL; \ } -#define GET_CURRENT_LINKED_PROGRAM(x, function)\ - struct gl2_program_intf **x = NULL;\ - if (ctx->ShaderObjects.CurrentProgram == NULL)\ - _mesa_error (ctx, GL_INVALID_OPERATION, function);\ - else {\ - x = ctx->ShaderObjects.CurrentProgram;\ - if (x != NULL && (**x).GetLinkStatus (x) == GL_FALSE) {\ - x = NULL;\ - _mesa_error (ctx, GL_INVALID_OPERATION, function);\ - }\ +#define GET_CURRENT_LINKED_PROGRAM(x, function) \ + struct gl2_program_intf **x = ctx->ShaderObjects.CurrentProgram; \ + if (!x || (**x).GetLinkStatus(x) == GL_FALSE) { \ + _mesa_error(ctx, GL_INVALID_OPERATION, function); \ + return; \ } + + #define IS_NAME_WITH_GL_PREFIX(x) ((x)[0] == 'g' && (x)[1] == 'l' && (x)[2] == '_') @@ -362,9 +360,6 @@ uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (!pro) - return; - if (!(**pro).WriteUniform(pro, location, count, values, type)) _mesa_error(ctx, GL_INVALID_OPERATION, caller); } @@ -512,9 +507,6 @@ uniform_matrix(GLint cols, GLint rows, const char *caller, FLUSH_VERTICES(ctx, _NEW_PROGRAM); - if (!pro) - return; /* no error? */ - if (transpose) { GLfloat *trans, *pt; const GLfloat *pv; @@ -820,7 +812,7 @@ _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) GLint loc = -1; GET_LINKED_PROGRAM(pro, programObj, "glGetUniformLocationARB"); - if (pro == NULL) + if (!pro) return -1; if (name == NULL) @@ -862,11 +854,13 @@ _mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) GET_CURRENT_CONTEXT(ctx); GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); - if (pro != NULL) { - if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); - RELEASE_PROGRAM(pro); - } + if (!pro) + return; + + if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); + + RELEASE_PROGRAM(pro); } GLvoid GLAPIENTRY @@ -875,11 +869,12 @@ _mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) GET_CURRENT_CONTEXT(ctx); GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); - if (pro != NULL) { - if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); - RELEASE_PROGRAM(pro); - } + if (!pro) + return; + + if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); + RELEASE_PROGRAM(pro); } GLvoid GLAPIENTRY @@ -946,7 +941,7 @@ _mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) GLint loc = -1; GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); - if (pro == NULL) + if (!pro) return -1; if (name == NULL) -- cgit v1.2.3 From 3bef600024a27376680e1dab326c1dd22c562322 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 22:15:43 +0000 Subject: implement _mesa_GetProgramiv() --- src/mesa/shader/shaderobjects.c | 43 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 1f7d0dbdb5..fdcb92a215 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -67,8 +67,8 @@ lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, return NULL; } _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - unk = (struct gl2_unknown_intf **) - (_mesa_HashLookup(ctx->Shared->GL2Objects, handle)); + unk = (struct gl2_unknown_intf **) _mesa_HashLookup(ctx->Shared->GL2Objects, + handle); _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); if (unk == NULL) { @@ -1005,7 +1005,44 @@ _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, void GLAPIENTRY _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) { - /* XXX to do */ + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, program, "glGetProgramiv"); + + if (!pro) + return; + + switch (pname) { + case GL_DELETE_STATUS: + *params = 0; /* XXX fix */ + break; + case GL_LINK_STATUS: + *params = (**pro).GetLinkStatus(pro); + break; + case GL_VALIDATE_STATUS: + *params = (**pro).GetValidateStatus(pro); + break; + case GL_INFO_LOG_LENGTH: + *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_unknown_inf **) pro ); + break; + case GL_ATTACHED_SHADERS: + *params = (**pro)._container.GetAttachedCount( (struct gl2_unknown_inf **) pro ); + break; + case GL_ACTIVE_ATTRIBUTES: + *params = (**pro).GetActiveAttribCount(pro); + break; + case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: + *params = (**pro).GetActiveAttribMaxLength(pro); + break; + case GL_ACTIVE_UNIFORMS: + *params = (**pro).GetActiveUniformCount(pro); + break; + case GL_ACTIVE_UNIFORM_MAX_LENGTH: + *params = (**pro).GetActiveUniformMaxLength(pro); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); + return; + } } void GLAPIENTRY -- cgit v1.2.3 From d2f80777e804742267efd700396275174928332d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 22:23:47 +0000 Subject: implement _mesa_GetShaderiv() --- src/mesa/shader/shaderobjects.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index fdcb92a215..8265ff40e3 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -1013,7 +1013,7 @@ _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) switch (pname) { case GL_DELETE_STATUS: - *params = 0; /* XXX fix */ + *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_inf **) pro); break; case GL_LINK_STATUS: *params = (**pro).GetLinkStatus(pro); @@ -1055,7 +1055,35 @@ _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, void GLAPIENTRY _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) { - /* XXX to do */ + GET_CURRENT_CONTEXT(ctx); + GET_SHADER(sh, shader, "glGetShaderiv"); + + if (!sh) + return; + + switch (pname) { + case GL_SHADER_TYPE: + *params = (**sh).GetSubType(sh); + break; + case GL_DELETE_STATUS: + *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_inf **) sh); + break; + case GL_COMPILE_STATUS: + *params = (**sh).GetCompileStatus(sh); + break; + case GL_INFO_LOG_LENGTH: + *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_inf **)sh); + break; + case GL_SHADER_SOURCE_LENGTH: + { + const GLchar *src = (**sh).GetSource(sh); + *params = src ? (_mesa_strlen(src) + 1) : 0; + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)"); + return; + } } void GLAPIENTRY -- cgit v1.2.3 From 2fbaddfa695986ed04e4d648bb91632fd66f326b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 23:28:36 +0000 Subject: check for USE_MGL_NAMESPACE --- src/mesa/glapi/gl_x86-64_asm.py | 4 ++++ src/mesa/glapi/gl_x86_asm.py | 4 ++++ src/mesa/glapi/glthread.h | 8 +++++++- 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py index 2a375d1ae9..1e1279b8f1 100644 --- a/src/mesa/glapi/gl_x86-64_asm.py +++ b/src/mesa/glapi/gl_x86-64_asm.py @@ -141,6 +141,10 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define THREADS' print '#endif' print '' + print '#ifdef USE_MGL_NAMESPACE' + print '#define _glapi_Dispatch _mglapi_Dispatch' + print '#endif' + print '' print '\t.text' print '' print '#ifdef GLX_USE_TLS' diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py index 977e0329cc..5ae3e2608e 100644 --- a/src/mesa/glapi/gl_x86_asm.py +++ b/src/mesa/glapi/gl_x86_asm.py @@ -79,6 +79,10 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define THREADS' print '#endif' print '' + print '#ifdef USE_MGL_NAMESPACE' + print '#define _glapi_Dispatch _mglapi_Dispatch' + print '#endif' + print '' print '#ifdef GLX_USE_TLS' print '' print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index 0958cd1b32..a61086d0dc 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -64,6 +64,12 @@ #define GLTHREAD_H +#if defined(USE_MGL_NAMESPACE) +#define _glapi_Dispatch _mglapi_Dispatch +#endif + + + #if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\ defined(WIN32_THREADS) || defined(USE_XTHREADS) || defined(BEOS_THREADS)) \ && !defined(THREADS) -- cgit v1.2.3 From c9365b7ca4fe7ac7e7e56debe50b371c8ed721d6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 23:32:30 +0000 Subject: Fix _mesa_IsProgram() and _mesa_IsShader() --- src/mesa/shader/shaderobjects.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 8265ff40e3..a2416c2872 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -1097,16 +1097,28 @@ GLboolean GLAPIENTRY _mesa_IsProgram(GLuint program) { GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, program, "glIsProgram"); - return gen ? GL_TRUE : GL_FALSE; + GET_PROGRAM(pro, program, "glIsProgram"); + if (pro) { + RELEASE_PROGRAM(pro); + return GL_TRUE; + } + else { + return GL_FALSE; + } } GLboolean GLAPIENTRY _mesa_IsShader(GLuint shader) { GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, shader, "glIsProgram"); - return gen ? GL_TRUE : GL_FALSE; + GET_SHADER(sh, shader, "glIsProgram"); + if (sh) { + RELEASE_SHADER(sh); + return GL_TRUE; + } + else { + return GL_FALSE; + } } -- cgit v1.2.3 From 64d952c92cf9393ec7e02902f2c6960d5028fe64 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Nov 2006 23:43:14 +0000 Subject: #define _glapi_Dispatch _mglapi_Dispatch when USE_MGL_NAMESPACE is set. --- src/mesa/glapi/gl_x86-64_asm.py | 5 +---- src/mesa/glapi/gl_x86_asm.py | 5 +---- src/mesa/x86-64/glapi_x86-64.S | 1 + src/mesa/x86/glapi_x86.S | 1 + 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py index 1e1279b8f1..fa45406f47 100644 --- a/src/mesa/glapi/gl_x86-64_asm.py +++ b/src/mesa/glapi/gl_x86-64_asm.py @@ -133,6 +133,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '' print '# if defined(USE_MGL_NAMESPACE)' print '# define GL_PREFIX(n) GLNAME(CONCAT(mgl,n))' + print '# define _glapi_Dispatch _mglapi_Dispatch' print '# else' print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))' print '# endif' @@ -141,10 +142,6 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define THREADS' print '#endif' print '' - print '#ifdef USE_MGL_NAMESPACE' - print '#define _glapi_Dispatch _mglapi_Dispatch' - print '#endif' - print '' print '\t.text' print '' print '#ifdef GLX_USE_TLS' diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py index 5ae3e2608e..650331a0c5 100644 --- a/src/mesa/glapi/gl_x86_asm.py +++ b/src/mesa/glapi/gl_x86_asm.py @@ -62,6 +62,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '#else' print '# if defined(USE_MGL_NAMESPACE)' print '# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))' + print '# define _glapi_Dispatch _mglapi_Dispatch' print '# else' print '# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))' print '# endif' @@ -79,10 +80,6 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define THREADS' print '#endif' print '' - print '#ifdef USE_MGL_NAMESPACE' - print '#define _glapi_Dispatch _mglapi_Dispatch' - print '#endif' - print '' print '#ifdef GLX_USE_TLS' print '' print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S index 1d95829134..d8ef5eae09 100644 --- a/src/mesa/x86-64/glapi_x86-64.S +++ b/src/mesa/x86-64/glapi_x86-64.S @@ -40,6 +40,7 @@ # if defined(USE_MGL_NAMESPACE) # define GL_PREFIX(n) GLNAME(CONCAT(mgl,n)) +# define _glapi_Dispatch _mglapi_Dispatch # else # define GL_PREFIX(n) GLNAME(CONCAT(gl,n)) # endif diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index 3221dbce18..2c01b38aeb 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -38,6 +38,7 @@ #else # if defined(USE_MGL_NAMESPACE) # define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n)) +# define _glapi_Dispatch _mglapi_Dispatch # else # define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n)) # endif -- cgit v1.2.3 From 590b557b10ccff7135d76ec800b944c8901c5141 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 4 Nov 2006 17:28:38 +0000 Subject: fix for glGetVertexAttribfvARB, bug 8883 --- src/mesa/shader/arbprogram.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index e1b2a94c8a..baba887912 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -102,7 +102,7 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (index == 0 || index >= MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index >= MAX_VERTEX_PROGRAM_ATTRIBS) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribfvARB(index)"); return; } @@ -124,6 +124,11 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params) params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Normalized; break; case GL_CURRENT_VERTEX_ATTRIB_ARB: + if (index == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetVertexAttribfvARB(pname)"); + return; + } FLUSH_CURRENT(ctx, 0); COPY_4V(params, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index]); break; -- cgit v1.2.3 From adf3a64b03c636007ce4d8d492c60aad8070c978 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 4 Nov 2006 17:31:21 +0000 Subject: fix error msg --- src/mesa/shader/arbprogram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index baba887912..91fb691038 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -126,7 +126,7 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params) case GL_CURRENT_VERTEX_ATTRIB_ARB: if (index == 0) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetVertexAttribfvARB(pname)"); + "glGetVertexAttribfvARB(index==0)"); return; } FLUSH_CURRENT(ctx, 0); -- cgit v1.2.3 From 120584a1e650c5c72c889666a82624af4f5df1c1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 4 Nov 2006 17:31:45 +0000 Subject: Fix for glGetVertexAttribfvNV, bug 8883 --- src/mesa/shader/nvprogram.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index 0e9a01dcab..4f160b1431 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -360,7 +360,7 @@ _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (index == 0 || index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { + if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)"); return; } @@ -376,6 +376,11 @@ _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params) params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Type; break; case GL_CURRENT_ATTRIB_NV: + if (index == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetVertexAttribdvNV(index == 0)"); + return; + } FLUSH_CURRENT(ctx, 0); COPY_4V(params, ctx->Current.Attrib[index]); break; @@ -396,7 +401,7 @@ _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (index == 0 || index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { + if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)"); return; } @@ -412,6 +417,11 @@ _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params) params[0] = (GLfloat) ctx->Array.ArrayObj->VertexAttrib[index].Type; break; case GL_CURRENT_ATTRIB_NV: + if (index == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetVertexAttribfvNV(index == 0)"); + return; + } FLUSH_CURRENT(ctx, 0); COPY_4V(params, ctx->Current.Attrib[index]); break; @@ -432,7 +442,7 @@ _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (index == 0 || index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { + if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)"); return; } @@ -448,6 +458,11 @@ _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params) params[0] = ctx->Array.ArrayObj->VertexAttrib[index].Type; break; case GL_CURRENT_ATTRIB_NV: + if (index == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetVertexAttribivNV(index == 0)"); + return; + } FLUSH_CURRENT(ctx, 0); params[0] = (GLint) ctx->Current.Attrib[index][0]; params[1] = (GLint) ctx->Current.Attrib[index][1]; -- cgit v1.2.3 From 0056ea5417d6d3c3ca875cf86a085611c83f8afb Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sat, 4 Nov 2006 23:50:27 +0000 Subject: Add cos instruction and remove left over debug. --- src/mesa/drivers/dri/r300/r300_fragprog.c | 105 ++++++++++++++++++------------ src/mesa/drivers/dri/r300/radeon_state.c | 4 -- 2 files changed, 64 insertions(+), 45 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 91ec4f855c..60f5db62fa 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -28,14 +28,14 @@ /* * Authors: * Ben Skeggs + * Jerome Glisse */ /*TODO'S * - * - COS/SIN/SCS/LIT instructions + * - COS/SIN/SCS instructions * - Depth write, WPOS/FOGC inputs * - FogOption - * - Negate on individual components (implement in swizzle code?) * - Verify results of opcodes for accuracy, I've only checked them * in specific cases. * - and more... @@ -503,9 +503,6 @@ static pfs_reg_t t_src(struct r300_fragment_program *rp, struct prog_src_register fpsrc) { pfs_reg_t r = undef; -#if 0 - pfs_reg_t n = undef; -#endif switch (fpsrc.File) { case PROGRAM_TEMPORARY: @@ -538,40 +535,6 @@ static pfs_reg_t t_src(struct r300_fragment_program *rp, /* no point swizzling ONE/ZERO/HALF constants... */ if (r.v_swz < SWIZZLE_111 || r.s_swz < SWIZZLE_ZERO) r = do_swizzle(rp, r, fpsrc.Swizzle, fpsrc.NegateBase); -#if 0 - /* WRONG! Need to be able to do individual component negation, - * should probably handle this in the swizzling code unless - * all components are negated, then we can do this natively */ - if ((fpsrc.NegateBase & 0xf) == 0xf) - r.negate = GL_TRUE; - - r.negate_s = (fpsrc.NegateBase >> 3) & 1; - - if ((fpsrc.NegateBase & 0x7) == 0x0) { - r.negate_v = 0; - } else if ((fpsrc.NegateBase & 0x7) == 0x7) { - r.negate_v = 1; - } else { - if (r.type != REG_TYPE_TEMP) { - n = get_temp_reg(rp); - emit_arith(rp, PFS_OP_MAD, n, 0x7 ^ fpsrc.NegateBase, - keep(r), pfs_one, pfs_zero, 0); - r.negate_v = 1; - emit_arith(rp, PFS_OP_MAD, n, - fpsrc.NegateBase & 0x7 | WRITEMASK_W, - r, pfs_one, pfs_zero, 0); - r.negate_v = 0; - r = n; - } else { - r.negate_v = 1; - emit_arith(rp, PFS_OP_MAD, r, - fpsrc.NegateBase & 0x7 | WRITEMASK_W, - r, pfs_one, pfs_zero, 0); - r.negate_v = 0; - } - } -#endif - return r; } @@ -580,6 +543,8 @@ static pfs_reg_t t_scalar_src(struct r300_fragment_program *rp, { struct prog_src_register src = fpsrc; int sc = GET_SWZ(fpsrc.Swizzle, 0); /* X */ + + printf("sc %d\n",sc); src.Swizzle = ((sc<<0)|(sc<<3)|(sc<<6)|(sc<<9)); @@ -1094,7 +1059,65 @@ static GLboolean parse_program(struct r300_fragment_program *rp) flags); break; case OPCODE_COS: - ERROR("COS not implemented\n"); + /* + * cos using taylor serie: + * cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + */ +// printf("swz %d\n", src[0].v_swz); + temp = get_temp_reg(rp); + cnstv[0] = 0.5; + cnstv[1] = 0.041666667; + cnstv[2] = 0.001388889; + cnstv[4] = 0.0; + cnst = emit_const4fv(rp, cnstv); + src[0] = t_scalar_src(rp, fpi->SrcReg[0]); + + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_XYZ, + src[0], + src[0], + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_Y | WRITEMASK_Z, + temp, temp, + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_Z, + temp, + swizzle(temp, X, X, X, W), + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_XYZ, + temp, cnst, + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_X, + pfs_one, + pfs_one, + negate(temp), + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_X, + temp, + pfs_one, + swizzle(temp, Y, Y, Y, W), + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_X, + temp, + pfs_one, + negate(swizzle(temp, Z, Z, Z, W)), + flags); + emit_arith(rp, PFS_OP_MAD, dest, mask, + swizzle(temp, X, X, X, X), + pfs_one, + pfs_zero, + flags); + free_temp(rp, temp); break; case OPCODE_DP3: src[0] = t_src(rp, fpi->SrcReg[0]); @@ -1578,7 +1601,7 @@ void r300_translate_fragment_shader(struct r300_fragment_program *rp) assert(rp->alu_end >= 0); rp->translated = GL_TRUE; - if (0) dump_program(rp); + if (1) dump_program(rp); } update_params(rp); diff --git a/src/mesa/drivers/dri/r300/radeon_state.c b/src/mesa/drivers/dri/r300/radeon_state.c index 3142fee98a..0ceaf7ebb7 100644 --- a/src/mesa/drivers/dri/r300/radeon_state.c +++ b/src/mesa/drivers/dri/r300/radeon_state.c @@ -169,10 +169,6 @@ void radeonSetCliprects(radeonContextPtr radeon) if ((draw_fb->Width != drawable->w) || (draw_fb->Height != drawable->h)) { - printf("w,h %d %d\n", - radeon->glCtx->DrawBuffer->Width, - radeon->glCtx->DrawBuffer->Height); - _mesa_resize_framebuffer(radeon->glCtx, draw_fb, drawable->w, drawable->h); draw_fb->Initialized = GL_TRUE; -- cgit v1.2.3 From e330a69ee509b4fc16b93ae554ca2e378c929e63 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sun, 5 Nov 2006 00:47:27 +0000 Subject: Add sin instruction to fragment program. There is a bug somewhere in fragment program. tri-cos and tri-sin show the bug. Also we should not emit multiple time the same constant. for sin,cos,lit have to fix that. --- src/mesa/drivers/dri/r300/r300_fragprog.c | 66 ++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 60f5db62fa..7793c5eb2e 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -1063,7 +1063,6 @@ static GLboolean parse_program(struct r300_fragment_program *rp) * cos using taylor serie: * cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! */ -// printf("swz %d\n", src[0].v_swz); temp = get_temp_reg(rp); cnstv[0] = 0.5; cnstv[1] = 0.041666667; @@ -1374,7 +1373,70 @@ static GLboolean parse_program(struct r300_fragment_program *rp) free_temp(rp, temp); break; case OPCODE_SIN: - ERROR("SIN not implemented\n"); + /* + * sin using taylor serie: + * sin(x) = x - x^3/3! + x^5/5! - x^7/7! + */ + temp = get_temp_reg(rp); + cnstv[0] = 0.333333333; + cnstv[1] = 0.008333333; + cnstv[2] = 0.000198413; + cnstv[4] = 0.0; + cnst = emit_const4fv(rp, cnstv); + src[0] = t_scalar_src(rp, fpi->SrcReg[0]); + + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_XYZ, + src[0], + src[0], + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_Y | WRITEMASK_Z, + temp, temp, + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_Z, + temp, + swizzle(temp, X, X, X, W), + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_XYZ, + src[0], + temp, + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_XYZ, + temp, cnst, + pfs_zero, + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_X, + src[0], + pfs_one, + negate(temp), + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_X, + temp, + pfs_one, + swizzle(temp, Y, Y, Y, W), + flags); + emit_arith(rp, PFS_OP_MAD, temp, + WRITEMASK_X, + temp, + pfs_one, + negate(swizzle(temp, Z, Z, Z, W)), + flags); + emit_arith(rp, PFS_OP_MAD, dest, mask, + swizzle(temp, X, X, X, X), + pfs_one, + pfs_zero, + flags); + free_temp(rp, temp); break; case OPCODE_SLT: src[0] = t_src(rp, fpi->SrcReg[0]); -- cgit v1.2.3 From e2b4d9b317104ff3c56a9bf108aa79084d49eba5 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 5 Nov 2006 13:46:48 +0000 Subject: Architect the DRI : - make use of the autogenerated nouveau_reg.h file - add object creation to the DRI - some work on screen and context creation --- src/mesa/drivers/dri/nouveau/Makefile | 6 +- src/mesa/drivers/dri/nouveau/nouveau_card.c | 50 + src/mesa/drivers/dri/nouveau/nouveau_card.h | 49 + src/mesa/drivers/dri/nouveau/nouveau_context.c | 12 +- src/mesa/drivers/dri/nouveau/nouveau_context.h | 5 +- src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h | 42 + src/mesa/drivers/dri/nouveau/nouveau_dri.h | 28 + src/mesa/drivers/dri/nouveau/nouveau_driver.c | 31 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 38 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 8 +- src/mesa/drivers/dri/nouveau/nouveau_ioctl.c | 60 - src/mesa/drivers/dri/nouveau/nouveau_ioctl.h | 36 - src/mesa/drivers/dri/nouveau/nouveau_object.c | 36 + src/mesa/drivers/dri/nouveau/nouveau_object.h | 13 + src/mesa/drivers/dri/nouveau/nouveau_reg.h | 1484 ++++++++++++++++++++++-- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 49 + src/mesa/drivers/dri/nouveau/nouveau_screen.h | 5 +- src/mesa/drivers/dri/nouveau/nouveau_state.c | 1 - src/mesa/drivers/dri/nouveau/nouveau_swtcl.c | 4 +- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 59 +- 20 files changed, 1768 insertions(+), 248 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_card.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_card.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_dri.h delete mode 100644 src/mesa/drivers/dri/nouveau/nouveau_ioctl.c delete mode 100644 src/mesa/drivers/dri/nouveau/nouveau_ioctl.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_object.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_object.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_screen.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index ee7bc5d317..08240ad032 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -8,13 +8,15 @@ LIBNAME = nouveau_dri.so MINIGLX_SOURCES = DRIVER_SOURCES = \ + nouveau_card.c \ nouveau_context.c \ nouveau_driver.c \ nouveau_fifo.c \ - nouveau_ioctl.c \ nouveau_lock.c \ + nouveau_object.c \ + nouveau_screen.c \ nouveau_span.c \ - nouveau_state.c \ + nouveau_state.c \ nouveau_tex.c \ nouveau_swtcl.c \ nv10_swtcl.c diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card.c b/src/mesa/drivers/dri/nouveau/nouveau_card.c new file mode 100644 index 0000000000..c36f62aff6 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_card.c @@ -0,0 +1,50 @@ + +#include "nouveau_card.h" +#include "nouveau_reg.h" + +static nouveau_card nouveau_card_list[]={ +//x0010, "Riva 128", ????, NV_03, 0}, +{0x0020, "TNT/TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, +{0x00A0, "TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, +{0x0100, "GeForce", NV10_TCL_PRIMITIVE_3D, NV_10, 0}, +{0x0110, "GeForce 2 MX", NV15_TCL_PRIMITIVE_3D|0x1100, NV_10, 0}, +{0x01A0, "NForce", NV15_TCL_PRIMITIVE_3D|0x1100, NV_10, 0}, +{0x0150, "GeForce 2", NV15_TCL_PRIMITIVE_3D, NV_10, 0}, +{0x0170, "GeForce 4 MX", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, +{0x0180, "GeForce 4 MX", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, +{0x01F0, "NForce 2", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, +{0x0200, "GeForce 3", NV20_TCL_PRIMITIVE_3D|0x2000, NV_20, NV_HAS_LMA}, +{0x0250, "GeForce 4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_20, NV_HAS_LMA}, +{0x0280, "GeForce 4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_20, NV_HAS_LMA}, +{0x0320, "GeForce FX 5200/5500", NV30_TCL_PRIMITIVE_3D|0x3400, NV_30, NV_HAS_LMA}, +{0x0310, "GeForce FX 5600", NV30_TCL_PRIMITIVE_3D|0x3000, NV_30, NV_HAS_LMA}, +{0x0340, "GeForce FX 5700", NV30_TCL_PRIMITIVE_3D|0x3500, NV_30, NV_HAS_LMA}, +{0x0300, "GeForce FX 5800", NV30_TCL_PRIMITIVE_3D|0x3000, NV_30, NV_HAS_LMA}, +{0x0330, "GeForce FX 5900", NV30_TCL_PRIMITIVE_3D|0x3500, NV_30, NV_HAS_LMA}, +{0x0240, "GeForce 6100", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, +{0x0160, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, +{0x0220, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, +{0x0140, "GeForce 6200/6600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x0040, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x00C0, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x0210, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x01D0, "GeForce 7200/7300/7400", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, +{0x0390, "GeForce 7300/7600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x02E0, "GeForce 7300/7600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x0090, "GeForce 7800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +{0x0290, "GeForce 7900", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +/* catchall */ +{0x0000, "Unknown card", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, +}; + + +nouveau_card* nouveau_card_lookup(uint32_t device_id) +{ + int i; + for(i=0;iscreen->card_type) + switch(nmesa->screen->card->type) { case NV_03: //nv03TriInitFunctions( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 21aa1a6313..be0785f453 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -36,13 +36,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mtypes.h" #include "tnl/t_vertex.h" -#include "nouveau_reg.h" #include "nouveau_screen.h" #include "xmlconfig.h" typedef struct nouveau_fifo_t{ u_int32_t* buffer; + u_int32_t* mmio; u_int32_t current; u_int32_t put; u_int32_t free; @@ -80,9 +80,6 @@ typedef struct nouveau_context { /* The per-context fifo */ nouveau_fifo fifo; - /* The fifo control regs */ - volatile unsigned char* fifo_mmio; - /* The read-only regs */ volatile unsigned char* mmio; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h b/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h new file mode 100644 index 0000000000..2f4c3f6d5d --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h @@ -0,0 +1,42 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin, Sylvain Munaut +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP 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. + +**************************************************************************/ + + + + +#define NV03_STATUS 0x004006b0 +#define NV04_STATUS 0x00400700 + +#define NV03_FIFO_REGS_SIZE 0x10000 +# define NV03_FIFO_REGS_DMAPUT 0x00000040 +# define NV03_FIFO_REGS_DMAGET 0x00000044 + +/* Fifo commands. These are not regs, neither masks */ +#define NV03_FIFO_CMD_JUMP 0x20000000 +#define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc +#define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK)) + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_dri.h b/src/mesa/drivers/dri/nouveau/nouveau_dri.h new file mode 100644 index 0000000000..ce3c3fb9cc --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_dri.h @@ -0,0 +1,28 @@ +#ifndef _NOUVEAU_DRI_ +#define _NOUVEAU_DRI_ + +#include "xf86drm.h" +#include "drm.h" +#include "nouveau_drm.h" + +typedef struct { + uint32_t device_id; /**< \brief PCI device ID */ + uint32_t width; /**< \brief width in pixels of display */ + uint32_t height; /**< \brief height in scanlines of display */ + uint32_t depth; /**< \brief depth of display (8, 15, 16, 24) */ + uint32_t bpp; /**< \brief bit depth of display (8, 16, 24, 32) */ + + uint32_t bus_type; /**< \brief ths bus type */ + uint32_t bus_mode; /**< \brief bus mode (used for AGP, maybe also for PCI-E ?) */ + + uint32_t front_offset; /**< \brief front buffer offset */ + uint32_t front_pitch; /**< \brief front buffer pitch */ + uint32_t back_offset; /**< \brief private back buffer offset */ + uint32_t back_pitch; /**< \brief private back buffer pitch */ + uint32_t depth_offset; /**< \brief private depth buffer offset */ + uint32_t depth_pitch; /**< \brief private depth buffer pitch */ + +} NOUVEAUDRIRec, *NOUVEAUDRIPtr; + +#endif + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index cb996acd89..a45530e451 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -25,7 +25,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ #include "nouveau_context.h" -#include "nouveau_ioctl.h" //#include "nouveau_state.h" #include "nouveau_lock.h" #include "nouveau_fifo.h" @@ -64,35 +63,7 @@ static const GLubyte *nouveauGetString( GLcontext *ctx, GLenum name ) return (GLubyte *)DRIVER_AUTHOR; case GL_RENDERER: - switch(nmesa->screen->card_type) - { - case NV_03: - card_name="Riva 128"; - break; - case NV_04: - card_name="TNT"; - break; - case NV_05: - card_name="TNT2"; - break; - case NV_10: - card_name="GeForce 1/2/4Mx"; - break; - case NV_20: - card_name="GeForce 3/4Ti"; - break; - case NV_30: - card_name="GeForce FX 5x00"; - break; - case NV_40: - card_name="GeForce FX 6x00"; - break; - case G_70: - card_name="GeForce FX 7x00"; - break; - default: - break; - } + card_name=nmesa->screen->card->name; switch(nmesa->screen->bus_type) { diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index cc77b577ca..5793909705 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -25,14 +25,25 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +#include "vblank.h" +#include +#include "mtypes.h" +#include "macros.h" +#include "dd.h" +#include "swrast/swrast.h" +#include "nouveau_context.h" +#include "nouveau_msg.h" #include "nouveau_fifo.h" #include "nouveau_lock.h" -#include "vblank.h" + #define RING_SKIPS 8 void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) { +#ifdef NOUVEAU_RING_DEBUG + return; +#endif u_int32_t fifo_get; while(nmesa->fifo.free < size+1) { fifo_get = NV_FIFO_READ(NV03_FIFO_REGS_DMAGET); @@ -58,15 +69,17 @@ void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) /* * Wait for the card to be idle - * XXX we should also wait for an empty fifo */ void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) { int i,status; + FIRE_RING(); + while(RING_AHEAD()>0); + for(i=0;i<1000000;i++) /* 1 second */ { - switch(nmesa->screen->card_type) + switch(nmesa->screen->card->type) { case NV_03: status=NV_READ(NV03_STATUS); @@ -95,3 +108,22 @@ void nouveauWaitForIdle(nouveauContextPtr nmesa) UNLOCK_HARDWARE(nmesa); } +// here we call the fifo initialization ioctl and fill in stuff accordingly +void nouveauFifoInit(nouveauContextPtr nmesa) +{ + drm_nouveau_fifo_alloc_t fifo_init; + + int ret; + ret=drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_ALLOC, &fifo_init, sizeof(fifo_init)); + if (ret) + FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); + + if (drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer)) + FATAL("Unable to map the fifo\n",ret); + if (drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio)) + FATAL("Unable to map the control regs\n",ret); + + MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); +} + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 95c78b5675..c2f8633dcc 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -30,11 +30,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define __NOUVEAU_FIFO_H__ #include "nouveau_context.h" +#include "nouveau_ctrlreg.h" #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) -#define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo_mmio + (reg)) -#define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo_mmio + (reg)) = value; +#define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) +#define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) = value; /* * Ring/fifo interface @@ -44,7 +45,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * - Output stuff to the ring with either OUT_RINGp (outputs a raw mem chunk), OUT_RING (1 uint32_t) or OUT_RINGf (1 float) * - RING_AVAILABLE returns the available fifo (in uint32_ts) * - RING_AHEAD returns how much ahead of the last submission point we are - * - FIRE_RING fire whatever we have that wasn't fired before + * - FIRE_RING fires whatever we have that wasn't fired before * - WAIT_RING waits for size (in uint32_ts) to be available in the fifo */ @@ -112,6 +113,7 @@ extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); }while(0) extern void nouveauWaitForIdle(nouveauContextPtr nmesa); +extern void nouveauFifoInit(nouveauContextPtr nmesa); #endif /* __NOUVEAU_FIFO_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c deleted file mode 100644 index 3f6e3076e2..0000000000 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.c +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -#include -#include "mtypes.h" -#include "macros.h" -#include "dd.h" -#include "swrast/swrast.h" - - -#include "nouveau_ioctl.h" -#include "nouveau_context.h" -#include "nouveau_msg.h" - -// here we call the fifo initialization ioctl and fill in stuff accordingly -void nouveauIoctlInitFifo(nouveauContextPtr nmesa) -{ - int ret; - drm_nouveau_fifo_alloc_t fifo_init; - - ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_ALLOC, &fifo_init, sizeof(fifo_init)); - if (ret) - FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); - MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); - - // XXX needs more stuff : - // - map the command buffer - // - map the fifo control regs - // - create the 3D object - -} - -void nouveauIoctlInitFunctions(struct dd_function_table *functions) -{ - // nothing for now -} - diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h b/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h deleted file mode 100644 index ce77d3d11e..0000000000 --- a/src/mesa/drivers/dri/nouveau/nouveau_ioctl.h +++ /dev/null @@ -1,36 +0,0 @@ -/************************************************************************** - -Copyright 2006 Stephane Marchesin -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - - -#ifndef __NOUVEAU_IOCTL_H__ -#define __NOUVEAU_IOCTL_H__ - -#include "nouveau_context.h" - -extern void nouveauIoctlInitFifo(nouveauContextPtr nmesa); -extern void nouveauIoctlInitFunctions(struct dd_function_table *functions); - -#endif /* __NOUVEAU_IOCTL_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c new file mode 100644 index 0000000000..9003fb1eae --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -0,0 +1,36 @@ + +#include "nouveau_fifo.h" +#include "nouveau_object.h" + + +static GLboolean NVDmaCreateContextObject(nouveauContextPtr nmesa, int handle, int class, uint32_t flags, + uint32_t dma_in, uint32_t dma_out, uint32_t dma_notifier) +{ + drm_nouveau_object_init_t cto; + int ret; + + cto.handle = handle; + cto.class = class; + cto.flags = flags; + cto.dma0= dma_in; + cto.dma1= dma_out; + cto.dma_notifier = dma_notifier; + ret = drmCommandWrite(nmesa->driFd, DRM_NOUVEAU_OBJECT_INIT, &cto, sizeof(cto)); + + return ret == 0; +} + +static void nouveauObjectOnSubchannel(nouveauContextPtr nmesa, int handle, int subchannel) +{ + BEGIN_RING_SIZE(subchannel, 0, 1); + OUT_RING(handle); +} + +void nouveauObjectInit(nouveauContextPtr nmesa) +{ + NVDmaCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, 0, 0, 0, 0); + nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); +} + + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h new file mode 100644 index 0000000000..5fe7487c47 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -0,0 +1,13 @@ + +#include "nouveau_context.h" + +void nouveauObjectInit(nouveauContextPtr nmesa); + +enum DMAObjects { + Nv3D = 0x80000019, +}; + +enum DMASubchannel { + NvSub3D = 1, +}; + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 583a2b82cb..359f36cec8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -1,79 +1,1417 @@ -/************************************************************************** +/* + Autogenerated file, do not edit ! + +************************************************************************** + + Copyright (C) 2006 : + Dmitry Baryshkov, + Laurent Carlier, + Matthieu Castet, + Dawid Gajownik, + Jeremy Kolb, + Stephane Loeuillet, + Patrice Mandin, + Stephane Marchesin, + Serge Martin, + Sylvain Munaut, + Ben Skeggs, + Erik Waling, + koala_br, + sturmflut. -Copyright 2006 Stephane Marchesin, Sylvain Munaut All Rights Reserved. -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -on the rights to use, copy, modify, merge, publish, distribute, sub -license, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP 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. - -**************************************************************************/ - - - - -#define NV03_BOOT_0 0x00100000 -# define NV03_BOOT_0_RAM_AMOUNT 0x00000003 -# define NV03_BOOT_0_RAM_AMOUNT_8MB 0x00000000 -# define NV03_BOOT_0_RAM_AMOUNT_2MB 0x00000001 -# define NV03_BOOT_0_RAM_AMOUNT_4MB 0x00000002 -# define NV03_BOOT_0_RAM_AMOUNT_8MB_SDRAM 0x00000003 -# define NV04_BOOT_0_RAM_AMOUNT_32MB 0x00000000 -# define NV04_BOOT_0_RAM_AMOUNT_4MB 0x00000001 -# define NV04_BOOT_0_RAM_AMOUNT_8MB 0x00000002 -# define NV04_BOOT_0_RAM_AMOUNT_16MB 0x00000003 - -#define NV04_FIFO_DATA 0x0010020c -# define NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK 0xfff00000 -# define NV10_FIFO_DATA_RAM_AMOUNT_MB_SHIFT 20 - -#define NV03_STATUS 0x004006b0 -#define NV04_STATUS 0x00400700 - -#define NV03_FIFO_SIZE 0x8000 -// NV10 maybe has 12 fifos -// NV40 probably has 16 fifos -#define NV03_FIFO_NUMBER 8 -#define NV03_FIFO_REGS_SIZE 0x10000 -# define NV03_FIFO_REGS_DMAPUT 0x00000040 -# define NV03_FIFO_REGS_DMAGET 0x00000044 - -/* Fifo commands. These are not regs, neither masks */ -#define NV03_FIFO_CMD_JUMP 0x20000000 -#define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc -#define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK)) - -/* Vertex attributes */ -#define NV30_UNKNOWN_0 0x00001718 -#define NV30_VERTEX_ATTRIBUTES 0x00001740 -#define NV20_VERTEX_ATTRIBUTE(i) (0x00001760+i*4) -#define NV20_VERTEX_ATTRIBUTE_TYPE_MASK 0x0000000f -#define NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT 0x00000002 -#define NV20_VERTEX_ATTRIBUTE_SIZE_MASK 0x000000f0 -#define NV10_VERTEX_ATTRIBUTE(i) (0x00000d04+i*8) -#define NV10_VERTEX_SET_FORMAT 0x00000cf0 - -/* Rendering commands */ -#define NV10_PRIMITIVE 0x00000dfc -#define NV20_PRIMITIVE 0x000017fc -#define NV30_PRIMITIVE 0x00001808 -#define NV10_BEGIN_VERTICES 0x00001800 -#define NV20_BEGIN_VERTICES 0x00001818 +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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +************************************************************************** + + Created from objects.c rev. 1.332 +*/ + +#ifndef _NOUVEAU_REG_H +#define _NOUVEAU_REG_H + +/****************************************** +Object NV01_CONTEXT_CLIP_RECTANGLE used on: NV03 NV04 NV10 NV15 NV20 NV40 G70 +*/ +#define NV01_CONTEXT_CLIP_RECTANGLE 0x00000019 +# define NV01_CONTEXT_CLIP_RECTANGLE_SET_POINT 0x00000300 /* Parameters: x y */ +# define NV01_CONTEXT_CLIP_RECTANGLE_SET_SIZE 0x00000304 /* Parameters: width height */ + +/****************************************** +Object NV_MEMORY_TO_MEMORY_FORMAT used on: NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV_MEMORY_TO_MEMORY_FORMAT 0x00000039 +# define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104 +# define NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY 0x00000180 +# define NV_MEMORY_TO_MEMORY_FORMAT_OBJECT_IN 0x00000184 +# define NV_MEMORY_TO_MEMORY_FORMAT_OBJECT_OUT 0x00000188 +# define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c +# define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_OUT 0x00000310 +# define NV_MEMORY_TO_MEMORY_FORMAT_PITCH_IN 0x00000314 +# define NV_MEMORY_TO_MEMORY_FORMAT_PITCH_OUT 0x00000318 +# define NV_MEMORY_TO_MEMORY_FORMAT_LINE_LENGTH_IN 0x0000031c +# define NV_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT 0x00000320 + +/****************************************** +Object NV03_PRIMITIVE_RASTER_OP used on: NV03 NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV03_PRIMITIVE_RASTER_OP 0x00000043 +# define NV03_PRIMITIVE_RASTER_OP_NOTIFY 0x00000100 +# define NV03_PRIMITIVE_RASTER_OP_DMA_NOTIFY 0x00000180 +# define NV03_PRIMITIVE_RASTER_OP_LOGIC_OP 0x00000300 /* Parameters: logic_op */ + +/****************************************** +Object NV04_GDI_RECTANGLE_TEXT used on: NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV04_GDI_RECTANGLE_TEXT 0x0000004a +# define NV04_GDI_RECTANGLE_TEXT_SET_DMA_NOTIFY 0x00000180 +# define NV04_GDI_RECTANGLE_TEXT_PATTERN 0x00000188 +# define NV04_GDI_RECTANGLE_TEXT_ROP5 0x0000018c +# define NV04_GDI_RECTANGLE_TEXT_SURFACE 0x00000198 +# define NV04_GDI_RECTANGLE_TEXT_OPERATION 0x000002fc +# define NV04_GDI_RECTANGLE_TEXT_FORMAT 0x00000300 +# define NV04_GDI_RECTANGLE_TEXT_BLOCK_LEVEL1_TL 0x000005f4 /* Parameters: left top */ +# define NV04_GDI_RECTANGLE_TEXT_BLOCK_LEVEL1_BR 0x000005f8 /* Parameters: right bottom */ +# define NV04_GDI_RECTANGLE_TEXT_FILL_VALUE 0x000005fc +# define NV04_GDI_RECTANGLE_TEXT_BLOCK_LEVEL2_TL 0x00000600 /* Parameters: left top */ +# define NV04_GDI_RECTANGLE_TEXT_BLOCK_LEVEL2_BR 0x00000604 /* Parameters: right bottom */ + +/****************************************** +Object NV04_SWIZZLED_SURFACE used on: NV04 NV10 NV15 +*/ +#define NV04_SWIZZLED_SURFACE 0x00000052 +# define NV04_SWIZZLED_SURFACE_DMA_NOTIFY 0x00000180 +# define NV04_SWIZZLED_SURFACE_DMA_IMAGE 0x00000184 +# define NV04_SWIZZLED_SURFACE_FORMAT 0x00000300 /* Parameters: log2(height) log2(width) color */ +# define NV04_SWIZZLED_SURFACE_OFFSET 0x00000304 + +/****************************************** +Object NV04_CONTEXT_SURFACES_3D used on: NV04 +*/ +#define NV04_CONTEXT_SURFACES_3D 0x00000053 +# define NV04_CONTEXT_SURFACES_3D_DMA_NOTIFY 0x00000180 +# define NV04_CONTEXT_SURFACES_3D_DMA_COLOR 0x00000184 +# define NV04_CONTEXT_SURFACES_3D_DMA_ZETA 0x00000188 +# define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL 0x000002f8 /* Parameters: x width */ +# define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL 0x000002fc /* Parameters: y height */ +# define NV04_CONTEXT_SURFACES_3D_FORMAT 0x00000300 /* Parameters: color type width height */ +# define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE 0x00000304 /* Parameters: width height */ +# define NV04_CONTEXT_SURFACES_3D_PITCH 0x00000308 /* Parameters: color zeta */ +# define NV04_CONTEXT_SURFACES_3D_OFFSET_COLOR 0x0000030c +# define NV04_CONTEXT_SURFACES_3D_OFFSET_ZETA 0x00000310 + +/****************************************** +Object NV04_DX5_TEXTURED_TRIANGLE used on: NV04 +*/ +#define NV04_DX5_TEXTURED_TRIANGLE 0x00000054 +# define NV04_DX5_TEXTURED_TRIANGLE_NOP 0x00000100 +# define NV04_DX5_TEXTURED_TRIANGLE_NOTIFY 0x00000104 +# define NV04_DX5_TEXTURED_TRIANGLE_DMA_NOTIFY 0x00000180 +# define NV04_DX5_TEXTURED_TRIANGLE_DMA_1 0x00000184 +# define NV04_DX5_TEXTURED_TRIANGLE_DMA_2 0x00000188 +# define NV04_DX5_TEXTURED_TRIANGLE_SURFACE 0x0000018c +# define NV04_DX5_TEXTURED_TRIANGLE_COLOR_KEY 0x00000300 +# define NV04_DX5_TEXTURED_TRIANGLE_TEXTURE_OFFSET 0x00000304 +# define NV04_DX5_TEXTURED_TRIANGLE_TEXTURE_FORMAT 0x00000308 /* Parameters: color mipmaps log(u) log(v) wrap_s wrap_t */ +# define NV04_DX5_TEXTURED_TRIANGLE_TEXTURE_FILTER 0x0000030c /* Parameters: magfilter minfilter lodbias */ +# define NV04_DX5_TEXTURED_TRIANGLE_BLEND 0x00000310 /* Parameters: texture benable dst src */ +# define NV04_DX5_TEXTURED_TRIANGLE_CONTROL 0x00000314 /* Parameters: alpharef alphafunc alphaenable zenable zwrite zfunc cullmode */ +# define NV04_DX5_TEXTURED_TRIANGLE_FOG_COLOR 0x00000318 +# define NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX( d) (0x00000400 + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SY( d) (0x00000404 + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SZ( d) (0x00000408 + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_INV_W( d) (0x0000040c + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_COLOR( d) (0x00000410 + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_SPECULAR( d) (0x00000414 + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_TEXTURE_S( d) (0x00000418 + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_TEXTURE_T( d) (0x0000041c + d * 0x0020) +# define NV04_DX5_TEXTURED_TRIANGLE_DRAW 0x00000600 /* Parameters: v0 v1 v2 v3 v4 v5 */ + +/****************************************** +Object NV04_DX6_MULTITEX_TRIANGLE used on: NV04 NV10 NV15 +*/ +#define NV04_DX6_MULTITEX_TRIANGLE 0x00000055 +# define NV04_DX6_MULTITEX_TRIANGLE_NOP 0x00000100 +# define NV04_DX6_MULTITEX_TRIANGLE_NOTIFY 0x00000104 +# define NV04_DX6_MULTITEX_TRIANGLE_DMA_NOTIFY 0x00000180 +# define NV04_DX6_MULTITEX_TRIANGLE_DMA_1 0x00000184 +# define NV04_DX6_MULTITEX_TRIANGLE_DMA_2 0x00000188 +# define NV04_DX6_MULTITEX_TRIANGLE_SURFACE 0x0000018c +# define NV04_DX6_MULTITEX_TRIANGLE_OFFSET0 0x00000308 +# define NV04_DX6_MULTITEX_TRIANGLE_OFFSET1 0x0000030c +# define NV04_DX6_MULTITEX_TRIANGLE_FORMAT0 0x00000310 /* Parameters: color mipmaps log(u) log(v) wrap_s wrap_t */ +# define NV04_DX6_MULTITEX_TRIANGLE_FORMAT1 0x00000314 /* Parameters: color mipmaps log(u) log(v) wrap_s wrap_t */ +# define NV04_DX6_MULTITEX_TRIANGLE_FILTER0 0x00000318 /* Parameters: magfilter minfilter lodbias */ +# define NV04_DX6_MULTITEX_TRIANGLE_FILTER1 0x0000031c /* Parameters: magfilter minfilter lodbias */ +# define NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_ALPHA 0x00000320 +# define NV04_DX6_MULTITEX_TRIANGLE_COMBINE_0_COLOR 0x00000324 +# define NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_ALPHA 0x0000032c +# define NV04_DX6_MULTITEX_TRIANGLE_COMBINE_1_COLOR 0x00000330 +# define NV04_DX6_MULTITEX_TRIANGLE_COMBINE_FACTOR 0x00000334 +# define NV04_DX6_MULTITEX_TRIANGLE_BLEND 0x00000338 /* Parameters: benable dst src */ +# define NV04_DX6_MULTITEX_TRIANGLE_CONTROL0 0x0000033c /* Parameters: red_write green_write blue_write alpha_write alpha_write stencil_write alpharef alphafunc alphaenable zenable zwrite zfunc cullmode */ +# define NV04_DX6_MULTITEX_TRIANGLE_CONTROL1 0x00000340 /* Parameters: stencil_enable stencil_mask_write stencil_mask_read stencilref stencilfunc */ +# define NV04_DX6_MULTITEX_TRIANGLE_CONTROL2 0x00000344 /* Parameters: stencil_fail stencil_zfail stencil_zpass */ +# define NV04_DX6_MULTITEX_TRIANGLE_FOG_COLOR 0x00000348 +# define NV04_DX6_MULTITEX_TRIANGLE_TLVERTEX_SX( d) (0x00000400 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_TLVERTEX_SY( d) (0x00000404 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_TLVERTEX_SZ( d) (0x00000408 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_INV_W( d) (0x0000040c + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_COLOR( d) (0x00000410 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_SPECULAR( d) (0x00000414 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_TEXTURE0_S( d) (0x00000418 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_TEXTURE0_T( d) (0x0000041c + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_TEXTURE1_S( d) (0x00000420 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_TEXTURE1_T( d) (0x00000424 + d * 0x0028) +# define NV04_DX6_MULTITEX_TRIANGLE_DRAW 0x00000540 /* Parameters: v0 v1 v2 v3 v4 v5 */ + +/****************************************** +Object NV04_COLOR_KEY used on: NV04 NV10 NV15 NV20 +*/ +#define NV04_COLOR_KEY 0x00000057 +# define NV04_COLOR_KEY_SET_DMA_NOTIFY 0x00000180 +# define NV04_COLOR_KEY_FORMAT 0x00000300 +# define NV04_COLOR_KEY_VALUE 0x00000304 + +/****************************************** +Object NV04_SOLID_LINE used on: NV04 +*/ +#define NV04_SOLID_LINE 0x0000005c +# define NV04_SOLID_LINE_CLIP_RECTANGLE 0x00000184 +# define NV04_SOLID_LINE_PATTERN 0x00000188 +# define NV04_SOLID_LINE_ROP 0x0000018c +# define NV04_SOLID_LINE_SURFACE 0x00000198 +# define NV04_SOLID_LINE_OPERATION 0x000002fc +# define NV04_SOLID_LINE_COLOR_FORMAT 0x00000300 +# define NV04_SOLID_LINE_COLOR_VALUE 0x00000304 +# define NV04_SOLID_LINE_START 0x00000400 /* Parameters: x y */ +# define NV04_SOLID_LINE_END 0x00000400 /* Parameters: x y */ + +/****************************************** +Object NV04_UNK005E used on: NV04 +*/ +#define NV04_UNK005E 0x0000005e +# define NV04_UNK005E_SET_SURFACE 0x00000198 +# define NV04_UNK005E_UNK02fc 0x000002fc +# define NV04_UNK005E_UNK0300 0x00000300 +# define NV04_UNK005E_COUNTER 0x00000304 + +/****************************************** +Object NV05_SCALED_IMAGE_FROM_MEMORY used on: NV04 +*/ +#define NV05_SCALED_IMAGE_FROM_MEMORY 0x00000063 +# define NV05_SCALED_IMAGE_FROM_MEMORY_SURFACE 0x00000198 +# define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION 0x000002fc +# define NV05_SCALED_IMAGE_FROM_MEMORY_OPERATION 0x00000304 + +/****************************************** +Object NV04_SCALED_IMAGE_FROM_MEMORY used on: NV04 +*/ +#define NV04_SCALED_IMAGE_FROM_MEMORY 0x00000077 +# define NV04_SCALED_IMAGE_FROM_MEMORY_DMA_NOTIFY 0x00000180 +# define NV04_SCALED_IMAGE_FROM_MEMORY_DMA_IMAGE 0x00000184 +# define NV04_SCALED_IMAGE_FROM_MEMORY_SURFACE 0x00000198 +# define NV04_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT 0x00000300 +# define NV04_SCALED_IMAGE_FROM_MEMORY_OPERATION 0x00000304 +# define NV04_SCALED_IMAGE_FROM_MEMORY_CLIP_POS 0x00000308 /* Parameters: x y */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE 0x0000030c /* Parameters: width height */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_OUT_POS 0x00000310 /* Parameters: x y */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE 0x00000314 /* Parameters: width height */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_DU_DX 0x00000318 /* Parameters: int frac*0x100000 */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_DV_DY 0x0000031c /* Parameters: int frac*0x100000 */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_SIZE 0x00000400 /* Parameters: width height */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_FORMAT 0x00000404 /* Parameters: pitch */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_OFFSET 0x00000408 +# define NV04_SCALED_IMAGE_FROM_MEMORY_POINT 0x0000040c /* Parameters: u_int u_frac*0x10 v_int v_frac*0x10 */ + +/****************************************** +Object NV_IMAGE_FROM_CPU used on: NV04 +*/ +#define NV_IMAGE_FROM_CPU 0x00000061 +# define NV_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180 +# define NV_IMAGE_FROM_CPU_CLIP_RECTANGLE 0x00000188 +# define NV_IMAGE_FROM_CPU_PATTERN 0x0000018c +# define NV_IMAGE_FROM_CPU_ROP 0x00000190 +# define NV_IMAGE_FROM_CPU_SURFACE 0x0000019c +# define NV_IMAGE_FROM_CPU_OPERATION 0x000002fc +# define NV_IMAGE_FROM_CPU_FORMAT 0x00000300 + +/****************************************** +Object NV05_IMAGE_FROM_CPU used on: NV04 +*/ +#define NV05_IMAGE_FROM_CPU 0x00000065 +# define NV05_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180 +# define NV05_IMAGE_FROM_CPU_CLIP_RECTANGLE 0x00000188 +# define NV05_IMAGE_FROM_CPU_PATTERN 0x0000018c +# define NV05_IMAGE_FROM_CPU_ROP 0x00000190 +# define NV05_IMAGE_FROM_CPU_SURFACE 0x0000019c +# define NV05_IMAGE_FROM_CPU_OPERATION 0x000002fc +# define NV05_IMAGE_FROM_CPU_FORMAT 0x00000300 +# define NV05_IMAGE_FROM_CPU_POINT 0x00000304 /* Parameters: x y */ +# define NV05_IMAGE_FROM_CPU_SIZE_OUT 0x00000308 /* Parameters: x y */ +# define NV05_IMAGE_FROM_CPU_SIZE_IN 0x0000030c /* Parameters: x y */ +# define NV05_IMAGE_FROM_CPU_COLOR( d) (0x00000400 + d * 0x0004) + +/****************************************** +Object NV_IMAGE_BLIT used on: NV04 NV10 NV15 NV20 +*/ +#define NV_IMAGE_BLIT 0x0000005f +# define NV_IMAGE_BLIT_DMA_NOTIFY 0x00000180 +# define NV_IMAGE_BLIT_COLOR_KEY 0x00000184 +# define NV_IMAGE_BLIT_CLIP_RECTANGLE 0x00000188 +# define NV_IMAGE_BLIT_PATTERN 0x0000018c +# define NV_IMAGE_BLIT_ROP5 0x00000190 +# define NV_IMAGE_BLIT_SURFACE 0x0000019c +# define NV_IMAGE_BLIT_OPERATION 0x000002fc +# define NV_IMAGE_BLIT_POINT_IN 0x00000300 /* Parameters: x y */ +# define NV_IMAGE_BLIT_POINT_OUT 0x00000304 /* Parameters: x y */ +# define NV_IMAGE_BLIT_SIZE 0x00000308 /* Parameters: width height */ + +/****************************************** +Object NV10_TCL_PRIMITIVE_3D used on: NV10 +*/ +#define NV10_TCL_PRIMITIVE_3D 0x00000056 +# define NV10_TCL_PRIMITIVE_3D_NOP 0x00000100 +# define NV10_TCL_PRIMITIVE_3D_NOTIFY 0x00000104 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_NOTIFY 0x00000180 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY0 0x00000184 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY1 0x00000188 +# define NV10_TCL_PRIMITIVE_3D_SET_DISPLAY_LIST 0x0000018c +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY2 0x00000194 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY3 0x00000198 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ 0x00000200 /* Parameters: width x */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_VERT 0x00000204 /* Parameters: height y */ +# define NV10_TCL_PRIMITIVE_3D_BUFFER_FORMAT 0x00000208 /* Parameters: type color */ +# define NV10_TCL_PRIMITIVE_3D_BUFFER_PITCH 0x0000020c /* Parameters: depth/stencil buffer pitch color buffer pitch */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_OFFSET 0x00000210 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_OFFSET 0x00000214 +# define NV10_TCL_PRIMITIVE_3D_TX_OFFSET(d) (0x00000218 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_TX_FORMAT(d) (0x00000220 + d * 0x0004) /* Parameters: wrap_t wrap_s log2(height) log2(width) lod npot format cube_map */ +# define NV10_TCL_PRIMITIVE_3D_TX_ENABLE(d) (0x00000228 + d * 0x0004) /* Parameters: enable anisotropy */ +# define NV10_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(d) (0x00000230 + d * 0x0004) /* Parameters: pitch */ +# define NV10_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(d) (0x00000240 + d * 0x0004) /* Parameters: width height */ +# define NV10_TCL_PRIMITIVE_3D_TX_FILTER(d) (0x00000248 + d * 0x0004) /* Parameters: mag_filter min_filter */ +# define NV10_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000260 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV10_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000268 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV10_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000278 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV10_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00000280 + d * 0x0004) /* Parameters: rc1_tx_units_enabled rc1_rc_enabled scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x000003e0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x00000540 + y * 0x0010 + x * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_RC_COLOR0 0x00000270 /* Parameters: a r g b */ +# define NV10_TCL_PRIMITIVE_3D_RC_COLOR1 0x00000274 /* Parameters: a r g b */ +# define NV10_TCL_PRIMITIVE_3D_RC_FINAL0 0x00000288 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV10_TCL_PRIMITIVE_3D_RC_FINAL1 0x0000028c /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL 0x00000294 /* Parameters: local_viewer color_control */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL 0x00000298 /* Parameters: specular diffuse ambient emission */ +# define NV10_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c +# define NV10_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 +# define NV10_TCL_PRIMITIVE_3D_FOG_ENABLE 0x000002a4 +# define NV10_TCL_PRIMITIVE_3D_FOG_COLOR 0x000002a8 /* Parameters: a b g r */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ +# define NV10_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE 0x00000300 +# define NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 +# define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c +# define NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 +# define NV10_TCL_PRIMITIVE_3D_LIGHTING_ENABLE 0x00000314 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE 0x00000318 +# define NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE 0x0000031c +# define NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_WEIGHT_ENABLE 0x00000328 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE 0x0000032c +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC 0x0000033c +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00000340 +# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000344 +# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000348 +# define NV10_TCL_PRIMITIVE_3D_BLEND_COLOR 0x0000034c /* Parameters: a r g b */ +# define NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 +# define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: r g b */ +# define NV10_TCL_PRIMITIVE_3D_DEPTH_MASK 0x0000035c +# define NV10_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_MASK 0x0000036c +# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL 0x00000370 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_ZFAIL 0x00000374 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_ZPASS 0x00000378 +# define NV10_TCL_PRIMITIVE_3D_SHADE_MODEL 0x0000037c +# define NV10_TCL_PRIMITIVE_3D_LINE_WIDTH 0x00000380 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR 0x00000384 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_UNITS 0x00000388 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x0000038c +# define NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK 0x00000390 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 +# define NV10_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c +# define NV10_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 +# define NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 +# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA 0x000003b4 +# define NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL 0x000003b8 /* Parameters: color_control */ +# define NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE( d) (0x000003c0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_VIEW_MATRIX_ENABLE 0x000003e8 /* Parameters: projection modelview0 modelview1 */ +# define NV10_TCL_PRIMITIVE_3D_POINT_SIZE 0x000003ec +# define NV10_TCL_PRIMITIVE_3D_MODELVIEW0_MATRIX( d) (0x00000400 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_MODELVIEW1_MATRIX( d) (0x00000440 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW0_MATRIX( d) (0x00000480 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW1_MATRIX( d) (0x000004c0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX( d) (0x00000500 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(d) (0x00000600 + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_B(d) (0x00000604 + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_C(d) (0x00000608 + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_D(d) (0x0000060c + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x00000680 +# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x00000684 +# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x00000688 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_A 0x000006a0 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_B 0x000006a4 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_C 0x000006a8 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_D 0x000006ac +# define NV10_TCL_PRIMITIVE_3D_SHININESS_E 0x000006b0 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_F 0x000006b4 +# define NV10_TCL_PRIMITIVE_3D_MATERIAL_AMBIENT_EMISSION 0x000006c4 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X 0x000006e8 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Y 0x000006ec +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Z 0x000006f0 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_W 0x000006f4 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x000006f8 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x000006fc +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00000700 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_D 0x00000704 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_E 0x00000708 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x0000070c +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000710 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000714 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(d) (0x00000800 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(d) (0x0000080c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(d) (0x00000818 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR(d) (0x00000828 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION0(d) (0x00000834 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_LIGHT(d) (0x00000840 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION1(d) (0x0000085c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_NORMAL(d) (0x00000868 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00000c00 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00000c04 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00000c08 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_X 0x00000c18 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Y 0x00000c1c +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Z 0x00000c20 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_W 0x00000c24 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_X 0x00000c30 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Y 0x00000c34 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Z 0x00000c38 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00000c40 /* Parameters: y x */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00000c44 /* Parameters: z */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_R 0x00000c50 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_G 0x00000c54 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_B 0x00000c58 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_A 0x00000c5c +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_R 0x00000c60 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_G 0x00000c64 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_B 0x00000c68 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4I 0x00000c6c /* Parameters: a b g r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_R 0x00000c80 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_G 0x00000c84 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_B 0x00000c88 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3I 0x00000c8c /* Parameters: a b g r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x00000c90 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_T 0x00000c94 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2I 0x00000c98 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_S 0x00000ca0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_T 0x00000ca4 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_R 0x00000ca8 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_Q 0x00000cac +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_ST 0x00000cb0 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_RQ 0x00000cb4 /* Parameters: q r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S 0x00000cb8 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_T 0x00000cbc +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2I 0x00000cc0 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_S 0x00000cc8 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_T 0x00000ccc +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_R 0x00000cd0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_Q 0x00000cd4 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_ST 0x00000cd8 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_RQ 0x00000cdc /* Parameters: q r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00000ce0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_WGH_1F 0x00000ce4 +# define NV10_TCL_PRIMITIVE_3D_EDGEFLAG_ENABLE 0x00000cec +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_VALIDATE 0x00000cf0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_POS 0x00000d00 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_POS 0x00000d04 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_COL 0x00000d08 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_COL 0x00000d0c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_COL2 0x00000d10 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_COL2 0x00000d14 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_TX0 0x00000d18 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_TX0 0x00000d1c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_TX1 0x00000d20 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_TX1 0x00000d24 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_NOR 0x00000d28 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_NOR 0x00000d2c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_WGH 0x00000d30 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_WGH 0x00000d34 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_FOG 0x00000d38 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_FOG 0x00000d3c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40 +# define NV10_TCL_PRIMITIVE_3D_LOGIC_OP 0x00000d44 +# define NV10_TCL_PRIMITIVE_3D_BEGIN_END 0x00000dfc +# define NV10_TCL_PRIMITIVE_3D_INDEX_DATA 0x00000e00 /* Parameters: index1 index0 */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_BEGIN_END 0x000013fc +# define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_DRAW_ARRAYS 0x00001400 /* Parameters: count-1 first */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X 0x00001638 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Y 0x0000163c +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Z 0x00001640 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_W 0x00001644 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA 0x00001800 + +/****************************************** +Object NV15_TCL_PRIMITIVE_3D used on: NV15 +*/ +#define NV15_TCL_PRIMITIVE_3D 0x00000096 +# define NV10_TCL_PRIMITIVE_3D_NOP 0x00000100 +# define NV10_TCL_PRIMITIVE_3D_NOTIFY 0x00000104 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_NOTIFY 0x00000180 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY0 0x00000184 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY1 0x00000188 +# define NV10_TCL_PRIMITIVE_3D_SET_DISPLAY_LIST 0x0000018c +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY2 0x00000194 +# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY3 0x00000198 +# define NV17_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY4 0x000001ac +# define NV17_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY5 0x000001b0 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ 0x00000200 /* Parameters: width x */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_VERT 0x00000204 /* Parameters: height y */ +# define NV10_TCL_PRIMITIVE_3D_BUFFER_FORMAT 0x00000208 /* Parameters: type color */ +# define NV10_TCL_PRIMITIVE_3D_BUFFER_PITCH 0x0000020c /* Parameters: depth/stencil buffer pitch color buffer pitch */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_OFFSET 0x00000210 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_OFFSET 0x00000214 +# define NV10_TCL_PRIMITIVE_3D_TX_OFFSET(d) (0x00000218 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_TX_FORMAT(d) (0x00000220 + d * 0x0004) /* Parameters: wrap_t wrap_s log2(height) log2(width) lod npot format cube_map */ +# define NV10_TCL_PRIMITIVE_3D_TX_ENABLE(d) (0x00000228 + d * 0x0004) /* Parameters: enable anisotropy */ +# define NV10_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(d) (0x00000230 + d * 0x0004) /* Parameters: pitch */ +# define NV10_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(d) (0x00000240 + d * 0x0004) /* Parameters: width height */ +# define NV10_TCL_PRIMITIVE_3D_TX_FILTER(d) (0x00000248 + d * 0x0004) /* Parameters: mag_filter min_filter */ +# define NV10_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000260 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV10_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000268 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV10_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000278 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV10_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00000280 + d * 0x0004) /* Parameters: rc1_tx_units_enabled rc1_rc_enabled scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x000003e0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x00000540 + y * 0x0010 + x * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_RC_COLOR0 0x00000270 /* Parameters: a r g b */ +# define NV10_TCL_PRIMITIVE_3D_RC_COLOR1 0x00000274 /* Parameters: a r g b */ +# define NV10_TCL_PRIMITIVE_3D_RC_FINAL0 0x00000288 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV10_TCL_PRIMITIVE_3D_RC_FINAL1 0x0000028c /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL 0x00000294 /* Parameters: local_viewer color_control */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL 0x00000298 /* Parameters: specular diffuse ambient emission */ +# define NV10_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c +# define NV10_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 +# define NV10_TCL_PRIMITIVE_3D_FOG_ENABLE 0x000002a4 +# define NV10_TCL_PRIMITIVE_3D_FOG_COLOR 0x000002a8 /* Parameters: a b g r */ +# define NV17_TCL_PRIMITIVE_3D_COLOR_MASK_ENABLE 0x000002bc +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ +# define NV10_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE 0x00000300 +# define NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 +# define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c +# define NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 +# define NV10_TCL_PRIMITIVE_3D_LIGHTING_ENABLE 0x00000314 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE 0x00000318 +# define NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE 0x0000031c +# define NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_WEIGHT_ENABLE 0x00000328 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE 0x0000032c +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC 0x0000033c +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00000340 +# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000344 +# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000348 +# define NV10_TCL_PRIMITIVE_3D_BLEND_COLOR 0x0000034c /* Parameters: a r g b */ +# define NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 +# define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: r g b */ +# define NV10_TCL_PRIMITIVE_3D_DEPTH_MASK 0x0000035c +# define NV10_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_MASK 0x0000036c +# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL 0x00000370 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_ZFAIL 0x00000374 +# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_ZPASS 0x00000378 +# define NV10_TCL_PRIMITIVE_3D_SHADE_MODEL 0x0000037c +# define NV10_TCL_PRIMITIVE_3D_LINE_WIDTH 0x00000380 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR 0x00000384 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_UNITS 0x00000388 +# define NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x0000038c +# define NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK 0x00000390 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 +# define NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 +# define NV10_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c +# define NV10_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 +# define NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 +# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA 0x000003b4 +# define NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL 0x000003b8 /* Parameters: color_control */ +# define NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE( d) (0x000003c0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_VIEW_MATRIX_ENABLE 0x000003e8 /* Parameters: projection modelview0 modelview1 */ +# define NV10_TCL_PRIMITIVE_3D_POINT_SIZE 0x000003ec +# define NV10_TCL_PRIMITIVE_3D_MODELVIEW0_MATRIX( d) (0x00000400 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_MODELVIEW1_MATRIX( d) (0x00000440 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW0_MATRIX( d) (0x00000480 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW1_MATRIX( d) (0x000004c0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX( d) (0x00000500 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(d) (0x00000600 + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_B(d) (0x00000604 + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_C(d) (0x00000608 + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_D(d) (0x0000060c + d * 0x0010) +# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x00000680 +# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x00000684 +# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x00000688 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_A 0x000006a0 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_B 0x000006a4 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_C 0x000006a8 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_D 0x000006ac +# define NV10_TCL_PRIMITIVE_3D_SHININESS_E 0x000006b0 +# define NV10_TCL_PRIMITIVE_3D_SHININESS_F 0x000006b4 +# define NV10_TCL_PRIMITIVE_3D_MATERIAL_AMBIENT_EMISSION 0x000006c4 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X 0x000006e8 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Y 0x000006ec +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Z 0x000006f0 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_W 0x000006f4 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x000006f8 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x000006fc +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00000700 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_D 0x00000704 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_E 0x00000708 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x0000070c +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000710 +# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000714 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(d) (0x00000800 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(d) (0x0000080c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(d) (0x00000818 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR(d) (0x00000828 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION0(d) (0x00000834 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_LIGHT(d) (0x00000840 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION1(d) (0x0000085c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_NORMAL(d) (0x00000868 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00000c00 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00000c04 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00000c08 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_X 0x00000c18 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Y 0x00000c1c +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Z 0x00000c20 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_W 0x00000c24 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_X 0x00000c30 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Y 0x00000c34 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Z 0x00000c38 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00000c40 /* Parameters: y x */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00000c44 /* Parameters: z */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_R 0x00000c50 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_G 0x00000c54 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_B 0x00000c58 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_A 0x00000c5c +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_R 0x00000c60 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_G 0x00000c64 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_B 0x00000c68 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4I 0x00000c6c /* Parameters: a b g r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_R 0x00000c80 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_G 0x00000c84 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_B 0x00000c88 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3I 0x00000c8c /* Parameters: a b g r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x00000c90 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_T 0x00000c94 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2I 0x00000c98 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_S 0x00000ca0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_T 0x00000ca4 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_R 0x00000ca8 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_Q 0x00000cac +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_ST 0x00000cb0 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_RQ 0x00000cb4 /* Parameters: q r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S 0x00000cb8 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_T 0x00000cbc +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2I 0x00000cc0 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_S 0x00000cc8 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_T 0x00000ccc +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_R 0x00000cd0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_Q 0x00000cd4 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_ST 0x00000cd8 /* Parameters: t s */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_RQ 0x00000cdc /* Parameters: q r */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00000ce0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_WGH_1F 0x00000ce4 +# define NV10_TCL_PRIMITIVE_3D_EDGEFLAG_ENABLE 0x00000cec +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ATTR( d) (0x00000d04 + d * 0x0008) +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_VALIDATE 0x00000cf0 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_POS 0x00000d00 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_POS 0x00000d04 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_COL 0x00000d08 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_COL 0x00000d0c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_COL2 0x00000d10 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_COL2 0x00000d14 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_TX0 0x00000d18 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_TX0 0x00000d1c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_TX1 0x00000d20 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_TX1 0x00000d24 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_NOR 0x00000d28 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_NOR 0x00000d2c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_WGH 0x00000d30 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_WGH 0x00000d34 /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_FOG 0x00000d38 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_FOG 0x00000d3c /* Parameters: stride fields type */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40 +# define NV10_TCL_PRIMITIVE_3D_LOGIC_OP 0x00000d44 +# define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_PITCH 0x00000d5c /* Parameters: pitch */ +# define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_OFFSET 0x00000d60 +# define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_FILL_VALUE 0x00000d68 +# define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_CLEAR_ENABLE 0x00000d6c +# define NV10_TCL_PRIMITIVE_3D_BEGIN_END 0x00000dfc +# define NV10_TCL_PRIMITIVE_3D_INDEX_DATA 0x00000e00 /* Parameters: index1 index0 */ +# define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_BEGIN_END 0x000013fc +# define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_DRAW_ARRAYS 0x00001400 /* Parameters: count-1 first */ +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X 0x00001638 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Y 0x0000163c +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Z 0x00001640 +# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_W 0x00001644 +# define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_ENABLE 0x00001658 +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA 0x00001800 + +/****************************************** +Object NV10_IMAGE_FROM_CPU used on: NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV10_IMAGE_FROM_CPU 0x0000008a +# define NV10_IMAGE_FROM_CPU_SET_DMA_NOTIFY 0x00000180 +# define NV10_IMAGE_FROM_CPU_SET_CONTEXT_CLIP_RECTANGLE 0x00000188 +# define NV10_IMAGE_FROM_CPU_SET_IMAGE_PATTERN 0x0000018c +# define NV10_IMAGE_FROM_CPU_SET_RASTER_OP 0x00000190 +# define NV10_IMAGE_FROM_CPU_SET_CONTEXT_SURFACES_2D 0x0000019c +# define NV10_IMAGE_FROM_CPU_OPERATION 0x000002fc +# define NV10_IMAGE_FROM_CPU_FORMAT 0x00000300 +# define NV10_IMAGE_FROM_CPU_POINT 0x00000304 /* Parameters: x y */ +# define NV10_IMAGE_FROM_CPU_SIZE_OUT 0x00000308 /* Parameters: width height */ +# define NV10_IMAGE_FROM_CPU_SIZE_IN 0x0000030c /* Parameters: width height */ +# define NV10_IMAGE_FROM_CPU_HLINE 0x00000400 + +/****************************************** +Object NV10_PRIMITIVE_2D used on: NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV10_PRIMITIVE_2D 0x0000007b +# define NV10_PRIMITIVE_2D_SET_DMA_NOTIFY 0x00000180 +# define NV10_PRIMITIVE_2D_SET_SURFACE 0x00000184 +# define NV10_PRIMITIVE_2D_SET_FORMAT 0x00000300 +# define NV10_PRIMITIVE_2D_SET_POINT 0x00000304 /* Parameters: x y */ +# define NV10_PRIMITIVE_2D_SET_SIZE 0x00000308 /* Parameters: width height */ +# define NV10_PRIMITIVE_2D_SET_CLIP_HORIZ 0x0000030c /* Parameters: width x */ +# define NV10_PRIMITIVE_2D_SET_CLIP_VERT 0x00000310 /* Parameters: height y */ +# define NV10_PRIMITIVE_2D_SET_DATA( d) (0x00000400 + d * 0x0004) + +/****************************************** +Object NV10_IMAGE_BLIT used on: NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV10_IMAGE_BLIT 0x0000009f +# define NV10_IMAGE_BLIT_NOP 0x00000100 +# define NV10_IMAGE_BLIT_NOTIFY 0x00000104 +# define NV10_IMAGE_BLIT_SET_DMA_NOTIFY 0x00000180 +# define NV10_IMAGE_BLIT_SET_CONTEXT_CLIP_RECTANGLE 0x00000188 +# define NV10_IMAGE_BLIT_SET_IMAGE_PATTERN 0x0000018c +# define NV10_IMAGE_BLIT_SET_RASTER_OP 0x00000190 +# define NV10_IMAGE_BLIT_SET_CONTEXT_SURFACES_2D 0x0000019c +# define NV10_IMAGE_BLIT_SET_OPERATION 0x000002fc +# define NV10_IMAGE_BLIT_SET_POINT 0x00000300 /* Parameters: x y */ +# define NV10_IMAGE_BLIT_SET_PITCH 0x00000304 /* Parameters: skip */ +# define NV10_IMAGE_BLIT_SET_SIZE 0x00000308 /* Parameters: width height */ + +/****************************************** +Object NV10_VIDEO_DISPLAY used on: NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV10_VIDEO_DISPLAY 0x0000007c +# define NV10_VIDEO_DISPLAY_COUNTER 0x00000050 +# define NV10_VIDEO_DISPLAY_SET_DMA_FROM_MEMORY 0x00000180 +# define NV10_VIDEO_DISPLAY_SET_DMA_IN_MEMORY0 0x00000184 +# define NV10_VIDEO_DISPLAY_SET_DMA_IN_MEMORY1 0x00000188 +# define NV10_VIDEO_DISPLAY_SET_OBJECT3 0x0000019c +# define NV10_VIDEO_DISPLAY_SIZE 0x000002f8 /* Parameters: height width */ +# define NV10_VIDEO_DISPLAY_OFFSET 0x00000300 + +/****************************************** +Object NV10_UNK0072 used on: NV10 NV15 NV20 NV40 G70 +*/ +#define NV10_UNK0072 0x00000072 +# define NV10_UNK0072_COUNTER 0x00000050 +# define NV10_UNK0072_SET_DMA_NOTIFY 0x00000180 + +/****************************************** +Object NV10_SCALED_IMAGE_FROM_MEMORY used on: NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV10_SCALED_IMAGE_FROM_MEMORY 0x00000089 +# define NV10_SCALED_IMAGE_FROM_MEMORY_COUNTER 0x00000050 +# define NV10_SCALED_IMAGE_FROM_MEMORY_SET_DMA_IN_MEMORY 0x00000184 +# define NV10_SCALED_IMAGE_FROM_MEMORY_SET_RASTER_OP 0x0000018c +# define NV10_SCALED_IMAGE_FROM_MEMORY_SET_IMAGE_PATTERN 0x00000188 +# define NV10_SCALED_IMAGE_FROM_MEMORY_SET_SURFACE 0x00000198 +# define NV10_SCALED_IMAGE_FROM_MEMORY_OPERATION 0x00000304 +# define NV10_SCALED_IMAGE_FROM_MEMORY_CLIP_POS 0x00000308 /* Parameters: x y */ +# define NV10_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE 0x0000030c /* Parameters: width height */ +# define NV10_SCALED_IMAGE_FROM_MEMORY_OUT_POS 0x00000310 /* Parameters: x y */ +# define NV10_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE 0x00000314 /* Parameters: width height */ +# define NV10_SCALED_IMAGE_FROM_MEMORY_SIZE 0x00000400 /* Parameters: width height */ +# define NV10_SCALED_IMAGE_FROM_MEMORY_FORMAT 0x00000404 /* Parameters: pitch */ +# define NV10_SCALED_IMAGE_FROM_MEMORY_OFFSET 0x00000408 +# define NV10_SCALED_IMAGE_FROM_MEMORY_POINT 0x0000040c /* Parameters: u_int u_frac*0x10 v_int v_frac*0x10 */ + +/****************************************** +Object NV10_CONTEXT_SURFACES_2D used on: NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV10_CONTEXT_SURFACES_2D 0x00000062 +# define NV10_CONTEXT_SURFACES_2D_SET_DMA_NOTIFY 0x00000180 +# define NV10_CONTEXT_SURFACES_2D_SET_DMA_IN_MEMORY0 0x00000184 +# define NV10_CONTEXT_SURFACES_2D_SET_DMA_IN_MEMORY1 0x00000188 +# define NV10_CONTEXT_SURFACES_2D_FORMAT 0x00000300 /* Parameters: color type width height */ +# define NV10_CONTEXT_SURFACES_2D_PITCH 0x00000304 /* Parameters: src dst */ +# define NV10_CONTEXT_SURFACES_2D_OFFSET_SRC 0x00000308 +# define NV10_CONTEXT_SURFACES_2D_OFFSET_DST 0x0000030c + +/****************************************** +Object NV04_SURFACE used on: NV04 NV10 NV15 +*/ +#define NV04_SURFACE 0x00000042 +# define NV04_SURFACE_NOTIFY 0x00000104 +# define NV04_SURFACE_DMA_NOTIFY 0x00000180 +# define NV04_SURFACE_DMA_IMAGE_SOURCE 0x00000184 +# define NV04_SURFACE_DMA_IMAGE_DESTIN 0x00000188 +# define NV04_SURFACE_FORMAT 0x00000300 +# define NV04_SURFACE_PITCH 0x00000304 /* Parameters: source destin */ +# define NV04_SURFACE_OFFSET_SOURCE 0x00000308 +# define NV04_SURFACE_OFFSET_DESTIN 0x0000030c + +/****************************************** +Object NV04_IMAGE_PATTERN used on: NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV04_IMAGE_PATTERN 0x00000044 +# define NV04_IMAGE_PATTERN_COLOR_FORMAT 0x00000300 +# define NV04_IMAGE_PATTERN_MONO_FORMAT 0x00000304 +# define NV04_IMAGE_PATTERN_SELECT 0x0000030c +# define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE 0x00000308 +# define NV04_IMAGE_PATTERN_MONOCHROME_COLOR0 0x00000310 +# define NV04_IMAGE_PATTERN_MONOCHROME_COLOR1 0x00000314 +# define NV04_IMAGE_PATTERN_MONOCHROME_PATTERN0 0x00000318 +# define NV04_IMAGE_PATTERN_MONOCHROME_PATTERN1 0x0000031c + +/****************************************** +Object NV20_SWIZZLED_SURFACE used on: NV20 NV30 NV40 G70 +*/ +#define NV20_SWIZZLED_SURFACE 0x0000009e +# define NV20_SWIZZLED_SURFACE_SET_OBJECT0 0x00000180 +# define NV20_SWIZZLED_SURFACE_SET_OBJECT1 0x00000184 +# define NV20_SWIZZLED_SURFACE_FORMAT 0x00000300 /* Parameters: log2(height) log2(width) color */ +# define NV20_SWIZZLED_SURFACE_OFFSET 0x00000304 + +/****************************************** +Object NV20_TCL_PRIMITIVE_3D used on: NV20 +*/ +#define NV20_TCL_PRIMITIVE_3D 0x00000097 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT0 0x00000180 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT1 0x00000184 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT2 0x00000188 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT3 0x00000194 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT4 0x00000198 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT5 0x0000019c +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT6 0x000001a0 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT7 0x000001a4 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT8 0x000001a8 +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT9 0x000001ac +# define NV20_TCL_PRIMITIVE_3D_SET_OBJECT10 0x000001b0 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ 0x00000200 /* Parameters: width x */ +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_VERT 0x00000204 /* Parameters: height y */ +# define NV20_TCL_PRIMITIVE_3D_BUFFER_FORMAT 0x00000208 /* Parameters: type color */ +# define NV20_TCL_PRIMITIVE_3D_BUFFER_PITCH 0x0000020c /* Parameters: depth/stencil buffer pitch color buffer pitch */ +# define NV20_TCL_PRIMITIVE_3D_COLOR_OFFSET 0x00000210 +# define NV20_TCL_PRIMITIVE_3D_DEPTH_OFFSET 0x00000214 +# define NV20_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_PITCH 0x0000022c /* Parameters: pitch */ +# define NV20_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_OFFSET 0x00000230 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_CONTROL 0x00000294 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_CONTROL 0x00000298 /* Parameters: back_specular back_ambient back_diffuse back_emission front_specular front_ambient front_diffuse front_emission */ +# define NV20_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c +# define NV20_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 +# define NV20_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE 0x00000300 +# define NV20_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 +# define NV20_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 +# define NV20_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c +# define NV20_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 +# define NV20_TCL_PRIMITIVE_3D_LIGHTING_ENABLE 0x00000314 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE 0x00000318 +# define NV20_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 +# define NV20_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE 0x0000032c +# define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 +# define NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC 0x0000033c +# define NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00000340 +# define NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000344 +# define NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000348 +# define NV20_TCL_PRIMITIVE_3D_BLEND_COLOR 0x0000034c /* Parameters: a r g b */ +# define NV20_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 +# define NV20_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: a r g b */ +# define NV20_TCL_PRIMITIVE_3D_DEPTH_MASK 0x0000035c +# define NV20_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 +# define NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 +# define NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 +# define NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_MASK 0x0000036c +# define NV20_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL 0x00000370 +# define NV20_TCL_PRIMITIVE_3D_STENCIL_OP_ZFAIL 0x00000374 +# define NV20_TCL_PRIMITIVE_3D_STENCIL_OP_ZPASS 0x00000378 +# define NV20_TCL_PRIMITIVE_3D_SHADE_MODEL 0x0000037c +# define NV20_TCL_PRIMITIVE_3D_LINE_WIDTH 0x00000380 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR 0x00000384 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_UNITS 0x00000388 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x0000038c +# define NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK 0x00000390 +# define NV20_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 +# define NV20_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 +# define NV20_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c +# define NV20_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 +# define NV20_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT 0x000003a8 +# define NV20_TCL_PRIMITIVE_3D_SEPARATE_SPECULAR_ENABLE 0x000003b8 +# define NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ +# define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x000003c0 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x00000420 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_POINT_SIZE 0x0000043c +# define NV20_TCL_PRIMITIVE_3D_MODELVIEW_MATRIX( d) (0x00000480 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW_MATRIX( d) (0x00000580 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_PROJECTION_MATRIX( d) (0x00000680 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x000006c0 + y * 0x0010 + x * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_A(d) (0x00000840 + d * 0x0010) +# define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_B(d) (0x00000844 + d * 0x0010) +# define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_C(d) (0x00000848 + d * 0x0010) +# define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_D(d) (0x0000084c + d * 0x0010) +# define NV20_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x000009c0 +# define NV20_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x000009c4 +# define NV20_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x000009c8 +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS 0x000009e0 +# define NV20_TCL_PRIMITIVE_3D_POINT_SPRITE 0x00000a1c /* Parameters: coord_replace r_mode enable */ +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x00000a30 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x00000a34 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00000a38 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_D 0x00000a3c +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_E 0x00000a40 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x00000a44 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000a48 +# define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000a4c +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST0 0x00000b00 +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST1 0x00000b04 +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST2 0x00000b08 +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST3 0x00000b0c +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_X 0x00000b80 +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_Y 0x00000b84 +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_Z 0x00000b88 +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_W 0x00000b8c +# define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_ID 0x00001ea4 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x00000a10 +# define NV20_TCL_PRIMITIVE_3D_TX_OFFSET(d) (0x00001b00 + d * 0x0040) +# define NV20_TCL_PRIMITIVE_3D_TX_FORMAT(d) (0x00001b04 + d * 0x0040) /* Parameters: log2(height) log2(width) lod format cube_map */ +# define NV20_TCL_PRIMITIVE_3D_TX_ENABLE(d) (0x00001b0c + d * 0x0040) /* Parameters: enable anisotropy */ +# define NV20_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(d) (0x00001b10 + d * 0x0040) /* Parameters: pitch */ +# define NV20_TCL_PRIMITIVE_3D_TX_FILTER(d) (0x00001b14 + d * 0x0040) /* Parameters: mag_filter min_filter */ +# define NV20_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(d) (0x00001b1c + d * 0x0040) /* Parameters: width height */ +# define NV20_TCL_PRIMITIVE_3D_TX_SHADER_OP 0x00001e70 /* Parameters: op0 op1 op2 op3 */ +# define NV20_TCL_PRIMITIVE_3D_TX_SHADER_CULL_MODE 0x000017f8 /* Parameters: cull0 cull1 cull2 cull3 */ +# define NV20_TCL_PRIMITIVE_3D_TX_SHADER_PREVIOUS 0x00001e78 /* Parameters: prev2 prev3 */ +# define NV20_TCL_PRIMITIVE_3D_RC_COLOR0 0x00001e20 /* Parameters: a r g b */ +# define NV20_TCL_PRIMITIVE_3D_RC_COLOR1 0x00001e24 /* Parameters: a r g b */ +# define NV20_TCL_PRIMITIVE_3D_RC_FINAL0 0x00000288 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV20_TCL_PRIMITIVE_3D_RC_FINAL1 0x0000028c /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ +# define NV20_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000260 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV20_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000ac0 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV20_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000aa0 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV20_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00001e40 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000105c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00001060 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00001064 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_HVEC_AND_DIR(d) (0x00001028 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(d) (0x00001000 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00001004 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_C(d) (0x00001008 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(d) (0x0000100c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00001010 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_C(d) (0x00001014 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(d) (0x00001018 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x0000101c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_C(d) (0x00001020 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_AMBIENT(d) (0x00000c00 + d * 0x0040) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_DIFFUSE(d) (0x00000c0c + d * 0x0040) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_SPECULAR(d) (0x00000c18 + d * 0x0040) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(d) (0x00001068 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(d) (0x0000106c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(d) (0x00001070 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(d) (0x00001040 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(d) (0x00001044 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(d) (0x00001048 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(d) (0x0000104c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(d) (0x00001050 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(d) (0x00001054 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(d) (0x00001058 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS 0x00001e28 +# define NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE 0x0000147c +# define NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN(d) (0x00001480 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00001500 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00001504 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00001508 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_4F_X 0x00001518 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Y 0x0000151c +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Z 0x00001520 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_4F_W 0x00001524 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_4I_XY 0x00001528 /* Parameters: y x */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_4I_ZW 0x0000152c /* Parameters: w z */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_X 0x00001530 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Y 0x00001534 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Z 0x00001538 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00001540 /* Parameters: y x */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00001544 /* Parameters: z */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_4F_R 0x00001550 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_4F_G 0x00001554 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_4F_B 0x00001558 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_4F_A 0x0000155c +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_3F_R 0x00001560 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_3F_G 0x00001564 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_3F_B 0x00001568 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL_4I 0x0000156c /* Parameters: a b g r */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_R 0x00001580 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_G 0x00001584 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_B 0x00001588 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_COL2_3I 0x0000158c /* Parameters: a b g r */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x00001590 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_T 0x00001594 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_2I 0x00001598 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_S 0x000015a0 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_T 0x000015a4 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_R 0x000015a8 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_Q 0x000015ac +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_ST 0x000015b0 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_RQ 0x000015b4 /* Parameters: q r */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S 0x000015b8 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_T 0x000015bc +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_2I 0x000015c0 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_S 0x000015c8 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_T 0x000015cc +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_R 0x000015d0 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_Q 0x000015d4 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_ST 0x000015d8 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_RQ 0x000015dc /* Parameters: q r */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_2F_S 0x000015e0 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_2F_T 0x000015e4 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_2I 0x000015e8 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_S 0x000015f0 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_T 0x000015f4 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_R 0x000015f8 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_Q 0x000015fc +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_4I_ST 0x00001600 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX2_4I_RQ 0x00001604 /* Parameters: q r */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_2F_S 0x00001608 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_2F_T 0x0000160c +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_2I 0x00001610 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_S 0x00001620 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_T 0x00001624 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_R 0x00001628 +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_Q 0x0000162c +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_4I_ST 0x00001630 /* Parameters: t s */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_TX3_4I_RQ 0x00001634 /* Parameters: q r */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00001698 +# define NV20_TCL_PRIMITIVE_3D_EDGE_FLAG 0x000016bc +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR0_POS 0x00001720 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR1_WGH 0x00001724 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR2_NOR 0x00001728 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR3_COL 0x0000172c /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR4_COL2 0x00001730 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR5_FOG 0x00001734 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR6 0x00001738 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR7 0x0000173c /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR8_TX0 0x00001740 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR9_TX1 0x00001744 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR10_TX2 0x00001748 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR11_TX3 0x0000174c /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR12_TX4 0x00001750 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR13_TX5 0x00001754 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR14_TX6 0x00001758 /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VB_POINTER_ATTR15_TX7 0x0000175c /* Parameters: enabled? offset */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR( d) (0x00001760 + d * 0x0004) +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR0_POS 0x00001760 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR1_WGH 0x00001764 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR2_NOR 0x00001768 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR3_COL 0x0000176c /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR4_COL2 0x00001770 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR5_FOG 0x00001774 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR6 0x00001778 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR7 0x0000177c /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR8_TX0 0x00001780 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR9_TX1 0x00001784 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR10_TX2 0x00001788 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR11_TX3 0x0000178c /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR12_TX4 0x00001790 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR13_TX5 0x00001794 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR14_TX6 0x00001798 /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR15_TX7 0x0000179c /* Parameters: stride fields type */ +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x000017a0 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK 0x000017b0 +# define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x000017bc +# define NV20_TCL_PRIMITIVE_3D_LOGIC_OP 0x000017c0 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_TWO_SIDE_ENABLE 0x000017c4 +# define NV20_TCL_PRIMITIVE_3D_BEGIN_END 0x000017fc +# define NV20_TCL_PRIMITIVE_3D_CLEAR_COLOR 0x00001d90 +# define NV20_TCL_PRIMITIVE_3D_CLEAR_MASK 0x00001d94 /* Parameters: clear color a clear color b clear color g clear color r clear depth clear stencil */ +# define NV20_TCL_PRIMITIVE_3D_INDEX_DATA 0x00001800 /* Parameters: index1 index0 */ +# define NV20_TCL_PRIMITIVE_3D_VB_VERTEX_BATCH 0x00001810 /* Parameters: count_vertices offset_vertices */ +# define NV20_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001818 + +/****************************************** +Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 +*/ +#define NV30_TCL_PRIMITIVE_3D 0x00000097 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT0 0x00000180 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT1 0x00000184 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT2 0x00000188 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT3 0x0000018c +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT4 0x00000194 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT5 0x00000198 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT6 0x000001a4 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT7 0x000001a8 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT8 0x000001ac +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT9 0x000001b4 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT10 0x000001b8 +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT11 0x0000019c +# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT12 0x000001a0 +# define NV30_TCL_PRIMITIVE_3D_BUFFER0_PITCH 0x0000020c /* Parameters: depth/stencil buffer pitch color0 buffer pitch */ +# define NV30_TCL_PRIMITIVE_3D_COLOR0_OFFSET 0x00000210 +# define NV30_TCL_PRIMITIVE_3D_DEPTH_OFFSET 0x00000214 +# define NV30_TCL_PRIMITIVE_3D_COLOR1_OFFSET 0x00000218 +# define NV30_TCL_PRIMITIVE_3D_BUFFER1_PITCH 0x0000021c /* Parameters: color1 buffer pitch */ +# define NV30_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_PITCH 0x0000022c /* Parameters: pitch */ +# define NV30_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_OFFSET 0x00000230 +# define NV30_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x00000240 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_BUFFER2_PITCH 0x00000280 +# define NV30_TCL_PRIMITIVE_3D_BUFFER3_PITCH 0x00000284 +# define NV30_TCL_PRIMITIVE_3D_BUFFER2_OFFSET 0x00000288 +# define NV30_TCL_PRIMITIVE_3D_BUFFER3_OFFSET 0x0000028c +# define NV30_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000300 +# define NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000304 +# define NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC 0x00000308 +# define NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x0000030c +# define NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE 0x00000310 +# define NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000314 +# define NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000318 +# define NV30_TCL_PRIMITIVE_3D_BLEND_COLOR 0x0000031c /* Parameters: a r g b */ +# define NV30_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000320 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000324 /* Parameters: a r g b */ +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_ENABLE 0x00000328 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_MASK 0x0000032c +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_FUNC 0x00000330 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_REF 0x00000334 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_MASK 0x00000338 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL 0x0000033c +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_ZFAIL 0x00000340 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_ZPASS 0x00000344 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_ENABLE 0x00000348 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_MASK 0x0000034c +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_FUNC 0x00000350 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_REF 0x00000354 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_MASK 0x00000358 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL 0x0000035c +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_ZFAIL 0x00000360 +# define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_ZPASS 0x00000364 +# define NV30_TCL_PRIMITIVE_3D_SHADE_MODEL 0x00000368 +# define NV30_TCL_PRIMITIVE_3D_FOG_ENABLE 0x0000036c +# define NV40_TCL_PRIMITIVE_3D_COLOR_MASK_BUFFER123 0x00000370 /* Parameters: buffer3 b buffer3 g buffer3 r buffer3 a buffer2 b buffer2 g buffer2 r buffer2 a buffer1 b buffer1 g buffer1 r buffer1 a */ +# define NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x0000037c +# define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 +# define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 +# define NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH 0x000003b8 +# define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x00000400 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_MODELVIEW_MATRIX( d) (0x00000480 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW_MATRIX( d) (0x00000580 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_PROJECTION_MATRIX( d) (0x00000680 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x000006c0 + y * 0x0010 + x * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM 0x000008e4 +# define NV30_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000008c8 +# define NV30_TCL_PRIMITIVE_3D_FOG_MODE 0x000008cc +# define NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x000008d0 +# define NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x000008d4 +# define NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x000008d8 +# define NV30_TCL_PRIMITIVE_3D_RC_FINAL0 0x000008f4 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV30_TCL_PRIMITIVE_3D_RC_FINAL1 0x000008f8 /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ +# define NV30_TCL_PRIMITIVE_3D_RC_IN_ALPHA 0x00000900 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV30_TCL_PRIMITIVE_3D_RC_IN_RGB 0x00000904 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV30_TCL_PRIMITIVE_3D_RC_OUT_ALPHA 0x00000910 /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV30_TCL_PRIMITIVE_3D_RC_OUT_RGB 0x00000914 /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_DIM0 0x00000200 /* Parameters: width x_offset */ +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_DIM1 0x00000204 /* Parameters: height y_offset */ +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_OFS0 0x000002c0 /* Parameters: width x_offset */ +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_OFS1 0x000002c4 /* Parameters: height y_offset */ +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0 0x00000a00 /* Parameters: width x_offset */ +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_1 0x00000a04 /* Parameters: height y_offset */ +# define NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS 0x000008c0 /* Parameters: width x_offset */ +# define NV30_TCL_PRIMITIVE_3D_SCISSOR_HEIGHT_YPOS 0x000008c4 /* Parameters: height y_offset */ +# define NV30_TCL_PRIMITIVE_3D_POINT_SPRITE 0x00001ee8 /* Parameters: coord_replace r_mode enable */ +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x00001ec0 +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x00001ec4 +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00001ec8 +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_D 0x00001ecc +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_E 0x00001ed0 +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x00001ed4 +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00001ed8 +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00001edc +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_OX 0x00000a20 +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_OY 0x00000a24 +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_NPF_DIV2 0x00000a28 +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_UNK0_0x0 0x00000a2c +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_PX_DIV2 0x00000a30 +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_PY_DIV2 0x00000a34 +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_FMN_DIV2 0x00000a38 +# define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_UNK1_0x0 0x00000a3c +# define NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000a60 +# define NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000a64 +# define NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000a68 +# define NV30_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000a6c +# define NV30_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x00000a70 +# define NV30_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x00000a74 +# define NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR 0x00000a78 +# define NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_UNITS 0x00000a7c +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST0 0x00000b80 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST1 0x00000b84 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST2 0x00000b88 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST3 0x00000b8c +# define NV30_TCL_PRIMITIVE_3D_OCC_QUERY_OR_COLOR_BUFF_ENABLE 0x000017c8 +# define NV30_TCL_PRIMITIVE_3D_STORE_RESULT 0x00001800 +# define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_A(d) (0x00000e00 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_B(d) (0x00000e04 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_C(d) (0x00000e08 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_D(d) (0x00000e0c + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(d) (0x00001000 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00001004 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_C(d) (0x00001008 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(d) (0x0000100c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00001010 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_C(d) (0x00001014 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(d) (0x00001018 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x0000101c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_C(d) (0x00001020 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(d) (0x00001228 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(d) (0x0000122c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(d) (0x00001230 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(d) (0x00001200 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(d) (0x00001204 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(d) (0x00001208 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(d) (0x0000120c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(d) (0x00001210 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(d) (0x00001214 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(d) (0x00001218 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000121c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00001220 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00001224 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x00001420 /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ +# define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE 0x00001db4 +# define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN 0x00001db8 /* Parameters: factor pattern */ +# define NV30_TCL_PRIMITIVE_3D_BEGIN_END 0x00001808 +# define NV30_TCL_PRIMITIVE_3D_CULL_FACE 0x00001830 +# define NV30_TCL_PRIMITIVE_3D_FRONT_FACE 0x00001834 +# define NV30_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00001838 +# define NV30_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x0000183c +# define NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH 0x00001d8c +# define NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB 0x00001d90 /* Parameters: a r g b */ +# define NV30_TCL_PRIMITIVE_3D_CLEAR_WHICH_BUFFERS 0x00001d94 +# define NV30_TCL_PRIMITIVE_3D_DO_VERTICES 0x00001dac +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_FROM_ID 0x00001e9c +# define NV30_TCL_PRIMITIVE_3D_VP_PROGRAM_START_ID 0x00001ea0 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_ID 0x00001efc +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P0_X 0x00001f00 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P0_Y 0x00001f04 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P0_Z 0x00001f08 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P0_W 0x00001f0c +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P1_X 0x00001f10 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P1_Y 0x00001f14 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P1_Z 0x00001f18 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P1_W 0x00001f1c +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P2_X 0x00001f20 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P2_Y 0x00001f24 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P2_Z 0x00001f28 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P2_W 0x00001f2c +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P3_X 0x00001f30 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P3_Y 0x00001f34 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P3_Z 0x00001f38 +# define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_P3_W 0x00001f3c +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_3X(d) (0x00001500 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_3Y(d) (0x00001504 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_3Z(d) (0x00001508 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_3W(d) (0x0000150c + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4X(d) (0x00001c00 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4Y(d) (0x00001c04 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4Z(d) (0x00001c08 + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4W(d) (0x00001c0c + d * 0x0010) +# define NV30_TCL_PRIMITIVE_3D_VB_POINTER_ATTR(d) (0x00001680 + d * 0x0004) /* Parameters: enabled? offset */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00000a90 /* Parameters: y x */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00000a94 /* Parameters: z */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x000018c0 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_T 0x000018c4 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S 0x000018c8 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_T 0x000018cc +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX2_2F_S 0x000018d0 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX2_2F_T 0x000018d4 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX3_2F_S 0x000018d8 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX3_2F_T 0x000018dc +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX0_2I 0x00001920 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX1_2I 0x00001924 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX2_2I 0x00001928 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX3_2I 0x0000192c /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_COL_4I 0x0000194c /* Parameters: a b g r */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_COL2_3I 0x00001950 /* Parameters: a b g r */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_ST 0x000019c0 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_RQ 0x000019c4 /* Parameters: q r */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_ST 0x000019c8 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_RQ 0x000019cc /* Parameters: q r */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX2_4I_ST 0x000019d0 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX2_4I_RQ 0x000019d4 /* Parameters: q r */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX3_4I_ST 0x000019d8 /* Parameters: t s */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_TX3_4I_RQ 0x000019dc /* Parameters: q r */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00001e54 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_UNK_0 0x00001718 +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR( d) (0x00001740 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR0_POS 0x00001740 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR1_WGH 0x00001744 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR2_NOR 0x00001748 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR3_COL 0x0000174c /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR4_COL2 0x00001750 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR5_FOG 0x00001754 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR6 0x00001758 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR7 0x0000175c /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR8_TX0 0x00001760 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR9_TX1 0x00001764 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR10_TX2 0x00001768 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR11_TX3 0x0000176c /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR12_TX4 0x00001770 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR13_TX5 0x00001774 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR14_TX6 0x00001778 /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR15_TX7 0x0000177c /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM 0x000008e4 +# define NV30_TCL_PRIMITIVE_3D_TX_ADDRESS_UNIT(d) (0x00001a00 + d * 0x0020) +# define NV30_TCL_PRIMITIVE_3D_TX_FORMAT_UNIT(d) (0x00001a04 + d * 0x0020) /* Parameters: mipmap type format ncomp cubic */ +# define NV30_TCL_PRIMITIVE_3D_TX_WRAP_UNIT(d) (0x00001a08 + d * 0x0020) /* Parameters: wrap_s wrap_t wrap_r */ +# define NV30_TCL_PRIMITIVE_3D_TX_ENABLE_UNIT(d) (0x00001a0c + d * 0x0020) /* Parameters: nv40_enable nv30_enable anisotropy */ +# define NV30_TCL_PRIMITIVE_3D_TX_SWIZZLE_UNIT(d) (0x00001a10 + d * 0x0020) +# define NV30_TCL_PRIMITIVE_3D_TX_FILTER_UNIT(d) (0x00001a14 + d * 0x0020) /* Parameters: filter_min filter_mag */ +# define NV30_TCL_PRIMITIVE_3D_TX_XY_DIM_UNIT(d) (0x00001a18 + d * 0x0020) /* Parameters: width height */ +# define NV30_TCL_PRIMITIVE_3D_TX_UNK07_UNIT(d) (0x00001a1c + d * 0x0020) +# define NV30_TCL_PRIMITIVE_3D_TX_DEPTH_UNIT(d) (0x00001840 + d * 0x0004) /* Parameters: depth NPOT pitch */ +# define NV30_TCL_PRIMITIVE_3D_VB_VERTEX_BATCH 0x00001814 /* Parameters: count_vertices offset_vertices */ +# define NV30_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001818 +# define NV30_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE 0x00000374 +# define NV30_TCL_PRIMITIVE_3D_LOGIC_OP_OP 0x00000378 +# define NV30_TCL_PRIMITIVE_3D_SET_DISPLAY_LIST_MEM_OFFSET 0x0000181c +# define NV30_TCL_PRIMITIVE_3D_EXECUTE_DISPLAY_LIST 0x00001824 /* Parameters: length start offset */ +# define NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x00001828 +# define NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK 0x0000182c +# define NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE 0x0000147c +# define NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN( d) (0x00001480 + d * 0x0004) +# define NV30_TCL_PRIMITIVE_3D_SET_CLIPPING_PLANES 0x00001478 +# define NV30_TCL_PRIMITIVE_3D_VP_IN_REG 0x00001ff0 /* Parameters: vertex pos weight normal primary color secondary color fogcoord texture coords 0 texture ccords 1 texture coords 2 texture coords 3 texture coords 4 texture coords 5 texture coords 6 texture coords 7 */ +# define NV30_TCL_PRIMITIVE_3D_VP_OUT_REG 0x00001ff4 /* Parameters: primary color secondary color backface primary color backface secondary color fogcoord pointsize clip plane 0 clip plane 1 clip plane 2 clip plane 3 clip plane 4 clip plane 5 texture coords 0 texture coords 1 texture coords 2 texture coords 3 texture coords 4 texture coords 5 texture coords 6 texture coords 7 */ + +/****************************************** +Object NV30_CLEAR_BUFFER used on: NV30 NV40 G70 +*/ +#define NV30_CLEAR_BUFFER 0x00000066 +# define NV30_CLEAR_BUFFER_SET_DMA_NOTIFY 0x00000180 +# define NV30_CLEAR_BUFFER_SET_IMAGE_PATTERN 0x00000188 +# define NV30_CLEAR_BUFFER_SET_RASTER_OP 0x0000018c +# define NV30_CLEAR_BUFFER_SET_CONTEXT_SURFACE_2D 0x00000198 +# define NV30_CLEAR_BUFFER_UNK002fc 0x000002fc + +/****************************************** +Object NV_DMA_FROM_MEMORY used on: NV03 NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV_DMA_FROM_MEMORY 0x00000002 + +/****************************************** +Object NV_DMA_TO_MEMORY used on: NV03 NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV_DMA_TO_MEMORY 0x00000003 + +/****************************************** +Object NV_DMA_IN_MEMORY used on: NV03 NV04 NV10 NV15 NV20 NV30 NV40 G70 +*/ +#define NV_DMA_IN_MEMORY 0x0000003d + +/****************************************** +Object NvType0046 used on: NV04 +*/ +#define NvType0046 0x00000046 +# define NvType0046_DMA_NOTIFY 0x00000180 +# define NvType0046_DMA_MEM_1 0x00000184 +# define NvType0046_DMA_MEM_2 0x00000188 +# define NvType0046_DMA_3 0x0000018c +# define NvType0046_DMA_4 0x00000190 +# define NvType0046_OBJ_5 0x00000194 +# define NvType0046_OBJ_6 0x00000198 +# define NvType0046_PITCH1 0x00000304 +# define NvType0046_PITCH2 0x0000030c +# define NvType0046_SIZE 0x00000340 /* Parameters: width height */ +# define NvType0046_WIDTH 0x00000344 /* Parameters: visible_width blank_width */ +# define NvType0046_HSYNC 0x00000348 /* Parameters: hsync_start hsync_len */ +# define NvType0046_HEIGHT 0x0000034c /* Parameters: visible_height blank_height */ +# define NvType0046_VSYNC 0x00000350 /* Parameters: vsync_start vsync_len */ +# define NvType0046_FULL_SIZE 0x00000354 /* Parameters: full_width full_height */ +# define NvType0046_PIXEL_CLK 0x00000358 +# define NvType0046_FLAGS 0x0000035c /* Parameters: doublescan -hsync -vsync depth */ + +/****************************************** +Object NvType0047 used on: NV04 +*/ +#define NvType0047 0x00000047 +# define NvType0047_DMA_NOTIFY 0x00000180 +# define NvType0047_UNK19C 0x0000019c +# define NvType0047_UNK1A0 0x000001a0 +/****************************************** +Object NvType0049 used on: NV04 +*/ +#define NvType0049 0x00000049 +# define NvType0049_DMA_NOTIFY 0x00000180 +# define NvType0049_DMA_MEM_1 0x00000184 +# define NvType0049_DMA_MEM_2 0x00000188 +/****************************************** +Object NvType004D used on: NV04 +*/ +#define NvType004D 0x0000004d +# define NvType004D_DMA_NOTIFY 0x00000180 +# define NvType004D_DMA_MEM_1 0x00000184 +# define NvType004D_DMA_MEM_2 0x00000188 +# define NvType004D_DMA_MEM_3 0x0000018c +# define NvType004D_DMA_MEM_4 0x00000190 +#endif /* _NOUVEAU_REG_H */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c new file mode 100644 index 0000000000..a2a29fe431 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -0,0 +1,49 @@ +/************************************************************************** + +Copyright 2006 Stephane Marchesin +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" +#include "nouveau_screen.h" +#include "nouveau_object.h" + +static nouveauScreenPtr nouveauCreateScreen(__DRIscreenPrivate *sPriv) +{ + nouveauScreenPtr screen; + NOUVEAUDRIPtr dri_priv=(NOUVEAUDRIPtr)sPriv->pDevPriv; + + screen->card=nouveau_card_lookup(dri_priv->device_id); +} + +static GLboolean nouveauInitDriver(__DRIscreenPrivate *sPriv) +{ + sPriv->private = (void *) nouveauCreateScreen( sPriv ); + if ( !sPriv->private ) { + nouveauDestroyScreen( sPriv ); + return GL_FALSE; + } + + return GL_TRUE; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.h b/src/mesa/drivers/dri/nouveau/nouveau_screen.h index f6959419c5..decdafa86d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.h @@ -30,8 +30,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xmlconfig.h" +#include "nouveau_dri.h" +#include "nouveau_card.h" + typedef struct { - u_int32_t card_type; + nouveau_card* card; u_int32_t bus_type; u_int32_t agp_mode; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 417fd9fbcc..85b5eae49e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -26,7 +26,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_state.h" -#include "nouveau_ioctl.h" #include "nouveau_swtcl.h" #include "nouveau_fifo.h" diff --git a/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c index 7c7ba7374b..746b0fac8c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c @@ -81,7 +81,7 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) if (mode) { nmesa->Fallback |= bit; if (oldfallback == 0) { - if (nmesa->screen->card_typescreen->card->typescreen->card_typescreen->card->typescreen->card_type==NV_10) - BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); - else if (nmesa->screen->card_type==NV_20) - BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); + if (nmesa->screen->card->type==NV_10) + BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); + else if (nmesa->screen->card->type==NV_20) + BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_BEGIN_END,1); else - BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); + BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_BEGIN_END,1); OUT_RING(nmesa->current_primitive); - if (nmesa->screen->card_type==NV_10) - BEGIN_RING_PRIM(channel,NV10_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); + if (nmesa->screen->card->type==NV_10) + BEGIN_RING_PRIM(NvSub3D,NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA,NOUVEAU_MIN_PRIM_SIZE); + else if (nmesa->screen->card->type==NV_20) + BEGIN_RING_PRIM(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_DATA,NOUVEAU_MIN_PRIM_SIZE); else - BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE); + BEGIN_RING_PRIM(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_DATA,NOUVEAU_MIN_PRIM_SIZE); } inline void nv10FinishPrimitive(struct nouveau_context *nmesa) { FINISH_RING_PRIM(); - if (nmesa->screen->card_type==NV_10) - BEGIN_RING_SIZE(channel,NV10_PRIMITIVE,1); - else if (nmesa->screen->card_type==NV_20) - BEGIN_RING_SIZE(channel,NV20_PRIMITIVE,1); + if (nmesa->screen->card->type==NV_10) + BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); + else if (nmesa->screen->card->type==NV_20) + BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_BEGIN_END,1); else - BEGIN_RING_SIZE(channel,NV30_PRIMITIVE,1); + BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_BEGIN_END,1); OUT_RING(0x0); FIRE_RING(); } @@ -700,15 +699,17 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint /* * Tell the hardware about the vertex format */ - if (nmesa->screen->card_type==NV_10) { + if (nmesa->screen->card->type==NV_10) { int size; +#define NV_VERTEX_ATTRIBUTE_TYPE_FLOAT 2 + #define NV10_SET_VERTEX_ATTRIB(i,j) \ do { \ size = attr_size[j] << 4; \ size |= (attr_size[j]*4) << 8; \ - size |= NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT; \ - BEGIN_RING_SIZE(channel, NV10_VERTEX_ATTRIBUTE(i),1); \ + size |= NV_VERTEX_ATTRIBUTE_TYPE_FLOAT; \ + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VERTEX_ATTR(i),1); \ OUT_RING(size); \ } while (0) @@ -721,27 +722,27 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint NV10_SET_VERTEX_ATTRIB(6, _TNL_ATTRIB_WEIGHT); NV10_SET_VERTEX_ATTRIB(7, _TNL_ATTRIB_FOG); - BEGIN_RING_SIZE(channel, NV10_VERTEX_SET_FORMAT,1); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_VALIDATE,1); OUT_RING(0); - } else if (nmesa->screen->card_type==NV_20) { + } else if (nmesa->screen->card->type==NV_20) { for(i=0;i<16;i++) { int size=attr_size[i]; - BEGIN_RING_SIZE(channel,NV20_VERTEX_ATTRIBUTE(i),1); - OUT_RING(NV20_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); + BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR(i),1); + OUT_RING(NV_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); } } else { - BEGIN_RING_SIZE(channel,NV30_VERTEX_ATTRIBUTES,slots); + BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR0_POS,slots); for(i=0;i Date: Sun, 5 Nov 2006 15:30:41 +0000 Subject: reindent --- src/mesa/shader/slang/slang_assemble.c | 2479 +++++++++++++++-------------- src/mesa/shader/slang/slang_execute_x86.c | 1114 ++++++------- 2 files changed, 1822 insertions(+), 1771 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 36fb2305f6..603fd4f7f8 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -35,13 +35,15 @@ /* slang_assembly */ -static GLboolean slang_assembly_construct (slang_assembly *assem) +static GLboolean +slang_assembly_construct(slang_assembly * assem) { - assem->type = slang_asm_none; - return GL_TRUE; + assem->type = slang_asm_none; + return GL_TRUE; } -static GLvoid slang_assembly_destruct (slang_assembly *assem) +static GLvoid +slang_assembly_destruct(slang_assembly * assem) { } @@ -50,80 +52,89 @@ static GLvoid slang_assembly_destruct (slang_assembly *assem) */ GLvoid -_slang_assembly_file_ctr (slang_assembly_file *self) +_slang_assembly_file_ctr(slang_assembly_file * self) { self->code = NULL; self->count = 0; self->capacity = 0; } -GLvoid slang_assembly_file_destruct (slang_assembly_file *file) +GLvoid +slang_assembly_file_destruct(slang_assembly_file * file) { - GLuint i; + GLuint i; - for (i = 0; i < file->count; i++) - slang_assembly_destruct (&file->code[i]); - slang_alloc_free (file->code); + for (i = 0; i < file->count; i++) + slang_assembly_destruct(&file->code[i]); + slang_alloc_free(file->code); } -static GLboolean push_new (slang_assembly_file *file) +static GLboolean +push_new(slang_assembly_file * file) { - if (file->count == file->capacity) - { - GLuint n; - - if (file->capacity == 0) - n = 256; - else - n = file->capacity * 2; - file->code = (slang_assembly *) slang_alloc_realloc (file->code, - file->capacity * sizeof (slang_assembly), n * sizeof (slang_assembly)); - if (file->code == NULL) - return GL_FALSE; - file->capacity = n; - } - if (!slang_assembly_construct (&file->code[file->count])) - return GL_FALSE; - file->count++; - return GL_TRUE; + if (file->count == file->capacity) { + GLuint n; + + if (file->capacity == 0) + n = 256; + else + n = file->capacity * 2; + file->code = (slang_assembly *) + slang_alloc_realloc(file->code, + file->capacity * sizeof(slang_assembly), + n * sizeof(slang_assembly)); + if (file->code == NULL) + return GL_FALSE; + file->capacity = n; + } + if (!slang_assembly_construct(&file->code[file->count])) + return GL_FALSE; + file->count++; + return GL_TRUE; } -static GLboolean push_gen (slang_assembly_file *file, slang_assembly_type type, GLfloat literal, - GLuint label, GLuint size) +static GLboolean +push_gen(slang_assembly_file * file, slang_assembly_type type, + GLfloat literal, GLuint label, GLuint size) { - slang_assembly *assem; - - if (!push_new (file)) - return GL_FALSE; - assem = &file->code[file->count - 1]; - assem->type = type; - assem->literal = literal; - assem->param[0] = label; - assem->param[1] = size; - return GL_TRUE; + slang_assembly *assem; + + if (!push_new(file)) + return GL_FALSE; + assem = &file->code[file->count - 1]; + assem->type = type; + assem->literal = literal; + assem->param[0] = label; + assem->param[1] = size; + return GL_TRUE; } -GLboolean slang_assembly_file_push (slang_assembly_file *file, slang_assembly_type type) +GLboolean +slang_assembly_file_push(slang_assembly_file * file, slang_assembly_type type) { - return push_gen (file, type, (GLfloat) 0, 0, 0); + return push_gen(file, type, (GLfloat) 0, 0, 0); } -GLboolean slang_assembly_file_push_label (slang_assembly_file *file, slang_assembly_type type, - GLuint label) +GLboolean +slang_assembly_file_push_label(slang_assembly_file * file, + slang_assembly_type type, GLuint label) { - return push_gen (file, type, (GLfloat) 0, label, 0); + return push_gen(file, type, (GLfloat) 0, label, 0); } -GLboolean slang_assembly_file_push_label2 (slang_assembly_file *file, slang_assembly_type type, - GLuint label1, GLuint label2) +GLboolean +slang_assembly_file_push_label2(slang_assembly_file * file, + slang_assembly_type type, GLuint label1, + GLuint label2) { - return push_gen (file, type, (GLfloat) 0, label1, label2); + return push_gen(file, type, (GLfloat) 0, label1, label2); } -GLboolean slang_assembly_file_push_literal (slang_assembly_file *file, slang_assembly_type type, - GLfloat literal) +GLboolean +slang_assembly_file_push_literal(slang_assembly_file * file, + slang_assembly_type type, GLfloat literal) { - return push_gen (file, type, literal, 0, 0); + return push_gen(file, type, literal, 0, 0); } #define PUSH slang_assembly_file_push @@ -133,284 +144,302 @@ GLboolean slang_assembly_file_push_literal (slang_assembly_file *file, slang_ass /* slang_assembly_file_restore_point */ -GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *file, - slang_assembly_file_restore_point *point) +GLboolean +slang_assembly_file_restore_point_save(slang_assembly_file * file, + slang_assembly_file_restore_point * + point) { - point->count = file->count; - return GL_TRUE; + point->count = file->count; + return GL_TRUE; } -GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *file, - slang_assembly_file_restore_point *point) +GLboolean +slang_assembly_file_restore_point_load(slang_assembly_file * file, + slang_assembly_file_restore_point * + point) { - GLuint i; + GLuint i; - for (i = point->count; i < file->count; i++) - slang_assembly_destruct (&file->code[i]); - file->count = point->count; - return GL_TRUE; + for (i = point->count; i < file->count; i++) + slang_assembly_destruct(&file->code[i]); + file->count = point->count; + return GL_TRUE; } /* utility functions */ -static GLboolean sizeof_variable (slang_assemble_ctx *A, slang_type_specifier *spec, - slang_type_qualifier qual, GLuint array_len, GLuint *size) +static GLboolean +sizeof_variable(slang_assemble_ctx * A, slang_type_specifier * spec, + slang_type_qualifier qual, GLuint array_len, GLuint * size) { - slang_storage_aggregate agg; - - /* calculate the size of the variable's aggregate */ - if (!slang_storage_aggregate_construct (&agg)) - return GL_FALSE; - if (!_slang_aggregate_variable (&agg, spec, array_len, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) - { - slang_storage_aggregate_destruct (&agg); - return GL_FALSE; - } - *size += _slang_sizeof_aggregate (&agg); - slang_storage_aggregate_destruct (&agg); - - /* for reference variables consider the additional address overhead */ - if (qual == slang_qual_out || qual == slang_qual_inout) - *size += 4; - - return GL_TRUE; + slang_storage_aggregate agg; + + /* calculate the size of the variable's aggregate */ + if (!slang_storage_aggregate_construct(&agg)) + return GL_FALSE; + if (!_slang_aggregate_variable + (&agg, spec, array_len, A->space.funcs, A->space.structs, + A->space.vars, A->mach, A->file, A->atoms)) { + slang_storage_aggregate_destruct(&agg); + return GL_FALSE; + } + *size += _slang_sizeof_aggregate(&agg); + slang_storage_aggregate_destruct(&agg); + + /* for reference variables consider the additional address overhead */ + if (qual == slang_qual_out || qual == slang_qual_inout) + *size += 4; + + return GL_TRUE; } -static GLboolean sizeof_variable2 (slang_assemble_ctx *A, slang_variable *var, GLuint *size) +static GLboolean +sizeof_variable2(slang_assemble_ctx * A, slang_variable * var, GLuint * size) { - var->address = *size; - if (var->type.qualifier == slang_qual_out || var->type.qualifier == slang_qual_inout) - var->address += 4; - return sizeof_variable (A, &var->type.specifier, var->type.qualifier, var->array_len, size); + var->address = *size; + if (var->type.qualifier == slang_qual_out + || var->type.qualifier == slang_qual_inout) + var->address += 4; + return sizeof_variable(A, &var->type.specifier, var->type.qualifier, + var->array_len, size); } -static GLboolean sizeof_variables (slang_assemble_ctx *A, slang_variable_scope *vars, GLuint start, - GLuint stop, GLuint *size) +static GLboolean +sizeof_variables(slang_assemble_ctx * A, slang_variable_scope * vars, + GLuint start, GLuint stop, GLuint * size) { - GLuint i; + GLuint i; - for (i = start; i < stop; i++) - if (!sizeof_variable2 (A, &vars->variables[i], size)) - return GL_FALSE; - return GL_TRUE; + for (i = start; i < stop; i++) + if (!sizeof_variable2(A, &vars->variables[i], size)) + return GL_FALSE; + return GL_TRUE; } -static GLboolean collect_locals (slang_assemble_ctx *A, slang_operation *op, GLuint *size) +static GLboolean +collect_locals(slang_assemble_ctx * A, slang_operation * op, GLuint * size) { - GLuint i; - - if (!sizeof_variables (A, op->locals, 0, op->locals->num_variables, size)) - return GL_FALSE; - for (i = 0; i < op->num_children; i++) - if (!collect_locals (A, &op->children[i], size)) - return GL_FALSE; - return GL_TRUE; + GLuint i; + + if (!sizeof_variables(A, op->locals, 0, op->locals->num_variables, size)) + return GL_FALSE; + for (i = 0; i < op->num_children; i++) + if (!collect_locals(A, &op->children[i], size)) + return GL_FALSE; + return GL_TRUE; } /* _slang_locate_function() */ -slang_function *_slang_locate_function (slang_function_scope *funcs, slang_atom a_name, - slang_operation *params, GLuint num_params, slang_assembly_name_space *space, - slang_atom_pool *atoms) +slang_function * +_slang_locate_function(slang_function_scope * funcs, slang_atom a_name, + slang_operation * params, GLuint num_params, + slang_assembly_name_space * space, + slang_atom_pool * atoms) { - GLuint i; - - for (i = 0; i < funcs->num_functions; i++) - { - GLuint j; - slang_function *f = &funcs->functions[i]; - - if (a_name != f->header.a_name) - continue; - if (f->param_count != num_params) - continue; - for (j = 0; j < num_params; j++) - { - slang_assembly_typeinfo ti; - - if (!slang_assembly_typeinfo_construct (&ti)) - return NULL; - if (!_slang_typeof_operation_ (¶ms[j], space, &ti, atoms)) - { - slang_assembly_typeinfo_destruct (&ti); - return NULL; - } - if (!slang_type_specifier_equal (&ti.spec, &f->parameters->variables[j].type.specifier)) - { - slang_assembly_typeinfo_destruct (&ti); - break; - } - slang_assembly_typeinfo_destruct (&ti); - - /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ - if (!ti.can_be_referenced && - (f->parameters->variables[j].type.qualifier == slang_qual_out || - f->parameters->variables[j].type.qualifier == slang_qual_inout)) - break; - } - if (j == num_params) - return f; - } - if (funcs->outer_scope != NULL) - return _slang_locate_function (funcs->outer_scope, a_name, params, num_params, space, atoms); - return NULL; + GLuint i; + + for (i = 0; i < funcs->num_functions; i++) { + GLuint j; + slang_function *f = &funcs->functions[i]; + + if (a_name != f->header.a_name) + continue; + if (f->param_count != num_params) + continue; + for (j = 0; j < num_params; j++) { + slang_assembly_typeinfo ti; + + if (!slang_assembly_typeinfo_construct(&ti)) + return NULL; + if (!_slang_typeof_operation_(¶ms[j], space, &ti, atoms)) { + slang_assembly_typeinfo_destruct(&ti); + return NULL; + } + if (!slang_type_specifier_equal + (&ti.spec, &f->parameters->variables[j].type.specifier)) { + slang_assembly_typeinfo_destruct(&ti); + break; + } + slang_assembly_typeinfo_destruct(&ti); + + /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ + if (!ti.can_be_referenced && + (f->parameters->variables[j].type.qualifier == slang_qual_out || + f->parameters->variables[j].type.qualifier == slang_qual_inout)) + break; + } + if (j == num_params) + return f; + } + if (funcs->outer_scope != NULL) + return _slang_locate_function(funcs->outer_scope, a_name, params, + num_params, space, atoms); + return NULL; } /* _slang_assemble_function() */ -GLboolean _slang_assemble_function (slang_assemble_ctx *A, slang_function *fun) +GLboolean +_slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) { - GLuint param_size, local_size; - GLuint skip, cleanup; - - fun->address = A->file->count; - - if (fun->body == NULL) - { - /* jump to the actual function body - we do not know it, so add the instruction - * to fixup table */ - fun->fixups.table = (GLuint *) slang_alloc_realloc (fun->fixups.table, - fun->fixups.count * sizeof (GLuint), (fun->fixups.count + 1) * sizeof (GLuint)); - if (fun->fixups.table == NULL) - return GL_FALSE; - fun->fixups.table[fun->fixups.count] = fun->address; - fun->fixups.count++; - if (!PUSH (A->file, slang_asm_jump)) - return GL_FALSE; - return GL_TRUE; - } - else - { - GLuint i; - - /* resolve all fixup table entries and delete it */ - for (i = 0; i < fun->fixups.count; i++) - A->file->code[fun->fixups.table[i]].param[0] = fun->address; - slang_fixup_table_free (&fun->fixups); - } - - /* At this point traverse function formal parameters and code to calculate - * total memory size to be allocated on the stack. - * During this process the variables will be assigned local addresses to - * reference them in the code. - * No storage optimizations are performed so exclusive scopes are not detected and shared. */ - - /* calculate return value size */ - param_size = 0; - if (fun->header.type.specifier.type != slang_spec_void) - if (!sizeof_variable (A, &fun->header.type.specifier, slang_qual_none, 0, ¶m_size)) - return GL_FALSE; - A->local.ret_size = param_size; - - /* calculate formal parameter list size */ - if (!sizeof_variables (A, fun->parameters, 0, fun->param_count, ¶m_size)) - return GL_FALSE; - - /* calculate local variables size - take into account the four-byte return address and - * temporaries for various tasks (4 for addr and 16 for swizzle temporaries). - * these include variables from the formal parameter scope and from the code */ - A->local.addr_tmp = param_size + 4; - A->local.swizzle_tmp = param_size + 4 + 4; - local_size = param_size + 4 + 4 + 16; - if (!sizeof_variables (A, fun->parameters, fun->param_count, fun->parameters->num_variables, - &local_size)) - return GL_FALSE; - if (!collect_locals (A, fun->body, &local_size)) - return GL_FALSE; - - /* allocate local variable storage */ - if (!PLAB (A->file, slang_asm_local_alloc, local_size - param_size - 4)) - return GL_FALSE; - - /* mark a new frame for function variable storage */ - if (!PLAB (A->file, slang_asm_enter, local_size)) - return GL_FALSE; - - /* jump directly to the actual code */ - skip = A->file->count; - if (!push_new (A->file)) - return GL_FALSE; - A->file->code[skip].type = slang_asm_jump; - - /* all "return" statements will be directed here */ - A->flow.function_end = A->file->count; - cleanup = A->file->count; - if (!push_new (A->file)) - return GL_FALSE; - A->file->code[cleanup].type = slang_asm_jump; - - /* execute the function body */ - A->file->code[skip].param[0] = A->file->count; - if (!_slang_assemble_operation (A, fun->body, /*slang_ref_freelance*/slang_ref_forbid)) - return GL_FALSE; - - /* this is the end of the function - restore the old function frame */ - A->file->code[cleanup].param[0] = A->file->count; - if (!PUSH (A->file, slang_asm_leave)) - return GL_FALSE; - - /* free local variable storage */ - if (!PLAB (A->file, slang_asm_local_free, local_size - param_size - 4)) - return GL_FALSE; - - /* return from the function */ - if (!PUSH (A->file, slang_asm_return)) - return GL_FALSE; - - return GL_TRUE; + GLuint param_size, local_size; + GLuint skip, cleanup; + + fun->address = A->file->count; + + if (fun->body == NULL) { + /* jump to the actual function body - we do not know it, so add the instruction + * to fixup table */ + fun->fixups.table = (GLuint *) + slang_alloc_realloc(fun->fixups.table, + fun->fixups.count * sizeof(GLuint), + (fun->fixups.count + 1) * sizeof(GLuint)); + if (fun->fixups.table == NULL) + return GL_FALSE; + fun->fixups.table[fun->fixups.count] = fun->address; + fun->fixups.count++; + if (!PUSH(A->file, slang_asm_jump)) + return GL_FALSE; + return GL_TRUE; + } + else { + GLuint i; + + /* resolve all fixup table entries and delete it */ + for (i = 0; i < fun->fixups.count; i++) + A->file->code[fun->fixups.table[i]].param[0] = fun->address; + slang_fixup_table_free(&fun->fixups); + } + + /* At this point traverse function formal parameters and code to calculate + * total memory size to be allocated on the stack. + * During this process the variables will be assigned local addresses to + * reference them in the code. + * No storage optimizations are performed so exclusive scopes are not + * detected and shared. + */ + + /* calculate return value size */ + param_size = 0; + if (fun->header.type.specifier.type != slang_spec_void) + if (!sizeof_variable + (A, &fun->header.type.specifier, slang_qual_none, 0, ¶m_size)) + return GL_FALSE; + A->local.ret_size = param_size; + + /* calculate formal parameter list size */ + if (!sizeof_variables + (A, fun->parameters, 0, fun->param_count, ¶m_size)) + return GL_FALSE; + + /* calculate local variables size - take into account the four-byte + * return address and temporaries for various tasks (4 for addr and + * 16 for swizzle temporaries). these include variables from the + * formal parameter scope and from the code + */ + A->local.addr_tmp = param_size + 4; + A->local.swizzle_tmp = param_size + 4 + 4; + local_size = param_size + 4 + 4 + 16; + if (!sizeof_variables + (A, fun->parameters, fun->param_count, fun->parameters->num_variables, + &local_size)) + return GL_FALSE; + if (!collect_locals(A, fun->body, &local_size)) + return GL_FALSE; + + /* allocate local variable storage */ + if (!PLAB(A->file, slang_asm_local_alloc, local_size - param_size - 4)) + return GL_FALSE; + + /* mark a new frame for function variable storage */ + if (!PLAB(A->file, slang_asm_enter, local_size)) + return GL_FALSE; + + /* jump directly to the actual code */ + skip = A->file->count; + if (!push_new(A->file)) + return GL_FALSE; + A->file->code[skip].type = slang_asm_jump; + + /* all "return" statements will be directed here */ + A->flow.function_end = A->file->count; + cleanup = A->file->count; + if (!push_new(A->file)) + return GL_FALSE; + A->file->code[cleanup].type = slang_asm_jump; + + /* execute the function body */ + A->file->code[skip].param[0] = A->file->count; + if (!_slang_assemble_operation + (A, fun->body, /*slang_ref_freelance */ slang_ref_forbid)) + return GL_FALSE; + + /* this is the end of the function - restore the old function frame */ + A->file->code[cleanup].param[0] = A->file->count; + if (!PUSH(A->file, slang_asm_leave)) + return GL_FALSE; + + /* free local variable storage */ + if (!PLAB(A->file, slang_asm_local_free, local_size - param_size - 4)) + return GL_FALSE; + + /* return from the function */ + if (!PUSH(A->file, slang_asm_return)) + return GL_FALSE; + + return GL_TRUE; } -GLboolean _slang_cleanup_stack (slang_assemble_ctx *A, slang_operation *op) +GLboolean +_slang_cleanup_stack(slang_assemble_ctx * A, slang_operation * op) { - slang_assembly_typeinfo ti; - GLuint size = 0; - - /* get type info of the operation and calculate its size */ - if (!slang_assembly_typeinfo_construct (&ti)) - return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) - { - slang_assembly_typeinfo_destruct (&ti); - return GL_FALSE; - } - if (ti.spec.type != slang_spec_void) { - if (A->ref == slang_ref_force) { - size = 4; - } - else if (!sizeof_variable (A, &ti.spec, slang_qual_none, 0, &size)) - { - slang_assembly_typeinfo_destruct (&ti); - return GL_FALSE; - } - } - slang_assembly_typeinfo_destruct (&ti); - - /* if nonzero, free it from the stack */ - if (size != 0) - { - if (!PLAB (A->file, slang_asm_local_free, size)) - return GL_FALSE; - } - - return GL_TRUE; + slang_assembly_typeinfo ti; + GLuint size = 0; + + /* get type info of the operation and calculate its size */ + if (!slang_assembly_typeinfo_construct(&ti)) + return GL_FALSE; + if (!_slang_typeof_operation(A, op, &ti)) { + slang_assembly_typeinfo_destruct(&ti); + return GL_FALSE; + } + if (ti.spec.type != slang_spec_void) { + if (A->ref == slang_ref_force) { + size = 4; + } + else if (!sizeof_variable(A, &ti.spec, slang_qual_none, 0, &size)) { + slang_assembly_typeinfo_destruct(&ti); + return GL_FALSE; + } + } + slang_assembly_typeinfo_destruct(&ti); + + /* if nonzero, free it from the stack */ + if (size != 0) { + if (!PLAB(A->file, slang_asm_local_free, size)) + return GL_FALSE; + } + + return GL_TRUE; } /* _slang_assemble_operation() */ static GLboolean -dereference_basic (slang_assemble_ctx *A, slang_storage_type type, GLuint *size, slang_swizzle *swz, - GLboolean is_swizzled) +dereference_basic(slang_assemble_ctx * A, slang_storage_type type, + GLuint * size, slang_swizzle * swz, GLboolean is_swizzled) { GLuint src_offset; slang_assembly_type ty; - *size -= _slang_sizeof_type (type); + *size -= _slang_sizeof_type(type); - /* If swizzling is taking place, we are forced to use scalar operations, even if we have - * vec4 instructions enabled (this should be actually done with special vec4 shuffle - * instructions). - * Adjust the size and calculate the offset within source variable to read. + /* If swizzling is taking place, we are forced to use scalar + * operations, even if we have vec4 instructions enabled (this + * should be actually done with special vec4 shuffle instructions). + * Adjust the size and calculate the offset within source variable + * to read. */ if (is_swizzled) src_offset = swz->swizzle[*size / 4] * 4; @@ -418,14 +447,14 @@ dereference_basic (slang_assemble_ctx *A, slang_storage_type type, GLuint *size, src_offset = *size; /* dereference data slot of a basic type */ - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) + if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_deref)) + if (!PUSH(A->file, slang_asm_addr_deref)) return GL_FALSE; if (src_offset != 0) { - if (!PLAB (A->file, slang_asm_addr_push, src_offset)) + if (!PLAB(A->file, slang_asm_addr_push, src_offset)) return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_add)) + if (!PUSH(A->file, slang_asm_addr_add)) return GL_FALSE; } @@ -449,12 +478,13 @@ dereference_basic (slang_assemble_ctx *A, slang_storage_type type, GLuint *size, ty = slang_asm_none; } - return PUSH (A->file, ty); + return PUSH(A->file, ty); } static GLboolean -dereference_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, GLuint *size, - slang_swizzle *swz, GLboolean is_swizzled) +dereference_aggregate(slang_assemble_ctx * A, + const slang_storage_aggregate * agg, GLuint * size, + slang_swizzle * swz, GLboolean is_swizzled) { GLuint i; @@ -464,22 +494,27 @@ dereference_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg for (j = arr->length; j > 0; j--) { if (arr->type == slang_stor_aggregate) { - if (!dereference_aggregate (A, arr->aggregate, size, swz, is_swizzled)) + if (!dereference_aggregate + (A, arr->aggregate, size, swz, is_swizzled)) return GL_FALSE; } else { if (is_swizzled && arr->type == slang_stor_vec4) { - if (!dereference_basic (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic + (A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; - if (!dereference_basic (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic + (A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; - if (!dereference_basic (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic + (A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; - if (!dereference_basic (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic + (A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; } else { - if (!dereference_basic (A, arr->type, size, swz, is_swizzled)) + if (!dereference_basic(A, arr->type, size, swz, is_swizzled)) return GL_FALSE; } } @@ -489,235 +524,240 @@ dereference_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg return GL_TRUE; } -GLboolean _slang_dereference (slang_assemble_ctx *A, slang_operation *op) +GLboolean +_slang_dereference(slang_assemble_ctx * A, slang_operation * op) { - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - GLuint size; - - /* get type information of the given operation */ - if (!slang_assembly_typeinfo_construct (&ti)) - return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) - goto end1; - - /* construct aggregate from the type info */ - if (!slang_storage_aggregate_construct (&agg)) - goto end1; - if (!_slang_aggregate_variable (&agg, &ti.spec, ti.array_len, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) - goto end; - - /* dereference the resulting aggregate */ - size = _slang_sizeof_aggregate (&agg); - result = dereference_aggregate (A, &agg, &size, &ti.swz, ti.is_swizzled); - -end: - slang_storage_aggregate_destruct (&agg); -end1: - slang_assembly_typeinfo_destruct (&ti); - return result; + slang_assembly_typeinfo ti; + GLboolean result = GL_FALSE; + slang_storage_aggregate agg; + GLuint size; + + /* get type information of the given operation */ + if (!slang_assembly_typeinfo_construct(&ti)) + return GL_FALSE; + if (!_slang_typeof_operation(A, op, &ti)) + goto end1; + + /* construct aggregate from the type info */ + if (!slang_storage_aggregate_construct(&agg)) + goto end1; + if (!_slang_aggregate_variable + (&agg, &ti.spec, ti.array_len, A->space.funcs, A->space.structs, + A->space.vars, A->mach, A->file, A->atoms)) + goto end; + + /* dereference the resulting aggregate */ + size = _slang_sizeof_aggregate(&agg); + result = dereference_aggregate(A, &agg, &size, &ti.swz, ti.is_swizzled); + + end: + slang_storage_aggregate_destruct(&agg); + end1: + slang_assembly_typeinfo_destruct(&ti); + return result; } -GLboolean _slang_assemble_function_call (slang_assemble_ctx *A, slang_function *fun, - slang_operation *params, GLuint param_count, GLboolean assignment) +GLboolean +_slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, + slang_operation * params, GLuint param_count, + GLboolean assignment) { - GLuint i; - slang_swizzle p_swz[64]; - slang_ref_type p_ref[64]; - - /* TODO: fix this, allocate dynamically */ - if (param_count > 64) - return GL_FALSE; - - /* make room for the return value, if any */ - if (fun->header.type.specifier.type != slang_spec_void) - { - GLuint ret_size = 0; - - if (!sizeof_variable (A, &fun->header.type.specifier, slang_qual_none, 0, &ret_size)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_local_alloc, ret_size)) - return GL_FALSE; - } - - /* push the actual parameters on the stack */ - for (i = 0; i < param_count; i++) - { - if (fun->parameters->variables[i].type.qualifier == slang_qual_inout || - fun->parameters->variables[i].type.qualifier == slang_qual_out) - { - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - /* TODO: optimize the "out" parameter case */ - if (!_slang_assemble_operation (A, ¶ms[i], slang_ref_force)) - return GL_FALSE; - p_swz[i] = A->swz; - p_ref[i] = A->ref; - if (!PUSH (A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_deref)) - return GL_FALSE; - if (i == 0 && assignment) - { - /* duplicate the resulting address */ - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_deref)) - return GL_FALSE; - } - if (!_slang_dereference (A, ¶ms[i])) - return GL_FALSE; - } - else - { - if (!_slang_assemble_operation (A, ¶ms[i], slang_ref_forbid)) - return GL_FALSE; - p_swz[i] = A->swz; - p_ref[i] = A->ref; - } - } - - /* call the function */ - if (!PLAB (A->file, slang_asm_call, fun->address)) - return GL_FALSE; - - /* pop the parameters from the stack */ - for (i = param_count; i > 0; i--) - { - GLuint j = i - 1; - - A->swz = p_swz[j]; - A->ref = p_ref[j]; - if (fun->parameters->variables[j].type.qualifier == slang_qual_inout || - fun->parameters->variables[j].type.qualifier == slang_qual_out) - { - /* for output parameter copy the contents of the formal parameter - * back to the original actual parameter */ - if (!_slang_assemble_assignment (A, ¶ms[j])) - return GL_FALSE; - /* pop the actual parameter's address */ - if (!PLAB (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - } - else - { - /* pop the value of the parameter */ - if (!_slang_cleanup_stack (A, ¶ms[j])) - return GL_FALSE; - } - } - - return GL_TRUE; + GLuint i; + slang_swizzle p_swz[64]; + slang_ref_type p_ref[64]; + + /* TODO: fix this, allocate dynamically */ + if (param_count > 64) + return GL_FALSE; + + /* make room for the return value, if any */ + if (fun->header.type.specifier.type != slang_spec_void) { + GLuint ret_size = 0; + + if (!sizeof_variable + (A, &fun->header.type.specifier, slang_qual_none, 0, &ret_size)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_local_alloc, ret_size)) + return GL_FALSE; + } + + /* push the actual parameters on the stack */ + for (i = 0; i < param_count; i++) { + if (fun->parameters->variables[i].type.qualifier == slang_qual_inout || + fun->parameters->variables[i].type.qualifier == slang_qual_out) { + if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) + return GL_FALSE; + /* TODO: optimize the "out" parameter case */ + if (!_slang_assemble_operation(A, ¶ms[i], slang_ref_force)) + return GL_FALSE; + p_swz[i] = A->swz; + p_ref[i] = A->ref; + if (!PUSH(A->file, slang_asm_addr_copy)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_deref)) + return GL_FALSE; + if (i == 0 && assignment) { + /* duplicate the resulting address */ + if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_deref)) + return GL_FALSE; + } + if (!_slang_dereference(A, ¶ms[i])) + return GL_FALSE; + } + else { + if (!_slang_assemble_operation(A, ¶ms[i], slang_ref_forbid)) + return GL_FALSE; + p_swz[i] = A->swz; + p_ref[i] = A->ref; + } + } + + /* call the function */ + if (!PLAB(A->file, slang_asm_call, fun->address)) + return GL_FALSE; + + /* pop the parameters from the stack */ + for (i = param_count; i > 0; i--) { + GLuint j = i - 1; + + A->swz = p_swz[j]; + A->ref = p_ref[j]; + if (fun->parameters->variables[j].type.qualifier == slang_qual_inout || + fun->parameters->variables[j].type.qualifier == slang_qual_out) { + /* for output parameter copy the contents of the formal parameter + * back to the original actual parameter + */ + if (!_slang_assemble_assignment(A, ¶ms[j])) + return GL_FALSE; + /* pop the actual parameter's address */ + if (!PLAB(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + } + else { + /* pop the value of the parameter */ + if (!_slang_cleanup_stack(A, ¶ms[j])) + return GL_FALSE; + } + } + + return GL_TRUE; } -GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *A, const char *name, - slang_operation *params, GLuint param_count, GLboolean assignment) +GLboolean +_slang_assemble_function_call_name(slang_assemble_ctx * A, const char *name, + slang_operation * params, + GLuint param_count, GLboolean assignment) { - slang_atom atom; - slang_function *fun; - - atom = slang_atom_pool_atom (A->atoms, name); - if (atom == SLANG_ATOM_NULL) - return GL_FALSE; - fun = _slang_locate_function (A->space.funcs, atom, params, param_count, &A->space, A->atoms); - if (fun == NULL) - return GL_FALSE; - return _slang_assemble_function_call (A, fun, params, param_count, assignment); + slang_atom atom; + slang_function *fun; + + atom = slang_atom_pool_atom(A->atoms, name); + if (atom == SLANG_ATOM_NULL) + return GL_FALSE; + fun = + _slang_locate_function(A->space.funcs, atom, params, param_count, + &A->space, A->atoms); + if (fun == NULL) + return GL_FALSE; + return _slang_assemble_function_call(A, fun, params, param_count, + assignment); } -static GLboolean assemble_function_call_name_dummyint (slang_assemble_ctx *A, const char *name, - slang_operation *params) +static GLboolean +assemble_function_call_name_dummyint(slang_assemble_ctx * A, const char *name, + slang_operation * params) { - slang_operation p[2]; - GLboolean result; - - p[0] = params[0]; - if (!slang_operation_construct (&p[1])) - return GL_FALSE; - p[1].type = slang_oper_literal_int; - result = _slang_assemble_function_call_name (A, name, p, 2, GL_FALSE); - slang_operation_destruct (&p[1]); - return result; + slang_operation p[2]; + GLboolean result; + + p[0] = params[0]; + if (!slang_operation_construct(&p[1])) + return GL_FALSE; + p[1].type = slang_oper_literal_int; + result = _slang_assemble_function_call_name(A, name, p, 2, GL_FALSE); + slang_operation_destruct(&p[1]); + return result; } static const struct { - const char *name; - slang_assembly_type code1, code2; + const char *name; + slang_assembly_type code1, code2; } inst[] = { - /* core */ - { "float_add", slang_asm_float_add, slang_asm_float_copy }, - { "float_multiply", slang_asm_float_multiply, slang_asm_float_copy }, - { "float_divide", slang_asm_float_divide, slang_asm_float_copy }, - { "float_negate", slang_asm_float_negate, slang_asm_float_copy }, - { "float_less", slang_asm_float_less, slang_asm_bool_copy }, - { "float_equal", slang_asm_float_equal_exp,slang_asm_bool_copy }, - { "float_to_int", slang_asm_float_to_int, slang_asm_int_copy }, - { "float_sine", slang_asm_float_sine, slang_asm_float_copy }, - { "float_arcsine", slang_asm_float_arcsine, slang_asm_float_copy }, - { "float_arctan", slang_asm_float_arctan, slang_asm_float_copy }, - { "float_power", slang_asm_float_power, slang_asm_float_copy }, - { "float_log2", slang_asm_float_log2, slang_asm_float_copy }, - { "float_floor", slang_asm_float_floor, slang_asm_float_copy }, - { "float_ceil", slang_asm_float_ceil, slang_asm_float_copy }, - { "float_noise1", slang_asm_float_noise1, slang_asm_float_copy }, - { "float_noise2", slang_asm_float_noise2, slang_asm_float_copy }, - { "float_noise3", slang_asm_float_noise3, slang_asm_float_copy }, - { "float_noise4", slang_asm_float_noise4, slang_asm_float_copy }, - { "int_to_float", slang_asm_int_to_float, slang_asm_float_copy }, - { "vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none }, - { "vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none }, - { "vec4_tex3d", slang_asm_vec4_tex3d, slang_asm_none }, - { "vec4_texcube", slang_asm_vec4_texcube, slang_asm_none }, - { "vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none }, - { "vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none }, - /* GL_MESA_shader_debug */ - { "float_print", slang_asm_float_deref, slang_asm_float_print }, - { "int_print", slang_asm_int_deref, slang_asm_int_print }, - { "bool_print", slang_asm_bool_deref, slang_asm_bool_print }, + /* core */ + {"float_add", slang_asm_float_add, slang_asm_float_copy}, + {"float_multiply", slang_asm_float_multiply, slang_asm_float_copy}, + {"float_divide", slang_asm_float_divide, slang_asm_float_copy}, + {"float_negate", slang_asm_float_negate, slang_asm_float_copy}, + {"float_less", slang_asm_float_less, slang_asm_bool_copy}, + {"float_equal", slang_asm_float_equal_exp, slang_asm_bool_copy}, + {"float_to_int", slang_asm_float_to_int, slang_asm_int_copy}, + {"float_sine", slang_asm_float_sine, slang_asm_float_copy}, + {"float_arcsine", slang_asm_float_arcsine, slang_asm_float_copy}, + {"float_arctan", slang_asm_float_arctan, slang_asm_float_copy}, + {"float_power", slang_asm_float_power, slang_asm_float_copy}, + {"float_log2", slang_asm_float_log2, slang_asm_float_copy}, + {"float_floor", slang_asm_float_floor, slang_asm_float_copy}, + {"float_ceil", slang_asm_float_ceil, slang_asm_float_copy}, + {"float_noise1", slang_asm_float_noise1, slang_asm_float_copy}, + {"float_noise2", slang_asm_float_noise2, slang_asm_float_copy}, + {"float_noise3", slang_asm_float_noise3, slang_asm_float_copy}, + {"float_noise4", slang_asm_float_noise4, slang_asm_float_copy}, + {"int_to_float", slang_asm_int_to_float, slang_asm_float_copy}, + {"vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none}, + {"vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none}, + {"vec4_tex3d", slang_asm_vec4_tex3d, slang_asm_none}, + {"vec4_texcube", slang_asm_vec4_texcube, slang_asm_none}, + {"vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none}, + {"vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none}, + /* GL_MESA_shader_debug */ + {"float_print", slang_asm_float_deref, slang_asm_float_print}, + {"int_print", slang_asm_int_deref, slang_asm_int_print}, + {"bool_print", slang_asm_bool_deref, slang_asm_bool_print}, /* vec4 */ - { "float_to_vec4", slang_asm_float_to_vec4, slang_asm_none }, - { "vec4_add", slang_asm_vec4_add, slang_asm_none }, - { "vec4_subtract", slang_asm_vec4_subtract, slang_asm_none }, - { "vec4_multiply", slang_asm_vec4_multiply, slang_asm_none }, - { "vec4_divide", slang_asm_vec4_divide, slang_asm_none }, - { "vec4_negate", slang_asm_vec4_negate, slang_asm_none }, - { "vec4_dot", slang_asm_vec4_dot, slang_asm_none }, - - { NULL, slang_asm_none, slang_asm_none } + {"float_to_vec4", slang_asm_float_to_vec4, slang_asm_none}, + {"vec4_add", slang_asm_vec4_add, slang_asm_none}, + {"vec4_subtract", slang_asm_vec4_subtract, slang_asm_none}, + {"vec4_multiply", slang_asm_vec4_multiply, slang_asm_none}, + {"vec4_divide", slang_asm_vec4_divide, slang_asm_none}, + {"vec4_negate", slang_asm_vec4_negate, slang_asm_none}, + {"vec4_dot", slang_asm_vec4_dot, slang_asm_none}, + {NULL, slang_asm_none, slang_asm_none} }; -static GLboolean call_asm_instruction (slang_assemble_ctx *A, slang_atom a_name) +static GLboolean +call_asm_instruction(slang_assemble_ctx * A, slang_atom a_name) { - const char *id; - GLuint i; + const char *id; + GLuint i; - id = slang_atom_pool_id (A->atoms, a_name); + id = slang_atom_pool_id(A->atoms, a_name); - for (i = 0; inst[i].name != NULL; i++) - if (slang_string_compare (id, inst[i].name) == 0) - break; - if (inst[i].name == NULL) - return GL_FALSE; + for (i = 0; inst[i].name != NULL; i++) + if (slang_string_compare(id, inst[i].name) == 0) + break; + if (inst[i].name == NULL) + return GL_FALSE; - if (!PLAB2 (A->file, inst[i].code1, 4, 0)) - return GL_FALSE; - if (inst[i].code2 != slang_asm_none) - if (!PLAB2 (A->file, inst[i].code2, 4, 0)) - return GL_FALSE; + if (!PLAB2(A->file, inst[i].code1, 4, 0)) + return GL_FALSE; + if (inst[i].code2 != slang_asm_none) + if (!PLAB2(A->file, inst[i].code2, 4, 0)) + return GL_FALSE; - /* clean-up the stack from the remaining dst address */ - if (!PLAB (A->file, slang_asm_local_free, 4)) - return GL_FALSE; + /* clean-up the stack from the remaining dst address */ + if (!PLAB(A->file, slang_asm_local_free, 4)) + return GL_FALSE; - return GL_TRUE; + return GL_TRUE; } static GLboolean -equality_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, GLuint *index, - GLuint size, GLuint z_label) +equality_aggregate(slang_assemble_ctx * A, + const slang_storage_aggregate * agg, GLuint * index, + GLuint size, GLuint z_label) { GLuint i; @@ -727,22 +767,25 @@ equality_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, G for (j = 0; j < arr->length; j++) { if (arr->type == slang_stor_aggregate) { - if (!equality_aggregate (A, arr->aggregate, index, size, z_label)) + if (!equality_aggregate(A, arr->aggregate, index, size, z_label)) return GL_FALSE; } else { #if defined(USE_X86_ASM) || defined(SLANG_X86) if (arr->type == slang_stor_vec4) { - if (!PLAB2 (A->file, slang_asm_vec4_equal_int, size + *index, *index)) + if (!PLAB2 + (A->file, slang_asm_vec4_equal_int, size + *index, *index)) return GL_FALSE; } else #endif - if (!PLAB2 (A->file, slang_asm_float_equal_int, size + *index, *index)) - return GL_FALSE; + if (!PLAB2 + (A->file, slang_asm_float_equal_int, size + *index, + *index)) + return GL_FALSE; - *index += _slang_sizeof_type (arr->type); - if (!PLAB (A->file, slang_asm_jump_if_zero, z_label)) + *index += _slang_sizeof_type(arr->type); + if (!PLAB(A->file, slang_asm_jump_if_zero, z_label)) return GL_FALSE; } } @@ -751,753 +794,755 @@ equality_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, G return GL_TRUE; } -static GLboolean equality (slang_assemble_ctx *A, slang_operation *op, GLboolean equal) +static GLboolean +equality(slang_assemble_ctx * A, slang_operation * op, GLboolean equal) { - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - GLuint index, size; - GLuint skip_jump, true_label, true_jump, false_label, false_jump; - - /* get type of operation */ - if (!slang_assembly_typeinfo_construct (&ti)) - return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) - goto end1; - - /* convert it to an aggregate */ - if (!slang_storage_aggregate_construct (&agg)) - goto end1; - if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) - goto end; - - /* compute the size of the agregate - there are two such aggregates on the stack */ - size = _slang_sizeof_aggregate (&agg); - - /* jump to the actual data-comparison code */ - skip_jump = A->file->count; - if (!PUSH (A->file, slang_asm_jump)) - goto end; - - /* pop off the stack the compared data and push 1 */ - true_label = A->file->count; - if (!PLAB (A->file, slang_asm_local_free, size * 2)) - goto end; - if (!PLIT (A->file, slang_asm_bool_push, (GLfloat) 1)) - goto end; - true_jump = A->file->count; - if (!PUSH (A->file, slang_asm_jump)) - goto end; - - false_label = A->file->count; - if (!PLAB (A->file, slang_asm_local_free, size * 2)) - goto end; - if (!PLIT (A->file, slang_asm_bool_push, (GLfloat) 0)) - goto end; - false_jump = A->file->count; - if (!PUSH (A->file, slang_asm_jump)) - goto end; - - A->file->code[skip_jump].param[0] = A->file->count; - - /* compare the data on stack, it will eventually jump either to true or false label */ - index = 0; - if (!equality_aggregate (A, &agg, &index, size, equal ? false_label : true_label)) - goto end; - if (!PLAB (A->file, slang_asm_jump, equal ? true_label : false_label)) - goto end; - - A->file->code[true_jump].param[0] = A->file->count; - A->file->code[false_jump].param[0] = A->file->count; - - result = GL_TRUE; -end: - slang_storage_aggregate_destruct (&agg); -end1: - slang_assembly_typeinfo_destruct (&ti); - return result; + slang_assembly_typeinfo ti; + GLboolean result = GL_FALSE; + slang_storage_aggregate agg; + GLuint index, size; + GLuint skip_jump, true_label, true_jump, false_label, false_jump; + + /* get type of operation */ + if (!slang_assembly_typeinfo_construct(&ti)) + return GL_FALSE; + if (!_slang_typeof_operation(A, op, &ti)) + goto end1; + + /* convert it to an aggregate */ + if (!slang_storage_aggregate_construct(&agg)) + goto end1; + if (!_slang_aggregate_variable + (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) + goto end; + + /* compute the size of the agregate - there are two such aggregates on the stack */ + size = _slang_sizeof_aggregate(&agg); + + /* jump to the actual data-comparison code */ + skip_jump = A->file->count; + if (!PUSH(A->file, slang_asm_jump)) + goto end; + + /* pop off the stack the compared data and push 1 */ + true_label = A->file->count; + if (!PLAB(A->file, slang_asm_local_free, size * 2)) + goto end; + if (!PLIT(A->file, slang_asm_bool_push, (GLfloat) 1)) + goto end; + true_jump = A->file->count; + if (!PUSH(A->file, slang_asm_jump)) + goto end; + + false_label = A->file->count; + if (!PLAB(A->file, slang_asm_local_free, size * 2)) + goto end; + if (!PLIT(A->file, slang_asm_bool_push, (GLfloat) 0)) + goto end; + false_jump = A->file->count; + if (!PUSH(A->file, slang_asm_jump)) + goto end; + + A->file->code[skip_jump].param[0] = A->file->count; + + /* compare the data on stack, it will eventually jump either to true or false label */ + index = 0; + if (!equality_aggregate + (A, &agg, &index, size, equal ? false_label : true_label)) + goto end; + if (!PLAB(A->file, slang_asm_jump, equal ? true_label : false_label)) + goto end; + + A->file->code[true_jump].param[0] = A->file->count; + A->file->code[false_jump].param[0] = A->file->count; + + result = GL_TRUE; + end: + slang_storage_aggregate_destruct(&agg); + end1: + slang_assembly_typeinfo_destruct(&ti); + return result; } -static GLboolean handle_subscript (slang_assemble_ctx *A, slang_assembly_typeinfo *tie, - slang_assembly_typeinfo *tia, slang_operation *op, slang_ref_type ref) +static GLboolean +handle_subscript(slang_assemble_ctx * A, slang_assembly_typeinfo * tie, + slang_assembly_typeinfo * tia, slang_operation * op, + slang_ref_type ref) { - GLuint asize = 0, esize = 0; - - /* get type info of the master expression (matrix, vector or an array */ - if (!_slang_typeof_operation (A, &op->children[0], tia)) - return GL_FALSE; - if (!sizeof_variable (A, &tia->spec, slang_qual_none, tia->array_len, &asize)) - return GL_FALSE; - - /* get type info of the result (matrix column, vector row or array element) */ - if (!_slang_typeof_operation (A, op, tie)) - return GL_FALSE; - if (!sizeof_variable (A, &tie->spec, slang_qual_none, 0, &esize)) - return GL_FALSE; - - /* assemble the master expression */ - if (!_slang_assemble_operation (A, &op->children[0], ref)) - return GL_FALSE; - - /* when indexing an l-value swizzle, push the swizzle_tmp */ - if (ref == slang_ref_force && tia->is_swizzled) - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; - - /* assemble the subscript expression */ - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - if (ref == slang_ref_force && tia->is_swizzled) - { - GLuint i; - - /* copy the swizzle indexes to the swizzle_tmp */ - for (i = 0; i < tia->swz.num_components; i++) - { - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_addr_push, i * 4)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_add)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_addr_push, tia->swz.swizzle[i])) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - } - - /* offset the pushed swizzle_tmp address and dereference it */ - if (!PUSH (A->file, slang_asm_int_to_addr)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_addr_push, 4)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_multiply)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_add)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_deref)) - return GL_FALSE; - } - else - { - /* convert the integer subscript to a relative address */ - if (!PUSH (A->file, slang_asm_int_to_addr)) - return GL_FALSE; - } - - if (!PLAB (A->file, slang_asm_addr_push, esize)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_multiply)) - return GL_FALSE; - - if (ref == slang_ref_force) - { - /* offset the base address with the relative address */ - if (!PUSH (A->file, slang_asm_addr_add)) - return GL_FALSE; - } - else - { - GLuint i; - - /* move the selected element to the beginning of the master expression */ - for (i = 0; i < esize; i += 4) - if (!PLAB2 (A->file, slang_asm_float_move, asize - esize + i + 4, i + 4)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - - /* free the rest of the master expression */ - if (!PLAB (A->file, slang_asm_local_free, asize - esize)) - return GL_FALSE; - } - - return GL_TRUE; + GLuint asize = 0, esize = 0; + + /* get type info of the master expression (matrix, vector or an array */ + if (!_slang_typeof_operation(A, &op->children[0], tia)) + return GL_FALSE; + if (!sizeof_variable + (A, &tia->spec, slang_qual_none, tia->array_len, &asize)) + return GL_FALSE; + + /* get type info of the result (matrix column, vector row or array element) */ + if (!_slang_typeof_operation(A, op, tie)) + return GL_FALSE; + if (!sizeof_variable(A, &tie->spec, slang_qual_none, 0, &esize)) + return GL_FALSE; + + /* assemble the master expression */ + if (!_slang_assemble_operation(A, &op->children[0], ref)) + return GL_FALSE; + + /* when indexing an l-value swizzle, push the swizzle_tmp */ + if (ref == slang_ref_force && tia->is_swizzled) + if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) + return GL_FALSE; + + /* assemble the subscript expression */ + if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) + return GL_FALSE; + + if (ref == slang_ref_force && tia->is_swizzled) { + GLuint i; + + /* copy the swizzle indexes to the swizzle_tmp */ + for (i = 0; i < tia->swz.num_components; i++) { + if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_addr_push, i * 4)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_add)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_addr_push, tia->swz.swizzle[i])) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_copy)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + } + + /* offset the pushed swizzle_tmp address and dereference it */ + if (!PUSH(A->file, slang_asm_int_to_addr)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_addr_push, 4)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_multiply)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_add)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_deref)) + return GL_FALSE; + } + else { + /* convert the integer subscript to a relative address */ + if (!PUSH(A->file, slang_asm_int_to_addr)) + return GL_FALSE; + } + + if (!PLAB(A->file, slang_asm_addr_push, esize)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_multiply)) + return GL_FALSE; + + if (ref == slang_ref_force) { + /* offset the base address with the relative address */ + if (!PUSH(A->file, slang_asm_addr_add)) + return GL_FALSE; + } + else { + GLuint i; + + /* move the selected element to the beginning of the master expression */ + for (i = 0; i < esize; i += 4) + if (!PLAB2 + (A->file, slang_asm_float_move, asize - esize + i + 4, i + 4)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + + /* free the rest of the master expression */ + if (!PLAB(A->file, slang_asm_local_free, asize - esize)) + return GL_FALSE; + } + + return GL_TRUE; } -static GLboolean handle_field (slang_assemble_ctx *A, slang_assembly_typeinfo *tia, - slang_assembly_typeinfo *tib, slang_operation *op, slang_ref_type ref) +static GLboolean +handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, + slang_assembly_typeinfo * tib, slang_operation * op, + slang_ref_type ref) { - /* get type info of the result (field or swizzle) */ - if (!_slang_typeof_operation (A, op, tia)) - return GL_FALSE; - - /* get type info of the master expression being accessed (struct or vector) */ - if (!_slang_typeof_operation (A, &op->children[0], tib)) - return GL_FALSE; - - /* if swizzling a vector in-place, the swizzle temporary is needed */ - if (ref == slang_ref_forbid && tia->is_swizzled) - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; - - /* assemble the master expression */ - if (!_slang_assemble_operation (A, &op->children[0], ref)) - return GL_FALSE; - - /* assemble the field expression */ - if (tia->is_swizzled) - { - if (ref == slang_ref_force) - { + /* get type info of the result (field or swizzle) */ + if (!_slang_typeof_operation(A, op, tia)) + return GL_FALSE; + + /* get type info of the master expression being accessed (struct or vector) */ + if (!_slang_typeof_operation(A, &op->children[0], tib)) + return GL_FALSE; + + /* if swizzling a vector in-place, the swizzle temporary is needed */ + if (ref == slang_ref_forbid && tia->is_swizzled) + if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) + return GL_FALSE; + + /* assemble the master expression */ + if (!_slang_assemble_operation(A, &op->children[0], ref)) + return GL_FALSE; + + /* assemble the field expression */ + if (tia->is_swizzled) { + if (ref == slang_ref_force) { #if 0 - if (tia->swz.num_components == 1) - { - /* simple case - adjust the vector's address to point to the selected component */ - if (!PLAB (file, slang_asm_addr_push, tia->swz.swizzle[0] * 4)) - return 0; - if (!PUSH (file, slang_asm_addr_add)) - return 0; - } - else + if (tia->swz.num_components == 1) { + /* simple case - adjust the vector's address to point to + * the selected component + */ + if (!PLAB(file, slang_asm_addr_push, tia->swz.swizzle[0] * 4)) + return 0; + if (!PUSH(file, slang_asm_addr_add)) + return 0; + } + else #endif - { - /* two or more vector components are being referenced - the so-called write mask - * must be passed to the upper operations and applied when assigning value - * to this swizzle */ - A->swz = tia->swz; - } - } - else - { - /* swizzle the vector in-place using the swizzle temporary */ - if (!_slang_assemble_constructor_from_swizzle (A, &tia->swz, &tia->spec, &tib->spec)) - return GL_FALSE; - } - } - else - { - GLuint i, struct_size = 0, field_offset = 0, field_size = 0; + { + /* two or more vector components are being referenced - + * the so-called write mask must be passed to the upper + * operations and applied when assigning value to this swizzle + */ + A->swz = tia->swz; + } + } + else { + /* swizzle the vector in-place using the swizzle temporary */ + if (!_slang_assemble_constructor_from_swizzle + (A, &tia->swz, &tia->spec, &tib->spec)) + return GL_FALSE; + } + } + else { + GLuint i, struct_size = 0, field_offset = 0, field_size = 0; /* * Calculate struct size, field offset and field size. */ - for (i = 0; i < tib->spec._struct->fields->num_variables; i++) - { - slang_variable *field; - slang_storage_aggregate agg; - GLuint size; - - field = &tib->spec._struct->fields->variables[i]; - if (!slang_storage_aggregate_construct (&agg)) - return GL_FALSE; - if (!_slang_aggregate_variable (&agg, &field->type.specifier, field->array_len, - A->space.funcs, A->space.structs, A->space.vars, A->mach, A->file, A->atoms)) - { - slang_storage_aggregate_destruct (&agg); - return GL_FALSE; - } - size = _slang_sizeof_aggregate (&agg); - slang_storage_aggregate_destruct (&agg); + for (i = 0; i < tib->spec._struct->fields->num_variables; i++) { + slang_variable *field; + slang_storage_aggregate agg; + GLuint size; + + field = &tib->spec._struct->fields->variables[i]; + if (!slang_storage_aggregate_construct(&agg)) + return GL_FALSE; + if (!_slang_aggregate_variable + (&agg, &field->type.specifier, field->array_len, A->space.funcs, + A->space.structs, A->space.vars, A->mach, A->file, A->atoms)) { + slang_storage_aggregate_destruct(&agg); + return GL_FALSE; + } + size = _slang_sizeof_aggregate(&agg); + slang_storage_aggregate_destruct(&agg); if (op->a_id == field->a_name) { field_size = size; field_offset = struct_size; } struct_size += size; - } + } - if (ref == slang_ref_force) - { + if (ref == slang_ref_force) { GLboolean shift; /* - * OPTIMIZATION: If selecting first field, no address shifting is needed. - */ + * OPTIMIZATION: If selecting first field, no address shifting + * is needed. + */ shift = (field_offset != 0); if (shift) { - if (!PLAB (A->file, slang_asm_addr_push, field_offset)) + if (!PLAB(A->file, slang_asm_addr_push, field_offset)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_addr_add)) return GL_FALSE; - if (!PUSH (A->file, slang_asm_addr_add)) - return GL_FALSE; - } - } - else - { + } + } + else { GLboolean relocate, shrink; - GLuint free_b = 0; + GLuint free_b = 0; /* - * OPTIMIZATION: If selecting last field, no relocation is needed. - */ + * OPTIMIZATION: If selecting last field, no relocation is needed. + */ relocate = (field_offset != (struct_size - field_size)); /* - * OPTIMIZATION: If field and struct sizes are equal, no partial free is needed. - */ + * OPTIMIZATION: If field and struct sizes are equal, no partial + * free is needed. + */ shrink = (field_size != struct_size); - if (relocate) - { - GLuint i; + if (relocate) { + GLuint i; - /* - * Move the selected element to the end of the master expression. - * Do it in reverse order to avoid overwriting itself. - */ - if (!PLAB (A->file, slang_asm_addr_push, field_offset)) + /* + * Move the selected element to the end of the master expression. + * Do it in reverse order to avoid overwriting itself. + */ + if (!PLAB(A->file, slang_asm_addr_push, field_offset)) return GL_FALSE; - for (i = field_size; i > 0; i -= 4) - if (!PLAB2 (A->file, slang_asm_float_move, struct_size - field_size + i, i)) - return GL_FALSE; - free_b += 4; - } - - if (shrink) - { - /* free the rest of the master expression */ - free_b += struct_size - field_size; - } - - if (free_b) - { - if (!PLAB (A->file, slang_asm_local_free, free_b)) - return GL_FALSE; - } - } - } - - return GL_TRUE; + for (i = field_size; i > 0; i -= 4) + if (!PLAB2 + (A->file, slang_asm_float_move, + struct_size - field_size + i, i)) + return GL_FALSE; + free_b += 4; + } + + if (shrink) { + /* free the rest of the master expression */ + free_b += struct_size - field_size; + } + + if (free_b) { + if (!PLAB(A->file, slang_asm_local_free, free_b)) + return GL_FALSE; + } + } + } + + return GL_TRUE; } -GLboolean _slang_assemble_operation (slang_assemble_ctx *A, slang_operation *op, slang_ref_type ref) +GLboolean +_slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, + slang_ref_type ref) { - /* set default results */ - A->ref = /*(ref == slang_ref_freelance) ? slang_ref_force : */ref; - A->swz.num_components = 0; - - switch (op->type) - { - case slang_oper_block_no_new_scope: - case slang_oper_block_new_scope: - { - GLuint i; - - for (i = 0; i < op->num_children; i++) - { - if (!_slang_assemble_operation (A, &op->children[i], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[i])) - return GL_FALSE; - } - } - break; - case slang_oper_variable_decl: - { - GLuint i; - slang_operation assign; - GLboolean result; - - /* Construct assignment expression placeholder. */ - if (!slang_operation_construct (&assign)) - return GL_FALSE; - assign.type = slang_oper_assign; - assign.children = (slang_operation *) slang_alloc_malloc (2 * sizeof (slang_operation)); - if (assign.children == NULL) - { - slang_operation_destruct (&assign); - return GL_FALSE; - } - for (assign.num_children = 0; assign.num_children < 2; assign.num_children++) - if (!slang_operation_construct (&assign.children[assign.num_children])) - { - slang_operation_destruct (&assign); - return GL_FALSE; - } - - result = GL_TRUE; - for (i = 0; i < op->num_children; i++) - { - slang_variable *var; - - var = _slang_locate_variable (op->children[i].locals, op->children[i].a_id, GL_TRUE); - if (var == NULL) - { - result = GL_FALSE; - break; - } - if (var->initializer == NULL) - continue; - - if (!slang_operation_copy (&assign.children[0], &op->children[i]) || - !slang_operation_copy (&assign.children[1], var->initializer) || - !_slang_assemble_assign (A, &assign, "=", slang_ref_forbid) || - !_slang_cleanup_stack (A, &assign)) - { - result = GL_FALSE; - break; - } - } - slang_operation_destruct (&assign); - if (!result) - return GL_FALSE; - } - break; - case slang_oper_asm: - { - GLuint i; - - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_force)) - return GL_FALSE; - for (i = 1; i < op->num_children; i++) - if (!_slang_assemble_operation (A, &op->children[i], slang_ref_forbid)) - return GL_FALSE; - if (!call_asm_instruction (A, op->a_id)) - return GL_FALSE; - } - break; - case slang_oper_break: - if (!PLAB (A->file, slang_asm_jump, A->flow.loop_end)) - return GL_FALSE; - break; - case slang_oper_continue: - if (!PLAB (A->file, slang_asm_jump, A->flow.loop_start)) - return GL_FALSE; - break; - case slang_oper_discard: - if (!PUSH (A->file, slang_asm_discard)) - return GL_FALSE; - if (!PUSH (A->file, slang_asm_exit)) - return GL_FALSE; - break; - case slang_oper_return: - if (A->local.ret_size != 0) - { - /* push the result's address */ - if (!PLAB2 (A->file, slang_asm_local_addr, 0, A->local.ret_size)) - return GL_FALSE; - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - - A->swz.num_components = 0; - /* assign the operation to the function result (it was reserved on the stack) */ - if (!_slang_assemble_assignment (A, op->children)) - return GL_FALSE; - - if (!PLAB (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - } - if (!PLAB (A->file, slang_asm_jump, A->flow.function_end)) - return GL_FALSE; - break; - case slang_oper_expression: - if (ref == slang_ref_force) - return GL_FALSE; - if (!_slang_assemble_operation (A, &op->children[0], ref)) - return GL_FALSE; - break; - case slang_oper_if: - if (!_slang_assemble_if (A, op)) - return GL_FALSE; - break; - case slang_oper_while: - if (!_slang_assemble_while (A, op)) - return GL_FALSE; - break; - case slang_oper_do: - if (!_slang_assemble_do (A, op)) - return GL_FALSE; - break; - case slang_oper_for: - if (!_slang_assemble_for (A, op)) - return GL_FALSE; - break; - case slang_oper_void: - break; - case slang_oper_literal_bool: - if (ref == slang_ref_force) - return GL_FALSE; - if (!PLIT (A->file, slang_asm_bool_push, op->literal)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_literal_int: - if (ref == slang_ref_force) - return GL_FALSE; - if (!PLIT (A->file, slang_asm_int_push, op->literal)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_literal_float: - if (ref == slang_ref_force) - return GL_FALSE; - if (!PLIT (A->file, slang_asm_float_push, op->literal)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_identifier: - { - slang_variable *var; - GLuint size; - - /* find the variable and calculate its size */ - var = _slang_locate_variable (op->locals, op->a_id, GL_TRUE); - if (var == NULL) - return GL_FALSE; - size = 0; - if (!sizeof_variable (A, &var->type.specifier, slang_qual_none, var->array_len, &size)) - return GL_FALSE; - - /* prepare stack for dereferencing */ - if (ref == slang_ref_forbid) - if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - - /* push the variable's address */ - if (var->global) - { - if (!PLAB (A->file, slang_asm_global_addr, var->address)) - return GL_FALSE; - } - else - { - if (!PLAB2 (A->file, slang_asm_local_addr, var->address, size)) - return GL_FALSE; - } - - /* perform the dereference */ - if (ref == slang_ref_forbid) - { - if (!PUSH (A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!PLAB (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - if (!_slang_dereference (A, op)) - return GL_FALSE; - } - } - break; - case slang_oper_sequence: - if (ref == slang_ref_force) - return GL_FALSE; - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[0])) - return GL_FALSE; - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_assign: - if (!_slang_assemble_assign (A, op, "=", ref)) - return GL_FALSE; - break; - case slang_oper_addassign: - if (!_slang_assemble_assign (A, op, "+=", ref)) - return GL_FALSE; - A->ref = ref; - break; - case slang_oper_subassign: - if (!_slang_assemble_assign (A, op, "-=", ref)) - return GL_FALSE; - A->ref = ref; - break; - case slang_oper_mulassign: - if (!_slang_assemble_assign (A, op, "*=", ref)) - return GL_FALSE; - A->ref = ref; - break; - /*case slang_oper_modassign:*/ - /*case slang_oper_lshassign:*/ - /*case slang_oper_rshassign:*/ - /*case slang_oper_orassign:*/ - /*case slang_oper_xorassign:*/ - /*case slang_oper_andassign:*/ - case slang_oper_divassign: - if (!_slang_assemble_assign (A, op, "/=", ref)) - return GL_FALSE; - A->ref = ref; - break; - case slang_oper_select: - if (!_slang_assemble_select (A, op)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_logicalor: - if (!_slang_assemble_logicalor (A, op)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_logicaland: - if (!_slang_assemble_logicaland (A, op)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_logicalxor: - if (!_slang_assemble_function_call_name (A, "^^", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - /*case slang_oper_bitor:*/ - /*case slang_oper_bitxor:*/ - /*case slang_oper_bitand:*/ - case slang_oper_less: - if (!_slang_assemble_function_call_name (A, "<", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_greater: - if (!_slang_assemble_function_call_name (A, ">", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_lessequal: - if (!_slang_assemble_function_call_name (A, "<=", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_greaterequal: - if (!_slang_assemble_function_call_name (A, ">=", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - /*case slang_oper_lshift:*/ - /*case slang_oper_rshift:*/ - case slang_oper_add: - if (!_slang_assemble_function_call_name (A, "+", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_subtract: - if (!_slang_assemble_function_call_name (A, "-", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_multiply: - if (!_slang_assemble_function_call_name (A, "*", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - /*case slang_oper_modulus:*/ - case slang_oper_divide: - if (!_slang_assemble_function_call_name (A, "/", op->children, 2, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_equal: - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - if (!equality (A, op->children, GL_TRUE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_notequal: - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - if (!equality (A, op->children, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_preincrement: - if (!_slang_assemble_assign (A, op, "++", ref)) - return GL_FALSE; - A->ref = ref; - break; - case slang_oper_predecrement: - if (!_slang_assemble_assign (A, op, "--", ref)) - return GL_FALSE; - A->ref = ref; - break; - case slang_oper_plus: - if (!_slang_dereference (A, op)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_minus: - if (!_slang_assemble_function_call_name (A, "-", op->children, 1, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - /*case slang_oper_complement:*/ - case slang_oper_not: - if (!_slang_assemble_function_call_name (A, "!", op->children, 1, GL_FALSE)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_subscript: - { - slang_assembly_typeinfo ti_arr, ti_elem; - - if (!slang_assembly_typeinfo_construct (&ti_arr)) - return GL_FALSE; - if (!slang_assembly_typeinfo_construct (&ti_elem)) - { - slang_assembly_typeinfo_destruct (&ti_arr); - return GL_FALSE; - } - if (!handle_subscript (A, &ti_elem, &ti_arr, op, ref)) - { - slang_assembly_typeinfo_destruct (&ti_arr); - slang_assembly_typeinfo_destruct (&ti_elem); - return GL_FALSE; - } - slang_assembly_typeinfo_destruct (&ti_arr); - slang_assembly_typeinfo_destruct (&ti_elem); - } - break; - case slang_oper_call: - { - slang_function *fun; - - fun = _slang_locate_function (A->space.funcs, op->a_id, op->children, op->num_children, - &A->space, A->atoms); - if (fun == NULL) - { - if (!_slang_assemble_constructor (A, op)) - return GL_FALSE; - } - else - { - if (!_slang_assemble_function_call (A, fun, op->children, op->num_children, GL_FALSE)) - return GL_FALSE; - } - A->ref = slang_ref_forbid; - } - break; - case slang_oper_field: - { - slang_assembly_typeinfo ti_after, ti_before; - - if (!slang_assembly_typeinfo_construct (&ti_after)) - return GL_FALSE; - if (!slang_assembly_typeinfo_construct (&ti_before)) - { - slang_assembly_typeinfo_destruct (&ti_after); - return GL_FALSE; - } - if (!handle_field (A, &ti_after, &ti_before, op, ref)) - { - slang_assembly_typeinfo_destruct (&ti_after); - slang_assembly_typeinfo_destruct (&ti_before); - return GL_FALSE; - } - slang_assembly_typeinfo_destruct (&ti_after); - slang_assembly_typeinfo_destruct (&ti_before); - } - break; - case slang_oper_postincrement: - if (!assemble_function_call_name_dummyint (A, "++", op->children)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - case slang_oper_postdecrement: - if (!assemble_function_call_name_dummyint (A, "--", op->children)) - return GL_FALSE; - A->ref = slang_ref_forbid; - break; - default: - return GL_FALSE; - } - - return GL_TRUE; -} + /* set default results */ + A->ref = /*(ref == slang_ref_freelance) ? slang_ref_force : */ ref; + A->swz.num_components = 0; + + switch (op->type) { + case slang_oper_block_no_new_scope: + case slang_oper_block_new_scope: + { + GLuint i; + + for (i = 0; i < op->num_children; i++) { + if (!_slang_assemble_operation + (A, &op->children[i], + slang_ref_forbid /*slang_ref_freelance */ )) + return GL_FALSE; + if (!_slang_cleanup_stack(A, &op->children[i])) + return GL_FALSE; + } + } + break; + case slang_oper_variable_decl: + { + GLuint i; + slang_operation assign; + GLboolean result; + + /* Construct assignment expression placeholder. */ + if (!slang_operation_construct(&assign)) + return GL_FALSE; + assign.type = slang_oper_assign; + assign.children = + (slang_operation *) slang_alloc_malloc(2 * + sizeof(slang_operation)); + if (assign.children == NULL) { + slang_operation_destruct(&assign); + return GL_FALSE; + } + for (assign.num_children = 0; assign.num_children < 2; + assign.num_children++) + if (!slang_operation_construct + (&assign.children[assign.num_children])) { + slang_operation_destruct(&assign); + return GL_FALSE; + } + + result = GL_TRUE; + for (i = 0; i < op->num_children; i++) { + slang_variable *var; + + var = + _slang_locate_variable(op->children[i].locals, + op->children[i].a_id, GL_TRUE); + if (var == NULL) { + result = GL_FALSE; + break; + } + if (var->initializer == NULL) + continue; + + if (!slang_operation_copy(&assign.children[0], &op->children[i]) + || !slang_operation_copy(&assign.children[1], + var->initializer) + || !_slang_assemble_assign(A, &assign, "=", slang_ref_forbid) + || !_slang_cleanup_stack(A, &assign)) { + result = GL_FALSE; + break; + } + } + slang_operation_destruct(&assign); + if (!result) + return GL_FALSE; + } + break; + case slang_oper_asm: + { + GLuint i; + if (!_slang_assemble_operation(A, &op->children[0], slang_ref_force)) + return GL_FALSE; + for (i = 1; i < op->num_children; i++) + if (!_slang_assemble_operation + (A, &op->children[i], slang_ref_forbid)) + return GL_FALSE; + if (!call_asm_instruction(A, op->a_id)) + return GL_FALSE; + } + break; + case slang_oper_break: + if (!PLAB(A->file, slang_asm_jump, A->flow.loop_end)) + return GL_FALSE; + break; + case slang_oper_continue: + if (!PLAB(A->file, slang_asm_jump, A->flow.loop_start)) + return GL_FALSE; + break; + case slang_oper_discard: + if (!PUSH(A->file, slang_asm_discard)) + return GL_FALSE; + if (!PUSH(A->file, slang_asm_exit)) + return GL_FALSE; + break; + case slang_oper_return: + if (A->local.ret_size != 0) { + /* push the result's address */ + if (!PLAB2(A->file, slang_asm_local_addr, 0, A->local.ret_size)) + return GL_FALSE; + if (!_slang_assemble_operation + (A, &op->children[0], slang_ref_forbid)) + return GL_FALSE; + + A->swz.num_components = 0; + /* assign the operation to the function result (it was reserved on the stack) */ + if (!_slang_assemble_assignment(A, op->children)) + return GL_FALSE; + + if (!PLAB(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + } + if (!PLAB(A->file, slang_asm_jump, A->flow.function_end)) + return GL_FALSE; + break; + case slang_oper_expression: + if (ref == slang_ref_force) + return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[0], ref)) + return GL_FALSE; + break; + case slang_oper_if: + if (!_slang_assemble_if(A, op)) + return GL_FALSE; + break; + case slang_oper_while: + if (!_slang_assemble_while(A, op)) + return GL_FALSE; + break; + case slang_oper_do: + if (!_slang_assemble_do(A, op)) + return GL_FALSE; + break; + case slang_oper_for: + if (!_slang_assemble_for(A, op)) + return GL_FALSE; + break; + case slang_oper_void: + break; + case slang_oper_literal_bool: + if (ref == slang_ref_force) + return GL_FALSE; + if (!PLIT(A->file, slang_asm_bool_push, op->literal)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_literal_int: + if (ref == slang_ref_force) + return GL_FALSE; + if (!PLIT(A->file, slang_asm_int_push, op->literal)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_literal_float: + if (ref == slang_ref_force) + return GL_FALSE; + if (!PLIT(A->file, slang_asm_float_push, op->literal)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_identifier: + { + slang_variable *var; + GLuint size; + + /* find the variable and calculate its size */ + var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); + if (var == NULL) + return GL_FALSE; + size = 0; + if (!sizeof_variable + (A, &var->type.specifier, slang_qual_none, var->array_len, + &size)) + return GL_FALSE; + + /* prepare stack for dereferencing */ + if (ref == slang_ref_forbid) + if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) + return GL_FALSE; + + /* push the variable's address */ + if (var->global) { + if (!PLAB(A->file, slang_asm_global_addr, var->address)) + return GL_FALSE; + } + else { + if (!PLAB2(A->file, slang_asm_local_addr, var->address, size)) + return GL_FALSE; + } + /* perform the dereference */ + if (ref == slang_ref_forbid) { + if (!PUSH(A->file, slang_asm_addr_copy)) + return GL_FALSE; + if (!PLAB(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + if (!_slang_dereference(A, op)) + return GL_FALSE; + } + } + break; + case slang_oper_sequence: + if (ref == slang_ref_force) + return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[0], + slang_ref_forbid /*slang_ref_freelance */ )) + return GL_FALSE; + if (!_slang_cleanup_stack(A, &op->children[0])) + return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_assign: + if (!_slang_assemble_assign(A, op, "=", ref)) + return GL_FALSE; + break; + case slang_oper_addassign: + if (!_slang_assemble_assign(A, op, "+=", ref)) + return GL_FALSE; + A->ref = ref; + break; + case slang_oper_subassign: + if (!_slang_assemble_assign(A, op, "-=", ref)) + return GL_FALSE; + A->ref = ref; + break; + case slang_oper_mulassign: + if (!_slang_assemble_assign(A, op, "*=", ref)) + return GL_FALSE; + A->ref = ref; + break; + /*case slang_oper_modassign: */ + /*case slang_oper_lshassign: */ + /*case slang_oper_rshassign: */ + /*case slang_oper_orassign: */ + /*case slang_oper_xorassign: */ + /*case slang_oper_andassign: */ + case slang_oper_divassign: + if (!_slang_assemble_assign(A, op, "/=", ref)) + return GL_FALSE; + A->ref = ref; + break; + case slang_oper_select: + if (!_slang_assemble_select(A, op)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_logicalor: + if (!_slang_assemble_logicalor(A, op)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_logicaland: + if (!_slang_assemble_logicaland(A, op)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_logicalxor: + if (!_slang_assemble_function_call_name(A, "^^", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + /*case slang_oper_bitor: */ + /*case slang_oper_bitxor: */ + /*case slang_oper_bitand: */ + case slang_oper_less: + if (!_slang_assemble_function_call_name(A, "<", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_greater: + if (!_slang_assemble_function_call_name(A, ">", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_lessequal: + if (!_slang_assemble_function_call_name(A, "<=", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_greaterequal: + if (!_slang_assemble_function_call_name(A, ">=", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + /*case slang_oper_lshift: */ + /*case slang_oper_rshift: */ + case slang_oper_add: + if (!_slang_assemble_function_call_name(A, "+", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_subtract: + if (!_slang_assemble_function_call_name(A, "-", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_multiply: + if (!_slang_assemble_function_call_name(A, "*", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + /*case slang_oper_modulus: */ + case slang_oper_divide: + if (!_slang_assemble_function_call_name(A, "/", op->children, 2, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_equal: + if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) + return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) + return GL_FALSE; + if (!equality(A, op->children, GL_TRUE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_notequal: + if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) + return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) + return GL_FALSE; + if (!equality(A, op->children, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_preincrement: + if (!_slang_assemble_assign(A, op, "++", ref)) + return GL_FALSE; + A->ref = ref; + break; + case slang_oper_predecrement: + if (!_slang_assemble_assign(A, op, "--", ref)) + return GL_FALSE; + A->ref = ref; + break; + case slang_oper_plus: + if (!_slang_dereference(A, op)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_minus: + if (!_slang_assemble_function_call_name + (A, "-", op->children, 1, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + /*case slang_oper_complement: */ + case slang_oper_not: + if (!_slang_assemble_function_call_name + (A, "!", op->children, 1, GL_FALSE)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_subscript: + { + slang_assembly_typeinfo ti_arr, ti_elem; + + if (!slang_assembly_typeinfo_construct(&ti_arr)) + return GL_FALSE; + if (!slang_assembly_typeinfo_construct(&ti_elem)) { + slang_assembly_typeinfo_destruct(&ti_arr); + return GL_FALSE; + } + if (!handle_subscript(A, &ti_elem, &ti_arr, op, ref)) { + slang_assembly_typeinfo_destruct(&ti_arr); + slang_assembly_typeinfo_destruct(&ti_elem); + return GL_FALSE; + } + slang_assembly_typeinfo_destruct(&ti_arr); + slang_assembly_typeinfo_destruct(&ti_elem); + } + break; + case slang_oper_call: + { + slang_function *fun; + + fun = + _slang_locate_function(A->space.funcs, op->a_id, op->children, + op->num_children, &A->space, A->atoms); + if (fun == NULL) { + if (!_slang_assemble_constructor(A, op)) + return GL_FALSE; + } + else { + if (!_slang_assemble_function_call + (A, fun, op->children, op->num_children, GL_FALSE)) + return GL_FALSE; + } + A->ref = slang_ref_forbid; + } + break; + case slang_oper_field: + { + slang_assembly_typeinfo ti_after, ti_before; + + if (!slang_assembly_typeinfo_construct(&ti_after)) + return GL_FALSE; + if (!slang_assembly_typeinfo_construct(&ti_before)) { + slang_assembly_typeinfo_destruct(&ti_after); + return GL_FALSE; + } + if (!handle_field(A, &ti_after, &ti_before, op, ref)) { + slang_assembly_typeinfo_destruct(&ti_after); + slang_assembly_typeinfo_destruct(&ti_before); + return GL_FALSE; + } + slang_assembly_typeinfo_destruct(&ti_after); + slang_assembly_typeinfo_destruct(&ti_before); + } + break; + case slang_oper_postincrement: + if (!assemble_function_call_name_dummyint(A, "++", op->children)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + case slang_oper_postdecrement: + if (!assemble_function_call_name_dummyint(A, "--", op->children)) + return GL_FALSE; + A->ref = slang_ref_forbid; + break; + default: + return GL_FALSE; + } + + return GL_TRUE; +} diff --git a/src/mesa/shader/slang/slang_execute_x86.c b/src/mesa/shader/slang/slang_execute_x86.c index 3e21edff6a..958086ff07 100644 --- a/src/mesa/shader/slang/slang_execute_x86.c +++ b/src/mesa/shader/slang/slang_execute_x86.c @@ -40,40 +40,42 @@ typedef struct { - GLuint index; - GLubyte *csr; + GLuint index; + GLubyte *csr; } fixup; typedef struct { - struct x86_function f; - struct x86_reg r_eax; - struct x86_reg r_ecx; - struct x86_reg r_edx; + struct x86_function f; + struct x86_reg r_eax; + struct x86_reg r_ecx; + struct x86_reg r_edx; struct x86_reg r_ebx; - struct x86_reg r_esp; - struct x86_reg r_ebp; - struct x86_reg r_st0; - struct x86_reg r_st1; - struct x86_reg r_st2; - struct x86_reg r_st3; + struct x86_reg r_esp; + struct x86_reg r_ebp; + struct x86_reg r_st0; + struct x86_reg r_st1; + struct x86_reg r_st2; + struct x86_reg r_st3; struct x86_reg r_st4; - fixup *fixups; - GLuint fixup_count; - GLubyte **labels; - slang_machine *mach; - GLubyte *l_discard; - GLubyte *l_exit; - GLshort fpucntl; + fixup *fixups; + GLuint fixup_count; + GLubyte **labels; + slang_machine *mach; + GLubyte *l_discard; + GLubyte *l_exit; + GLshort fpucntl; } codegen_ctx; -static GLvoid add_fixup (codegen_ctx *G, GLuint index, GLubyte *csr) +static GLvoid +add_fixup(codegen_ctx * G, GLuint index, GLubyte * csr) { - G->fixups = (fixup *) slang_alloc_realloc (G->fixups, G->fixup_count * sizeof (fixup), - (G->fixup_count + 1) * sizeof (fixup)); - G->fixups[G->fixup_count].index = index; - G->fixups[G->fixup_count].csr = csr; - G->fixup_count++; + G->fixups = + (fixup *) slang_alloc_realloc(G->fixups, G->fixup_count * sizeof(fixup), + (G->fixup_count + 1) * sizeof(fixup)); + G->fixups[G->fixup_count].index = index; + G->fixups[G->fixup_count].csr = csr; + G->fixup_count++; } #ifdef NO_FAST_MATH @@ -88,661 +90,665 @@ static GLvoid add_fixup (codegen_ctx *G, GLuint index, GLubyte *csr) /* * XXX - * These should produce a valid code that computes powers. Unfortunately, it does not. + * These should produce a valid code that computes powers. + * Unfortunately, it does not. */ -static void set_fpu_round_neg_inf (codegen_ctx *G) +static void +set_fpu_round_neg_inf(codegen_ctx * G) { - if (G->fpucntl != RND_NEG_FPU) - { - G->fpucntl = RND_NEG_FPU; - x87_fnclex (&G->f); - x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->x86.fpucntl_rnd_neg); - x87_fldcw (&G->f, x86_deref (G->r_eax)); - } + if (G->fpucntl != RND_NEG_FPU) { + G->fpucntl = RND_NEG_FPU; + x87_fnclex(&G->f); + x86_mov_reg_imm(&G->f, G->r_eax, + (GLint) & G->mach->x86.fpucntl_rnd_neg); + x87_fldcw(&G->f, x86_deref(G->r_eax)); + } } -static void emit_x87_ex2 (codegen_ctx *G) +static void +emit_x87_ex2(codegen_ctx * G) { - set_fpu_round_neg_inf (G); - - x87_fld (&G->f, G->r_st0); /* a a */ - x87_fprndint (&G->f); /* int(a) a */ - x87_fld (&G->f, G->r_st0); /* int(a) int(a) a */ - x87_fstp (&G->f, G->r_st3); /* int(a) a int(a)*/ - x87_fsubp (&G->f, G->r_st1);/* frac(a) int(a) */ - x87_f2xm1 (&G->f); /* (2^frac(a))-1 int(a)*/ - x87_fld1 (&G->f); /* 1 (2^frac(a))-1 int(a)*/ - x87_faddp (&G->f, G->r_st1);/* 2^frac(a) int(a) */ - x87_fscale (&G->f); /* 2^a */ + set_fpu_round_neg_inf(G); + + x87_fld(&G->f, G->r_st0); /* a a */ + x87_fprndint(&G->f); /* int(a) a */ + x87_fld(&G->f, G->r_st0); /* int(a) int(a) a */ + x87_fstp(&G->f, G->r_st3); /* int(a) a int(a) */ + x87_fsubp(&G->f, G->r_st1); /* frac(a) int(a) */ + x87_f2xm1(&G->f); /* (2^frac(a))-1 int(a) */ + x87_fld1(&G->f); /* 1 (2^frac(a))-1 int(a) */ + x87_faddp(&G->f, G->r_st1); /* 2^frac(a) int(a) */ + x87_fscale(&G->f); /* 2^a */ } -static void emit_pow (codegen_ctx *G) +static void +emit_pow(codegen_ctx * G) { - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_fld (&G->f, x86_make_disp (G->r_esp, 4)); - x87_fyl2x (&G->f); - emit_x87_ex2 (G); + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); + x87_fyl2x(&G->f); + emit_x87_ex2(G); } #endif -static GLfloat do_ceilf (GLfloat x) +static GLfloat +do_ceilf(GLfloat x) { - return CEILF (x); + return CEILF(x); } -static GLfloat do_floorf (GLfloat x) +static GLfloat +do_floorf(GLfloat x) { - return FLOORF (x); + return FLOORF(x); } static GLfloat -do_ftoi (GLfloat x) +do_ftoi(GLfloat x) { return (GLfloat) ((GLint) (x)); } -static GLfloat do_powf (GLfloat y, GLfloat x) +static GLfloat +do_powf(GLfloat y, GLfloat x) { - return (GLfloat) _mesa_pow ((GLdouble) x, (GLdouble) y); + return (GLfloat) _mesa_pow((GLdouble) x, (GLdouble) y); } static GLvoid -ensure_infolog_created (slang_info_log **infolog) +ensure_infolog_created(slang_info_log ** infolog) { if (*infolog == NULL) { - *infolog = slang_alloc_malloc (sizeof (slang_info_log)); + *infolog = slang_alloc_malloc(sizeof(slang_info_log)); if (*infolog == NULL) return; - slang_info_log_construct (*infolog); + slang_info_log_construct(*infolog); } } -static GLvoid do_print_float (slang_info_log **infolog, GLfloat x) +static GLvoid +do_print_float(slang_info_log ** infolog, GLfloat x) { - _mesa_printf ("slang print: %f\n", x); - ensure_infolog_created (infolog); - slang_info_log_print (*infolog, "%f", x); + _mesa_printf("slang print: %f\n", x); + ensure_infolog_created(infolog); + slang_info_log_print(*infolog, "%f", x); } -static GLvoid do_print_int (slang_info_log **infolog, GLfloat x) +static GLvoid +do_print_int(slang_info_log ** infolog, GLfloat x) { - _mesa_printf ("slang print: %d\n", (GLint) (x)); - ensure_infolog_created (infolog); - slang_info_log_print (*infolog, "%d", (GLint) (x)); + _mesa_printf("slang print: %d\n", (GLint) (x)); + ensure_infolog_created(infolog); + slang_info_log_print(*infolog, "%d", (GLint) (x)); } -static GLvoid do_print_bool (slang_info_log **infolog, GLfloat x) +static GLvoid +do_print_bool(slang_info_log ** infolog, GLfloat x) { - _mesa_printf ("slang print: %s\n", (GLint) (x) ? "true" : "false"); - ensure_infolog_created (infolog); - slang_info_log_print (*infolog, "%s", (GLint) (x) ? "true" : "false"); + _mesa_printf("slang print: %s\n", (GLint) (x) ? "true" : "false"); + ensure_infolog_created(infolog); + slang_info_log_print(*infolog, "%s", (GLint) (x) ? "true" : "false"); } #define FLOAT_ONE 0x3f800000 #define FLOAT_ZERO 0 -static GLvoid codegen_assem (codegen_ctx *G, slang_assembly *a, slang_info_log **infolog) +static GLvoid +codegen_assem(codegen_ctx * G, slang_assembly * a, slang_info_log ** infolog) { - GLint disp, i; - - switch (a->type) - { - case slang_asm_none: - break; - case slang_asm_float_copy: - case slang_asm_int_copy: - case slang_asm_bool_copy: - x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[0])); - x86_pop (&G->f, G->r_ecx); - x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1]), G->r_ecx); - break; - case slang_asm_float_move: - case slang_asm_int_move: - case slang_asm_bool_move: - x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[1])); - x86_add (&G->f, G->r_eax, x86_deref (G->r_esp)); - x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax)); - x86_mov (&G->f, x86_make_disp (G->r_esp, a->param[0]), G->r_eax); - break; - case slang_asm_float_push: - case slang_asm_int_push: - case slang_asm_bool_push: - /* TODO: use push imm32 */ - x86_mov_reg_imm (&G->f, G->r_eax, *((GLint *) &a->literal)); - x86_push (&G->f, G->r_eax); - break; - case slang_asm_float_deref: - case slang_asm_int_deref: - case slang_asm_bool_deref: - case slang_asm_addr_deref: - x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp)); - x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax)); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax); - break; - case slang_asm_float_add: - x87_fld (&G->f, x86_make_disp (G->r_esp, 4)); - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_faddp (&G->f, G->r_st1); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_multiply: - x87_fld (&G->f, x86_make_disp (G->r_esp, 4)); - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_fmulp (&G->f, G->r_st1); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_divide: - x87_fld (&G->f, x86_make_disp (G->r_esp, 4)); - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_fdivp (&G->f, G->r_st1); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_negate: - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_fchs (&G->f); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_less: - x87_fld (&G->f, x86_make_disp (G->r_esp, 4)); - x87_fcomp (&G->f, x86_deref (G->r_esp)); - x87_fnstsw (&G->f, G->r_eax); - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm (&G->f, G->r_ecx, 0x100); - x86_test (&G->f, G->r_eax, G->r_ecx); - { - GLubyte *lab0, *lab1; - - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward (&G->f, cc_E); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward (&G->f); - x86_fixup_fwd_jump (&G->f, lab0); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump (&G->f, lab1); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx); - } - break; - case slang_asm_float_equal_exp: - x87_fld (&G->f, x86_make_disp (G->r_esp, 4)); - x87_fcomp (&G->f, x86_deref (G->r_esp)); - x87_fnstsw (&G->f, G->r_eax); - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000); - x86_test (&G->f, G->r_eax, G->r_ecx); - { - GLubyte *lab0, *lab1; - - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward (&G->f, cc_E); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward (&G->f); - x86_fixup_fwd_jump (&G->f, lab0); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump (&G->f, lab1); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx); - } - break; - case slang_asm_float_equal_int: - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -4)); - x87_fld (&G->f, x86_make_disp (G->r_esp, a->param[0] + 4)); - x87_fcomp (&G->f, x86_make_disp (G->r_esp, a->param[1] + 4)); - x87_fnstsw (&G->f, G->r_eax); - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000); - x86_test (&G->f, G->r_eax, G->r_ecx); - { - GLubyte *lab0, *lab1; - - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward (&G->f, cc_E); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward (&G->f); - x86_fixup_fwd_jump (&G->f, lab0); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump (&G->f, lab1); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx); - } - break; - case slang_asm_float_to_int: + GLint disp, i; + + switch (a->type) { + case slang_asm_none: + break; + case slang_asm_float_copy: + case slang_asm_int_copy: + case slang_asm_bool_copy: + x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, a->param[0])); + x86_pop(&G->f, G->r_ecx); + x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1]), G->r_ecx); + break; + case slang_asm_float_move: + case slang_asm_int_move: + case slang_asm_bool_move: + x86_lea(&G->f, G->r_eax, x86_make_disp(G->r_esp, a->param[1])); + x86_add(&G->f, G->r_eax, x86_deref(G->r_esp)); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_eax)); + x86_mov(&G->f, x86_make_disp(G->r_esp, a->param[0]), G->r_eax); + break; + case slang_asm_float_push: + case slang_asm_int_push: + case slang_asm_bool_push: + /* TODO: use push imm32 */ + x86_mov_reg_imm(&G->f, G->r_eax, *((GLint *) & a->literal)); + x86_push(&G->f, G->r_eax); + break; + case slang_asm_float_deref: + case slang_asm_int_deref: + case slang_asm_bool_deref: + case slang_asm_addr_deref: + x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_eax)); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_eax); + break; + case slang_asm_float_add: + x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_faddp(&G->f, G->r_st1); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_multiply: + x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_fmulp(&G->f, G->r_st1); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_divide: + x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_fdivp(&G->f, G->r_st1); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_negate: + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_fchs(&G->f); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_less: + x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); + x87_fcomp(&G->f, x86_deref(G->r_esp)); + x87_fnstsw(&G->f, G->r_eax); + /* TODO: use test r8,imm8 */ + x86_mov_reg_imm(&G->f, G->r_ecx, 0x100); + x86_test(&G->f, G->r_eax, G->r_ecx); + { + GLubyte *lab0, *lab1; + /* TODO: use jcc rel8 */ + lab0 = x86_jcc_forward(&G->f, cc_E); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); + /* TODO: use jmp rel8 */ + lab1 = x86_jmp_forward(&G->f); + x86_fixup_fwd_jump(&G->f, lab0); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); + x86_fixup_fwd_jump(&G->f, lab1); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); + } + break; + case slang_asm_float_equal_exp: + x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); + x87_fcomp(&G->f, x86_deref(G->r_esp)); + x87_fnstsw(&G->f, G->r_eax); + /* TODO: use test r8,imm8 */ + x86_mov_reg_imm(&G->f, G->r_ecx, 0x4000); + x86_test(&G->f, G->r_eax, G->r_ecx); + { + GLubyte *lab0, *lab1; + /* TODO: use jcc rel8 */ + lab0 = x86_jcc_forward(&G->f, cc_E); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); + /* TODO: use jmp rel8 */ + lab1 = x86_jmp_forward(&G->f); + x86_fixup_fwd_jump(&G->f, lab0); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); + x86_fixup_fwd_jump(&G->f, lab1); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); + } + break; + case slang_asm_float_equal_int: + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, -4)); + x87_fld(&G->f, x86_make_disp(G->r_esp, a->param[0] + 4)); + x87_fcomp(&G->f, x86_make_disp(G->r_esp, a->param[1] + 4)); + x87_fnstsw(&G->f, G->r_eax); + /* TODO: use test r8,imm8 */ + x86_mov_reg_imm(&G->f, G->r_ecx, 0x4000); + x86_test(&G->f, G->r_eax, G->r_ecx); + { + GLubyte *lab0, *lab1; + /* TODO: use jcc rel8 */ + lab0 = x86_jcc_forward(&G->f, cc_E); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); + /* TODO: use jmp rel8 */ + lab1 = x86_jmp_forward(&G->f); + x86_fixup_fwd_jump(&G->f, lab0); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); + x86_fixup_fwd_jump(&G->f, lab1); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); + } + break; + case slang_asm_float_to_int: /* TODO: use fistp without rounding */ - x86_call (&G->f, (GLubyte *) (do_ftoi)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_sine: - /* TODO: use fsin */ - x86_call (&G->f, (GLubyte *) _mesa_sinf); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_arcsine: - /* TODO: use fpatan (?) */ - x86_call (&G->f, (GLubyte *) _mesa_asinf); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_arctan: - /* TODO: use fpatan */ - x86_call (&G->f, (GLubyte *) _mesa_atanf); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_power: - /* TODO: use emit_pow() */ - x86_call (&G->f, (GLubyte *) do_powf); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_log2: - x87_fld1 (&G->f); - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_fyl2x (&G->f); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_floor: - x86_call (&G->f, (GLubyte *) do_floorf); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_ceil: - x86_call (&G->f, (GLubyte *) do_ceilf); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_noise1: - x86_call (&G->f, (GLubyte *) _slang_library_noise1); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_noise2: - x86_call (&G->f, (GLubyte *) _slang_library_noise2); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_noise3: - x86_call (&G->f, (GLubyte *) _slang_library_noise4); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 8)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_float_noise4: - x86_call (&G->f, (GLubyte *) _slang_library_noise4); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12)); - x87_fstp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_int_to_float: - break; - case slang_asm_int_to_addr: - x87_fld (&G->f, x86_deref (G->r_esp)); - x87_fistp (&G->f, x86_deref (G->r_esp)); - break; - case slang_asm_addr_copy: - x86_pop (&G->f, G->r_eax); - x86_mov (&G->f, G->r_ecx, x86_deref (G->r_esp)); - x86_mov (&G->f, x86_deref (G->r_ecx), G->r_eax); - break; - case slang_asm_addr_push: - /* TODO: use push imm32 */ - x86_mov_reg_imm (&G->f, G->r_eax, (GLint) a->param[0]); - x86_push (&G->f, G->r_eax); - break; - case slang_asm_addr_add: - x86_pop (&G->f, G->r_eax); - x86_add (&G->f, x86_deref (G->r_esp), G->r_eax); - break; - case slang_asm_addr_multiply: - x86_pop (&G->f, G->r_ecx); - x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp)); - x86_mul (&G->f, G->r_ecx); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax); - break; - case slang_asm_vec4_tex1d: - x86_call (&G->f, (GLubyte *) _slang_library_tex1d); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12)); - break; - case slang_asm_vec4_tex2d: - x86_call (&G->f, (GLubyte *) _slang_library_tex2d); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16)); - break; - case slang_asm_vec4_tex3d: - x86_call (&G->f, (GLubyte *) _slang_library_tex3d); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20)); - break; - case slang_asm_vec4_texcube: - x86_call (&G->f, (GLubyte *) _slang_library_texcube); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20)); - break; - case slang_asm_vec4_shad1d: - x86_call (&G->f, (GLubyte *) _slang_library_shad1d); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20)); - break; - case slang_asm_vec4_shad2d: - x86_call (&G->f, (GLubyte *) _slang_library_shad2d); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20)); - break; - case slang_asm_jump: - add_fixup (G, a->param[0], x86_jmp_forward (&G->f)); - break; - case slang_asm_jump_if_zero: - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x86_xor (&G->f, G->r_eax, G->r_eax); - x86_cmp (&G->f, G->r_eax, x86_make_disp (G->r_esp, -4)); - { - GLubyte *lab0; - - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward (&G->f, cc_NE); - add_fixup (G, a->param[0], x86_jmp_forward (&G->f)); - x86_fixup_fwd_jump (&G->f, lab0); - } - break; - case slang_asm_enter: - /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ - assert (a->param[0] != 0); - x86_push (&G->f, G->r_ebp); - x86_lea (&G->f, G->r_ebp, x86_make_disp (G->r_esp, (GLint) a->param[0])); - break; - case slang_asm_leave: - x86_pop (&G->f, G->r_ebp); - break; - case slang_asm_local_alloc: - /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ - assert (a->param[0] != 0); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -(GLint) a->param[0])); - break; - case slang_asm_local_free: - /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ - assert (a->param[0] != 0); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, (GLint) a->param[0])); - break; - case slang_asm_local_addr: - disp = -(GLint) (a->param[0] + a->param[1]) + 4; - if (disp != 0) - { - x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_ebp, disp)); - x86_push (&G->f, G->r_eax); - } - else - x86_push (&G->f, G->r_ebp); - break; - case slang_asm_global_addr: - /* TODO: use push imm32 */ - x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->mem + a->param[0]); - x86_push (&G->f, G->r_eax); - break; - case slang_asm_call: - add_fixup (G, a->param[0], x86_call_forward (&G->f)); - break; - case slang_asm_return: - x86_ret (&G->f); - break; - case slang_asm_discard: - x86_jmp (&G->f, G->l_discard); - break; - case slang_asm_exit: - x86_jmp (&G->f, G->l_exit); - break; - /* GL_MESA_shader_debug */ + x86_call(&G->f, (GLubyte *) (do_ftoi)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_sine: + /* TODO: use fsin */ + x86_call(&G->f, (GLubyte *) _mesa_sinf); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_arcsine: + /* TODO: use fpatan (?) */ + x86_call(&G->f, (GLubyte *) _mesa_asinf); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_arctan: + /* TODO: use fpatan */ + x86_call(&G->f, (GLubyte *) _mesa_atanf); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_power: + /* TODO: use emit_pow() */ + x86_call(&G->f, (GLubyte *) do_powf); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_log2: + x87_fld1(&G->f); + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_fyl2x(&G->f); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_floor: + x86_call(&G->f, (GLubyte *) do_floorf); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_ceil: + x86_call(&G->f, (GLubyte *) do_ceilf); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_noise1: + x86_call(&G->f, (GLubyte *) _slang_library_noise1); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_noise2: + x86_call(&G->f, (GLubyte *) _slang_library_noise2); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_noise3: + x86_call(&G->f, (GLubyte *) _slang_library_noise4); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 8)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_float_noise4: + x86_call(&G->f, (GLubyte *) _slang_library_noise4); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 12)); + x87_fstp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_int_to_float: + break; + case slang_asm_int_to_addr: + x87_fld(&G->f, x86_deref(G->r_esp)); + x87_fistp(&G->f, x86_deref(G->r_esp)); + break; + case slang_asm_addr_copy: + x86_pop(&G->f, G->r_eax); + x86_mov(&G->f, G->r_ecx, x86_deref(G->r_esp)); + x86_mov(&G->f, x86_deref(G->r_ecx), G->r_eax); + break; + case slang_asm_addr_push: + /* TODO: use push imm32 */ + x86_mov_reg_imm(&G->f, G->r_eax, (GLint) a->param[0]); + x86_push(&G->f, G->r_eax); + break; + case slang_asm_addr_add: + x86_pop(&G->f, G->r_eax); + x86_add(&G->f, x86_deref(G->r_esp), G->r_eax); + break; + case slang_asm_addr_multiply: + x86_pop(&G->f, G->r_ecx); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); + x86_mul(&G->f, G->r_ecx); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_eax); + break; + case slang_asm_vec4_tex1d: + x86_call(&G->f, (GLubyte *) _slang_library_tex1d); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 12)); + break; + case slang_asm_vec4_tex2d: + x86_call(&G->f, (GLubyte *) _slang_library_tex2d); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); + break; + case slang_asm_vec4_tex3d: + x86_call(&G->f, (GLubyte *) _slang_library_tex3d); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); + break; + case slang_asm_vec4_texcube: + x86_call(&G->f, (GLubyte *) _slang_library_texcube); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); + break; + case slang_asm_vec4_shad1d: + x86_call(&G->f, (GLubyte *) _slang_library_shad1d); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); + break; + case slang_asm_vec4_shad2d: + x86_call(&G->f, (GLubyte *) _slang_library_shad2d); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); + break; + case slang_asm_jump: + add_fixup(G, a->param[0], x86_jmp_forward(&G->f)); + break; + case slang_asm_jump_if_zero: + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x86_xor(&G->f, G->r_eax, G->r_eax); + x86_cmp(&G->f, G->r_eax, x86_make_disp(G->r_esp, -4)); + { + GLubyte *lab0; + /* TODO: use jcc rel8 */ + lab0 = x86_jcc_forward(&G->f, cc_NE); + add_fixup(G, a->param[0], x86_jmp_forward(&G->f)); + x86_fixup_fwd_jump(&G->f, lab0); + } + break; + case slang_asm_enter: + /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ + assert(a->param[0] != 0); + x86_push(&G->f, G->r_ebp); + x86_lea(&G->f, G->r_ebp, x86_make_disp(G->r_esp, (GLint) a->param[0])); + break; + case slang_asm_leave: + x86_pop(&G->f, G->r_ebp); + break; + case slang_asm_local_alloc: + /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ + assert(a->param[0] != 0); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, -(GLint) a->param[0])); + break; + case slang_asm_local_free: + /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ + assert(a->param[0] != 0); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, (GLint) a->param[0])); + break; + case slang_asm_local_addr: + disp = -(GLint) (a->param[0] + a->param[1]) + 4; + if (disp != 0) { + x86_lea(&G->f, G->r_eax, x86_make_disp(G->r_ebp, disp)); + x86_push(&G->f, G->r_eax); + } + else + x86_push(&G->f, G->r_ebp); + break; + case slang_asm_global_addr: + /* TODO: use push imm32 */ + x86_mov_reg_imm(&G->f, G->r_eax, (GLint) & G->mach->mem + a->param[0]); + x86_push(&G->f, G->r_eax); + break; + case slang_asm_call: + add_fixup(G, a->param[0], x86_call_forward(&G->f)); + break; + case slang_asm_return: + x86_ret(&G->f); + break; + case slang_asm_discard: + x86_jmp(&G->f, G->l_discard); + break; + case slang_asm_exit: + x86_jmp(&G->f, G->l_exit); + break; + /* GL_MESA_shader_debug */ case slang_asm_float_print: /* TODO: use push imm32 */ - x86_mov_reg_imm (&G->f, G->r_eax, (GLint) (infolog)); - x86_push (&G->f, G->r_eax); - x86_call (&G->f, (GLubyte *) (do_print_float)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); + x86_mov_reg_imm(&G->f, G->r_eax, (GLint) (infolog)); + x86_push(&G->f, G->r_eax); + x86_call(&G->f, (GLubyte *) (do_print_float)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); break; - case slang_asm_int_print: + case slang_asm_int_print: /* TODO: use push imm32 */ - x86_mov_reg_imm (&G->f, G->r_eax, (GLint) (infolog)); - x86_push (&G->f, G->r_eax); - x86_call (&G->f, (GLubyte *) do_print_int); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - break; - case slang_asm_bool_print: + x86_mov_reg_imm(&G->f, G->r_eax, (GLint) (infolog)); + x86_push(&G->f, G->r_eax); + x86_call(&G->f, (GLubyte *) do_print_int); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + break; + case slang_asm_bool_print: /* TODO: use push imm32 */ - x86_mov_reg_imm (&G->f, G->r_eax, (GLint) (infolog)); - x86_push (&G->f, G->r_eax); - x86_call (&G->f, (GLubyte *) do_print_bool); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - break; - /* vec4 */ + x86_mov_reg_imm(&G->f, G->r_eax, (GLint) (infolog)); + x86_push(&G->f, G->r_eax); + x86_call(&G->f, (GLubyte *) do_print_bool); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + break; + /* vec4 */ case slang_asm_float_to_vec4: /* [vec4] | float > [vec4] */ - x87_fld (&G->f, x86_deref (G->r_esp)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4)); - x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp)); - x87_fst (&G->f, x86_make_disp (G->r_eax, 12)); - x87_fst (&G->f, x86_make_disp (G->r_eax, 8)); - x87_fst (&G->f, x86_make_disp (G->r_eax, 4)); - x87_fstp (&G->f, x86_deref (G->r_eax)); + x87_fld(&G->f, x86_deref(G->r_esp)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); + x87_fst(&G->f, x86_make_disp(G->r_eax, 12)); + x87_fst(&G->f, x86_make_disp(G->r_eax, 8)); + x87_fst(&G->f, x86_make_disp(G->r_eax, 4)); + x87_fstp(&G->f, x86_deref(G->r_eax)); break; case slang_asm_vec4_add: /* [vec4] | vec4 > [vec4] */ - x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, 16)); + x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_eax, i * 4)); + x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_esp, i * 4)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16)); + x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_faddp (&G->f, G->r_st4); + x87_faddp(&G->f, G->r_st4); for (i = 0; i < 4; i++) - x87_fstp (&G->f, x86_make_disp (G->r_eax, 12 - i * 4)); + x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); break; case slang_asm_vec4_subtract: /* [vec4] | vec4 > [vec4] */ - x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, 16)); + x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_eax, i * 4)); + x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_esp, i * 4)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16)); + x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fsubp (&G->f, G->r_st4); + x87_fsubp(&G->f, G->r_st4); for (i = 0; i < 4; i++) - x87_fstp (&G->f, x86_make_disp (G->r_eax, 12 - i * 4)); + x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); break; case slang_asm_vec4_multiply: /* [vec4] | vec4 > [vec4] */ - x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, 16)); + x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_eax, i * 4)); + x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_esp, i * 4)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16)); + x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fmulp (&G->f, G->r_st4); + x87_fmulp(&G->f, G->r_st4); for (i = 0; i < 4; i++) - x87_fstp (&G->f, x86_make_disp (G->r_eax, 12 - i * 4)); + x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); break; case slang_asm_vec4_divide: /* [vec4] | vec4 > [vec4] */ - x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, 16)); + x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_eax, i * 4)); + x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_esp, i * 4)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16)); + x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); for (i = 0; i < 4; i++) - x87_fdivp (&G->f, G->r_st4); + x87_fdivp(&G->f, G->r_st4); for (i = 0; i < 4; i++) - x87_fstp (&G->f, x86_make_disp (G->r_eax, 12 - i * 4)); + x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); break; case slang_asm_vec4_negate: /* [vec4] > [vec4] */ - x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp)); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_eax, i * 4)); + x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); for (i = 0; i < 4; i++) { - x87_fchs (&G->f); - x87_fstp (&G->f, x86_make_disp (G->r_eax, 12 - i * 4)); + x87_fchs(&G->f); + x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); } break; case slang_asm_vec4_dot: /* [vec4] | vec4 > [float] */ for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_esp, i * 4)); - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16)); - x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp)); + x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); for (i = 0; i < 4; i++) - x87_fld (&G->f, x86_make_disp (G->r_eax, i * 4)); + x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); for (i = 0; i < 4; i++) - x87_fmulp (&G->f, G->r_st4); + x87_fmulp(&G->f, G->r_st4); for (i = 0; i < 3; i++) - x87_faddp (&G->f, G->r_st1); - x87_fstp (&G->f, x86_deref (G->r_eax)); + x87_faddp(&G->f, G->r_st1); + x87_fstp(&G->f, x86_deref(G->r_eax)); break; case slang_asm_vec4_copy: /* [vec4] | vec4 > [vec4] */ - x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[0])); - x86_pop (&G->f, G->r_ecx); - x86_pop (&G->f, G->r_edx); - x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1]), G->r_ecx); - x86_pop (&G->f, G->r_ebx); - x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1] + 4), G->r_edx); - x86_pop (&G->f, G->r_ecx); - x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1] + 8), G->r_ebx); - x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1] + 12), G->r_ecx); + x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, a->param[0])); + x86_pop(&G->f, G->r_ecx); + x86_pop(&G->f, G->r_edx); + x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1]), G->r_ecx); + x86_pop(&G->f, G->r_ebx); + x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1] + 4), G->r_edx); + x86_pop(&G->f, G->r_ecx); + x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1] + 8), G->r_ebx); + x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1] + 12), G->r_ecx); break; case slang_asm_vec4_deref: /* [vec4] > vec4 */ - x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp)); - x86_mov (&G->f, G->r_ecx, x86_make_disp (G->r_eax, 12)); - x86_mov (&G->f, G->r_edx, x86_make_disp (G->r_eax, 8)); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx); - x86_mov (&G->f, G->r_ebx, x86_make_disp (G->r_eax, 4)); - x86_push (&G->f, G->r_edx); - x86_mov (&G->f, G->r_ecx, x86_deref (G->r_eax)); - x86_push (&G->f, G->r_ebx); - x86_push (&G->f, G->r_ecx); + x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); + x86_mov(&G->f, G->r_ecx, x86_make_disp(G->r_eax, 12)); + x86_mov(&G->f, G->r_edx, x86_make_disp(G->r_eax, 8)); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); + x86_mov(&G->f, G->r_ebx, x86_make_disp(G->r_eax, 4)); + x86_push(&G->f, G->r_edx); + x86_mov(&G->f, G->r_ecx, x86_deref(G->r_eax)); + x86_push(&G->f, G->r_ebx); + x86_push(&G->f, G->r_ecx); break; case slang_asm_vec4_equal_int: - x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -4)); - x86_mov_reg_imm (&G->f, G->r_edx, 0x4000); + x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, -4)); + x86_mov_reg_imm(&G->f, G->r_edx, 0x4000); for (i = 0; i < 4; i++) { - x87_fld (&G->f, x86_make_disp (G->r_esp, a->param[0] + 4 + i * 4)); - x87_fcomp (&G->f, x86_make_disp (G->r_esp, a->param[1] + 4 + i * 4)); - x87_fnstsw (&G->f, G->r_eax); - x86_and (&G->f, G->r_edx, G->r_eax); + x87_fld(&G->f, x86_make_disp(G->r_esp, a->param[0] + 4 + i * 4)); + x87_fcomp(&G->f, x86_make_disp(G->r_esp, a->param[1] + 4 + i * 4)); + x87_fnstsw(&G->f, G->r_eax); + x86_and(&G->f, G->r_edx, G->r_eax); } /* TODO: use test r8,imm8 */ - x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000); - x86_test (&G->f, G->r_edx, G->r_ecx); + x86_mov_reg_imm(&G->f, G->r_ecx, 0x4000); + x86_test(&G->f, G->r_edx, G->r_ecx); { GLubyte *lab0, *lab1; /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward (&G->f, cc_E); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE); + lab0 = x86_jcc_forward(&G->f, cc_E); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward (&G->f); - x86_fixup_fwd_jump (&G->f, lab0); - x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump (&G->f, lab1); - x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx); + lab1 = x86_jmp_forward(&G->f); + x86_fixup_fwd_jump(&G->f, lab0); + x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); + x86_fixup_fwd_jump(&G->f, lab1); + x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); } break; default: - assert (0); + _mesa_problem(NULL, "Unexpected switch case in codegen_assem"); } } -GLboolean _slang_x86_codegen (slang_machine *mach, slang_assembly_file *file, GLuint start) +GLboolean +_slang_x86_codegen(slang_machine * mach, slang_assembly_file * file, + GLuint start) { - codegen_ctx G; - GLubyte *j_body, *j_exit; - GLuint i; + codegen_ctx G; + GLubyte *j_body, *j_exit; + GLuint i; /* Free the old code - if any. */ if (mach->x86.compiled_func != NULL) { - _mesa_exec_free (mach->x86.compiled_func); + _mesa_exec_free(mach->x86.compiled_func); mach->x86.compiled_func = NULL; } - /* - * We need as much as 1M because *all* assembly, including built-in library, is - * being translated to x86. - * The built-in library occupies 450K, so we can be safe for now. - * It is going to change in the future, when we get assembly analysis running. - */ - x86_init_func_size (&G.f, 1048576); - G.r_eax = x86_make_reg (file_REG32, reg_AX); - G.r_ecx = x86_make_reg (file_REG32, reg_CX); - G.r_edx = x86_make_reg (file_REG32, reg_DX); - G.r_ebx = x86_make_reg (file_REG32, reg_BX); - G.r_esp = x86_make_reg (file_REG32, reg_SP); - G.r_ebp = x86_make_reg (file_REG32, reg_BP); - G.r_st0 = x86_make_reg (file_x87, 0); - G.r_st1 = x86_make_reg (file_x87, 1); - G.r_st2 = x86_make_reg (file_x87, 2); - G.r_st3 = x86_make_reg (file_x87, 3); - G.r_st4 = x86_make_reg (file_x87, 4); - G.fixups = NULL; - G.fixup_count = 0; - G.labels = (GLubyte **) slang_alloc_malloc (file->count * sizeof (GLubyte *)); - G.mach = mach; - G.fpucntl = RESTORE_FPU; - - mach->x86.fpucntl_rnd_neg = RND_NEG_FPU; - mach->x86.fpucntl_restore = RESTORE_FPU; - - /* prepare stack and jump to start */ - x86_push (&G.f, G.r_ebp); - x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore); - x86_push (&G.f, G.r_esp); - x86_pop (&G.f, G.r_ecx); - x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx); - j_body = x86_jmp_forward (&G.f); - - /* "discard" instructions jump to this label */ - G.l_discard = x86_get_label (&G.f); - x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->kill); - x86_mov_reg_imm (&G.f, G.r_ecx, 1); - x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx); - G.l_exit = x86_get_label (&G.f); - j_exit = x86_jmp_forward (&G.f); - - for (i = 0; i < file->count; i++) - { - G.labels[i] = x86_get_label (&G.f); - if (i == start) - x86_fixup_fwd_jump (&G.f, j_body); - codegen_assem (&G, &file->code[i], &mach->infolog); - } - - /* - * Restore stack and return. - * This must be handled this way, because "discard" can be invoked from any - * place in the code. - */ - x86_fixup_fwd_jump (&G.f, j_exit); - x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore); - x86_mov (&G.f, G.r_esp, x86_deref (G.r_eax)); - x86_pop (&G.f, G.r_ebp); - if (G.fpucntl != RESTORE_FPU) - { - x87_fnclex (&G.f); - x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->x86.fpucntl_restore); - x87_fldcw (&G.f, x86_deref (G.r_eax)); - } - x86_ret (&G.f); - - /* fixup forward labels */ - for (i = 0; i < G.fixup_count; i++) - { - G.f.csr = G.labels[G.fixups[i].index]; - x86_fixup_fwd_jump (&G.f, G.fixups[i].csr); - } - - slang_alloc_free (G.fixups); - slang_alloc_free (G.labels); - - /* install new code */ - mach->x86.compiled_func = (GLvoid (*) (slang_machine *)) x86_get_func (&G.f); - - return GL_TRUE; + /* + * We need as much as 1M because *all* assembly, including built-in library, is + * being translated to x86. + * The built-in library occupies 450K, so we can be safe for now. + * It is going to change in the future, when we get assembly analysis running. + */ + x86_init_func_size(&G.f, 1048576); + G.r_eax = x86_make_reg(file_REG32, reg_AX); + G.r_ecx = x86_make_reg(file_REG32, reg_CX); + G.r_edx = x86_make_reg(file_REG32, reg_DX); + G.r_ebx = x86_make_reg(file_REG32, reg_BX); + G.r_esp = x86_make_reg(file_REG32, reg_SP); + G.r_ebp = x86_make_reg(file_REG32, reg_BP); + G.r_st0 = x86_make_reg(file_x87, 0); + G.r_st1 = x86_make_reg(file_x87, 1); + G.r_st2 = x86_make_reg(file_x87, 2); + G.r_st3 = x86_make_reg(file_x87, 3); + G.r_st4 = x86_make_reg(file_x87, 4); + G.fixups = NULL; + G.fixup_count = 0; + G.labels = + (GLubyte **) slang_alloc_malloc(file->count * sizeof(GLubyte *)); + G.mach = mach; + G.fpucntl = RESTORE_FPU; + + mach->x86.fpucntl_rnd_neg = RND_NEG_FPU; + mach->x86.fpucntl_restore = RESTORE_FPU; + + /* prepare stack and jump to start */ + x86_push(&G.f, G.r_ebp); + x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & mach->x86.esp_restore); + x86_push(&G.f, G.r_esp); + x86_pop(&G.f, G.r_ecx); + x86_mov(&G.f, x86_deref(G.r_eax), G.r_ecx); + j_body = x86_jmp_forward(&G.f); + + /* "discard" instructions jump to this label */ + G.l_discard = x86_get_label(&G.f); + x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & G.mach->kill); + x86_mov_reg_imm(&G.f, G.r_ecx, 1); + x86_mov(&G.f, x86_deref(G.r_eax), G.r_ecx); + G.l_exit = x86_get_label(&G.f); + j_exit = x86_jmp_forward(&G.f); + + for (i = 0; i < file->count; i++) { + G.labels[i] = x86_get_label(&G.f); + if (i == start) + x86_fixup_fwd_jump(&G.f, j_body); + codegen_assem(&G, &file->code[i], &mach->infolog); + } + + /* + * Restore stack and return. + * This must be handled this way, because "discard" can be invoked from any + * place in the code. + */ + x86_fixup_fwd_jump(&G.f, j_exit); + x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & mach->x86.esp_restore); + x86_mov(&G.f, G.r_esp, x86_deref(G.r_eax)); + x86_pop(&G.f, G.r_ebp); + if (G.fpucntl != RESTORE_FPU) { + x87_fnclex(&G.f); + x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & G.mach->x86.fpucntl_restore); + x87_fldcw(&G.f, x86_deref(G.r_eax)); + } + x86_ret(&G.f); + + /* fixup forward labels */ + for (i = 0; i < G.fixup_count; i++) { + G.f.csr = G.labels[G.fixups[i].index]; + x86_fixup_fwd_jump(&G.f, G.fixups[i].csr); + } + + slang_alloc_free(G.fixups); + slang_alloc_free(G.labels); + + /* install new code */ + mach->x86.compiled_func = (GLvoid(*)(slang_machine *)) x86_get_func(&G.f); + + return GL_TRUE; } #endif - -- cgit v1.2.3 From aee30f3f9d4c2936ddb735e07ec5988444e0a89e Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Sun, 5 Nov 2006 22:21:11 +0000 Subject: fix using VERT_ATTRIB_WEIGHT instead of VERT_BIT_WEIGHT when assigning vp inputs. --- src/mesa/drivers/dri/r200/r200_vertprog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index acea0dba99..b5afe51d82 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -501,7 +501,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte free_inputs &= ~(1 << 0); array_count++; } - if (mesa_vp->Base.InputsRead & VERT_ATTRIB_WEIGHT) { + if (mesa_vp->Base.InputsRead & VERT_BIT_WEIGHT) { /* we don't actually handle that later. Then again, we don't have to... */ vp->inputs[VERT_ATTRIB_WEIGHT] = 12; array_count++; -- cgit v1.2.3 From 0ddd50c8aec1ae6dfe2d649972abf8f36a4e103e Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Sun, 5 Nov 2006 23:13:19 +0000 Subject: fix vp lockups due to incorrectly set up / emitted attrib inputs. --- src/mesa/drivers/dri/r200/r200_tcl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c index 3334d1e156..86edf7132c 100644 --- a/src/mesa/drivers/dri/r200/r200_tcl.c +++ b/src/mesa/drivers/dri/r200/r200_tcl.c @@ -384,7 +384,7 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx, r200ContextPtr rmesa = R200_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; - GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0; + GLuint inputs = 0; GLuint i; /* TODO: separate this from the swtnl pipeline @@ -404,6 +404,7 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx, r200ValidateState( ctx ); if (!ctx->VertexProgram._Enabled) { + inputs = VERT_BIT_POS | VERT_BIT_COLOR0; /* NOTE: inputs != tnl->render_inputs - these are the untransformed * inputs. */ -- cgit v1.2.3 From 20802a7b695cdb580c479352bc3eab84d1481b2c Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Tue, 7 Nov 2006 17:37:22 +0000 Subject: Commit a small nitpick --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 79ee29cfa5..510704f7d4 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -664,7 +664,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint if (index&(1< Date: Thu, 9 Nov 2006 20:47:22 +0000 Subject: Fix some && (logical) that should clearly have been & (bitwise). --- src/mesa/drivers/x11/xm_span.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c index ff0557800a..a24966b3ae 100644 --- a/src/mesa/drivers/x11/xm_span.c +++ b/src/mesa/drivers/x11/xm_span.c @@ -1453,7 +1453,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS ) pixel &= 0x00ffffff; pixel |= rgba[i][BCOMP] << 24; *ptr4++ = pixel; - pixel = *ptr4 && 0xffff0000; + pixel = *ptr4 & 0xffff0000; pixel |= rgba[i][GCOMP]; pixel |= rgba[i][RCOMP] << 8; *ptr4 = pixel; @@ -1463,7 +1463,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS ) pixel |= rgba[i][BCOMP] << 16; pixel |= rgba[i][GCOMP] << 24; *ptr4++ = pixel; - pixel = *ptr4 && 0xffffff00; + pixel = *ptr4 & 0xffffff00; pixel |= rgba[i][RCOMP]; *ptr4 = pixel; break; @@ -1493,7 +1493,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS ) pixel &= 0x00ffffff; pixel |= rgba[i][BCOMP] << 24; *ptr4++ = pixel; - pixel = *ptr4 && 0xffff0000; + pixel = *ptr4 & 0xffff0000; pixel |= rgba[i][GCOMP]; pixel |= rgba[i++][RCOMP] << 8; *ptr4 = pixel; @@ -1504,7 +1504,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS ) pixel |= rgba[i][BCOMP] << 16; pixel |= rgba[i][GCOMP] << 24; *ptr4++ = pixel; - pixel = *ptr4 && 0xffffff00; + pixel = *ptr4 & 0xffffff00; pixel |= rgba[i++][RCOMP]; *ptr4 = pixel; if (0 == --w) -- cgit v1.2.3 From 3ce4adaa8fc0cb067dd9da3f358556490954f776 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 9 Nov 2006 22:28:09 +0000 Subject: Remove unnecessary setting of GetBufferSize to NULL. --- src/mesa/drivers/dri/r300/radeon_context.c | 1 - src/mesa/drivers/dri/radeon/radeon_context.c | 1 - 2 files changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c index 9ddd2f4e28..3a6bde8fc3 100644 --- a/src/mesa/drivers/dri/r300/radeon_context.c +++ b/src/mesa/drivers/dri/r300/radeon_context.c @@ -102,7 +102,6 @@ static const GLubyte *radeonGetString(GLcontext * ctx, GLenum name) */ static void radeonInitDriverFuncs(struct dd_function_table *functions) { - functions->GetBufferSize = NULL; functions->GetString = radeonGetString; } diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index e4dcc96466..8b92e3fe65 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -171,7 +171,6 @@ static const struct tnl_pipeline_stage *radeon_pipeline[] = { */ static void radeonInitDriverFuncs( struct dd_function_table *functions ) { - functions->GetBufferSize = NULL; /* OBSOLETE */ functions->GetString = radeonGetString; } -- cgit v1.2.3 From d7815f59134b0fb5cb3b56b72b22ba55002265ac Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 10 Nov 2006 00:14:30 +0000 Subject: Implement GLX_SGI_make_current_read Discontinue use of the old GetBuffeSize interface. Track both the current read-drawable and the current draw-drawable. After moving some context state to via_rednerbuffer, GLX_SGI_make_current_read can be enabled. The extension works, but the wincopy test prodcues a black window for the destination window. After messing around with the window and looking at the code, I believe the problem is in the handling of buffer swap requests on a drawable that isn't the current draw-drawable. --- src/mesa/drivers/dri/unichrome/via_context.c | 146 ++++++++++++++++++--------- src/mesa/drivers/dri/unichrome/via_context.h | 33 ++++-- src/mesa/drivers/dri/unichrome/via_ioctl.c | 34 ++++--- src/mesa/drivers/dri/unichrome/via_screen.c | 1 + src/mesa/drivers/dri/unichrome/via_span.c | 10 +- src/mesa/drivers/dri/unichrome/via_state.c | 14 ++- 6 files changed, 153 insertions(+), 85 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index fa143186c1..49c2465655 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -147,10 +147,13 @@ viaRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb, static void -viaInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format) +viaInitRenderbuffer(struct via_renderbuffer *vrb, GLenum format, + __DRIdrawablePrivate *dPriv) { const GLuint name = 0; + struct gl_renderbuffer *rb = & vrb->Base; + vrb->dPriv = dPriv; _mesa_init_renderbuffer(rb, name); /* Make sure we're using a null-valued GetPointer routine */ @@ -198,8 +201,9 @@ viaInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format) * \sa AllocateBuffer */ static GLboolean -calculate_buffer_parameters( struct via_context *vmesa, - struct gl_framebuffer *fb ) +calculate_buffer_parameters(struct via_context *vmesa, + struct gl_framebuffer *fb, + __DRIdrawablePrivate *dPriv) { const unsigned shift = vmesa->viaScreen->bitsPerPixel / 16; const unsigned extra = 32; @@ -215,26 +219,28 @@ calculate_buffer_parameters( struct via_context *vmesa, if (!vmesa->front.Base.InternalFormat) { /* do one-time init for the renderbuffers */ - viaInitRenderbuffer(&vmesa->front.Base, GL_RGBA); + viaInitRenderbuffer(&vmesa->front, GL_RGBA, dPriv); viaSetSpanFunctions(&vmesa->front, &fb->Visual); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &vmesa->front.Base); if (fb->Visual.doubleBufferMode) { - viaInitRenderbuffer(&vmesa->back.Base, GL_RGBA); + viaInitRenderbuffer(&vmesa->back, GL_RGBA, dPriv); viaSetSpanFunctions(&vmesa->back, &fb->Visual); _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &vmesa->back.Base); } if (vmesa->glCtx->Visual.depthBits > 0) { - viaInitRenderbuffer(&vmesa->depth.Base, + viaInitRenderbuffer(&vmesa->depth, (vmesa->glCtx->Visual.depthBits == 16 - ? GL_DEPTH_COMPONENT16 : GL_DEPTH_COMPONENT24)); + ? GL_DEPTH_COMPONENT16 : GL_DEPTH_COMPONENT24), + dPriv); viaSetSpanFunctions(&vmesa->depth, &fb->Visual); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &vmesa->depth.Base); } if (vmesa->glCtx->Visual.stencilBits > 0) { - viaInitRenderbuffer(&vmesa->stencil.Base, GL_STENCIL_INDEX8_EXT); + viaInitRenderbuffer(&vmesa->stencil, GL_STENCIL_INDEX8_EXT, + dPriv); viaSetSpanFunctions(&vmesa->stencil, &fb->Visual); _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &vmesa->stencil.Base); } @@ -243,11 +249,9 @@ calculate_buffer_parameters( struct via_context *vmesa, assert(vmesa->front.Base.InternalFormat); assert(vmesa->front.Base.AllocStorage); if (fb->Visual.doubleBufferMode) { - assert(fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer); - assert(vmesa->front.Base.AllocStorage); + assert(vmesa->back.Base.AllocStorage); } if (fb->Visual.depthBits) { - assert(fb->Attachment[BUFFER_DEPTH].Renderbuffer); assert(vmesa->depth.Base.AllocStorage); } @@ -352,19 +356,11 @@ void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, { struct via_context *vmesa = VIA_CONTEXT(ctx); - calculate_buffer_parameters( vmesa, drawbuffer ); + calculate_buffer_parameters(vmesa, drawbuffer, vmesa->driDrawable); _mesa_resize_framebuffer(ctx, drawbuffer, width, height); } -static void viaBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) -{ - GET_CURRENT_CONTEXT(ctx); - struct via_context *vmesa = VIA_CONTEXT(ctx); - *width = vmesa->driDrawable->w; - *height = vmesa->driDrawable->h; -} - /* Extension strings exported by the Unichrome driver. */ const struct dri_extension card_extensions[] = @@ -579,7 +575,6 @@ viaCreateContext(const __GLcontextModes *visual, ctx->Const.MaxPointSizeAA = 1.0; ctx->Const.PointSizeGranularity = 1.0; - ctx->Driver.GetBufferSize = viaBufferSize; ctx->Driver.GetString = viaGetString; ctx->DriverCtx = (void *)vmesa; @@ -734,50 +729,72 @@ viaDestroyContext(__DRIcontextPrivate *driContextPriv) void viaXMesaWindowMoved(struct via_context *vmesa) { - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + __DRIdrawablePrivate *const drawable = vmesa->driDrawable; + __DRIdrawablePrivate *const readable = vmesa->driReadable; + struct via_renderbuffer *const draw_buffer = + (struct via_renderbuffer *) drawable->driverPrivate; + struct via_renderbuffer *const read_buffer = + (struct via_renderbuffer *) readable->driverPrivate; GLuint bytePerPixel = vmesa->viaScreen->bitsPerPixel >> 3; - if (!dPriv) + if (!drawable) return; switch (vmesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0]) { case BUFFER_BIT_BACK_LEFT: - if (dPriv->numBackClipRects == 0) { - vmesa->numClipRects = dPriv->numClipRects; - vmesa->pClipRects = dPriv->pClipRects; + if (drawable->numBackClipRects == 0) { + vmesa->numClipRects = drawable->numClipRects; + vmesa->pClipRects = drawable->pClipRects; } else { - vmesa->numClipRects = dPriv->numBackClipRects; - vmesa->pClipRects = dPriv->pBackClipRects; + vmesa->numClipRects = drawable->numBackClipRects; + vmesa->pClipRects = drawable->pBackClipRects; } break; case BUFFER_BIT_FRONT_LEFT: - vmesa->numClipRects = dPriv->numClipRects; - vmesa->pClipRects = dPriv->pClipRects; + vmesa->numClipRects = drawable->numClipRects; + vmesa->pClipRects = drawable->pClipRects; break; default: vmesa->numClipRects = 0; break; } - if (vmesa->drawW != dPriv->w || - vmesa->drawH != dPriv->h) - calculate_buffer_parameters( vmesa, vmesa->glCtx->DrawBuffer ); + if ((draw_buffer->drawW != drawable->w) + || (draw_buffer->drawH != drawable->h)) { + calculate_buffer_parameters(vmesa, vmesa->glCtx->DrawBuffer, + drawable); + } - vmesa->drawXoff = (GLuint)(((dPriv->x * bytePerPixel) & 0x1f) / + draw_buffer->drawXoff = (GLuint)(((drawable->x * bytePerPixel) & 0x1f) / bytePerPixel); - vmesa->drawX = dPriv->x - vmesa->drawXoff; - vmesa->drawY = dPriv->y; - vmesa->drawW = dPriv->w; - vmesa->drawH = dPriv->h; + draw_buffer->drawX = drawable->x - draw_buffer->drawXoff; + draw_buffer->drawY = drawable->y; + draw_buffer->drawW = drawable->w; + draw_buffer->drawH = drawable->h; + + if (drawable != readable) { + if ((read_buffer->drawW != readable->w) + || (read_buffer->drawH != readable->h)) { + calculate_buffer_parameters(vmesa, vmesa->glCtx->ReadBuffer, + readable); + } + + read_buffer->drawXoff = (GLuint)(((readable->x * bytePerPixel) & 0x1f) / + bytePerPixel); + read_buffer->drawX = readable->x - read_buffer->drawXoff; + read_buffer->drawY = readable->y; + read_buffer->drawW = readable->w; + read_buffer->drawH = readable->h; + } vmesa->front.orig = (vmesa->front.offset + - vmesa->drawY * vmesa->front.pitch + - vmesa->drawX * bytePerPixel); + draw_buffer->drawY * vmesa->front.pitch + + draw_buffer->drawX * bytePerPixel); vmesa->front.origMap = (vmesa->front.map + - vmesa->drawY * vmesa->front.pitch + - vmesa->drawX * bytePerPixel); + draw_buffer->drawY * vmesa->front.pitch + + draw_buffer->drawX * bytePerPixel); vmesa->back.orig = vmesa->back.offset; vmesa->depth.orig = vmesa->depth.offset; @@ -813,15 +830,41 @@ viaMakeCurrent(__DRIcontextPrivate *driContextPriv, drawBuffer = (GLframebuffer *)driDrawPriv->driverPrivate; readBuffer = (GLframebuffer *)driReadPriv->driverPrivate; - if ( vmesa->driDrawable != driDrawPriv ) { - driDrawableInitVBlank( driDrawPriv, vmesa->vblank_flags, - &vmesa->vbl_seq ); - vmesa->driDrawable = driDrawPriv; - if ( ! calculate_buffer_parameters( vmesa, drawBuffer ) ) { - return GL_FALSE; - } + if (vmesa->driDrawable != driDrawPriv) { + driDrawableInitVBlank(driDrawPriv, vmesa->vblank_flags, + &vmesa->vbl_seq); } + if ((vmesa->driDrawable != driDrawPriv) + || (vmesa->driReadable != driReadPriv)) { + vmesa->driDrawable = driDrawPriv; + vmesa->driReadable = driReadPriv; + + if ((drawBuffer->Width != driDrawPriv->w) + || (drawBuffer->Height != driDrawPriv->h)) { + _mesa_resize_framebuffer(ctx, drawBuffer, + driDrawPriv->w, driDrawPriv->h); + drawBuffer->Initialized = GL_TRUE; + } + + if (!calculate_buffer_parameters(vmesa, drawBuffer, driDrawPriv)) { + return GL_FALSE; + } + + if (driDrawPriv != driReadPriv) { + if ((readBuffer->Width != driReadPriv->w) + || (readBuffer->Height != driReadPriv->h)) { + _mesa_resize_framebuffer(ctx, readBuffer, + driReadPriv->w, driReadPriv->h); + readBuffer->Initialized = GL_TRUE; + } + + if (!calculate_buffer_parameters(vmesa, readBuffer, driReadPriv)) { + return GL_FALSE; + } + } + } + _mesa_make_current(vmesa->glCtx, drawBuffer, readBuffer); ctx->Driver.DrawBuffer( ctx, ctx->Color.DrawBuffer[0] ); @@ -847,7 +890,10 @@ void viaGetLock(struct via_context *vmesa, GLuint flags) drmGetLock(vmesa->driFd, vmesa->hHWContext, flags); - DRI_VALIDATE_DRAWABLE_INFO( sPriv, dPriv ); + DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv); + if (dPriv != vmesa->driReadable) { + DRI_VALIDATE_DRAWABLE_INFO(sPriv, vmesa->driReadable); + } if (vmesa->sarea->ctxOwner != vmesa->hHWContext) { vmesa->sarea->ctxOwner = vmesa->hHWContext; diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h index 9d7a0e6cb6..77161a8d5d 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.h +++ b/src/mesa/drivers/dri/unichrome/via_context.h @@ -98,6 +98,18 @@ struct via_renderbuffer { * at (drawX,drawY) in screen space. */ char *origMap; + + int drawX; /* origin of drawable in draw buffer */ + int drawY; + int drawW; + int drawH; + + int drawXoff; /* drawX is 32byte aligned - this is + * the delta to the real origin, in + * pixel units. + */ + + __DRIdrawablePrivate *dPriv; }; @@ -272,16 +284,6 @@ struct via_context { struct via_renderbuffer *drawBuffer; - int drawX; /* origin of drawable in draw buffer */ - int drawY; - int drawW; - int drawH; - - int drawXoff; /* drawX is 32byte aligned - this is - * the delta to the real origin, in - * pixel units. - */ - GLuint numClipRects; /* cliprects for that buffer */ drm_clip_rect_t *pClipRects; @@ -294,7 +296,16 @@ struct via_context { int driFd; __DRInativeDisplay *display; - __DRIdrawablePrivate *driDrawable; + /** + * DRI drawable bound to this context for drawing. + */ + __DRIdrawablePrivate *driDrawable; + + /** + * DRI drawable bound to this context for reading. + */ + __DRIdrawablePrivate *driReadable; + __DRIscreenPrivate *driScreen; viaScreenPrivate *viaScreen; drm_via_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index dd2e93b286..5d102de93e 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -182,8 +182,8 @@ static void viaFillBuffer(struct via_context *vmesa, GLuint i; for (i = 0; i < nboxes ; i++) { - int x = pbox[i].x1 - vmesa->drawX; - int y = pbox[i].y1 - vmesa->drawY; + int x = pbox[i].x1 - buffer->drawX; + int y = pbox[i].y1 - buffer->drawY; int w = pbox[i].x2 - pbox[i].x1; int h = pbox[i].y2 - pbox[i].y1; @@ -206,6 +206,8 @@ static void viaClear(GLcontext *ctx, GLbitfield mask) { struct via_context *vmesa = VIA_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + struct via_renderbuffer *const vrb = + (struct via_renderbuffer *) dPriv->driverPrivate; int flag = 0; GLuint i = 0; GLuint clear_depth_mask = 0xf << 28; @@ -274,8 +276,8 @@ static void viaClear(GLcontext *ctx, GLbitfield mask) /* flip top to bottom */ cy = dPriv->h - cy - ch; - cx += vmesa->drawX + vmesa->drawXoff; - cy += vmesa->drawY; + cx += vrb->drawX + vrb->drawXoff; + cy += vrb->drawY; if (!all) { drm_clip_rect_t *b = vmesa->pClipRects; @@ -352,8 +354,8 @@ static void viaDoSwapBuffers(struct via_context *vmesa, GLuint i; for (i = 0; i < nbox; i++, b++) { - GLint x = b->x1 - vmesa->drawX; - GLint y = b->y1 - vmesa->drawY; + GLint x = b->x1 - back->drawX; + GLint y = b->y1 - back->drawY; GLint w = b->x2 - b->x1; GLint h = b->y2 - b->y1; @@ -766,7 +768,7 @@ static void via_emit_cliprect(struct via_context *vmesa, vb[4] = (HC_SubA_HDBBasL << 24) | (offset & 0xFFFFFF); vb[5] = (HC_SubA_HDBBasH << 24) | ((offset & 0xFF000000) >> 24); - vb[6] = (HC_SubA_HSPXYOS << 24) | ((31-vmesa->drawXoff) << HC_HSPXOS_SHIFT); + vb[6] = (HC_SubA_HSPXYOS << 24) | ((31 - buffer->drawXoff) << HC_HSPXOS_SHIFT); vb[7] = (HC_SubA_HDBFM << 24) | HC_HDBLoc_Local | format | pitch; } @@ -881,21 +883,25 @@ void viaFlushDmaLocked(struct via_context *vmesa, GLuint flags) } else if (vmesa->numClipRects) { drm_clip_rect_t *pbox = vmesa->pClipRects; - + __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + struct via_renderbuffer *const vrb = + (struct via_renderbuffer *) dPriv->driverPrivate; + + for (i = 0; i < vmesa->numClipRects; i++) { drm_clip_rect_t b; - b.x1 = pbox[i].x1 - (vmesa->drawX + vmesa->drawXoff); - b.x2 = pbox[i].x2 - (vmesa->drawX + vmesa->drawXoff); - b.y1 = pbox[i].y1 - vmesa->drawY; - b.y2 = pbox[i].y2 - vmesa->drawY; + b.x1 = pbox[i].x1 - (vrb->drawX + vrb->drawXoff); + b.x2 = pbox[i].x2 - (vrb->drawX + vrb->drawXoff); + b.y1 = pbox[i].y1 - vrb->drawY; + b.y2 = pbox[i].y2 - vrb->drawY; if (vmesa->scissor && !intersect_rect(&b, &b, &vmesa->scissorRect)) continue; - b.x1 += vmesa->drawXoff; - b.x2 += vmesa->drawXoff; + b.x1 += vrb->drawXoff; + b.x2 += vrb->drawXoff; via_emit_cliprect(vmesa, &b); diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 98a742c720..28e1f9451e 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -182,6 +182,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv) (*glx_enable_extension)( psc, "GLX_MESA_swap_control" ); } + (*glx_enable_extension)( psc, "GLX_SGI_make_current_read" ); (*glx_enable_extension)( psc, "GLX_MESA_swap_frame_usage" ); } diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index 6ff95cc444..f1ed98036b 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -41,13 +41,12 @@ #undef LOCAL_VARS #define LOCAL_VARS \ - struct via_context *vmesa = VIA_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; \ struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \ + __DRIdrawablePrivate *dPriv = vrb->dPriv; \ GLuint pitch = vrb->pitch; \ GLuint height = dPriv->h; \ GLint p = 0; \ - char *buf = (char *)(vrb->origMap + vmesa->drawXoff * vrb->bpp); \ + char *buf = (char *)(vrb->origMap + vrb->drawXoff * vrb->bpp); \ (void) p; /* ================================================================ @@ -79,12 +78,11 @@ /* 16 bit depthbuffer functions. */ #define LOCAL_DEPTH_VARS \ - struct via_context *vmesa = VIA_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; \ struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \ + __DRIdrawablePrivate *dPriv = vrb->dPriv; \ GLuint depth_pitch = vrb->pitch; \ GLuint height = dPriv->h; \ - char *buf = (char *)(vrb->map + (vmesa->drawXoff * vrb->bpp/8)) + char *buf = (char *)(vrb->map + (vrb->drawXoff * vrb->bpp/8)) #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c index c001661d0b..2c9cfca522 100644 --- a/src/mesa/drivers/dri/unichrome/via_state.c +++ b/src/mesa/drivers/dri/unichrome/via_state.c @@ -476,6 +476,9 @@ void viaEmitState(struct via_context *vmesa) */ if (ctx->Polygon.StippleFlag) { GLuint *stipple = &ctx->PolygonStipple[0]; + __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + struct via_renderbuffer *const vrb = + (struct via_renderbuffer *) dPriv->driverPrivate; GLint i; BEGIN_RING(38); @@ -498,9 +501,9 @@ void viaEmitState(struct via_context *vmesa) OUT_RING( HC_HEADER2 ); OUT_RING( (HC_ParaType_NotTex << 16) ); OUT_RING( (HC_SubA_HSPXYOS << 24) | - (((32- vmesa->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT)); + (((32- vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT)); OUT_RING( (HC_SubA_HSPXYOS << 24) | - (((32 - vmesa->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT)); + (((32 - vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT)); ADVANCE_RING(); } @@ -720,15 +723,18 @@ static void viaColorMask(GLcontext *ctx, void viaCalcViewport(GLcontext *ctx) { struct via_context *vmesa = VIA_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + struct via_renderbuffer *const vrb = + (struct via_renderbuffer *) dPriv->driverPrivate; const GLfloat *v = ctx->Viewport._WindowMap.m; GLfloat *m = vmesa->ViewportMatrix.m; /* See also via_translate_vertex. */ m[MAT_SX] = v[MAT_SX]; - m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X + vmesa->drawXoff; + m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X + vrb->drawXoff; m[MAT_SY] = - v[MAT_SY]; - m[MAT_TY] = - v[MAT_TY] + vmesa->driDrawable->h + SUBPIXEL_Y; + m[MAT_TY] = - v[MAT_TY] + dPriv->h + SUBPIXEL_Y; m[MAT_SZ] = v[MAT_SZ] * (1.0 / vmesa->depth_max); m[MAT_TZ] = v[MAT_TZ] * (1.0 / vmesa->depth_max); } -- cgit v1.2.3 From 28623163098a92bf43af882fbc63e9ce9f910a26 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 10 Nov 2006 00:32:35 +0000 Subject: Fix up texture compression at least Get and TexImage, not too sure about how to fix SubTexImage with compressed textures --- src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c | 14 ++- src/mesa/drivers/dri/i915tex/intel_mipmap_tree.h | 2 +- src/mesa/drivers/dri/i915tex/intel_tex.c | 5 + src/mesa/drivers/dri/i915tex/intel_tex.h | 14 +++ src/mesa/drivers/dri/i915tex/intel_tex_format.c | 22 ++++ src/mesa/drivers/dri/i915tex/intel_tex_image.c | 129 ++++++++++++++++------ src/mesa/drivers/dri/i915tex/intel_tex_validate.c | 6 +- 7 files changed, 151 insertions(+), 41 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c index 2ebe3ae14e..2b1077aee0 100644 --- a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c @@ -56,7 +56,7 @@ intel_miptree_create(struct intel_context *intel, GLuint last_level, GLuint width0, GLuint height0, - GLuint depth0, GLuint cpp, GLboolean compressed) + GLuint depth0, GLuint cpp, GLuint compress_byte) { GLboolean ok; struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1); @@ -72,8 +72,8 @@ intel_miptree_create(struct intel_context *intel, mt->width0 = width0; mt->height0 = height0; mt->depth0 = depth0; - mt->cpp = compressed ? 2 : cpp; - mt->compressed = compressed; + mt->cpp = compress_byte ? compress_byte : cpp; + mt->compressed = compress_byte ? 1 : 0; mt->refcount = 1; switch (intel->intelScreen->deviceID) { @@ -302,11 +302,15 @@ intel_miptree_image_data(struct intel_context *intel, GLuint dst_offset = intel_miptree_image_offset(dst, face, level); const GLuint *dst_depth_offset = intel_miptree_depth_offsets(dst, level); GLuint i; + GLuint height = 0; DBG("%s\n", __FUNCTION__); for (i = 0; i < depth; i++) { + height = dst->level[level].height; + if(dst->compressed) + height /= 4; intel_region_data(intel->intelScreen, dst->region, dst_offset + dst_depth_offset[i], 0, 0, src, src_row_pitch, 0, 0, /* source x,y */ - dst->level[level].width, dst->level[level].height); + dst->level[level].width, height); src += src_image_pitch; } @@ -329,6 +333,8 @@ intel_miptree_image_copy(struct intel_context *intel, const GLuint *src_depth_offset = intel_miptree_depth_offsets(src, level); GLuint i; + if (dst->compressed) + height /= 4; for (i = 0; i < depth; i++) { intel_region_copy(intel->intelScreen, dst->region, dst_offset + dst_depth_offset[i], diff --git a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.h b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.h index e6dd5bb600..ecdb7be244 100644 --- a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.h @@ -121,7 +121,7 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel, GLuint height0, GLuint depth0, GLuint cpp, - GLboolean compressed); + GLuint compress_byte); void intel_miptree_reference(struct intel_mipmap_tree **dst, struct intel_mipmap_tree *src); diff --git a/src/mesa/drivers/dri/i915tex/intel_tex.c b/src/mesa/drivers/dri/i915tex/intel_tex.c index 8046c29d95..b08dee43bc 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex.c @@ -171,6 +171,11 @@ intelInitTextureFuncs(struct dd_function_table *functions) functions->CopyTexSubImage1D = intelCopyTexSubImage1D; functions->CopyTexSubImage2D = intelCopyTexSubImage2D; functions->GetTexImage = intelGetTexImage; + + /* compressed texture functions */ + functions->CompressedTexImage2D = intelCompressedTexImage2D; + functions->GetCompressedTexImage = intelGetCompressedTexImage; + functions->NewTextureObject = intelNewTextureObject; functions->NewTextureImage = intelNewTextureImage; functions->DeleteTexture = intelDeleteTextureObject; diff --git a/src/mesa/drivers/dri/i915tex/intel_tex.h b/src/mesa/drivers/dri/i915tex/intel_tex.h index 2f3d4ec2d1..6e9938fe53 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex.h +++ b/src/mesa/drivers/dri/i915tex/intel_tex.h @@ -123,6 +123,18 @@ void intelGetTexImage(GLcontext * ctx, GLenum target, GLint level, struct gl_texture_object *texObj, struct gl_texture_image *texImage); +void intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + +void intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level, + GLvoid *pixels, + const struct gl_texture_object *texObj, + const struct gl_texture_image *texImage); + GLuint intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit); void intel_tex_map_images(struct intel_context *intel, @@ -131,4 +143,6 @@ void intel_tex_map_images(struct intel_context *intel, void intel_tex_unmap_images(struct intel_context *intel, struct intel_texture_object *intelObj); +int intel_compressed_num_bytes(GLuint mesaFormat); + #endif diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_format.c b/src/mesa/drivers/dri/i915tex/intel_tex_format.c index 33281295dc..6e058dff69 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_format.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_format.c @@ -148,3 +148,25 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat, return NULL; /* never get here */ } + +int intel_compressed_num_bytes(GLuint mesaFormat) +{ + int bytes = 0; + switch(mesaFormat) { + + case MESA_FORMAT_RGB_FXT1: + case MESA_FORMAT_RGBA_FXT1: + case MESA_FORMAT_RGB_DXT1: + case MESA_FORMAT_RGBA_DXT1: + bytes = 2; + break; + + case MESA_FORMAT_RGBA_DXT3: + case MESA_FORMAT_RGBA_DXT5: + bytes = 4; + default: + break; + } + + return bytes; +} diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_image.c b/src/mesa/drivers/dri/i915tex/intel_tex_image.c index 48c2f35d3b..79f377a4b7 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_image.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_image.c @@ -69,7 +69,7 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel, GLuint height = intelImage->base.Height; GLuint depth = intelImage->base.Depth; GLuint l2width, l2height, l2depth; - GLuint i; + GLuint i, comp_byte = 0; DBG("%s\n", __FUNCTION__); @@ -121,6 +121,8 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel, } assert(!intelObj->mt); + if (intelImage->base.IsCompressed) + comp_byte = intel_compressed_num_bytes(intelImage->base.TexFormat->MesaFormat); intelObj->mt = intel_miptree_create(intel, intelObj->base.Target, intelImage->base.InternalFormat, @@ -130,7 +132,7 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel, height, depth, intelImage->base.TexFormat->TexelBytes, - intelImage->base.IsCompressed); + comp_byte); DBG("%s - success\n", __FUNCTION__); } @@ -298,7 +300,7 @@ intelTexImage(GLcontext * ctx, GLenum format, GLenum type, const void *pixels, const struct gl_pixelstore_attrib *unpack, struct gl_texture_object *texObj, - struct gl_texture_image *texImage) + struct gl_texture_image *texImage, GLsizei imageSize, int compressed) { struct intel_context *intel = intel_context(ctx); struct intel_texture_object *intelObj = intel_texture_object(texObj); @@ -346,17 +348,26 @@ intelTexImage(GLcontext * ctx, break; } - texelBytes = texImage->TexFormat->TexelBytes; - - - /* Minimum pitch of 32 bytes */ - if (postConvWidth * texelBytes < 32) { - postConvWidth = 32 / texelBytes; - texImage->RowStride = postConvWidth; + if (texImage->TexFormat->TexelBytes == 0) { + /* must be a compressed format */ + texelBytes = 0; + texImage->IsCompressed = GL_TRUE; + texImage->CompressedSize = + ctx->Driver.CompressedTextureSize(ctx, texImage->Width, + texImage->Height, texImage->Depth, + texImage->TexFormat->MesaFormat); + } else { + texelBytes = texImage->TexFormat->TexelBytes; + + /* Minimum pitch of 32 bytes */ + if (postConvWidth * texelBytes < 32) { + postConvWidth = 32 / texelBytes; + texImage->RowStride = postConvWidth; + } + + assert(texImage->RowStride == postConvWidth); } - assert(texImage->RowStride == postConvWidth); - /* Release the reference to a potentially orphaned buffer. * Release any old malloced memory. */ @@ -453,9 +464,15 @@ intelTexImage(GLcontext * ctx, * the expectation that the mipmap tree will be set up but nothing * more will be done. This is where those calls return: */ - pixels = _mesa_validate_pbo_teximage(ctx, dims, width, height, 1, - format, type, - pixels, unpack, "glTexImage"); + if (compressed) { + pixels = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, pixels, + unpack, + "glCompressedTexImage"); + } else { + pixels = _mesa_validate_pbo_teximage(ctx, dims, width, height, 1, + format, type, + pixels, unpack, "glTexImage"); + } if (!pixels) return; @@ -478,7 +495,7 @@ intelTexImage(GLcontext * ctx, if (texImage->IsCompressed) { sizeInBytes = texImage->CompressedSize; dstRowStride = - _mesa_compressed_row_stride(texImage->InternalFormat, width); + _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width); assert(dims != 3); } else { @@ -497,14 +514,16 @@ intelTexImage(GLcontext * ctx, * the blitter to copy. Or, use the hardware to do the format * conversion and copy: */ - if (!texImage->TexFormat->StoreImage(ctx, dims, - texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, - texImage->ImageOffsets, - width, height, depth, - format, type, pixels, unpack)) { + if (compressed) { + memcpy(texImage->Data, pixels, imageSize); + } else if (!texImage->TexFormat->StoreImage(ctx, dims, + texImage->_BaseFormat, + texImage->TexFormat, + texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ + dstRowStride, + texImage->ImageOffsets, + width, height, depth, + format, type, pixels, unpack)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); } @@ -541,7 +560,7 @@ intelTexImage3D(GLcontext * ctx, { intelTexImage(ctx, 3, target, level, internalFormat, width, height, depth, border, - format, type, pixels, unpack, texObj, texImage); + format, type, pixels, unpack, texObj, texImage, 0, 0); } @@ -557,7 +576,7 @@ intelTexImage2D(GLcontext * ctx, { intelTexImage(ctx, 2, target, level, internalFormat, width, height, 1, border, - format, type, pixels, unpack, texObj, texImage); + format, type, pixels, unpack, texObj, texImage, 0, 0); } void @@ -572,20 +591,30 @@ intelTexImage1D(GLcontext * ctx, { intelTexImage(ctx, 1, target, level, internalFormat, width, 1, 1, border, - format, type, pixels, unpack, texObj, texImage); + format, type, pixels, unpack, texObj, texImage, 0, 0); } - +void intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + intelTexImage(ctx, 2, target, level, + internalFormat, width, height, 1, border, + 0, 0, data, &ctx->Unpack, texObj, texImage, imageSize, 1); +} /** * Need to map texture image into memory before copying image data, * then unmap it. */ -void -intelGetTexImage(GLcontext * ctx, GLenum target, GLint level, - GLenum format, GLenum type, GLvoid * pixels, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) +static void +intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid * pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, int compressed) { struct intel_context *intel = intel_context(ctx); struct intel_texture_image *intelImage = intel_texture_image(texImage); @@ -615,8 +644,15 @@ intelGetTexImage(GLcontext * ctx, GLenum target, GLint level, assert(intelImage->base.Data); } - _mesa_get_teximage(ctx, target, level, format, type, pixels, - texObj, texImage); + + if (compressed) { + _mesa_get_compressed_teximage(ctx, target, level, pixels, + texObj, texImage); + } else { + _mesa_get_teximage(ctx, target, level, format, type, pixels, + texObj, texImage); + } + /* Unmap */ if (intelImage->mt) { @@ -624,3 +660,26 @@ intelGetTexImage(GLcontext * ctx, GLenum target, GLint level, intelImage->base.Data = NULL; } } + +void +intelGetTexImage(GLcontext * ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid * pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage) +{ + intel_get_tex_image(ctx, target, level, format, type, pixels, + texObj, texImage, 0); + + +} + +void +intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level, + GLvoid *pixels, + const struct gl_texture_object *texObj, + const struct gl_texture_image *texImage) +{ + intel_get_tex_image(ctx, target, level, 0, 0, pixels, + texObj, texImage, 1); + +} diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c index e273716b09..5f82dfa19e 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c @@ -165,6 +165,10 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) /* May need to create a new tree: */ if (!intelObj->mt) { + int comp_byte = 0; + + if (firstImage->base.IsCompressed) + comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat->MesaFormat); intelObj->mt = intel_miptree_create(intel, intelObj->base.Target, firstImage->base.InternalFormat, @@ -175,7 +179,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) firstImage->base.Depth, firstImage->base.TexFormat-> TexelBytes, - firstImage->base.IsCompressed); + comp_byte); } /* Pull in any images not in the object's tree: -- cgit v1.2.3 From 6e2c95253718e9ba294a788ba3bb37b7c9603409 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 10 Nov 2006 18:47:22 +0000 Subject: Enable GLX_SGI_make_current_read. Eliminate use of deprecated GetBufferSize interface. Keep framebuffer state associated with the read-drawable and the draw-drawable up to date. Tested with progs/demos/wincopy. --- src/mesa/drivers/dri/savage/savage_init.h | 10 ---------- src/mesa/drivers/dri/savage/savage_xmesa.c | 32 +++++++++++++++++++++++------- src/mesa/drivers/dri/savage/savagedd.c | 17 ---------------- src/mesa/drivers/dri/savage/savagespan.c | 4 ++-- 4 files changed, 27 insertions(+), 36 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/savage/savage_init.h b/src/mesa/drivers/dri/savage/savage_init.h index 0dec397b7b..9cf8e66b7c 100644 --- a/src/mesa/drivers/dri/savage/savage_init.h +++ b/src/mesa/drivers/dri/savage/savage_init.h @@ -80,16 +80,6 @@ typedef struct { } savageScreenPrivate; -/** - * savageRenderbuffer, derived from Mesa's gl_renderbuffer - */ -typedef struct { - struct gl_renderbuffer Base; - /* XXX per-window info should go here */ - int foo, bar; -} savageRenderbuffer; - - #include "savagecontext.h" extern void savageGetLock( savageContextPtr imesa, GLuint flags ); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index aaba58ed33..f8d68d7874 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -173,6 +173,9 @@ savageInitDriver(__DRIscreenPrivate *sPriv) { savageScreenPrivate *savageScreen; SAVAGEDRIPtr gDRIPriv = (SAVAGEDRIPtr)sPriv->pDevPriv; + PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension = + (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); + if (sPriv->devPrivSize != sizeof(SAVAGEDRIRec)) { fprintf(stderr,"\nERROR! sizeof(SAVAGEDRIRec) does not match passed size from device driver\n"); @@ -260,6 +263,11 @@ savageInitDriver(__DRIscreenPrivate *sPriv) driParseOptionInfo (&savageScreen->optionCache, __driConfigOptions, __driNConfigOptions); + if (glx_enable_extension != NULL) { + (*glx_enable_extension)(sPriv->psc->screenConfigs, + "GLX_SGI_make_current_read"); + } + #if 0 savageDDFastPathInit(); savageDDTrifuncInit(); @@ -756,6 +764,9 @@ void savageXMesaSetBackClipRects( savageContextPtr imesa ) static void savageXMesaWindowMoved( savageContextPtr imesa ) { + __DRIdrawablePrivate *const drawable = imesa->driDrawable; + __DRIdrawablePrivate *const readable = imesa->driReadable; + if (0) fprintf(stderr, "savageXMesaWindowMoved\n\n"); @@ -769,6 +780,11 @@ static void savageXMesaWindowMoved( savageContextPtr imesa ) default: break; } + + driUpdateFramebufferSize(imesa->glCtx, drawable); + if (drawable != readable) { + driUpdateFramebufferSize(imesa->glCtx, readable); + } } @@ -858,11 +874,12 @@ savageMakeCurrent(__DRIcontextPrivate *driContextPriv, void savageGetLock( savageContextPtr imesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawablePrivate *const drawable = imesa->driDrawable; + __DRIdrawablePrivate *const readable = imesa->driReadable; __DRIscreenPrivate *sPriv = imesa->driScreen; drm_savage_sarea_t *sarea = imesa->sarea; int me = imesa->hHWContext; - int stamp = dPriv->lastStamp; + int stamp = drawable->lastStamp; int heap; unsigned int timestamp = 0; @@ -882,10 +899,11 @@ void savageGetLock( savageContextPtr imesa, GLuint flags ) * NOTE: This releases and regains the hw lock, so all state * checking must be done *after* this call: */ - DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv); - + DRI_VALIDATE_DRAWABLE_INFO(sPriv, drawable); + if (drawable != readable) { + DRI_VALIDATE_DRAWABLE_INFO(sPriv, readable); + } - /* If we lost context, need to dump all registers to hardware. * Note that we don't care about 2d contexts, even if they perform @@ -916,8 +934,8 @@ void savageGetLock( savageContextPtr imesa, GLuint flags ) DRI_AGE_TEXTURES( imesa->textureHeaps[heap] ); } - if (dPriv->lastStamp != stamp) { - driUpdateFramebufferSize(imesa->glCtx, dPriv); + if (drawable->lastStamp != stamp) { + driUpdateFramebufferSize(imesa->glCtx, drawable); savageXMesaWindowMoved( imesa ); } } diff --git a/src/mesa/drivers/dri/savage/savagedd.c b/src/mesa/drivers/dri/savage/savagedd.c index ae19481f03..92431065bf 100644 --- a/src/mesa/drivers/dri/savage/savagedd.c +++ b/src/mesa/drivers/dri/savage/savagedd.c @@ -95,24 +95,7 @@ static GLint savageGetParameteri(const GLcontext *ctx, GLint param) #endif -static void savageBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) -{ - GET_CURRENT_CONTEXT(ctx); - savageContextPtr imesa = SAVAGE_CONTEXT(ctx); - - /* Need to lock to make sure the driDrawable is uptodate. This - * information is used to resize Mesa's software buffers, so it has - * to be correct. - */ - LOCK_HARDWARE(imesa); - *width = imesa->driDrawable->w; - *height = imesa->driDrawable->h; - UNLOCK_HARDWARE(imesa); -} - - void savageDDInitDriverFuncs( GLcontext *ctx ) { - ctx->Driver.GetBufferSize = savageBufferSize; ctx->Driver.GetString = savageDDGetString; } diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c index 5d6246797f..2fe991a6b9 100644 --- a/src/mesa/drivers/dri/savage/savagespan.c +++ b/src/mesa/drivers/dri/savage/savagespan.c @@ -34,8 +34,8 @@ #define LOCAL_VARS \ savageContextPtr imesa = SAVAGE_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ + __DRIdrawablePrivate *const dPriv = drb->dPriv; \ GLuint cpp = drb->cpp; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ @@ -45,8 +45,8 @@ #define LOCAL_DEPTH_VARS \ savageContextPtr imesa = SAVAGE_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ + __DRIdrawablePrivate *const dPriv = drb->dPriv; \ GLuint zpp = drb->cpp; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ -- cgit v1.2.3 From 5c384721522d6a2f9a500e26f0805dda77a31126 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 10 Nov 2006 18:57:30 +0000 Subject: Refactor savageXMesaSet{Back,Front}ClipRects. Refactor savageXMesaSetBackClipRects and savageXMesaSetFrontClipRects into a single new routine called savageXMesaSetClipRects. This allows a few cleanups in the code. --- src/mesa/drivers/dri/savage/savage_init.h | 3 +-- src/mesa/drivers/dri/savage/savage_xmesa.c | 33 ++++-------------------------- src/mesa/drivers/dri/savage/savagestate.c | 11 ++++------ 3 files changed, 9 insertions(+), 38 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/savage/savage_init.h b/src/mesa/drivers/dri/savage/savage_init.h index 9cf8e66b7c..43fb969c69 100644 --- a/src/mesa/drivers/dri/savage/savage_init.h +++ b/src/mesa/drivers/dri/savage/savage_init.h @@ -83,8 +83,7 @@ typedef struct { #include "savagecontext.h" extern void savageGetLock( savageContextPtr imesa, GLuint flags ); -extern void savageXMesaSetBackClipRects( savageContextPtr imesa ); -extern void savageXMesaSetFrontClipRects( savageContextPtr imesa ); +extern void savageXMesaSetClipRects(savageContextPtr imesa); #define GET_DISPATCH_AGE( imesa ) imesa->sarea->last_dispatch diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index f8d68d7874..f51e321a4a 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -724,34 +724,18 @@ void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) } #endif -void savageXMesaSetFrontClipRects( savageContextPtr imesa ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - - imesa->numClipRects = dPriv->numClipRects; - imesa->pClipRects = dPriv->pClipRects; - imesa->drawX = dPriv->x; - imesa->drawY = dPriv->y; - - savageCalcViewport( imesa->glCtx ); -} - -void savageXMesaSetBackClipRects( savageContextPtr imesa ) +void savageXMesaSetClipRects(savageContextPtr imesa) { __DRIdrawablePrivate *dPriv = imesa->driDrawable; - if (dPriv->numBackClipRects == 0) - { - - + if ((dPriv->numBackClipRects == 0) + || (imesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT)) { imesa->numClipRects = dPriv->numClipRects; imesa->pClipRects = dPriv->pClipRects; imesa->drawX = dPriv->x; imesa->drawY = dPriv->y; } else { - - imesa->numClipRects = dPriv->numBackClipRects; imesa->pClipRects = dPriv->pBackClipRects; imesa->drawX = dPriv->backX; @@ -770,16 +754,7 @@ static void savageXMesaWindowMoved( savageContextPtr imesa ) if (0) fprintf(stderr, "savageXMesaWindowMoved\n\n"); - switch (imesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0]) { - case BUFFER_BIT_FRONT_LEFT: - savageXMesaSetFrontClipRects( imesa ); - break; - case BUFFER_BIT_BACK_LEFT: - savageXMesaSetBackClipRects( imesa ); - break; - default: - break; - } + savageXMesaSetClipRects(imesa); driUpdateFramebufferSize(imesa->glCtx, drawable); if (drawable != readable) { diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c index e554afdbb7..2f20dc23b6 100644 --- a/src/mesa/drivers/dri/savage/savagestate.c +++ b/src/mesa/drivers/dri/savage/savagestate.c @@ -647,23 +647,20 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode ) case BUFFER_BIT_FRONT_LEFT: imesa->IsDouble = GL_FALSE; imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->frontOffset>>11; - - imesa->NotFirstFrame = GL_FALSE; - savageXMesaSetFrontClipRects( imesa ); - FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; case BUFFER_BIT_BACK_LEFT: imesa->IsDouble = GL_TRUE; imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->backOffset>>11; - imesa->NotFirstFrame = GL_FALSE; - savageXMesaSetBackClipRects( imesa ); - FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; default: FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_TRUE ); return; } + imesa->NotFirstFrame = GL_FALSE; + savageXMesaSetClipRects(imesa); + FALLBACK(ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE); + if (destCtrl != imesa->regs.s4.destCtrl.ui) imesa->dirty |= SAVAGE_UPLOAD_GLOBAL; } -- cgit v1.2.3 From ded5517bd5d5e15def688a2b0dd2e2c89713424a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 10 Nov 2006 21:06:23 +0000 Subject: Bump driver date. --- src/mesa/drivers/dri/savage/savagedd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/savage/savagedd.c b/src/mesa/drivers/dri/savage/savagedd.c index 92431065bf..a5c5310e28 100644 --- a/src/mesa/drivers/dri/savage/savagedd.c +++ b/src/mesa/drivers/dri/savage/savagedd.c @@ -42,7 +42,7 @@ #include "utils.h" -#define DRIVER_DATE "20050829" +#define DRIVER_DATE "20061110" /*************************************** * Mesa's Driver Functions -- cgit v1.2.3 From f82bc9110b3b06f3313e584e860d0e41d11965f0 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 11 Nov 2006 00:00:45 +0000 Subject: Some work on nv30 state, heavily based on jkolb's work --- src/mesa/drivers/dri/nouveau/Makefile | 3 +- src/mesa/drivers/dri/nouveau/nouveau_context.h | 10 +- src/mesa/drivers/dri/nouveau/nouveau_state.c | 14 - src/mesa/drivers/dri/nouveau/nv30_state.c | 462 +++++++++++++++++++++++++ 4 files changed, 470 insertions(+), 19 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nv30_state.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 08240ad032..ed700a7085 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -19,7 +19,8 @@ DRIVER_SOURCES = \ nouveau_state.c \ nouveau_tex.c \ nouveau_swtcl.c \ - nv10_swtcl.c + nv10_swtcl.c \ + nv30_state.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index be0785f453..d1abde6856 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -83,6 +83,7 @@ typedef struct nouveau_context { /* The read-only regs */ volatile unsigned char* mmio; + /* FIXME : do we want to put all state into a separate struct ? */ /* State for tris */ GLuint color_offset; GLuint specular_offset; @@ -93,10 +94,11 @@ typedef struct nouveau_context { struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; GLuint vertex_attr_count; - /* Clear state */ - GLuint clear_color; - GLuint clear_depth; - GLuint clear_stencil; + /* Depth/stencil clear state */ + uint32_t clear_value; + + /* Light state */ + uint32_t enabled_lights; /* The drawing fallbacks */ GLuint Fallback; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 85b5eae49e..94c92aeb8a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -54,20 +54,6 @@ static __inline__ GLuint nouveauPackColor(GLuint format, } } -static void nouveauDDClearColor(GLcontext *ctx, const GLfloat color[4]) -{ - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - GLubyte c[4]; - - CLAMPED_FLOAT_TO_UBYTE(c[0], color[0]); - CLAMPED_FLOAT_TO_UBYTE(c[1], color[1]); - CLAMPED_FLOAT_TO_UBYTE(c[2], color[2]); - CLAMPED_FLOAT_TO_UBYTE(c[3], color[3]); - - nmesa->clear_color = nouveauPackColor( nmesa->screen->fbFormat, - c[0], c[1], c[2], c[3] ); -} - static void nouveauCalcViewport(GLcontext *ctx) { /* Calculate the Viewport Matrix */ diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c new file mode 100644 index 0000000000..71a44085ae --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -0,0 +1,462 @@ +/************************************************************************** + +Copyright 2006 Nouveau +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" + +#include "tnl/t_pipeline.h" + +#include "mtypes.h" +#include "colormac.h" + +void nv30AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte ubRef; + CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); + + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); + OUT_RING(func); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ + OUT_RING(ubRef); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ +} + +void nv30BlendColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte cf[4]; + + CLAMPED_FLOAT_TO_UBYTE(cf[0], color[0]); + CLAMPED_FLOAT_TO_UBYTE(cf[1], color[1]); + CLAMPED_FLOAT_TO_UBYTE(cf[2], color[2]); + CLAMPED_FLOAT_TO_UBYTE(cf[3], color[3]); + + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); + OUT_RING(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); +} + +void nv30BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); + OUT_RING((modeA<<16) | modeRGB); +} + + +void nv30BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); + OUT_RING((sfactorA<<16) | sfactorRGB); + OUT_RING((dfactorA<<16) | dfactorRGB); +} + +void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte c[4]; + UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); + OUT_RING(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); +} + +void nv30ClearDepth(GLcontext *ctx, GLclampd d) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING(nmesa->clear_value); +} + +/* we're don't support indexed buffers + void (*ClearIndex)(GLcontext *ctx, GLuint index) + */ + +void nv30ClearStencil(GLcontext *ctx, GLint s) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING(nmesa->clear_value); +} + +void nv30ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); + OUT_RINGf(equation[0]); + OUT_RINGf(equation[1]); + OUT_RINGf(equation[2]); + OUT_RINGf(equation[3]); +} + +void nv30ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, + GLboolean bmask, GLboolean amask ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_MASK, 1); + OUT_RING(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); +} + +void nv30ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) +{ + // TODO I need love +} + +void nv30CullFace(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE, 1); + OUT_RING(mode); +} + +void nv30FrontFace(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FRONT_FACE, 1); + OUT_RING(mode); +} + +void nv30DepthFunc(GLcontext *ctx, GLenum func) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); + OUT_RING(func); +} + +void nv30DepthMask(GLcontext *ctx, GLboolean flag) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); + OUT_RING(flag); +} + +void nv30DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); + OUT_RINGf(nearval); + OUT_RINGf(farval); +} + +/** Specify the current buffer for writing */ +//void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); +/** Specify the buffers for writing for fragment programs*/ +//void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); + +void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + switch(cap) + { + case GL_ALPHA_TEST: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); + OUT_RING(state); + break; +// case GL_AUTO_NORMAL: + case GL_BLEND: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); + OUT_RING(state); + break; + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); + OUT_RING(state); + break; + case GL_COLOR_LOGIC_OP: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE, 1); + OUT_RING(state); + break; +// case GL_COLOR_MATERIAL: +// case GL_COLOR_SUM_EXT: +// case GL_COLOR_TABLE: +// case GL_CONVOLUTION_1D: +// case GL_CONVOLUTION_2D: + case GL_CULL_FACE: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); + OUT_RING(state); + break; + case GL_DEPTH_TEST: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); + OUT_RING(state); + break; + case GL_DITHER: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); + OUT_RING(state); + break; + case GL_FOG: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); + OUT_RING(state); + break; +// case GL_HISTOGRAM: +// case GL_INDEX_LOGIC_OP: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + { + uint32_t mask=0x11<<(2*(cap-GL_LIGHT0)); + nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING(nmesa->enabled_lights); + break; + } +// case GL_LIGHTING: +// case GL_LINE_SMOOTH: +// case GL_LINE_STIPPLE: +// case GL_MAP1_COLOR_4: +// case GL_MAP1_INDEX: +// case GL_MAP1_NORMAL: +// case GL_MAP1_TEXTURE_COORD_1: +// case GL_MAP1_TEXTURE_COORD_2: +// case GL_MAP1_TEXTURE_COORD_3: +// case GL_MAP1_TEXTURE_COORD_4: +// case GL_MAP1_VERTEX_3: +// case GL_MAP1_VERTEX_4: +// case GL_MAP2_COLOR_4: +// case GL_MAP2_INDEX: +// case GL_MAP2_NORMAL: +// case GL_MAP2_TEXTURE_COORD_1: +// case GL_MAP2_TEXTURE_COORD_2: +// case GL_MAP2_TEXTURE_COORD_3: +// case GL_MAP2_TEXTURE_COORD_4: +// case GL_MAP2_VERTEX_3: +// case GL_MAP2_VERTEX_4: +// case GL_MINMAX: + case GL_NORMALIZE: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING(state); + break; +// case GL_POINT_SMOOTH: + case GL_POLYGON_OFFSET_POINT: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_OFFSET_LINE: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_OFFSET_FILL: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_STIPPLE: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE, 1); + OUT_RING(state); + break; +// case GL_POST_COLOR_MATRIX_COLOR_TABLE: +// case GL_POST_CONVOLUTION_COLOR_TABLE: +// case GL_RESCALE_NORMAL: +// case GL_SCISSOR_TEST: +// case GL_SEPARABLE_2D: + case GL_STENCIL_TEST: + // TODO BACK and FRONT ? + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_ENABLE, 1); + OUT_RING(state); + break; +// case GL_TEXTURE_GEN_Q: +// case GL_TEXTURE_GEN_R: +// case GL_TEXTURE_GEN_S: +// case GL_TEXTURE_GEN_T: +// case GL_TEXTURE_1D: +// case GL_TEXTURE_2D: +// case GL_TEXTURE_3D: + } +} + +void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + switch(pname) + { + case GL_FOG_MODE: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //OUT_RING (params); + break; + /* TODO: unsure about the rest.*/ + default: + break; + } + +} + +void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) +{ + // TODO I need love (fog and line_smooth hints) +} + +// void (*IndexMask)(GLcontext *ctx, GLuint mask); + +void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + /* not sure where the fourth param value goes...*/ + switch(pname) + { + case GL_AMBIENT: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_DIFFUSE: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPECULAR: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPOT_DIRECTION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_POSITION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPOT_EXPONENT: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + OUT_RINGf(*params); + break; + case GL_SPOT_CUTOFF: + /* you can't factor these */ + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + OUT_RINGf(params[0]); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + OUT_RINGf(params[1]); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + OUT_RINGf(params[2]); + break; + case GL_CONSTANT_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + case GL_LINEAR_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + case GL_QUADRATIC_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + default: + break; + } +} + +/** Set the lighting model parameters */ +void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); + + +void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); + OUT_RING((pattern << 16) | factor); +} + +void nv30LineWidth(GLcontext *ctx, GLfloat width) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); + OUT_RINGf(width); +} + +void nv30LogicOpcode(GLcontext *ctx, GLenum opcode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LOGIC_OP_OP, 1); + OUT_RING(opcode); +} + +void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +{ + /*TODO: not sure what goes here. */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + +} + +/** Specify the diameter of rasterized points */ +void (*PointSize)(GLcontext *ctx, GLfloat size); +/** Select a polygon rasterization mode */ +void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); +/** Set the scale and units used to calculate depth values */ +void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); +/** Set the polygon stippling pattern */ +void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); +/* Specifies the current buffer for reading */ +void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); +/** Set rasterization mode */ +void (*RenderMode)(GLcontext *ctx, GLenum mode ); +/** Define the scissor box */ +void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +/** Select flat or smooth shading */ +void (*ShadeModel)(GLcontext *ctx, GLenum mode); +/** OpenGL 2.0 two-sided StencilFunc */ +void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask); +/** OpenGL 2.0 two-sided StencilMask */ +void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); +/** OpenGL 2.0 two-sided StencilOp */ +void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass); +/** Control the generation of texture coordinates */ +void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, + const GLfloat *params); +/** Set texture environment parameters */ +void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, + const GLfloat *param); +/** Set texture parameters */ +void (*TexParameter)(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params); +void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); +/** Set the viewport */ +void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + -- cgit v1.2.3 From 0850289d8c66f75ac72347b1bf4bf6d15fb60139 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 11 Nov 2006 11:25:08 +0000 Subject: Add the GL_LIGHING enable --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 1 + src/mesa/drivers/dri/nouveau/nv30_state.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index d1abde6856..257d09f8b2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -98,6 +98,7 @@ typedef struct nouveau_context { uint32_t clear_value; /* Light state */ + GLboolean lighting_enabled; uint32_t enabled_lights; /* The drawing fallbacks */ diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 71a44085ae..b1914b462f 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -230,11 +230,21 @@ void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) { uint32_t mask=0x11<<(2*(cap-GL_LIGHT0)); nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); - OUT_RING(nmesa->enabled_lights); + if (nmesa->lighting_enabled) + { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING(nmesa->enabled_lights); + } break; } -// case GL_LIGHTING: + case GL_LIGHTING: + nmesa->lighting_enabled=state; + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + if (nmesa->lighting_enabled) + OUT_RING(nmesa->enabled_lights); + else + OUT_RING(0x0); + break; // case GL_LINE_SMOOTH: // case GL_LINE_STIPPLE: // case GL_MAP1_COLOR_4: -- cgit v1.2.3 From 994ea9556f7fb55546c6426639ebb4cc3970a5d5 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 11 Nov 2006 12:01:48 +0000 Subject: Fix the texture init function name --- src/mesa/drivers/dri/nouveau/nouveau_tex.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_tex.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tex.c b/src/mesa/drivers/dri/nouveau/nouveau_tex.c index e3160b2d3d..0a8d279669 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tex.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_tex.c @@ -28,7 +28,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_tex.h" // XXX needs some love -void nouveauInitTextureFuncs( struct dd_function_table *functions ) +void nouveauTexInitFunctions( struct dd_function_table *functions ) { /* functions->TexEnv = nouveauTexEnv; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_tex.h b/src/mesa/drivers/dri/nouveau/nouveau_tex.h index c415dc2a6b..7ac71f8300 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_tex.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_tex.h @@ -28,6 +28,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __NOUVEAU_TEX_H__ #define __NOUVEAU_TEX_H__ +#include +#include "mtypes.h" +#include "macros.h" +#include "dd.h" + extern void nouveauTexInitFunctions( struct dd_function_table *functions ); #endif /* __NOUVEAU_TEX_H__ */ -- cgit v1.2.3 From 4f61fd18b2ba2dae38c68f4facb80ac2016d50ac Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sat, 11 Nov 2006 16:48:14 +0000 Subject: Fill in nv30PointSize and nv30Viewport. --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 1 + src/mesa/drivers/dri/nouveau/nv30_state.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 359f36cec8..c5052d7c4b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -1178,6 +1178,7 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS 0x000008c0 /* Parameters: width x_offset */ # define NV30_TCL_PRIMITIVE_3D_SCISSOR_HEIGHT_YPOS 0x000008c4 /* Parameters: height y_offset */ # define NV30_TCL_PRIMITIVE_3D_POINT_SPRITE 0x00001ee8 /* Parameters: coord_replace r_mode enable */ +# define NV30_TCL_PRIMITIVE_3D_POINT_SIZE 0x00001ee0 # define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x00001ec0 # define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x00001ec4 # define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00001ec8 diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index b1914b462f..c3670580a2 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -433,7 +433,13 @@ void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) } /** Specify the diameter of rasterized points */ -void (*PointSize)(GLcontext *ctx, GLfloat size); +void nv30PointSize(GLcontext *ctx, GLfloat size) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RINFf(size); +} + /** Select a polygon rasterization mode */ void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); /** Set the scale and units used to calculate depth values */ @@ -467,6 +473,14 @@ void (*TexParameter)(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params); void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); + /** Set the viewport */ -void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ + /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); + OUT_RING((w << 16) | x); + OUT_RING((h << 16) | y); +} -- cgit v1.2.3 From f65a4b8a8dd9f2dfb7f9fb0ce2b1a3ef3382aa84 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 11 Nov 2006 18:25:00 +0000 Subject: Some nouveau_screen work for darktama --- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index a2a29fe431..d1beafe40e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -28,11 +28,32 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_screen.h" #include "nouveau_object.h" +#include "xmlpool.h" + +PUBLIC const char __driConfigOptions[] = +DRI_CONF_BEGIN + DRI_CONF_SECTION_DEBUG + DRI_CONF_NO_RAST(false) + DRI_CONF_SECTION_END +DRI_CONF_END; +static const GLuint __driNConfigOptions = 1; + static nouveauScreenPtr nouveauCreateScreen(__DRIscreenPrivate *sPriv) { nouveauScreenPtr screen; NOUVEAUDRIPtr dri_priv=(NOUVEAUDRIPtr)sPriv->pDevPriv; + /* allocate screen */ + screen = (nouveauScreenPtr) CALLOC( sizeof(*screen) ); + if ( !screen ) { + __driUtilMessage("%s: Could not allocate memory for screen structure",__FUNCTION__); + return NULL; + } + + + /* parse information in __driConfigOptions */ + driParseOptionInfo (&screen->optionCache,__driConfigOptions, __driNConfigOptions); + screen->card=nouveau_card_lookup(dri_priv->device_id); } -- cgit v1.2.3 From d037c84c33d6a164dc8f76dab4e352054a01f32f Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 11 Nov 2006 20:00:29 +0000 Subject: fix typo --- src/mesa/drivers/dri/nouveau/nv30_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index c3670580a2..e6e5fdbd15 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -437,7 +437,7 @@ void nv30PointSize(GLcontext *ctx, GLfloat size) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1); - OUT_RINFf(size); + OUT_RINGf(size); } /** Select a polygon rasterization mode */ -- cgit v1.2.3 From 6464787bfd1888ea93ebfe53528ceac3c27c993f Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 12 Nov 2006 02:05:40 +0000 Subject: Dont call exit() from the DRI driver, with AIGLX this is particularly nasty --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 3 ++- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 14 ++++++++++---- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_msg.h | 2 -- 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 00f0646b1b..ff00782c99 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -79,7 +79,8 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, return GL_FALSE; /* Create the hardware context */ - nouveauFifoInit(nmesa); + if (!nouveauFifoInit(nmesa)) + return GL_FALSE; nouveauObjectInit(nmesa); /* Init default driver functions then plug in our nouveau-specific functions diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 5793909705..94d6773d33 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -109,19 +109,25 @@ void nouveauWaitForIdle(nouveauContextPtr nmesa) } // here we call the fifo initialization ioctl and fill in stuff accordingly -void nouveauFifoInit(nouveauContextPtr nmesa) +GLboolean nouveauFifoInit(nouveauContextPtr nmesa) { drm_nouveau_fifo_alloc_t fifo_init; int ret; ret=drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_ALLOC, &fifo_init, sizeof(fifo_init)); - if (ret) + if (ret) { FATAL("Fifo initialization ioctl failed (returned %d)\n",ret); + return GL_FALSE; + } - if (drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer)) + if (drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer)) { FATAL("Unable to map the fifo\n",ret); - if (drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio)) + return GL_FALSE; + } + if (drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio)) { FATAL("Unable to map the control regs\n",ret); + return GL_FALSE; + } MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index c2f8633dcc..afe4017d60 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -113,7 +113,7 @@ extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); }while(0) extern void nouveauWaitForIdle(nouveauContextPtr nmesa); -extern void nouveauFifoInit(nouveauContextPtr nmesa); +extern GLboolean nouveauFifoInit(nouveauContextPtr nmesa); #endif /* __NOUVEAU_FIFO_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_msg.h b/src/mesa/drivers/dri/nouveau/nouveau_msg.h index 7b8f89e774..5dea2189c7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_msg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_msg.h @@ -54,7 +54,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fprintf(stderr, "File %s function %s line %d\n", __FILE__, __FUNCTION__, __LINE__); \ fprintf(stderr, a, ## __VA_ARGS__);\ fprintf(stderr, "***************************************************************************\n");\ - exit(0);\ }while(0) #define FATAL(a, ...) do{\ @@ -62,7 +61,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fprintf(stderr, "File %s function %s line %d\n", __FILE__, __FUNCTION__, __LINE__); \ fprintf(stderr, a, ## __VA_ARGS__);\ fprintf(stderr, "***************************************************************************\n");\ - exit(0);\ }while(0) #endif /* __NOUVEAU_MSG_H__ */ -- cgit v1.2.3 From b8e05366e192ab4ebaf69dc8a4a18da4e65cbf80 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 12 Nov 2006 02:06:30 +0000 Subject: We need nmesa->driFd and friends setup before we call nouveauFifoInit --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index ff00782c99..37582f3583 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -78,6 +78,16 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, if ( !nmesa ) return GL_FALSE; + nmesa->driContext = driContextPriv; + nmesa->driScreen = sPriv; + nmesa->driDrawable = NULL; + nmesa->hHWContext = driContextPriv->hHWContext; + nmesa->driHwLock = &sPriv->pSAREA->lock; + nmesa->driFd = sPriv->fd; + + nmesa->screen = (nouveauScreenPtr)(sPriv->private); + screen=nmesa->screen; + /* Create the hardware context */ if (!nouveauFifoInit(nmesa)) return GL_FALSE; @@ -104,16 +114,6 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, driContextPriv->driverPrivate = nmesa; ctx = nmesa->glCtx; - nmesa->driContext = driContextPriv; - nmesa->driScreen = sPriv; - nmesa->driDrawable = NULL; - nmesa->hHWContext = driContextPriv->hHWContext; - nmesa->driHwLock = &sPriv->pSAREA->lock; - nmesa->driFd = sPriv->fd; - - nmesa->screen = (nouveauScreenPtr)(sPriv->private); - screen=nmesa->screen; - /* Parse configuration files */ driParseConfigFiles (&nmesa->optionCache, &screen->optionCache, screen->driScreen->myNum, "nouveau"); -- cgit v1.2.3 From 2af374716f351421b978050b113e93abae0e2dc8 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 12 Nov 2006 08:38:44 +0000 Subject: Some more nouveau_screen.c setup, not sure how correct it is yet though.. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 15 ++ src/mesa/drivers/dri/nouveau/nouveau_context.h | 4 + src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 8 + src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 2 + src/mesa/drivers/dri/nouveau/nouveau_screen.c | 309 ++++++++++++++++++++++++- 5 files changed, 337 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 37582f3583..f815ace31c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -61,6 +61,11 @@ static const struct dri_debug_control debug_control[] = { NULL, 0 } }; +const struct dri_extension common_extensions[] = +{ + { NULL, 0 } +}; + /* Create the device specific context. */ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, @@ -214,3 +219,13 @@ GLboolean nouveauUnbindContext( __DRIcontextPrivate *driContextPriv ) { return GL_TRUE; } + +void nouveauSwapBuffers(__DRIdrawablePrivate *dPriv) +{ +} + +void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv, + int x, int y, int w, int h) +{ +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 257d09f8b2..1da5b6d61d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -182,6 +182,10 @@ extern GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv, extern GLboolean nouveauUnbindContext( __DRIcontextPrivate *driContextPriv ); +extern void nouveauSwapBuffers(__DRIdrawablePrivate *dPriv); + +extern void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv, + int x, int y, int w, int h); #endif /* __NOUVEAU_CONTEXT_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 94d6773d33..52c227cccc 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -113,6 +113,10 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa) { drm_nouveau_fifo_alloc_t fifo_init; +#ifdef NOUVEAU_RING_DEBUG + return GL_TRUE; +#endif + int ret; ret=drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_ALLOC, &fifo_init, sizeof(fifo_init)); if (ret) { @@ -129,7 +133,11 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa) return GL_FALSE; } + /* Setup our initial FIFO tracking params */ + nmesa->fifo.free = fifo_init.cmdbuf_size >> 2; + MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); + return GL_TRUE; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index afe4017d60..0edb083388 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -32,6 +32,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_ctrlreg.h" +//#define NOUVEAU_RING_DEBUG + #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) #define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index d1beafe40e..75da632447 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -24,9 +24,23 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +#include "glheader.h" +#include "imports.h" +#include "mtypes.h" +#include "framebuffer.h" +#include "renderbuffer.h" + #include "nouveau_context.h" #include "nouveau_screen.h" #include "nouveau_object.h" +#include "nouveau_span.h" + +#include "utils.h" +#include "context.h" +#include "vblank.h" +#include "drirenderbuffer.h" + +#include "GL/internal/dri_interface.h" #include "xmlpool.h" @@ -38,6 +52,8 @@ DRI_CONF_BEGIN DRI_CONF_END; static const GLuint __driNConfigOptions = 1; +extern const struct dri_extension common_extensions[]; + static nouveauScreenPtr nouveauCreateScreen(__DRIscreenPrivate *sPriv) { nouveauScreenPtr screen; @@ -49,12 +65,35 @@ static nouveauScreenPtr nouveauCreateScreen(__DRIscreenPrivate *sPriv) __driUtilMessage("%s: Could not allocate memory for screen structure",__FUNCTION__); return NULL; } - /* parse information in __driConfigOptions */ driParseOptionInfo (&screen->optionCache,__driConfigOptions, __driNConfigOptions); + screen->fbFormat = dri_priv->bpp / 8; + screen->frontOffset = dri_priv->front_offset; + screen->frontPitch = dri_priv->front_pitch; + screen->backOffset = dri_priv->back_offset; + screen->backPitch = dri_priv->back_pitch; + screen->depthOffset = dri_priv->depth_offset; + screen->depthPitch = dri_priv->depth_pitch; + screen->card=nouveau_card_lookup(dri_priv->device_id); + screen->driScreen = sPriv; + return screen; +} + +static void +nouveauDestroyScreen(__DRIscreenPrivate *sPriv) +{ + nouveauScreenPtr screen = (nouveauScreenPtr)sPriv->private; + + if (!screen) return; + + /* free all option information */ + driDestroyOptionInfo (&screen->optionCache); + + FREE(screen); + sPriv->private = NULL; } static GLboolean nouveauInitDriver(__DRIscreenPrivate *sPriv) @@ -68,3 +107,271 @@ static GLboolean nouveauInitDriver(__DRIscreenPrivate *sPriv) return GL_TRUE; } +/** + * Create the Mesa framebuffer and renderbuffers for a given window/drawable. + * + * \todo This function (and its interface) will need to be updated to support + * pbuffers. + */ +static GLboolean +nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap) +{ + nouveauScreenPtr screen = (nouveauScreenPtr) driScrnPriv->private; + + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + const GLboolean swDepth = GL_FALSE; + const GLboolean swAlpha = GL_FALSE; + const GLboolean swAccum = mesaVis->accumRedBits > 0; + const GLboolean swStencil = mesaVis->stencilBits > 0 && mesaVis->depthBits != 24; + struct gl_framebuffer *fb = _mesa_create_framebuffer(mesaVis); + + /* front color renderbuffer */ + { + driRenderbuffer *frontRb + = driNewRenderbuffer(GL_RGBA, + driScrnPriv->pFB + screen->frontOffset, + screen->fbFormat, + screen->frontOffset, screen->frontPitch, + driDrawPriv); + nouveauSpanSetFunctions(frontRb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base); + } + + /* back color renderbuffer */ + if (mesaVis->doubleBufferMode) { + driRenderbuffer *backRb + = driNewRenderbuffer(GL_RGBA, + driScrnPriv->pFB + screen->backOffset, + screen->fbFormat, + screen->backOffset, screen->backPitch, + driDrawPriv); + nouveauSpanSetFunctions(backRb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base); + } + + /* depth renderbuffer */ + if (mesaVis->depthBits == 16) { + driRenderbuffer *depthRb + = driNewRenderbuffer(GL_DEPTH_COMPONENT16, + driScrnPriv->pFB + screen->depthOffset, + screen->fbFormat, + screen->depthOffset, screen->depthPitch, + driDrawPriv); + nouveauSpanSetFunctions(depthRb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); + } + else if (mesaVis->depthBits == 24) { + driRenderbuffer *depthRb + = driNewRenderbuffer(GL_DEPTH_COMPONENT24, + driScrnPriv->pFB + screen->depthOffset, + screen->fbFormat, + screen->depthOffset, screen->depthPitch, + driDrawPriv); + nouveauSpanSetFunctions(depthRb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); + } + + /* stencil renderbuffer */ + if (mesaVis->stencilBits > 0 && !swStencil) { + driRenderbuffer *stencilRb + = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, + driScrnPriv->pFB + screen->depthOffset, + screen->fbFormat, + screen->depthOffset, screen->depthPitch, + driDrawPriv); + nouveauSpanSetFunctions(stencilRb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &stencilRb->Base); + } + + _mesa_add_soft_renderbuffers(fb, + GL_FALSE, /* color */ + swDepth, + swStencil, + swAccum, + swAlpha, + GL_FALSE /* aux */); + driDrawPriv->driverPrivate = (void *) fb; + + return (driDrawPriv->driverPrivate != NULL); + } +} + + +static void +nouveauDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + +static int +nouveauGetSwapInfo(__DRIdrawablePrivate *dpriv, __DRIswapInfo *sInfo) +{ + return -1; +} + +static const struct __DriverAPIRec nouveauAPI = { + .InitDriver = nouveauInitDriver, + .DestroyScreen = nouveauDestroyScreen, + .CreateContext = nouveauCreateContext, + .DestroyContext = nouveauDestroyContext, + .CreateBuffer = nouveauCreateBuffer, + .DestroyBuffer = nouveauDestroyBuffer, + .SwapBuffers = nouveauSwapBuffers, + .MakeCurrent = nouveauMakeCurrent, + .UnbindContext = nouveauUnbindContext, + .GetSwapInfo = nouveauGetSwapInfo, + .GetMSC = driGetMSC32, + .WaitForMSC = driWaitForMSC32, + .WaitForSBC = NULL, + .SwapBuffersMSC = NULL, + .CopySubBuffer = nouveauCopySubBuffer +}; + + +static __GLcontextModes * +nouveauFillInModes( unsigned pixel_bits, unsigned depth_bits, + unsigned stencil_bits, GLboolean have_back_buffer ) +{ + __GLcontextModes * modes; + __GLcontextModes * m; + unsigned num_modes; + unsigned depth_buffer_factor; + unsigned back_buffer_factor; + GLenum fb_format; + GLenum fb_type; + + /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't + * support pageflipping at all. + */ + static const GLenum back_buffer_modes[] = { + GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML + }; + + u_int8_t depth_bits_array[3]; + u_int8_t stencil_bits_array[3]; + + depth_bits_array[0] = 0; + depth_bits_array[1] = depth_bits; + depth_bits_array[2] = depth_bits; + + /* Just like with the accumulation buffer, always provide some modes + * with a stencil buffer. It will be a sw fallback, but some apps won't + * care about that. + */ + stencil_bits_array[0] = 0; + stencil_bits_array[1] = 0; + stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; + + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; + back_buffer_factor = (have_back_buffer) ? 3 : 1; + + num_modes = depth_buffer_factor * back_buffer_factor * 4; + + if ( pixel_bits == 16 ) { + fb_format = GL_RGB; + fb_type = GL_UNSIGNED_SHORT_5_6_5; + } else { + fb_format = GL_BGRA; + fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; + } + + modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) ); + m = modes; + if (!driFillInModes(&m, fb_format, fb_type, + depth_bits_array, stencil_bits_array, depth_buffer_factor, + back_buffer_modes, back_buffer_factor, + GLX_TRUE_COLOR)) { + fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", + __func__, __LINE__ ); + return NULL; + } + if (!driFillInModes(&m, fb_format, fb_type, + depth_bits_array, stencil_bits_array, depth_buffer_factor, + back_buffer_modes, back_buffer_factor, + GLX_DIRECT_COLOR)) { + fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", + __func__, __LINE__ ); + return NULL; + } + + /* Mark the visual as slow if there are "fake" stencil bits. + */ + for ( m = modes ; m != NULL ; m = m->next ) { + if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) { + m->visualRating = GLX_SLOW_CONFIG; + } + } + + return modes; +} + + +/** + * This is the bootstrap function for the driver. libGL supplies all of the + * requisite information about the system, and the driver initializes itself. + * This routine also fills in the linked list pointed to by \c driver_modes + * with the \c __GLcontextModes that the driver can support for windows or + * pbuffers. + * + * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on + * failure. + */ +PUBLIC +void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, + const __GLcontextModes * modes, + const __DRIversion * ddx_version, + const __DRIversion * dri_version, + const __DRIversion * drm_version, + const __DRIframebuffer * frame_buffer, + drmAddress pSAREA, int fd, + int internal_api_version, + const __DRIinterfaceMethods * interface, + __GLcontextModes ** driver_modes) + +{ + __DRIscreenPrivate *psp; + static const __DRIversion ddx_expected = { 1, 2, 0 }; + static const __DRIversion dri_expected = { 4, 0, 0 }; + static const __DRIversion drm_expected = { 1, 0, 0 }; + + dri_interface = interface; + + if (!driCheckDriDdxDrmVersions2("nouveau", + dri_version, & dri_expected, + ddx_version, & ddx_expected, + drm_version, & drm_expected)) { + return NULL; + } + + psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL, + ddx_version, dri_version, drm_version, + frame_buffer, pSAREA, fd, + internal_api_version, &nouveauAPI); + if ( psp != NULL ) { + NOUVEAUDRIPtr dri_priv = (NOUVEAUDRIPtr)psp->pDevPriv; + + *driver_modes = nouveauFillInModes(dri_priv->bpp, + (dri_priv->bpp == 16) ? 16 : 24, + (dri_priv->bpp == 16) ? 0 : 8, + (dri_priv->back_offset != dri_priv->depth_offset)); + + /* Calling driInitExtensions here, with a NULL context pointer, does not actually + * enable the extensions. It just makes sure that all the dispatch offsets for all + * the extensions that *might* be enables are known. This is needed because the + * dispatch offsets need to be known when _mesa_context_create is called, but we can't + * enable the extensions until we have a context pointer. + * + * Hello chicken. Hello egg. How are you two today? + */ + driInitExtensions( NULL, common_extensions, GL_FALSE ); + } + + return (void *) psp; +} + -- cgit v1.2.3 From d5d00cf8c93d607876f66ca87e82087497f47d4a Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sun, 12 Nov 2006 18:18:02 +0000 Subject: Add include guard. --- src/mesa/drivers/dri/nouveau/nouveau_object.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index 5fe7487c47..1065a0be59 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -1,3 +1,5 @@ +#ifndef __NOUVEAU_OBJECT_H__ +#define __NOUVEAU_OBJECT_H__ #include "nouveau_context.h" @@ -11,3 +13,4 @@ enum DMASubchannel { NvSub3D = 1, }; +#endif -- cgit v1.2.3 From 47695f06894ed28602ad9ec1449739e658498c82 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 13 Nov 2006 16:01:03 +0000 Subject: Fix segfault in nouveauCalcViewport --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index f815ace31c..34a65d6d4b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -135,6 +135,8 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, _tnl_CreateContext( ctx ); _swsetup_CreateContext( ctx ); + _math_matrix_ctr(&nmesa->viewport); + switch(nmesa->screen->card->type) { case NV_03: -- cgit v1.2.3 From e7ad10587ada74570a13c503aae274bc187910d3 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Nov 2006 20:54:51 +0000 Subject: Fix "3D driver claims to not support visual ..." warnings. In 16-bit color modes the 3D driver was erroneously creating fbconfigs with 16-bits of accumulation alpha. Since the 2D driver always generates modes with zero bits of alpha, the lists of fbconfigs did not match and warnings were generated by libGL. --- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index 0a4499cfae..5e3d07f65b 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -393,7 +393,7 @@ static __GLcontextModes *tdfxFillInModes(unsigned pixel_bits, m->accumRedBits = accum ? 16 : 0; m->accumGreenBits = accum ? 16 : 0; m->accumBlueBits = accum ? 16 : 0; - m->accumAlphaBits = accum ? 16 : 0; + m->accumAlphaBits = (accum && deep) ? 16 : 0; m->stencilBits = stencil ? 8 : 0; m->depthBits = deep ? (depth ? 24 : 0) -- cgit v1.2.3 From 7fbe6a5c5155aa2f123a09ebba62b8c4dd8cda84 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Nov 2006 21:21:40 +0000 Subject: Eliminate use of deprecated GetBufferSize interface. --- src/mesa/drivers/dri/tdfx/tdfx_context.c | 18 +++++++--------- src/mesa/drivers/dri/tdfx/tdfx_dd.c | 35 ++++++++------------------------ 2 files changed, 15 insertions(+), 38 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index dd40544d49..5ac1fb5986 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -23,19 +23,14 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.12 2003/05/08 09:25:35 herrb Exp $ */ -/* - * New fixes: - * Daniel Borca , 19 Jul 2004 - * - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes - * Brian Paul +/** + * \file tdfx_context.c + * Context management functions for 3Dfx hardware. * + * \author Gareth Hughes (original rewrite 29 Sep - 1 Oct 2000) + * \author Brian Paul + * \author Daniel Borca (new fixes 19 Jul 2004) */ #include @@ -703,6 +698,7 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, UNLOCK_HARDWARE( newFx ); } + driUpdateFramebufferSize(newCtx, driDrawPriv); _mesa_make_current( newCtx, (GLframebuffer *) driDrawPriv->driverPrivate, (GLframebuffer *) driReadPriv->driverPrivate ); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.c b/src/mesa/drivers/dri/tdfx/tdfx_dd.c index c2f3185dc4..bace05af89 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_dd.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.c @@ -23,16 +23,13 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.10 2002/10/30 12:52:00 alanh Exp $ */ -/* - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes - * Brian Paul - * +/** + * \file tdfx_dd.c + * Device driver interface functions for 3Dfx based cards. + * + * \author Gareth Hughes (Original rewrite 29 Sep - 1 Oct 2000) + * \author Brian Paul */ #include "tdfx_context.h" @@ -50,7 +47,7 @@ #endif -#define TDFX_DATE "20040719" +#define DRIVER_DATE "20061113" /* These are used in calls to FX_grColorMaskv() */ @@ -81,7 +78,7 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name ) UNLOCK_HARDWARE(fxMesa); strcpy( buffer, "Mesa DRI " ); - strcat( buffer, TDFX_DATE ); + strcat( buffer, DRIVER_DATE ); strcat( buffer, " " ); if ( strcmp( hardware, "Voodoo3 (tm)" ) == 0 ) { @@ -138,21 +135,6 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name ) } -/* Return uptodate buffer size information. - */ -static void tdfxDDGetBufferSize( GLframebuffer *buffer, - GLuint *width, GLuint *height ) -{ - GET_CURRENT_CONTEXT(ctx); - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - - LOCK_HARDWARE( fxMesa ); - *width = fxMesa->width; - *height = fxMesa->height; - UNLOCK_HARDWARE( fxMesa ); -} - - #define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ ((vis->redBits == r) && \ (vis->greenBits == g) && \ @@ -167,7 +149,6 @@ void tdfxDDInitDriverFuncs( const __GLcontextModes *visual, } functions->GetString = tdfxDDGetString; - functions->GetBufferSize = tdfxDDGetBufferSize; /* Accelerated paths */ -- cgit v1.2.3 From 038bd400e204bcfd9e0926b7e98122525d98f4d1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Nov 2006 21:53:04 +0000 Subject: Major clean-up of tdfxDDGetString. --- src/mesa/drivers/dri/tdfx/tdfx_dd.c | 59 ++++++++++--------------------------- 1 file changed, 16 insertions(+), 43 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.c b/src/mesa/drivers/dri/tdfx/tdfx_dd.c index bace05af89..b55af8571e 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_dd.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.c @@ -64,67 +64,40 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name ) { tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; - switch ( name ) { + switch (name) { case GL_RENDERER: { /* The renderer string must be per-context state to handle * multihead correctly. */ - char *buffer = fxMesa->rendererString; - char hardware[100]; + char *const buffer = fxMesa->rendererString; + char hardware[64]; LOCK_HARDWARE(fxMesa); - strcpy( hardware, fxMesa->Glide.grGetString(GR_HARDWARE) ); + strncpy(hardware, fxMesa->Glide.grGetString(GR_HARDWARE), + sizeof(hardware)); + hardware[sizeof(hardware) - 1] = '\0'; UNLOCK_HARDWARE(fxMesa); - strcpy( buffer, "Mesa DRI " ); - strcat( buffer, DRIVER_DATE ); - strcat( buffer, " " ); - - if ( strcmp( hardware, "Voodoo3 (tm)" ) == 0 ) { - strcat( buffer, "Voodoo3" ); - } - else if ( strcmp( hardware, "Voodoo Banshee (tm)" ) == 0 ) { - strcat( buffer, "VoodooBanshee" ); - } - else if ( strcmp( hardware, "Voodoo4 (tm)" ) == 0 ) { - strcat( buffer, "Voodoo4" ); + if ((strncmp(hardware, "Voodoo3", 7) == 0) + || (strncmp(hardware, "Voodoo4", 7) == 0) + || (strncmp(hardware, "Voodoo5", 7) == 0)) { + hardware[7] = '\0'; } - else if ( strcmp( hardware, "Voodoo5 (tm)" ) == 0 ) { - strcat( buffer, "Voodoo5" ); + else if (strncmp(hardware, "Voodoo Banshee", 14) == 0) { + strcpy(&hardware[6], "Banshee"); } else { /* unexpected result: replace spaces with hyphens */ int i; - for ( i = 0 ; hardware[i] && i < 60 ; i++ ) { - if ( hardware[i] == ' ' || hardware[i] == '\t' ) + for (i = 0; hardware[i] && (i < sizeof(hardware)); i++) { + if (hardware[i] == ' ' || hardware[i] == '\t') { hardware[i] = '-'; + } } - strcat( buffer, hardware ); } - /* Append any CPU-specific information. - */ -#ifdef USE_X86_ASM - if ( _mesa_x86_cpu_features ) { - strncat( buffer, " x86", 4 ); - } -#endif -#ifdef USE_MMX_ASM - if ( cpu_has_mmx ) { - strncat( buffer, "/MMX", 4 ); - } -#endif -#ifdef USE_3DNOW_ASM - if ( cpu_has_3dnow ) { - strncat( buffer, "/3DNow!", 7 ); - } -#endif -#ifdef USE_SSE_ASM - if ( cpu_has_xmm ) { - strncat( buffer, "/SSE", 4 ); - } -#endif + (void) driGetRendererString(buffer, hardware, DRIVER_DATE, 0); return (const GLubyte *) buffer; } case GL_VENDOR: -- cgit v1.2.3 From ce526de6ffea41d70f6efb6608ffe308028cb47b Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Nov 2006 22:51:11 +0000 Subject: tdfxDDWriteDepthPixels can be called with mask == NULL. Via depth_test_pixels (swrast/s_depth.c), tdfxDDWriteDepthPixels can be called with mask == NULL. Test for this condition in the places where mask might be dereference. This matches the behavior of several other functions in this file with a 'const GLubyte mask[]' parameter. --- src/mesa/drivers/dri/tdfx/tdfx_span.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c index ce895f8254..ee5eb459be 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -976,7 +976,7 @@ tdfxDDWriteDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb, GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, sizeof(GLushort)); for (i = 0; i < n; i++) { - if (mask[i] && visible_pixel(fxMesa, x[i], y[i])) { + if ((!mask || mask[i]) && visible_pixel(fxMesa, x[i], y[i])) { xpos = x[i] + fxMesa->x_offset; ypos = bottom - y[i]; d16 = depth[i]; @@ -1000,7 +1000,7 @@ tdfxDDWriteDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb, GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, sizeof(GLuint)); for (i = 0; i < n; i++) { - if (mask[i]) { + if (!mask || mask[i]) { if (visible_pixel(fxMesa, x[i], y[i])) { xpos = x[i] + fxMesa->x_offset; ypos = bottom - y[i]; -- cgit v1.2.3 From 37ce9b30e904e0dd3d4734792eb7488a48acdebb Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Nov 2006 22:54:43 +0000 Subject: Implement GL_ARB_occlusion_query. Based on the old code that implemented GL_HP_occlusion_test, implement GL_ARB_occlusion_query. This code passes progs/demo/arbocclude. --- src/mesa/drivers/dri/tdfx/tdfx_context.c | 2 ++ src/mesa/drivers/dri/tdfx/tdfx_dd.c | 54 +++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index 5ac1fb5986..e9c07bd862 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -60,6 +60,7 @@ #define need_GL_ARB_multisample /* #define need_GL_ARB_point_parameters */ +#define need_GL_ARB_occlusion_query #define need_GL_ARB_texture_compression #define need_GL_ARB_vertex_buffer_object /* #define need_GL_ARB_vertex_program */ @@ -82,6 +83,7 @@ const struct dri_extension card_extensions[] = { { "GL_ARB_multisample", GL_ARB_multisample_functions }, + { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, { "GL_ARB_texture_mirrored_repeat", NULL }, { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.c b/src/mesa/drivers/dri/tdfx/tdfx_dd.c index b55af8571e..adbe0c0f33 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_dd.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.c @@ -38,6 +38,7 @@ #include "tdfx_vb.h" #include "tdfx_pixels.h" +#include "utils.h" #include "context.h" #include "enums.h" #include "framebuffer.h" @@ -108,6 +109,55 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name ) } +static void +tdfxBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + (void) q; + + if (target == GL_SAMPLES_PASSED_ARB) { + LOCK_HARDWARE(fxMesa); + fxMesa->Glide.grFinish(); + fxMesa->Glide.grReset(GR_STATS_PIXELS); + UNLOCK_HARDWARE(fxMesa); + } +} + + +static void +tdfxEndQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FxI32 total_pixels; + FxI32 z_fail_pixels; + + + if (target == GL_SAMPLES_PASSED_ARB) { + LOCK_HARDWARE(fxMesa); + fxMesa->Glide.grFinish(); + + fxMesa->Glide.grGet(GR_STATS_PIXELS_DEPTHFUNC_FAIL, sizeof(FxI32), + &z_fail_pixels); + fxMesa->Glide.grGet(GR_STATS_PIXELS_IN, sizeof(FxI32), &total_pixels); + + q->Result = total_pixels - z_fail_pixels; + + /* Apparently, people have seen z_fail_pixels > total_pixels under + * some conditions on some 3Dfx hardware. The occlusion query spec + * requires that we clamp to 0. + */ + if (q->Result < 0) { + q->Result = 0; + } + + q->Ready = GL_TRUE; + + UNLOCK_HARDWARE(fxMesa); + } +} + + #define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ ((vis->redBits == r) && \ (vis->greenBits == g) && \ @@ -121,7 +171,9 @@ void tdfxDDInitDriverFuncs( const __GLcontextModes *visual, fprintf( stderr, "tdfx: %s()\n", __FUNCTION__ ); } - functions->GetString = tdfxDDGetString; + functions->GetString = tdfxDDGetString; + functions->BeginQuery = tdfxBeginQuery; + functions->EndQuery = tdfxEndQuery; /* Accelerated paths */ -- cgit v1.2.3 From 0b69e4837ebf795ba0dbd56d610fc3bd94363f34 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 13 Nov 2006 23:34:35 +0000 Subject: Clean-up compiler warnings. --- src/mesa/drivers/dri/tdfx/tdfx_tex.c | 2 +- src/mesa/drivers/dri/tdfx/tdfx_texstate.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c index c3fe7bebd3..89865d9637 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c @@ -1755,7 +1755,7 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target, for (i = 0; i < rows; i++) { MEMCPY(dest, data, srcRowStride); dest += destRowStride; - data = (GLvoid *)((GLuint)data + (GLuint)srcRowStride); + data = (GLvoid *)((intptr_t)data + (intptr_t)srcRowStride); } /* [dBorca] Hack alert: diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c index f5f385fad7..fda9ce5684 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c @@ -1015,9 +1015,12 @@ SetupSingleTexEnvVoodoo3(GLcontext *ctx, int unit, } break; - default: + default: { + (void) memcpy(&colorComb, &fxMesa->ColorCombine, sizeof(colorComb)); + (void) memcpy(&alphaComb, &fxMesa->AlphaCombine, sizeof(alphaComb)); _mesa_problem(ctx, "bad texture env mode in %s", __FUNCTION__); } + } if (colorComb.Function != fxMesa->ColorCombine.Function || colorComb.Factor != fxMesa->ColorCombine.Factor || -- cgit v1.2.3 From efa91b9a8f39dd49a59e4fc5524657f7cd5ae8ac Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 14 Nov 2006 00:10:34 +0000 Subject: Enable GLX_SGI_make_current_read for tdfx. Implement GLX_SGI_make_current_read for tdfx. Remove annoying debug printf in tdfxSwapBuffers. Updated a comment in drirenderbuffer.h to note that the tdfx driver uses a flag that was previously only used by s3v. This code was tested with glxgears, wincopy, and manywin. --- src/mesa/drivers/dri/common/drirenderbuffer.h | 7 +++++-- src/mesa/drivers/dri/tdfx/tdfx_context.c | 10 ++++++++-- src/mesa/drivers/dri/tdfx/tdfx_context.h | 12 +++++++++++- src/mesa/drivers/dri/tdfx/tdfx_lock.c | 23 ++++++++++++++++------- src/mesa/drivers/dri/tdfx/tdfx_pixels.c | 12 ++++++------ src/mesa/drivers/dri/tdfx/tdfx_screen.c | 12 ++++++++++++ src/mesa/drivers/dri/tdfx/tdfx_span.c | 25 +++++++++++-------------- 7 files changed, 69 insertions(+), 32 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.h b/src/mesa/drivers/dri/common/drirenderbuffer.h index cd73b78174..747f92fcdb 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.h +++ b/src/mesa/drivers/dri/common/drirenderbuffer.h @@ -52,8 +52,11 @@ typedef struct { */ GLboolean depthHasSurface; - /* XXX this is for s3v only. A handy flag to know if this is the back - * color buffer. + /** + * A handy flag to know if this is the back color buffer. + * + * \note + * This is currently only used by s3v and tdfx. */ GLboolean backBuffer; } driRenderbuffer; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index e9c07bd862..bd9dade89b 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -657,8 +657,10 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, GLcontext *newCtx = newFx->glCtx; GET_CURRENT_CONTEXT(curCtx); - if ( newFx->driDrawable != driDrawPriv ) { + if ((newFx->driDrawable != driDrawPriv) + || (newFx->driReadable != driReadPriv)) { newFx->driDrawable = driDrawPriv; + newFx->driReadable = driReadPriv; newFx->dirty = ~0; } else { @@ -676,6 +678,11 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, newFx->dirty = ~0; } + driUpdateFramebufferSize(newCtx, driDrawPriv); + if (driDrawPriv != driReadPriv) { + driUpdateFramebufferSize(newCtx, driReadPriv); + } + if ( !newFx->Glide.Initialized ) { if ( !tdfxInitContext( driDrawPriv, newFx ) ) return GL_FALSE; @@ -700,7 +707,6 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, UNLOCK_HARDWARE( newFx ); } - driUpdateFramebufferSize(newCtx, driDrawPriv); _mesa_make_current( newCtx, (GLframebuffer *) driDrawPriv->driverPrivate, (GLframebuffer *) driReadPriv->driverPrivate ); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.h b/src/mesa/drivers/dri/tdfx/tdfx_context.h index b8349fec73..89a7a9d6c4 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.h +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.h @@ -895,7 +895,17 @@ struct tdfx_context { /* stuff added for DRI */ __DRIscreenPrivate *driScreen; __DRIcontextPrivate *driContext; - __DRIdrawablePrivate *driDrawable; + + /** + * DRI drawable bound to this context for drawing. + */ + __DRIdrawablePrivate *driDrawable; + + /** + * DRI drawable bound to this context for reading. + */ + __DRIdrawablePrivate *driReadable; + drm_context_t hHWContext; drm_hw_lock_t *driHwLock; int driFd; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_lock.c b/src/mesa/drivers/dri/tdfx/tdfx_lock.c index ae3ba1a832..a20c91d030 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_lock.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_lock.c @@ -47,16 +47,20 @@ void tdfxGetLock( tdfxContextPtr fxMesa ) { __DRIcontextPrivate *cPriv = fxMesa->driContext; - __DRIdrawablePrivate *dPriv = cPriv->driDrawablePriv; - __DRIscreenPrivate *sPriv = dPriv->driScreenPriv; + __DRIdrawablePrivate *const drawable = cPriv->driDrawablePriv; + __DRIdrawablePrivate *const readable = cPriv->driReadablePriv; + __DRIscreenPrivate *sPriv = drawable->driScreenPriv; TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) + fxMesa->fxScreen->sarea_priv_offset); - unsigned int stamp = dPriv->lastStamp; + unsigned int stamp = drawable->lastStamp; drmGetLock( fxMesa->driFd, fxMesa->hHWContext, 0 ); - /* This macro will update dPriv's cliprects if needed */ - DRI_VALIDATE_DRAWABLE_INFO( sPriv, dPriv ); + /* This macro will update drawable's cliprects if needed */ + DRI_VALIDATE_DRAWABLE_INFO(sPriv, drawable); + if (drawable != readable) { + DRI_VALIDATE_DRAWABLE_INFO(sPriv, readable); + } if ( saPriv->fifoOwner != fxMesa->hHWContext ) { fxMesa->Glide.grDRIImportFifo( saPriv->fifoPtr, saPriv->fifoRead ); @@ -83,10 +87,15 @@ void tdfxGetLock( tdfxContextPtr fxMesa ) } #endif - if ( *dPriv->pStamp != stamp || saPriv->ctxOwner != fxMesa->hHWContext ) { + if ((*drawable->pStamp != stamp) + || (saPriv->ctxOwner != fxMesa->hHWContext)) { + driUpdateFramebufferSize(fxMesa->glCtx, drawable); + if (drawable != readable) { + driUpdateFramebufferSize(fxMesa->glCtx, readable); + } + tdfxUpdateClipping(fxMesa->glCtx); tdfxUploadClipping(fxMesa); - driUpdateFramebufferSize(fxMesa->glCtx, dPriv); } DEBUG_LOCK(); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c index 1a5a2b1109..732270b2bd 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c @@ -496,9 +496,9 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y, { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); GrLfbInfo_t info; - - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + __DRIdrawablePrivate *const readable = fxMesa->driReadable; + const GLint winX = readable->x; + const GLint winY = readable->y + readable->h - 1; const GLint scrX = winX + x; const GLint scrY = winY - y; @@ -554,9 +554,9 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); GrLfbInfo_t info; - - const GLint winX = fxMesa->x_offset; - const GLint winY = fxMesa->y_offset + fxMesa->height - 1; + __DRIdrawablePrivate *const readable = fxMesa->driReadable; + const GLint winX = readable->x; + const GLint winY = readable->y + readable->h - 1; const GLint scrX = winX + x; const GLint scrY = winY - y; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index 5e3d07f65b..646f5126eb 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -73,6 +73,9 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv ) { tdfxScreenPrivate *fxScreen; TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv; + PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension = + (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); + void *const psc = sPriv->psc->screenConfigs; if (sPriv->devPrivSize != sizeof(TDFXDRIRec)) { fprintf(stderr,"\nERROR! sizeof(TDFXDRIRec) does not match passed size from device driver\n"); @@ -113,6 +116,10 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv ) return GL_FALSE; } + if (glx_enable_extension != NULL) { + (*glx_enable_extension)(psc, "GLX_SGI_make_current_read"); + } + return GL_TRUE; } @@ -180,6 +187,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, driDrawPriv); tdfxSetSpanFunctions(backRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base); + backRb->backBuffer = GL_TRUE; } if (mesaVis->depthBits == 16) { @@ -265,7 +273,9 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) return; LOCK_HARDWARE( fxMesa ); fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); +#ifdef DEBUG printf("SwapBuf SetState 1\n"); +#endif fxMesa->Glide.grGlideSetState(fxMesa->Glide.State ); } } @@ -325,7 +335,9 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) if (ctx->DriverCtx != fxMesa) { fxMesa = TDFX_CONTEXT(ctx); fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); +#ifdef DEBUG printf("SwapBuf SetState 2\n"); +#endif fxMesa->Glide.grGlideSetState(fxMesa->Glide.State ); } UNLOCK_HARDWARE( fxMesa ); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c index ee5eb459be..d9d52d2b6f 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -47,21 +47,19 @@ #define LOCAL_VARS \ - __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \ - tdfxScreenPrivate *fxPriv = fxMesa->fxScreen; \ - GLboolean isFront = (ctx->DrawBuffer->_ColorDrawBufferMask[0] \ - == BUFFER_BIT_FRONT_LEFT); \ - GLuint pitch = isFront ? (fxMesa->screen_width * BYTESPERPIXEL) \ - : info.strideInBytes; \ - GLuint height = fxMesa->height; \ + driRenderbuffer *drb = (driRenderbuffer *) rb; \ + __DRIdrawablePrivate *const dPriv = drb->dPriv; \ + GLuint pitch = drb->backBuffer ? info.strideInBytes \ + : (drb->pitch * drb->cpp); \ + const GLuint bottom = dPriv->h - 1; \ char *buf = (char *)((char *)info.lfbPtr + \ - dPriv->x * fxPriv->cpp + \ - dPriv->y * pitch); \ + (dPriv->x * drb->cpp) + \ + (dPriv->y * pitch)); \ GLuint p; \ (void) buf; (void) p; -#define Y_FLIP(_y) (height - _y - 1) +#define Y_FLIP(_y) (bottom - _y) #define HW_WRITE_LOCK() \ @@ -71,10 +69,9 @@ UNLOCK_HARDWARE( fxMesa ); \ LOCK_HARDWARE( fxMesa ); \ info.size = sizeof(GrLfbInfo_t); \ - if ( fxMesa->Glide.grLfbLock( GR_LFB_WRITE_ONLY, \ - fxMesa->DrawBuffer, LFB_MODE, \ - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ - { + if (fxMesa->Glide.grLfbLock(GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer, \ + LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, \ + &info)) { #define HW_WRITE_UNLOCK() \ fxMesa->Glide.grLfbUnlock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer );\ -- cgit v1.2.3 From 6cc5a82206503190c2387266b4ad1b075d9dec62 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 14 Nov 2006 14:22:43 +0000 Subject: Make sure RENDER_FINISH is called on the zero pixel case. Reported by Haihao Xiang. --- src/mesa/swrast/s_readpix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index cbfb7712d8..128ce0afb3 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -554,7 +554,7 @@ _swrast_ReadPixels( GLcontext *ctx, /* Do all needed clipping here, so that we can forget about it later */ if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { /* The ReadPixels region is totally outside the window bounds */ - return; + goto end; } if (clippedPacking.BufferObj->Name) { -- cgit v1.2.3 From 8f6a50a49cd3b7479d1cfcf195b53e6d9b0800dd Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Wed, 15 Nov 2006 17:45:05 +0000 Subject: Remove use of GetBufferSize (depreciated). --- src/mesa/drivers/dri/r200/r200_context.c | 23 +++++++-------------- src/mesa/drivers/dri/r200/r200_context.h | 1 + src/mesa/drivers/dri/r200/r200_lock.c | 14 ++++++++----- src/mesa/drivers/dri/r200/r200_state.c | 35 ++++++++++++++++++++++++-------- 4 files changed, 44 insertions(+), 29 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 06b2a152d9..bb7a16c932 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -87,21 +87,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. int R200_DEBUG = (0); #endif - -/* Return the width and height of the given buffer. - */ -static void r200GetBufferSize( GLframebuffer *buffer, - GLuint *width, GLuint *height ) -{ - GET_CURRENT_CONTEXT(ctx); - r200ContextPtr rmesa = R200_CONTEXT(ctx); - - LOCK_HARDWARE( rmesa ); - *width = rmesa->dri.drawable->w; - *height = rmesa->dri.drawable->h; - UNLOCK_HARDWARE( rmesa ); -} - /* Return various strings for glGetString(). */ static const GLubyte *r200GetString( GLcontext *ctx, GLenum name ) @@ -233,7 +218,7 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = { */ static void r200InitDriverFuncs( struct dd_function_table *functions ) { - functions->GetBufferSize = r200GetBufferSize; + functions->GetBufferSize = NULL; /* OBSOLETE */ functions->GetString = r200GetString; } @@ -700,7 +685,13 @@ r200MakeCurrent( __DRIcontextPrivate *driContextPriv, if ( newCtx->dri.drawable != driDrawPriv ) { driDrawableInitVBlank( driDrawPriv, newCtx->vblank_flags, &newCtx->vbl_seq ); + } + + if ( newCtx->dri.drawable != driDrawPriv || + newCtx->dri.readable != driReadPriv ) { newCtx->dri.drawable = driDrawPriv; + newCtx->dri.readable = driReadPriv; + r200UpdateWindow( newCtx->glCtx ); r200UpdateViewportOffset( newCtx->glCtx ); } diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index c6910f5238..9f109e07ff 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -699,6 +699,7 @@ struct r200_dri_mirror { __DRIcontextPrivate *context; /* DRI context */ __DRIscreenPrivate *screen; /* DRI screen */ __DRIdrawablePrivate *drawable; /* DRI drawable bound to this ctx */ + __DRIdrawablePrivate *readable; /* DRI readable bound to this ctx */ drm_context_t hwContext; drm_hw_lock_t *hwLock; diff --git a/src/mesa/drivers/dri/r200/r200_lock.c b/src/mesa/drivers/dri/r200/r200_lock.c index 66bb075864..bcc0c91639 100644 --- a/src/mesa/drivers/dri/r200/r200_lock.c +++ b/src/mesa/drivers/dri/r200/r200_lock.c @@ -69,7 +69,8 @@ r200UpdatePageFlipping( r200ContextPtr rmesa ) */ void r200GetLock( r200ContextPtr rmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + __DRIdrawablePrivate *drawable = rmesa->dri.drawable; + __DRIdrawablePrivate *readable = rmesa->dri.readable; __DRIscreenPrivate *sPriv = rmesa->dri.screen; drm_radeon_sarea_t *sarea = rmesa->sarea; int i; @@ -84,17 +85,20 @@ void r200GetLock( r200ContextPtr rmesa, GLuint flags ) * Since the hardware state depends on having the latest drawable * clip rects, all state checking must be done _after_ this call. */ - DRI_VALIDATE_DRAWABLE_INFO( sPriv, dPriv ); + DRI_VALIDATE_DRAWABLE_INFO( sPriv, drawable ); + if (drawable != readable) { + DRI_VALIDATE_DRAWABLE_INFO( sPriv, readable ); + } - if ( rmesa->lastStamp != dPriv->lastStamp ) { + if ( rmesa->lastStamp != drawable->lastStamp ) { r200UpdatePageFlipping( rmesa ); if (rmesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT) r200SetCliprects( rmesa, GL_BACK_LEFT ); else r200SetCliprects( rmesa, GL_FRONT_LEFT ); r200UpdateViewportOffset( rmesa->glCtx ); - driUpdateFramebufferSize(rmesa->glCtx, dPriv); - rmesa->lastStamp = dPriv->lastStamp; + driUpdateFramebufferSize(rmesa->glCtx, drawable); + rmesa->lastStamp = drawable->lastStamp; } R200_STATECHANGE( rmesa, ctx ); diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 097fbc868a..dc1fbef72e 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -40,6 +40,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "enums.h" #include "colormac.h" #include "light.h" +#include "framebuffer.h" #include "swrast/swrast.h" #include "array_cache/acache.h" @@ -1845,23 +1846,26 @@ static void r200LogicOpCode( GLcontext *ctx, GLenum opcode ) void r200SetCliprects( r200ContextPtr rmesa, GLenum mode ) { - __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + __DRIdrawablePrivate *const drawable = rmesa->dri.drawable; + __DRIdrawablePrivate *const readable = rmesa->dri.readable; + GLframebuffer *const draw_fb = (GLframebuffer*) drawable->driverPrivate; + GLframebuffer *const read_fb = (GLframebuffer*) readable->driverPrivate; switch ( mode ) { case GL_FRONT_LEFT: - rmesa->numClipRects = dPriv->numClipRects; - rmesa->pClipRects = dPriv->pClipRects; + rmesa->numClipRects = drawable->numClipRects; + rmesa->pClipRects = drawable->pClipRects; break; case GL_BACK_LEFT: /* Can't ignore 2d windows if we are page flipping. */ - if ( dPriv->numBackClipRects == 0 || rmesa->doPageFlip ) { - rmesa->numClipRects = dPriv->numClipRects; - rmesa->pClipRects = dPriv->pClipRects; + if ( drawable->numBackClipRects == 0 || rmesa->doPageFlip ) { + rmesa->numClipRects = drawable->numClipRects; + rmesa->pClipRects = drawable->pClipRects; } else { - rmesa->numClipRects = dPriv->numBackClipRects; - rmesa->pClipRects = dPriv->pBackClipRects; + rmesa->numClipRects = drawable->numBackClipRects; + rmesa->pClipRects = drawable->pBackClipRects; } break; default: @@ -1869,6 +1873,21 @@ void r200SetCliprects( r200ContextPtr rmesa, GLenum mode ) return; } + if ((draw_fb->Width != drawable->w) || (draw_fb->Height != drawable->h)) { + _mesa_resize_framebuffer(rmesa->glCtx, draw_fb, + drawable->w, drawable->h); + draw_fb->Initialized = GL_TRUE; + } + + if (drawable != readable) { + if ((read_fb->Width != readable->w) || + (read_fb->Height != readable->h)) { + _mesa_resize_framebuffer(rmesa->glCtx, read_fb, + readable->w, readable->h); + read_fb->Initialized = GL_TRUE; + } + } + if (rmesa->state.scissor.enabled) r200RecalcScissorRects( rmesa ); } -- cgit v1.2.3 From 12e710c8501df502a61638612f75f738f7796b89 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 18:56:48 +0000 Subject: Comments for operations. --- src/mesa/shader/slang/slang_compile_operation.h | 120 +++++++++++++----------- 1 file changed, 66 insertions(+), 54 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index d9bce36b9b..f5fee1e50e 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -29,85 +29,97 @@ extern "C" { #endif +/** + * Types of slang operations. + * These are the basic intermediate code representations. + * [foo] indicates a sub-tree or reference to another type of node + */ typedef enum slang_operation_type_ { slang_oper_none, - slang_oper_block_no_new_scope, - slang_oper_block_new_scope, - slang_oper_variable_decl, + slang_oper_block_no_new_scope, /* "{" sequence "}" */ + slang_oper_block_new_scope, /* "{" sequence "}" */ + slang_oper_variable_decl, /* [type] [var] or [var] = [expr] */ slang_oper_asm, - slang_oper_break, - slang_oper_continue, - slang_oper_discard, - slang_oper_return, - slang_oper_expression, - slang_oper_if, - slang_oper_while, - slang_oper_do, - slang_oper_for, - slang_oper_void, - slang_oper_literal_bool, - slang_oper_literal_int, - slang_oper_literal_float, - slang_oper_identifier, - slang_oper_sequence, - slang_oper_assign, - slang_oper_addassign, - slang_oper_subassign, - slang_oper_mulassign, - slang_oper_divassign, + slang_oper_break, /* "break" statement */ + slang_oper_continue, /* "continue" statement */ + slang_oper_discard, /* "discard" (kill fragment) statement */ + slang_oper_return, /* "return" [expr] */ + slang_oper_expression, /* [expr] */ + slang_oper_if, /* "if" [0] then [1] else [2] */ + slang_oper_while, /* "while" [cond] [body] */ + slang_oper_do, /* "do" [body] "while" [cond] */ + slang_oper_for, /* "for" [init] [while] [incr] [body] */ + slang_oper_void, /* nop */ + slang_oper_literal_bool, /* "true" or "false" */ + slang_oper_literal_int, /* integer literal */ + slang_oper_literal_float, /* float literal */ + slang_oper_identifier, /* var name, func name, etc */ + slang_oper_sequence, /* [expr] "," [expr] "," etc */ + slang_oper_assign, /* [var] "=" [expr] */ + slang_oper_addassign, /* [var] "+=" [expr] */ + slang_oper_subassign, /* [var] "-=" [expr] */ + slang_oper_mulassign, /* [var] "*=" [expr] */ + slang_oper_divassign, /* [var] "/=" [expr] */ /*slang_oper_modassign,*/ /*slang_oper_lshassign,*/ /*slang_oper_rshassign,*/ /*slang_oper_orassign,*/ /*slang_oper_xorassign,*/ /*slang_oper_andassign,*/ - slang_oper_select, - slang_oper_logicalor, - slang_oper_logicalxor, - slang_oper_logicaland, + slang_oper_select, /* [expr] "?" [expr] ":" [expr] */ + slang_oper_logicalor, /* [expr] "||" [expr] */ + slang_oper_logicalxor, /* [expr] "^^" [expr] */ + slang_oper_logicaland, /* [expr] "&&" [expr] */ /*slang_oper_bitor,*/ /*slang_oper_bitxor,*/ /*slang_oper_bitand,*/ - slang_oper_equal, - slang_oper_notequal, - slang_oper_less, - slang_oper_greater, - slang_oper_lessequal, - slang_oper_greaterequal, + slang_oper_equal, /* [expr] "==" [expr] */ + slang_oper_notequal, /* [expr] "!=" [expr] */ + slang_oper_less, /* [expr] "<" [expr] */ + slang_oper_greater, /* [expr] ">" [expr] */ + slang_oper_lessequal, /* [expr] "<=" [expr] */ + slang_oper_greaterequal, /* [expr] ">=" [expr] */ /*slang_oper_lshift,*/ /*slang_oper_rshift,*/ - slang_oper_add, - slang_oper_subtract, - slang_oper_multiply, - slang_oper_divide, + slang_oper_add, /* [expr] "+" [expr] */ + slang_oper_subtract, /* [expr] "-" [expr] */ + slang_oper_multiply, /* [expr] "*" [expr] */ + slang_oper_divide, /* [expr] "/" [expr] */ /*slang_oper_modulus,*/ - slang_oper_preincrement, - slang_oper_predecrement, - slang_oper_plus, - slang_oper_minus, + slang_oper_preincrement, /* "++" [var] */ + slang_oper_predecrement, /* "--" [var] */ + slang_oper_plus, /* "-" [expr] */ + slang_oper_minus, /* "+" [expr] */ /*slang_oper_complement,*/ - slang_oper_not, - slang_oper_subscript, - slang_oper_call, - slang_oper_field, - slang_oper_postincrement, - slang_oper_postdecrement + slang_oper_not, /* "!" [expr] */ + slang_oper_subscript, /* [expr] "[" [expr] "]" */ + slang_oper_call, /* [func name] [param] [param] [...] */ + slang_oper_field, /* i.e.: ".next" or ".xzy" or ".xxx" etc */ + slang_oper_postincrement, /* [var] "++" */ + slang_oper_postdecrement /* [var] "--" */ } slang_operation_type; + +/** + * A slang_operation is basically a compiled instruction (such as assignment, + * a while-loop, a conditiona, a function call, etc). + */ typedef struct slang_operation_ { slang_operation_type type; struct slang_operation_ *children; unsigned int num_children; - float literal; /* type: bool, literal_int, literal_float */ - slang_atom a_id; /* type: asm, identifier, call, field */ - slang_variable_scope *locals; + float literal; /**< Used for float, int and bool values */ + slang_atom a_id; /**< type: asm, identifier, call, field */ + slang_variable_scope *locals; /**< local vars for scope */ } slang_operation; -int slang_operation_construct (slang_operation *); -void slang_operation_destruct (slang_operation *); -int slang_operation_copy (slang_operation *, const slang_operation *); + +extern int slang_operation_construct (slang_operation *); +extern void slang_operation_destruct (slang_operation *); +extern int slang_operation_copy (slang_operation *, const slang_operation *); + #ifdef __cplusplus } -- cgit v1.2.3 From 11a54c38f7d9c84da591ff084590c9928ac4ee0d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 19:54:25 +0000 Subject: #define LONGSTRING __extension__ in imports.h and use it to silence gcc warnings about long string literals. --- src/mesa/main/imports.h | 9 +++++++++ src/mesa/shader/arbprogparse.c | 15 ++++++--------- src/mesa/shader/slang/slang_preprocess.c | 8 ++++---- 3 files changed, 19 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 9fb02a7e9c..dad2767e72 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -55,6 +55,15 @@ extern "C" { #define NULL 0 #endif + +/** gcc -pedantic warns about long string literals, LONGSTRING silences that */ +#if !defined(__GNUC__) || (__GNUC__ < 2) || \ + ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)) +# define LONGSTRING +#else +# define LONGSTRING __extension__ +#endif + /*@}*/ diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 43e3bc183d..a423e4ff13 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.1 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -77,12 +77,6 @@ struct arb_program }; -#ifndef __extension__ -#if !defined(__GNUC__) || (__GNUC__ < 2) || \ - ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)) -# define __extension__ -#endif -#endif /* TODO: * Fragment Program Stuff: @@ -168,10 +162,11 @@ struct arb_program typedef GLubyte *production; + /** * This is the text describing the rules to parse the grammar */ -__extension__ static char arb_grammar_text[] = +LONGSTRING static char arb_grammar_text[] = #include "arbprogram_syn.h" ; @@ -4053,7 +4048,8 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, program->Base.Parameters = ap.Base.Parameters; #if DEBUG_FP - _mesa_print_program(&program.Base); + _mesa_printf("____________Fragment program %u ________\n", program->Base.ID); + _mesa_print_program(&program->Base); #endif } @@ -4105,6 +4101,7 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, program->Base.Parameters = ap.Base.Parameters; #if DEBUG_VP + _mesa_printf("____________Vertex program %u __________\n", program->Base.ID); _mesa_print_program(&program->Base); #endif } diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c index 43aa9a1e95..66a6a98392 100644 --- a/src/mesa/shader/slang/slang_preprocess.c +++ b/src/mesa/shader/slang/slang_preprocess.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -32,15 +32,15 @@ #include "grammar_mesa.h" #include "slang_preprocess.h" -static const char *slang_pp_directives_syn = +LONGSTRING static const char *slang_pp_directives_syn = #include "library/slang_pp_directives_syn.h" ; -static const char *slang_pp_expression_syn = +LONGSTRING static const char *slang_pp_expression_syn = #include "library/slang_pp_expression_syn.h" ; -static const char *slang_pp_version_syn = +LONGSTRING static const char *slang_pp_version_syn = #include "library/slang_pp_version_syn.h" ; -- cgit v1.2.3 From 7c279f4dd7cd9b15c7eca284fb333fada4e74be4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 21:35:06 +0000 Subject: fix casts to silence warnings --- src/mesa/shader/shaderobjects.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index a2416c2872..c7a1cec48e 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -1013,7 +1013,7 @@ _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) switch (pname) { case GL_DELETE_STATUS: - *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_inf **) pro); + *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_intf **) pro); break; case GL_LINK_STATUS: *params = (**pro).GetLinkStatus(pro); @@ -1022,10 +1022,10 @@ _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) *params = (**pro).GetValidateStatus(pro); break; case GL_INFO_LOG_LENGTH: - *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_unknown_inf **) pro ); + *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_generic_intf **) pro ); break; case GL_ATTACHED_SHADERS: - *params = (**pro)._container.GetAttachedCount( (struct gl2_unknown_inf **) pro ); + *params = (**pro)._container.GetAttachedCount( (struct gl2_container_intf **) pro ); break; case GL_ACTIVE_ATTRIBUTES: *params = (**pro).GetActiveAttribCount(pro); @@ -1066,13 +1066,13 @@ _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) *params = (**sh).GetSubType(sh); break; case GL_DELETE_STATUS: - *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_inf **) sh); + *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_intf **) sh); break; case GL_COMPILE_STATUS: *params = (**sh).GetCompileStatus(sh); break; case GL_INFO_LOG_LENGTH: - *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_inf **)sh); + *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_intf **)sh); break; case GL_SHADER_SOURCE_LENGTH: { -- cgit v1.2.3 From 82a9ba92b4d50dec49c8301a4da53cb2b10fbcf9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 21:38:26 +0000 Subject: improved error mesages --- src/mesa/shader/shaderobjects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index c7a1cec48e..da4d5c8472 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -307,14 +307,14 @@ _mesa_UseProgramObjectARB(GLhandleARB programObj) FLUSH_VERTICES(ctx, _NEW_PROGRAM); if (programObj != 0) { - GET_PROGRAM(pro, programObj, "glUseProgramObjectARB"); + GET_PROGRAM(pro, programObj, "glUseProgramObjectARB(program)"); if (pro == NULL) return; if ((**pro).GetLinkStatus(pro) == GL_FALSE) { RELEASE_PROGRAM(pro); - _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB(not linked)"); return; } -- cgit v1.2.3 From 2d376a61f0f2524d4f4bc75fccc7134e6817b819 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 21:39:32 +0000 Subject: s/int/GLboolean/ --- src/mesa/shader/slang/slang_compile_variable.c | 2 +- src/mesa/shader/slang/slang_compile_variable.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index b62743addb..679d93b951 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -183,7 +183,7 @@ int slang_variable_construct (slang_variable *var) var->initializer = NULL; var->address = ~0; var->size = 0; - var->global = 0; + var->global = GL_FALSE; return 1; } diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 6b9679a3b7..0b62ad2f1d 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -76,7 +76,7 @@ typedef struct slang_variable_ struct slang_operation_ *initializer; unsigned int address; unsigned int size; - int global; + GLboolean global; } slang_variable; int slang_variable_construct (slang_variable *); -- cgit v1.2.3 From adbbf94fa4d30a9c0b612d9406cc8bd0f61ea019 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 21:39:57 +0000 Subject: indent, comments --- src/mesa/shader/slang/slang_compile_function.h | 66 ++++++++++++++++---------- 1 file changed, 42 insertions(+), 24 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 24bc0d6ffd..6d3b85399c 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -31,53 +31,71 @@ extern "C" { struct slang_code_unit_; +/** + * Types of functions. + */ typedef enum slang_function_kind_ { - slang_func_ordinary, - slang_func_constructor, - slang_func_operator + slang_func_ordinary, + slang_func_constructor, + slang_func_operator } slang_function_kind; typedef struct slang_fixup_table_ { - GLuint *table; - GLuint count; + GLuint *table; + GLuint count; } slang_fixup_table; -void slang_fixup_table_init (slang_fixup_table *); -void slang_fixup_table_free (slang_fixup_table *); +extern void slang_fixup_table_init(slang_fixup_table *); +extern void slang_fixup_table_free(slang_fixup_table *); + +/** + * Description of a compiled shader function. + */ typedef struct slang_function_ { - slang_function_kind kind; - slang_variable header; - slang_variable_scope *parameters; - unsigned int param_count; - slang_operation *body; - unsigned int address; - slang_fixup_table fixups; + slang_function_kind kind; + slang_variable header; + slang_variable_scope *parameters; + unsigned int param_count; + slang_operation *body; /**< The instruction tree */ + unsigned int address; + slang_fixup_table fixups; } slang_function; -int slang_function_construct (slang_function *); -void slang_function_destruct (slang_function *); +extern int slang_function_construct(slang_function *); +extern void slang_function_destruct(slang_function *); + +/** + * Basically, a list of compiled functions. + */ typedef struct slang_function_scope_ { - slang_function *functions; + slang_function *functions; GLuint num_functions; - struct slang_function_scope_ *outer_scope; + struct slang_function_scope_ *outer_scope; } slang_function_scope; + extern GLvoid -_slang_function_scope_ctr (slang_function_scope *); +_slang_function_scope_ctr(slang_function_scope *); + +extern void +slang_function_scope_destruct(slang_function_scope *); -void slang_function_scope_destruct (slang_function_scope *); -int slang_function_scope_find_by_name (slang_function_scope *, slang_atom, int); -slang_function *slang_function_scope_find (slang_function_scope *, slang_function *, int); +extern int +slang_function_scope_find_by_name(slang_function_scope *, slang_atom, int); + +extern slang_function * +slang_function_scope_find(slang_function_scope *, slang_function *, int); extern GLboolean -_slang_build_export_code_table (slang_export_code_table *, slang_function_scope *, - struct slang_code_unit_ *); +_slang_build_export_code_table(slang_export_code_table *, slang_function_scope *, + struct slang_code_unit_ *); + #ifdef __cplusplus } -- cgit v1.2.3 From 4a12160e8f0eec446158212e869e0b13e9c6e823 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 21:41:24 +0000 Subject: reindent --- src/mesa/shader/slang/slang_compile_function.c | 233 ++++++++++++++----------- 1 file changed, 130 insertions(+), 103 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index eb8fd1bd40..b0e2b62d42 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -33,50 +33,55 @@ /* slang_fixup_table */ -void slang_fixup_table_init (slang_fixup_table *fix) +void +slang_fixup_table_init(slang_fixup_table * fix) { - fix->table = NULL; - fix->count = 0; + fix->table = NULL; + fix->count = 0; } -void slang_fixup_table_free (slang_fixup_table *fix) +void +slang_fixup_table_free(slang_fixup_table * fix) { - slang_alloc_free (fix->table); - slang_fixup_table_init (fix); + slang_alloc_free(fix->table); + slang_fixup_table_init(fix); } /* slang_function */ -int slang_function_construct (slang_function *func) +int +slang_function_construct(slang_function * func) { - func->kind = slang_func_ordinary; - if (!slang_variable_construct (&func->header)) - return 0; - func->parameters = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope)); - if (func->parameters == NULL) - { - slang_variable_destruct (&func->header); - return 0; - } - _slang_variable_scope_ctr (func->parameters); - func->param_count = 0; - func->body = NULL; - func->address = ~0; - slang_fixup_table_init (&func->fixups); - return 1; + func->kind = slang_func_ordinary; + if (!slang_variable_construct(&func->header)) + return 0; + + func->parameters = (slang_variable_scope *) + slang_alloc_malloc(sizeof(slang_variable_scope)); + if (func->parameters == NULL) { + slang_variable_destruct(&func->header); + return 0; + } + + _slang_variable_scope_ctr(func->parameters); + func->param_count = 0; + func->body = NULL; + func->address = ~0; + slang_fixup_table_init(&func->fixups); + return 1; } -void slang_function_destruct (slang_function *func) +void +slang_function_destruct(slang_function * func) { - slang_variable_destruct (&func->header); - slang_variable_scope_destruct (func->parameters); - slang_alloc_free (func->parameters); - if (func->body != NULL) - { - slang_operation_destruct (func->body); - slang_alloc_free (func->body); - } - slang_fixup_table_free (&func->fixups); + slang_variable_destruct(&func->header); + slang_variable_scope_destruct(func->parameters); + slang_alloc_free(func->parameters); + if (func->body != NULL) { + slang_operation_destruct(func->body); + slang_alloc_free(func->body); + } + slang_fixup_table_free(&func->fixups); } /* @@ -84,60 +89,82 @@ void slang_function_destruct (slang_function *func) */ GLvoid -_slang_function_scope_ctr (slang_function_scope *self) +_slang_function_scope_ctr(slang_function_scope * self) { self->functions = NULL; self->num_functions = 0; self->outer_scope = NULL; } -void slang_function_scope_destruct (slang_function_scope *scope) +void +slang_function_scope_destruct(slang_function_scope * scope) { - unsigned int i; + unsigned int i; - for (i = 0; i < scope->num_functions; i++) - slang_function_destruct (scope->functions + i); - slang_alloc_free (scope->functions); + for (i = 0; i < scope->num_functions; i++) + slang_function_destruct(scope->functions + i); + slang_alloc_free(scope->functions); } -int slang_function_scope_find_by_name (slang_function_scope *funcs, slang_atom a_name, int all_scopes) + +/** + * Search a list of functions for a particular function by name. + * \param funcs the list of functions to search + * \param a_name the name to search for + * \param all_scopes if non-zero, search containing scopes too. + * \return pointer to found function, or NULL. + */ +int +slang_function_scope_find_by_name(slang_function_scope * funcs, + slang_atom a_name, int all_scopes) { - unsigned int i; - - for (i = 0; i < funcs->num_functions; i++) - if (a_name == funcs->functions[i].header.a_name) - return 1; - if (all_scopes && funcs->outer_scope != NULL) - return slang_function_scope_find_by_name (funcs->outer_scope, a_name, 1); - return 0; + unsigned int i; + + for (i = 0; i < funcs->num_functions; i++) + if (a_name == funcs->functions[i].header.a_name) + return 1; + if (all_scopes && funcs->outer_scope != NULL) + return slang_function_scope_find_by_name(funcs->outer_scope, a_name, 1); + return 0; } -slang_function *slang_function_scope_find (slang_function_scope *funcs, slang_function *fun, - int all_scopes) + +/** + * Search a list of functions for a particular function (for implementing + * function calls. Matching is done by first comparing the function's name, + * then the function's parameter list. + * + * \param funcs the list of functions to search + * \param fun the function to search for + * \param all_scopes if non-zero, search containing scopes too. + * \return pointer to found function, or NULL. + */ +slang_function * +slang_function_scope_find(slang_function_scope * funcs, slang_function * fun, + int all_scopes) { - unsigned int i; - - for (i = 0; i < funcs->num_functions; i++) - { - slang_function *f = &funcs->functions[i]; - unsigned int j; - - if (fun->header.a_name != f->header.a_name) - continue; - if (fun->param_count != f->param_count) - continue; - for (j = 0; j < fun->param_count; j++) - { - if (!slang_type_specifier_equal (&fun->parameters->variables[j].type.specifier, - &f->parameters->variables[j].type.specifier)) - break; - } - if (j == fun->param_count) - return f; - } - if (all_scopes && funcs->outer_scope != NULL) - return slang_function_scope_find (funcs->outer_scope, fun, 1); - return NULL; + unsigned int i; + + for (i = 0; i < funcs->num_functions; i++) { + slang_function *f = &funcs->functions[i]; + unsigned int j; + + if (fun->header.a_name != f->header.a_name) + continue; + if (fun->param_count != f->param_count) + continue; + for (j = 0; j < fun->param_count; j++) { + if (!slang_type_specifier_equal + (&fun->parameters->variables[j].type.specifier, + &f->parameters->variables[j].type.specifier)) + break; + } + if (j == fun->param_count) + return f; + } + if (all_scopes && funcs->outer_scope != NULL) + return slang_function_scope_find(funcs->outer_scope, fun, 1); + return NULL; } /* @@ -145,31 +172,30 @@ slang_function *slang_function_scope_find (slang_function_scope *funcs, slang_fu */ GLboolean -_slang_build_export_code_table (slang_export_code_table *tbl, slang_function_scope *funs, - slang_code_unit *unit) +_slang_build_export_code_table(slang_export_code_table * tbl, + slang_function_scope * funs, + slang_code_unit * unit) { - slang_atom mainAtom; - GLuint i; - - mainAtom = slang_atom_pool_atom (tbl->atoms, "main"); - if (mainAtom == SLANG_ATOM_NULL) - return GL_FALSE; - - for (i = 0; i < funs->num_functions; i++) - { - if (funs->functions[i].header.a_name == mainAtom) - { - slang_function *fun = &funs->functions[i]; - slang_export_code_entry *e; - slang_assemble_ctx A; - - e = slang_export_code_table_add (tbl); - if (e == NULL) - return GL_FALSE; + slang_atom mainAtom; + GLuint i; + + mainAtom = slang_atom_pool_atom(tbl->atoms, "main"); + if (mainAtom == SLANG_ATOM_NULL) + return GL_FALSE; + + for (i = 0; i < funs->num_functions; i++) { + if (funs->functions[i].header.a_name == mainAtom) { + slang_function *fun = &funs->functions[i]; + slang_export_code_entry *e; + slang_assemble_ctx A; + + e = slang_export_code_table_add(tbl); + if (e == NULL) + return GL_FALSE; e->address = unit->object->assembly.count; - e->name = slang_atom_pool_atom (tbl->atoms, "@main"); - if (e->name == SLANG_ATOM_NULL) - return GL_FALSE; + e->name = slang_atom_pool_atom(tbl->atoms, "@main"); + if (e->name == SLANG_ATOM_NULL) + return GL_FALSE; A.file = &unit->object->assembly; A.mach = &unit->object->machine; @@ -177,12 +203,13 @@ _slang_build_export_code_table (slang_export_code_table *tbl, slang_function_sco A.space.funcs = &unit->funs; A.space.structs = &unit->structs; A.space.vars = &unit->vars; - slang_assembly_file_push_label (&unit->object->assembly, slang_asm_local_alloc, 20); - slang_assembly_file_push_label (&unit->object->assembly, slang_asm_enter, 20); - _slang_assemble_function_call (&A, fun, NULL, 0, GL_FALSE); - slang_assembly_file_push (&unit->object->assembly, slang_asm_exit); - } - } - return GL_TRUE; + slang_assembly_file_push_label(&unit->object->assembly, + slang_asm_local_alloc, 20); + slang_assembly_file_push_label(&unit->object->assembly, + slang_asm_enter, 20); + _slang_assemble_function_call(&A, fun, NULL, 0, GL_FALSE); + slang_assembly_file_push(&unit->object->assembly, slang_asm_exit); + } + } + return GL_TRUE; } - -- cgit v1.2.3 From 408e01b9394d39ecd7755ca63b36017bbc0521d0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 21:52:20 +0000 Subject: reindent, add some comments --- src/mesa/shader/slang/slang_compile.c | 3170 +++++++++++++++++---------------- 1 file changed, 1625 insertions(+), 1545 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 357d61b246..77a293ea45 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -35,21 +35,23 @@ #include "slang_storage.h" /* - * This is a straightforward implementation of the slang front-end compiler. - * Lots of error-checking functionality is missing but every well-formed shader source should - * compile successfully and execute as expected. However, some semantically ill-formed shaders + * This is a straightforward implementation of the slang front-end + * compiler. Lots of error-checking functionality is missing but + * every well-formed shader source should compile successfully and + * execute as expected. However, some semantically ill-formed shaders * may be accepted resulting in undefined behaviour. */ /* slang_var_pool */ -static GLuint slang_var_pool_alloc (slang_var_pool *pool, unsigned int size) +static GLuint +slang_var_pool_alloc(slang_var_pool * pool, unsigned int size) { - GLuint addr; + GLuint addr; - addr = pool->next_addr; - pool->next_addr += size; - return addr; + addr = pool->next_addr; + pool->next_addr += size; + return addr; } /* @@ -57,20 +59,21 @@ static GLuint slang_var_pool_alloc (slang_var_pool *pool, unsigned int size) */ GLvoid -_slang_code_unit_ctr (slang_code_unit *self, struct slang_code_object_ *object) +_slang_code_unit_ctr(slang_code_unit * self, + struct slang_code_object_ * object) { - _slang_variable_scope_ctr (&self->vars); - _slang_function_scope_ctr (&self->funs); - _slang_struct_scope_ctr (&self->structs); + _slang_variable_scope_ctr(&self->vars); + _slang_function_scope_ctr(&self->funs); + _slang_struct_scope_ctr(&self->structs); self->object = object; } GLvoid -_slang_code_unit_dtr (slang_code_unit *self) +_slang_code_unit_dtr(slang_code_unit * self) { - slang_variable_scope_destruct (&self->vars); - slang_function_scope_destruct (&self->funs); - slang_struct_scope_destruct (&self->structs); + slang_variable_scope_destruct(&self->vars); + slang_function_scope_destruct(&self->funs); + slang_struct_scope_destruct(&self->structs); } /* @@ -78,296 +81,313 @@ _slang_code_unit_dtr (slang_code_unit *self) */ GLvoid -_slang_code_object_ctr (slang_code_object *self) +_slang_code_object_ctr(slang_code_object * self) { GLuint i; for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) - _slang_code_unit_ctr (&self->builtin[i], self); - _slang_code_unit_ctr (&self->unit, self); - _slang_assembly_file_ctr (&self->assembly); - slang_machine_ctr (&self->machine); + _slang_code_unit_ctr(&self->builtin[i], self); + _slang_code_unit_ctr(&self->unit, self); + _slang_assembly_file_ctr(&self->assembly); + slang_machine_ctr(&self->machine); self->varpool.next_addr = 0; - slang_atom_pool_construct (&self->atompool); - slang_export_data_table_ctr (&self->expdata); + slang_atom_pool_construct(&self->atompool); + slang_export_data_table_ctr(&self->expdata); self->expdata.atoms = &self->atompool; - slang_export_code_table_ctr (&self->expcode); + slang_export_code_table_ctr(&self->expcode); self->expcode.atoms = &self->atompool; } GLvoid -_slang_code_object_dtr (slang_code_object *self) +_slang_code_object_dtr(slang_code_object * self) { GLuint i; for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) - _slang_code_unit_dtr (&self->builtin[i]); - _slang_code_unit_dtr (&self->unit); - slang_assembly_file_destruct (&self->assembly); - slang_machine_dtr (&self->machine); - slang_atom_pool_destruct (&self->atompool); - slang_export_data_table_dtr (&self->expdata); - slang_export_code_table_ctr (&self->expcode); + _slang_code_unit_dtr(&self->builtin[i]); + _slang_code_unit_dtr(&self->unit); + slang_assembly_file_destruct(&self->assembly); + slang_machine_dtr(&self->machine); + slang_atom_pool_destruct(&self->atompool); + slang_export_data_table_dtr(&self->expdata); + slang_export_code_table_ctr(&self->expcode); } /* slang_info_log */ static char *out_of_memory = "Error: Out of memory.\n"; -void slang_info_log_construct (slang_info_log *log) +void +slang_info_log_construct(slang_info_log * log) { - log->text = NULL; - log->dont_free_text = 0; + log->text = NULL; + log->dont_free_text = 0; } -void slang_info_log_destruct (slang_info_log *log) +void +slang_info_log_destruct(slang_info_log * log) { - if (!log->dont_free_text) - slang_alloc_free (log->text); + if (!log->dont_free_text) + slang_alloc_free(log->text); } -static int slang_info_log_message (slang_info_log *log, const char *prefix, const char *msg) +static int +slang_info_log_message(slang_info_log * log, const char *prefix, + const char *msg) { GLuint size; - if (log->dont_free_text) - return 0; - size = slang_string_length (msg) + 2; + if (log->dont_free_text) + return 0; + size = slang_string_length(msg) + 2; if (prefix != NULL) - size += slang_string_length (prefix) + 2; + size += slang_string_length(prefix) + 2; if (log->text != NULL) { - GLuint old_len = slang_string_length (log->text); - log->text = (char *) (slang_alloc_realloc (log->text, old_len + 1, old_len + size)); + GLuint old_len = slang_string_length(log->text); + log->text = (char *) + slang_alloc_realloc(log->text, old_len + 1, old_len + size); } else { - log->text = (char *) (slang_alloc_malloc (size)); + log->text = (char *) (slang_alloc_malloc(size)); if (log->text != NULL) log->text[0] = '\0'; } - if (log->text == NULL) - return 0; + if (log->text == NULL) + return 0; if (prefix != NULL) { - slang_string_concat (log->text, prefix); - slang_string_concat (log->text, ": "); + slang_string_concat(log->text, prefix); + slang_string_concat(log->text, ": "); } - slang_string_concat (log->text, msg); - slang_string_concat (log->text, "\n"); - return 1; + slang_string_concat(log->text, msg); + slang_string_concat(log->text, "\n"); + return 1; } -int slang_info_log_print (slang_info_log *log, const char *msg, ...) +int +slang_info_log_print(slang_info_log * log, const char *msg, ...) { va_list va; char buf[1024]; - va_start (va, msg); - _mesa_vsprintf (buf, msg, va); - va_end (va); - return slang_info_log_message (log, NULL, buf); + va_start(va, msg); + _mesa_vsprintf(buf, msg, va); + va_end(va); + return slang_info_log_message(log, NULL, buf); } -int slang_info_log_error (slang_info_log *log, const char *msg, ...) +int +slang_info_log_error(slang_info_log * log, const char *msg, ...) { - va_list va; - char buf[1024]; - - va_start (va, msg); - _mesa_vsprintf (buf, msg, va); - va_end (va); - if (slang_info_log_message (log, "Error", buf)) - return 1; - slang_info_log_memory (log); - return 0; + va_list va; + char buf[1024]; + + va_start(va, msg); + _mesa_vsprintf(buf, msg, va); + va_end(va); + if (slang_info_log_message(log, "Error", buf)) + return 1; + slang_info_log_memory(log); + return 0; } -int slang_info_log_warning (slang_info_log *log, const char *msg, ...) +int +slang_info_log_warning(slang_info_log * log, const char *msg, ...) { - va_list va; - char buf[1024]; - - va_start (va, msg); - _mesa_vsprintf (buf, msg, va); - va_end (va); - if (slang_info_log_message (log, "Warning", buf)) - return 1; - slang_info_log_memory (log); - return 0; + va_list va; + char buf[1024]; + + va_start(va, msg); + _mesa_vsprintf(buf, msg, va); + va_end(va); + if (slang_info_log_message(log, "Warning", buf)) + return 1; + slang_info_log_memory(log); + return 0; } -void slang_info_log_memory (slang_info_log *log) +void +slang_info_log_memory(slang_info_log * log) { - if (!slang_info_log_message (log, "Error", "Out of memory.")) - { - log->dont_free_text = 1; - log->text = out_of_memory; - } + if (!slang_info_log_message(log, "Error", "Out of memory.")) { + log->dont_free_text = 1; + log->text = out_of_memory; + } } /* slang_parse_ctx */ typedef struct slang_parse_ctx_ { - const byte *I; - slang_info_log *L; - int parsing_builtin; - int global_scope; - slang_atom_pool *atoms; + const byte *I; + slang_info_log *L; + int parsing_builtin; + GLboolean global_scope; /**< Is object being declared a global? */ + slang_atom_pool *atoms; } slang_parse_ctx; /* slang_output_ctx */ typedef struct slang_output_ctx_ { - slang_variable_scope *vars; - slang_function_scope *funs; - slang_struct_scope *structs; - slang_assembly_file *assembly; - slang_var_pool *global_pool; - slang_machine *machine; + slang_variable_scope *vars; + slang_function_scope *funs; + slang_struct_scope *structs; + slang_assembly_file *assembly; + slang_var_pool *global_pool; + slang_machine *machine; } slang_output_ctx; /* _slang_compile() */ -static void parse_identifier_str (slang_parse_ctx *C, char **id) +static void +parse_identifier_str(slang_parse_ctx * C, char **id) { - *id = (char *) C->I; - C->I += _mesa_strlen (*id) + 1; + *id = (char *) C->I; + C->I += _mesa_strlen(*id) + 1; } -static slang_atom parse_identifier (slang_parse_ctx *C) +static slang_atom +parse_identifier(slang_parse_ctx * C) { - const char *id; - - id = (const char *) C->I; - C->I += _mesa_strlen (id) + 1; - return slang_atom_pool_atom (C->atoms, id); + const char *id; + + id = (const char *) C->I; + C->I += _mesa_strlen(id) + 1; + return slang_atom_pool_atom(C->atoms, id); } -static int parse_number (slang_parse_ctx *C, int *number) +static int +parse_number(slang_parse_ctx * C, int *number) { - const int radix = (int) (*C->I++); - *number = 0; - while (*C->I != '\0') - { - int digit; - if (*C->I >= '0' && *C->I <= '9') - digit = (int) (*C->I - '0'); - else if (*C->I >= 'A' && *C->I <= 'Z') - digit = (int) (*C->I - 'A') + 10; - else - digit = (int) (*C->I - 'a') + 10; - *number = *number * radix + digit; - C->I++; - } - C->I++; - if (*number > 65535) - slang_info_log_warning (C->L, "%d: literal integer overflow.", *number); - return 1; + const int radix = (int) (*C->I++); + *number = 0; + while (*C->I != '\0') { + int digit; + if (*C->I >= '0' && *C->I <= '9') + digit = (int) (*C->I - '0'); + else if (*C->I >= 'A' && *C->I <= 'Z') + digit = (int) (*C->I - 'A') + 10; + else + digit = (int) (*C->I - 'a') + 10; + *number = *number * radix + digit; + C->I++; + } + C->I++; + if (*number > 65535) + slang_info_log_warning(C->L, "%d: literal integer overflow.", *number); + return 1; } -static int parse_float (slang_parse_ctx *C, float *number) +static int +parse_float(slang_parse_ctx * C, float *number) { - char *integral = NULL; - char *fractional = NULL; - char *exponent = NULL; - char *whole = NULL; - - parse_identifier_str (C, &integral); - parse_identifier_str (C, &fractional); - parse_identifier_str (C, &exponent); - - whole = (char *) (slang_alloc_malloc ((_mesa_strlen (integral) + _mesa_strlen (fractional) + - _mesa_strlen (exponent) + 3) * sizeof (char))); - if (whole == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - - slang_string_copy (whole, integral); - slang_string_concat (whole, "."); - slang_string_concat (whole, fractional); - slang_string_concat (whole, "E"); - slang_string_concat (whole, exponent); - - *number = (float) (_mesa_strtod(whole, (char **)NULL)); - - slang_alloc_free (whole); - return 1; + char *integral = NULL; + char *fractional = NULL; + char *exponent = NULL; + char *whole = NULL; + + parse_identifier_str(C, &integral); + parse_identifier_str(C, &fractional); + parse_identifier_str(C, &exponent); + + whole = (char *) (slang_alloc_malloc((_mesa_strlen(integral) + + _mesa_strlen(fractional) + + _mesa_strlen(exponent) + 3) * sizeof(char))); + if (whole == NULL) { + slang_info_log_memory(C->L); + return 0; + } + + slang_string_copy(whole, integral); + slang_string_concat(whole, "."); + slang_string_concat(whole, fractional); + slang_string_concat(whole, "E"); + slang_string_concat(whole, exponent); + + *number = (float) (_mesa_strtod(whole, (char **) NULL)); + + slang_alloc_free(whole); + return 1; } /* revision number - increment after each change affecting emitted output */ #define REVISION 3 -static int check_revision (slang_parse_ctx *C) +static int +check_revision(slang_parse_ctx * C) { - if (*C->I != REVISION) - { - slang_info_log_error (C->L, "Internal compiler error."); - return 0; - } - C->I++; - return 1; + if (*C->I != REVISION) { + slang_info_log_error(C->L, "Internal compiler error."); + return 0; + } + C->I++; + return 1; } -static int parse_statement (slang_parse_ctx *, slang_output_ctx *, slang_operation *); -static int parse_expression (slang_parse_ctx *, slang_output_ctx *, slang_operation *); -static int parse_type_specifier (slang_parse_ctx *, slang_output_ctx *, slang_type_specifier *); +static int parse_statement(slang_parse_ctx *, slang_output_ctx *, + slang_operation *); +static int parse_expression(slang_parse_ctx *, slang_output_ctx *, + slang_operation *); +static int parse_type_specifier(slang_parse_ctx *, slang_output_ctx *, + slang_type_specifier *); -static GLboolean parse_array_len (slang_parse_ctx *C, slang_output_ctx *O, GLuint *len) +static GLboolean +parse_array_len(slang_parse_ctx * C, slang_output_ctx * O, GLuint * len) { - slang_operation array_size; - slang_assembly_name_space space; - GLboolean result; - - if (!slang_operation_construct (&array_size)) - return GL_FALSE; - if (!parse_expression (C, O, &array_size)) - { - slang_operation_destruct (&array_size); - return GL_FALSE; - } - - space.funcs = O->funs; - space.structs = O->structs; - space.vars = O->vars; - result = _slang_evaluate_int (O->assembly, O->machine, &space, &array_size, len, C->atoms); - slang_operation_destruct (&array_size); - return result; + slang_operation array_size; + slang_assembly_name_space space; + GLboolean result; + + if (!slang_operation_construct(&array_size)) + return GL_FALSE; + if (!parse_expression(C, O, &array_size)) { + slang_operation_destruct(&array_size); + return GL_FALSE; + } + + space.funcs = O->funs; + space.structs = O->structs; + space.vars = O->vars; + result = _slang_evaluate_int(O->assembly, O->machine, &space, + &array_size, len, C->atoms); + slang_operation_destruct(&array_size); + return result; } -static GLboolean calculate_var_size (slang_parse_ctx *C, slang_output_ctx *O, slang_variable *var) +static GLboolean +calculate_var_size(slang_parse_ctx * C, slang_output_ctx * O, + slang_variable * var) { - slang_storage_aggregate agg; - - if (!slang_storage_aggregate_construct (&agg)) - return GL_FALSE; - if (!_slang_aggregate_variable (&agg, &var->type.specifier, var->array_len, O->funs, O->structs, - O->vars, O->machine, O->assembly, C->atoms)) - { - slang_storage_aggregate_destruct (&agg); - return GL_FALSE; - } - var->size = _slang_sizeof_aggregate (&agg); - slang_storage_aggregate_destruct (&agg); - return GL_TRUE; + slang_storage_aggregate agg; + + if (!slang_storage_aggregate_construct(&agg)) + return GL_FALSE; + if (!_slang_aggregate_variable(&agg, &var->type.specifier, var->array_len, + O->funs, O->structs, O->vars, O->machine, + O->assembly, C->atoms)) { + slang_storage_aggregate_destruct(&agg); + return GL_FALSE; + } + var->size = _slang_sizeof_aggregate(&agg); + slang_storage_aggregate_destruct(&agg); + return GL_TRUE; } -static GLboolean convert_to_array (slang_parse_ctx *C, slang_variable *var, - const slang_type_specifier *sp) +static GLboolean +convert_to_array(slang_parse_ctx * C, slang_variable * var, + const slang_type_specifier * sp) { - /* sized array - mark it as array, copy the specifier to the array element and - * parse the expression */ - var->type.specifier.type = slang_spec_array; - var->type.specifier._array = (slang_type_specifier *) slang_alloc_malloc (sizeof ( - slang_type_specifier)); - if (var->type.specifier._array == NULL) - { - slang_info_log_memory (C->L); - return GL_FALSE; - } - slang_type_specifier_ctr (var->type.specifier._array); - return slang_type_specifier_copy (var->type.specifier._array, sp); + /* sized array - mark it as array, copy the specifier to the array element and + * parse the expression */ + var->type.specifier.type = slang_spec_array; + var->type.specifier._array = (slang_type_specifier *) + slang_alloc_malloc(sizeof(slang_type_specifier)); + if (var->type.specifier._array == NULL) { + slang_info_log_memory(C->L); + return GL_FALSE; + } + slang_type_specifier_ctr(var->type.specifier._array); + return slang_type_specifier_copy(var->type.specifier._array, sp); } /* structure field */ @@ -375,136 +395,139 @@ static GLboolean convert_to_array (slang_parse_ctx *C, slang_variable *var, #define FIELD_NEXT 1 #define FIELD_ARRAY 2 -static GLboolean parse_struct_field_var (slang_parse_ctx *C, slang_output_ctx *O, slang_variable *var, - const slang_type_specifier *sp) +static GLboolean +parse_struct_field_var(slang_parse_ctx * C, slang_output_ctx * O, + slang_variable * var, const slang_type_specifier * sp) { - var->a_name = parse_identifier (C); - if (var->a_name == SLANG_ATOM_NULL) - return GL_FALSE; - - switch (*C->I++) - { - case FIELD_NONE: - if (!slang_type_specifier_copy (&var->type.specifier, sp)) - return GL_FALSE; - break; - case FIELD_ARRAY: - if (!convert_to_array (C, var, sp)) - return GL_FALSE; - if (!parse_array_len (C, O, &var->array_len)) - return GL_FALSE; - break; - default: - return GL_FALSE; - } - - return calculate_var_size (C, O, var); + var->a_name = parse_identifier(C); + if (var->a_name == SLANG_ATOM_NULL) + return GL_FALSE; + + switch (*C->I++) { + case FIELD_NONE: + if (!slang_type_specifier_copy(&var->type.specifier, sp)) + return GL_FALSE; + break; + case FIELD_ARRAY: + if (!convert_to_array(C, var, sp)) + return GL_FALSE; + if (!parse_array_len(C, O, &var->array_len)) + return GL_FALSE; + break; + default: + return GL_FALSE; + } + + return calculate_var_size(C, O, var); } -static int parse_struct_field (slang_parse_ctx *C, slang_output_ctx *O, slang_struct *st, - slang_type_specifier *sp) +static int +parse_struct_field(slang_parse_ctx * C, slang_output_ctx * O, + slang_struct * st, slang_type_specifier * sp) { - slang_output_ctx o = *O; - - o.structs = st->structs; - if (!parse_type_specifier (C, &o, sp)) - return 0; - do - { - slang_variable *var; - - st->fields->variables = (slang_variable *) slang_alloc_realloc (st->fields->variables, - st->fields->num_variables * sizeof (slang_variable), - (st->fields->num_variables + 1) * sizeof (slang_variable)); - if (st->fields->variables == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - var = &st->fields->variables[st->fields->num_variables]; - if (!slang_variable_construct (var)) - return 0; - st->fields->num_variables++; - if (!parse_struct_field_var (C, &o, var, sp)) - return 0; - } - while (*C->I++ != FIELD_NONE); - - return 1; + slang_output_ctx o = *O; + + o.structs = st->structs; + if (!parse_type_specifier(C, &o, sp)) + return 0; + + do { + slang_variable *var; + + st->fields->variables = + (slang_variable *) slang_alloc_realloc(st->fields->variables, + st->fields->num_variables * + sizeof(slang_variable), + (st->fields->num_variables + + 1) * sizeof(slang_variable)); + if (st->fields->variables == NULL) { + slang_info_log_memory(C->L); + return 0; + } + var = &st->fields->variables[st->fields->num_variables]; + if (!slang_variable_construct(var)) + return 0; + st->fields->num_variables++; + if (!parse_struct_field_var(C, &o, var, sp)) + return 0; + } + while (*C->I++ != FIELD_NONE); + + return 1; } -static int parse_struct (slang_parse_ctx *C, slang_output_ctx *O, slang_struct **st) +static int +parse_struct(slang_parse_ctx * C, slang_output_ctx * O, slang_struct ** st) { - slang_atom a_name; - const char *name; - - /* parse struct name (if any) and make sure it is unique in current scope */ - a_name = parse_identifier (C); - if (a_name == SLANG_ATOM_NULL) - return 0; - name = slang_atom_pool_id (C->atoms, a_name); - if (name[0] != '\0' && slang_struct_scope_find (O->structs, a_name, 0) != NULL) - { - slang_info_log_error (C->L, "%s: duplicate type name.", name); - return 0; - } - - /* set-up a new struct */ - *st = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct)); - if (*st == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - if (!slang_struct_construct (*st)) - { - slang_alloc_free (*st); - *st = NULL; - slang_info_log_memory (C->L); - return 0; - } - (**st).a_name = a_name; - (**st).structs->outer_scope = O->structs; - - /* parse individual struct fields */ - do - { - slang_type_specifier sp; - - slang_type_specifier_ctr (&sp); - if (!parse_struct_field (C, O, *st, &sp)) - { - slang_type_specifier_dtr (&sp); - return 0; - } - slang_type_specifier_dtr (&sp); - } - while (*C->I++ != FIELD_NONE); - - /* if named struct, copy it to current scope */ - if (name[0] != '\0') - { - slang_struct *s; - - O->structs->structs = (slang_struct *) slang_alloc_realloc (O->structs->structs, - O->structs->num_structs * sizeof (slang_struct), - (O->structs->num_structs + 1) * sizeof (slang_struct)); - if (O->structs->structs == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - s = &O->structs->structs[O->structs->num_structs]; - if (!slang_struct_construct (s)) - return 0; - O->structs->num_structs++; - if (!slang_struct_copy (s, *st)) - return 0; - } - - return 1; + slang_atom a_name; + const char *name; + + /* parse struct name (if any) and make sure it is unique in current scope */ + a_name = parse_identifier(C); + if (a_name == SLANG_ATOM_NULL) + return 0; + + name = slang_atom_pool_id(C->atoms, a_name); + if (name[0] != '\0' + && slang_struct_scope_find(O->structs, a_name, 0) != NULL) { + slang_info_log_error(C->L, "%s: duplicate type name.", name); + return 0; + } + + /* set-up a new struct */ + *st = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); + if (*st == NULL) { + slang_info_log_memory(C->L); + return 0; + } + if (!slang_struct_construct(*st)) { + slang_alloc_free(*st); + *st = NULL; + slang_info_log_memory(C->L); + return 0; + } + (**st).a_name = a_name; + (**st).structs->outer_scope = O->structs; + + /* parse individual struct fields */ + do { + slang_type_specifier sp; + + slang_type_specifier_ctr(&sp); + if (!parse_struct_field(C, O, *st, &sp)) { + slang_type_specifier_dtr(&sp); + return 0; + } + slang_type_specifier_dtr(&sp); + } + while (*C->I++ != FIELD_NONE); + + /* if named struct, copy it to current scope */ + if (name[0] != '\0') { + slang_struct *s; + + O->structs->structs = + (slang_struct *) slang_alloc_realloc(O->structs->structs, + O->structs->num_structs * + sizeof(slang_struct), + (O->structs->num_structs + + 1) * sizeof(slang_struct)); + if (O->structs->structs == NULL) { + slang_info_log_memory(C->L); + return 0; + } + s = &O->structs->structs[O->structs->num_structs]; + if (!slang_struct_construct(s)) + return 0; + O->structs->num_structs++; + if (!slang_struct_copy(s, *st)) + return 0; + } + + return 1; } + /* type qualifier */ #define TYPE_QUALIFIER_NONE 0 #define TYPE_QUALIFIER_CONST 1 @@ -514,35 +537,35 @@ static int parse_struct (slang_parse_ctx *C, slang_output_ctx *O, slang_struct * #define TYPE_QUALIFIER_FIXEDOUTPUT 5 #define TYPE_QUALIFIER_FIXEDINPUT 6 -static int parse_type_qualifier (slang_parse_ctx *C, slang_type_qualifier *qual) +static int +parse_type_qualifier(slang_parse_ctx * C, slang_type_qualifier * qual) { - switch (*C->I++) - { - case TYPE_QUALIFIER_NONE: - *qual = slang_qual_none; - break; - case TYPE_QUALIFIER_CONST: - *qual = slang_qual_const; - break; - case TYPE_QUALIFIER_ATTRIBUTE: - *qual = slang_qual_attribute; - break; - case TYPE_QUALIFIER_VARYING: - *qual = slang_qual_varying; - break; - case TYPE_QUALIFIER_UNIFORM: - *qual = slang_qual_uniform; - break; - case TYPE_QUALIFIER_FIXEDOUTPUT: - *qual = slang_qual_fixedoutput; - break; - case TYPE_QUALIFIER_FIXEDINPUT: - *qual = slang_qual_fixedinput; - break; - default: - return 0; - } - return 1; + switch (*C->I++) { + case TYPE_QUALIFIER_NONE: + *qual = slang_qual_none; + break; + case TYPE_QUALIFIER_CONST: + *qual = slang_qual_const; + break; + case TYPE_QUALIFIER_ATTRIBUTE: + *qual = slang_qual_attribute; + break; + case TYPE_QUALIFIER_VARYING: + *qual = slang_qual_varying; + break; + case TYPE_QUALIFIER_UNIFORM: + *qual = slang_qual_uniform; + break; + case TYPE_QUALIFIER_FIXEDOUTPUT: + *qual = slang_qual_fixedoutput; + break; + case TYPE_QUALIFIER_FIXEDINPUT: + *qual = slang_qual_fixedinput; + break; + default: + return 0; + } + return 1; } /* type specifier */ @@ -571,127 +594,127 @@ static int parse_type_qualifier (slang_parse_ctx *C, slang_type_qualifier *qual) #define TYPE_SPECIFIER_STRUCT 22 #define TYPE_SPECIFIER_TYPENAME 23 -static int parse_type_specifier (slang_parse_ctx *C, slang_output_ctx *O, slang_type_specifier *spec) +static int +parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, + slang_type_specifier * spec) { - switch (*C->I++) - { - case TYPE_SPECIFIER_VOID: - spec->type = slang_spec_void; - break; - case TYPE_SPECIFIER_BOOL: - spec->type = slang_spec_bool; - break; - case TYPE_SPECIFIER_BVEC2: - spec->type = slang_spec_bvec2; - break; - case TYPE_SPECIFIER_BVEC3: - spec->type = slang_spec_bvec3; - break; - case TYPE_SPECIFIER_BVEC4: - spec->type = slang_spec_bvec4; - break; - case TYPE_SPECIFIER_INT: - spec->type = slang_spec_int; - break; - case TYPE_SPECIFIER_IVEC2: - spec->type = slang_spec_ivec2; - break; - case TYPE_SPECIFIER_IVEC3: - spec->type = slang_spec_ivec3; - break; - case TYPE_SPECIFIER_IVEC4: - spec->type = slang_spec_ivec4; - break; - case TYPE_SPECIFIER_FLOAT: - spec->type = slang_spec_float; - break; - case TYPE_SPECIFIER_VEC2: - spec->type = slang_spec_vec2; - break; - case TYPE_SPECIFIER_VEC3: - spec->type = slang_spec_vec3; - break; - case TYPE_SPECIFIER_VEC4: - spec->type = slang_spec_vec4; - break; - case TYPE_SPECIFIER_MAT2: - spec->type = slang_spec_mat2; - break; - case TYPE_SPECIFIER_MAT3: - spec->type = slang_spec_mat3; - break; - case TYPE_SPECIFIER_MAT4: - spec->type = slang_spec_mat4; - break; - case TYPE_SPECIFIER_SAMPLER1D: - spec->type = slang_spec_sampler1D; - break; - case TYPE_SPECIFIER_SAMPLER2D: - spec->type = slang_spec_sampler2D; - break; - case TYPE_SPECIFIER_SAMPLER3D: - spec->type = slang_spec_sampler3D; - break; - case TYPE_SPECIFIER_SAMPLERCUBE: - spec->type = slang_spec_samplerCube; - break; - case TYPE_SPECIFIER_SAMPLER1DSHADOW: - spec->type = slang_spec_sampler1DShadow; - break; - case TYPE_SPECIFIER_SAMPLER2DSHADOW: - spec->type = slang_spec_sampler2DShadow; - break; - case TYPE_SPECIFIER_STRUCT: - spec->type = slang_spec_struct; - if (!parse_struct (C, O, &spec->_struct)) - return 0; - break; - case TYPE_SPECIFIER_TYPENAME: - spec->type = slang_spec_struct; - { - slang_atom a_name; - slang_struct *stru; - - a_name = parse_identifier (C); - if (a_name == NULL) - return 0; - - stru = slang_struct_scope_find (O->structs, a_name, 1); - if (stru == NULL) - { - slang_info_log_error (C->L, "%s: undeclared type name.", - slang_atom_pool_id (C->atoms, a_name)); - return 0; - } - - spec->_struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct)); - if (spec->_struct == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - if (!slang_struct_construct (spec->_struct)) - { - slang_alloc_free (spec->_struct); - spec->_struct = NULL; - return 0; - } - if (!slang_struct_copy (spec->_struct, stru)) - return 0; - } - break; - default: - return 0; - } - return 1; + switch (*C->I++) { + case TYPE_SPECIFIER_VOID: + spec->type = slang_spec_void; + break; + case TYPE_SPECIFIER_BOOL: + spec->type = slang_spec_bool; + break; + case TYPE_SPECIFIER_BVEC2: + spec->type = slang_spec_bvec2; + break; + case TYPE_SPECIFIER_BVEC3: + spec->type = slang_spec_bvec3; + break; + case TYPE_SPECIFIER_BVEC4: + spec->type = slang_spec_bvec4; + break; + case TYPE_SPECIFIER_INT: + spec->type = slang_spec_int; + break; + case TYPE_SPECIFIER_IVEC2: + spec->type = slang_spec_ivec2; + break; + case TYPE_SPECIFIER_IVEC3: + spec->type = slang_spec_ivec3; + break; + case TYPE_SPECIFIER_IVEC4: + spec->type = slang_spec_ivec4; + break; + case TYPE_SPECIFIER_FLOAT: + spec->type = slang_spec_float; + break; + case TYPE_SPECIFIER_VEC2: + spec->type = slang_spec_vec2; + break; + case TYPE_SPECIFIER_VEC3: + spec->type = slang_spec_vec3; + break; + case TYPE_SPECIFIER_VEC4: + spec->type = slang_spec_vec4; + break; + case TYPE_SPECIFIER_MAT2: + spec->type = slang_spec_mat2; + break; + case TYPE_SPECIFIER_MAT3: + spec->type = slang_spec_mat3; + break; + case TYPE_SPECIFIER_MAT4: + spec->type = slang_spec_mat4; + break; + case TYPE_SPECIFIER_SAMPLER1D: + spec->type = slang_spec_sampler1D; + break; + case TYPE_SPECIFIER_SAMPLER2D: + spec->type = slang_spec_sampler2D; + break; + case TYPE_SPECIFIER_SAMPLER3D: + spec->type = slang_spec_sampler3D; + break; + case TYPE_SPECIFIER_SAMPLERCUBE: + spec->type = slang_spec_samplerCube; + break; + case TYPE_SPECIFIER_SAMPLER1DSHADOW: + spec->type = slang_spec_sampler1DShadow; + break; + case TYPE_SPECIFIER_SAMPLER2DSHADOW: + spec->type = slang_spec_sampler2DShadow; + break; + case TYPE_SPECIFIER_STRUCT: + spec->type = slang_spec_struct; + if (!parse_struct(C, O, &spec->_struct)) + return 0; + break; + case TYPE_SPECIFIER_TYPENAME: + spec->type = slang_spec_struct; + { + slang_atom a_name; + slang_struct *stru; + + a_name = parse_identifier(C); + if (a_name == NULL) + return 0; + + stru = slang_struct_scope_find(O->structs, a_name, 1); + if (stru == NULL) { + slang_info_log_error(C->L, "%s: undeclared type name.", + slang_atom_pool_id(C->atoms, a_name)); + return 0; + } + + spec->_struct = + (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); + if (spec->_struct == NULL) { + slang_info_log_memory(C->L); + return 0; + } + if (!slang_struct_construct(spec->_struct)) { + slang_alloc_free(spec->_struct); + spec->_struct = NULL; + return 0; + } + if (!slang_struct_copy(spec->_struct, stru)) + return 0; + } + break; + default: + return 0; + } + return 1; } -static int parse_fully_specified_type (slang_parse_ctx *C, slang_output_ctx *O, - slang_fully_specified_type *type) +static int +parse_fully_specified_type(slang_parse_ctx * C, slang_output_ctx * O, + slang_fully_specified_type * type) { - if (!parse_type_qualifier (C, &type->qualifier)) - return 0; - return parse_type_specifier (C, O, &type->specifier); + if (!parse_type_qualifier(C, &type->qualifier)) + return 0; + return parse_type_specifier(C, O, &type->specifier); } /* operation */ @@ -758,459 +781,486 @@ static int parse_fully_specified_type (slang_parse_ctx *C, slang_output_ctx *O, #define OP_POSTINCREMENT 60 #define OP_POSTDECREMENT 61 -static int parse_child_operation (slang_parse_ctx *C, slang_output_ctx *O, slang_operation *oper, - int statement) + +/** + * When parsing a compound production, this function is used to parse the + * children. + * For example, a a while-loop compound will have two children, the + * while condition expression and the loop body. So, this function will + * be called twice to parse those two sub-expressions. + * \param C the parsing context + * \param O the output context + * \param oper the operation we're parsing + * \param statment which child of the operation is being parsed + * \return 1 if success, 0 if error + */ +static int +parse_child_operation(slang_parse_ctx * C, slang_output_ctx * O, + slang_operation * oper, unsigned int statement) { - slang_operation *ch; - - oper->children = (slang_operation *) slang_alloc_realloc (oper->children, - oper->num_children * sizeof (slang_operation), - (oper->num_children + 1) * sizeof (slang_operation)); - if (oper->children == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - ch = &oper->children[oper->num_children]; - if (!slang_operation_construct (ch)) - { - slang_info_log_memory (C->L); - return 0; - } - oper->num_children++; - if (statement) - return parse_statement (C, O, ch); - return parse_expression (C, O, ch); + slang_operation *ch; + + /* grow child array */ + oper->children = (slang_operation *) + slang_alloc_realloc(oper->children, + oper->num_children * sizeof(slang_operation), + (oper->num_children + 1) * sizeof(slang_operation)); + if (oper->children == NULL) { + slang_info_log_memory(C->L); + return 0; + } + + ch = &oper->children[oper->num_children]; + if (!slang_operation_construct(ch)) { + slang_info_log_memory(C->L); + return 0; + } + oper->num_children++; + /* XXX I guess the 0th "statement" is not really a statement? */ + if (statement) + return parse_statement(C, O, ch); + return parse_expression(C, O, ch); } -static int parse_declaration (slang_parse_ctx *C, slang_output_ctx *O); +static int parse_declaration(slang_parse_ctx * C, slang_output_ctx * O); -static int parse_statement (slang_parse_ctx *C, slang_output_ctx *O, slang_operation *oper) +static int +parse_statement(slang_parse_ctx * C, slang_output_ctx * O, + slang_operation * oper) { - oper->locals->outer_scope = O->vars; - switch (*C->I++) - { - case OP_BLOCK_BEGIN_NO_NEW_SCOPE: - /* parse child statements, do not create new variable scope */ - oper->type = slang_oper_block_no_new_scope; - while (*C->I != OP_END) - if (!parse_child_operation (C, O, oper, 1)) - return 0; - C->I++; - break; - case OP_BLOCK_BEGIN_NEW_SCOPE: - /* parse child statements, create new variable scope */ - { - slang_output_ctx o = *O; - - oper->type = slang_oper_block_new_scope; - o.vars = oper->locals; - while (*C->I != OP_END) - if (!parse_child_operation (C, &o, oper, 1)) - return 0; - C->I++; - } - break; - case OP_DECLARE: - /* local variable declaration, individual declarators are stored as children identifiers */ - oper->type = slang_oper_variable_decl; - { - const unsigned int first_var = O->vars->num_variables; - - /* parse the declaration, note that there can be zero or more than one declarators */ - if (!parse_declaration (C, O)) - return 0; - if (first_var < O->vars->num_variables) - { - const unsigned int num_vars = O->vars->num_variables - first_var; - unsigned int i; - - oper->children = (slang_operation *) slang_alloc_malloc (num_vars * sizeof ( - slang_operation)); - if (oper->children == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - for (oper->num_children = 0; oper->num_children < num_vars; oper->num_children++) - if (!slang_operation_construct (&oper->children[oper->num_children])) - { - slang_info_log_memory (C->L); - return 0; - } - for (i = first_var; i < O->vars->num_variables; i++) - { - slang_operation *o = &oper->children[i - first_var]; - - o->type = slang_oper_identifier; - o->locals->outer_scope = O->vars; - o->a_id = O->vars->variables[i].a_name; - } - } - } - break; - case OP_ASM: - /* the __asm statement, parse the mnemonic and all its arguments as expressions */ - oper->type = slang_oper_asm; - oper->a_id = parse_identifier (C); - if (oper->a_id == SLANG_ATOM_NULL) - return 0; - while (*C->I != OP_END) - if (!parse_child_operation (C, O, oper, 0)) - return 0; - C->I++; - break; - case OP_BREAK: - oper->type = slang_oper_break; - break; - case OP_CONTINUE: - oper->type = slang_oper_continue; - break; - case OP_DISCARD: - oper->type = slang_oper_discard; - break; - case OP_RETURN: - oper->type = slang_oper_return; - if (!parse_child_operation (C, O, oper, 0)) - return 0; - break; - case OP_EXPRESSION: - oper->type = slang_oper_expression; - if (!parse_child_operation (C, O, oper, 0)) - return 0; - break; - case OP_IF: - oper->type = slang_oper_if; - if (!parse_child_operation (C, O, oper, 0)) - return 0; - if (!parse_child_operation (C, O, oper, 1)) - return 0; - if (!parse_child_operation (C, O, oper, 1)) - return 0; - break; - case OP_WHILE: - { - slang_output_ctx o = *O; - - oper->type = slang_oper_while; - o.vars = oper->locals; - if (!parse_child_operation (C, &o, oper, 1)) - return 0; - if (!parse_child_operation (C, &o, oper, 1)) - return 0; - } - break; - case OP_DO: - oper->type = slang_oper_do; - if (!parse_child_operation (C, O, oper, 1)) - return 0; - if (!parse_child_operation (C, O, oper, 0)) - return 0; - break; - case OP_FOR: - { - slang_output_ctx o = *O; - - oper->type = slang_oper_for; - o.vars = oper->locals; - if (!parse_child_operation (C, &o, oper, 1)) - return 0; - if (!parse_child_operation (C, &o, oper, 1)) - return 0; - if (!parse_child_operation (C, &o, oper, 0)) - return 0; - if (!parse_child_operation (C, &o, oper, 1)) - return 0; - } - break; - default: - return 0; - } - return 1; + oper->locals->outer_scope = O->vars; + switch (*C->I++) { + case OP_BLOCK_BEGIN_NO_NEW_SCOPE: + /* parse child statements, do not create new variable scope */ + oper->type = slang_oper_block_no_new_scope; + while (*C->I != OP_END) + if (!parse_child_operation(C, O, oper, 1)) + return 0; + C->I++; + break; + case OP_BLOCK_BEGIN_NEW_SCOPE: + /* parse child statements, create new variable scope */ + { + slang_output_ctx o = *O; + + oper->type = slang_oper_block_new_scope; + o.vars = oper->locals; + while (*C->I != OP_END) + if (!parse_child_operation(C, &o, oper, 1)) + return 0; + C->I++; + } + break; + case OP_DECLARE: + /* local variable declaration, individual declarators are stored as + * children identifiers + */ + oper->type = slang_oper_variable_decl; + { + const unsigned int first_var = O->vars->num_variables; + + /* parse the declaration, note that there can be zero or more + * than one declarators + */ + if (!parse_declaration(C, O)) + return 0; + if (first_var < O->vars->num_variables) { + const unsigned int num_vars = O->vars->num_variables - first_var; + unsigned int i; + + oper->children = (slang_operation *) + slang_alloc_malloc(num_vars * sizeof(slang_operation)); + if (oper->children == NULL) { + slang_info_log_memory(C->L); + return 0; + } + for (oper->num_children = 0; oper->num_children < num_vars; + oper->num_children++) { + if (!slang_operation_construct + (&oper->children[oper->num_children])) { + slang_info_log_memory(C->L); + return 0; + } + } + for (i = first_var; i < O->vars->num_variables; i++) { + slang_operation *o = &oper->children[i - first_var]; + o->type = slang_oper_identifier; + o->locals->outer_scope = O->vars; + o->a_id = O->vars->variables[i].a_name; + } + } + } + break; + case OP_ASM: + /* the __asm statement, parse the mnemonic and all its arguments + * as expressions + */ + oper->type = slang_oper_asm; + oper->a_id = parse_identifier(C); + if (oper->a_id == SLANG_ATOM_NULL) + return 0; + while (*C->I != OP_END) { + if (!parse_child_operation(C, O, oper, 0)) + return 0; + } + C->I++; + break; + case OP_BREAK: + oper->type = slang_oper_break; + break; + case OP_CONTINUE: + oper->type = slang_oper_continue; + break; + case OP_DISCARD: + oper->type = slang_oper_discard; + break; + case OP_RETURN: + oper->type = slang_oper_return; + if (!parse_child_operation(C, O, oper, 0)) + return 0; + break; + case OP_EXPRESSION: + oper->type = slang_oper_expression; + if (!parse_child_operation(C, O, oper, 0)) + return 0; + break; + case OP_IF: + oper->type = slang_oper_if; + if (!parse_child_operation(C, O, oper, 0)) + return 0; + if (!parse_child_operation(C, O, oper, 1)) + return 0; + if (!parse_child_operation(C, O, oper, 1)) + return 0; + break; + case OP_WHILE: + { + slang_output_ctx o = *O; + + oper->type = slang_oper_while; + o.vars = oper->locals; + if (!parse_child_operation(C, &o, oper, 1)) + return 0; + if (!parse_child_operation(C, &o, oper, 1)) + return 0; + } + break; + case OP_DO: + oper->type = slang_oper_do; + if (!parse_child_operation(C, O, oper, 1)) + return 0; + if (!parse_child_operation(C, O, oper, 0)) + return 0; + break; + case OP_FOR: + { + slang_output_ctx o = *O; + + oper->type = slang_oper_for; + o.vars = oper->locals; + if (!parse_child_operation(C, &o, oper, 1)) + return 0; + if (!parse_child_operation(C, &o, oper, 1)) + return 0; + if (!parse_child_operation(C, &o, oper, 0)) + return 0; + if (!parse_child_operation(C, &o, oper, 1)) + return 0; + } + break; + default: + return 0; + } + return 1; } -static int handle_nary_expression (slang_parse_ctx *C, slang_operation *op, slang_operation **ops, - unsigned int *total_ops, unsigned int n) +static int +handle_nary_expression(slang_parse_ctx * C, slang_operation * op, + slang_operation ** ops, unsigned int *total_ops, + unsigned int n) { - unsigned int i; - - op->children = (slang_operation *) slang_alloc_malloc (n * sizeof (slang_operation)); - if (op->children == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - op->num_children = n; - - for (i = 0; i < n; i++) - op->children[i] = (*ops)[*total_ops - (n + 1 - i)]; - (*ops)[*total_ops - (n + 1)] = (*ops)[*total_ops - 1]; - *total_ops -= n; - - *ops = (slang_operation *) slang_alloc_realloc (*ops, (*total_ops + n) * sizeof (slang_operation), - *total_ops * sizeof (slang_operation)); - if (*ops == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - return 1; + unsigned int i; + + op->children = + (slang_operation *) slang_alloc_malloc(n * sizeof(slang_operation)); + if (op->children == NULL) { + slang_info_log_memory(C->L); + return 0; + } + op->num_children = n; + + for (i = 0; i < n; i++) + op->children[i] = (*ops)[*total_ops - (n + 1 - i)]; + (*ops)[*total_ops - (n + 1)] = (*ops)[*total_ops - 1]; + *total_ops -= n; + + *ops = (slang_operation *) + slang_alloc_realloc(*ops, + (*total_ops + n) * sizeof(slang_operation), + *total_ops * sizeof(slang_operation)); + if (*ops == NULL) { + slang_info_log_memory(C->L); + return 0; + } + return 1; } -static int is_constructor_name (const char *name, slang_atom a_name, slang_struct_scope *structs) +static int +is_constructor_name(const char *name, slang_atom a_name, + slang_struct_scope * structs) { - if (slang_type_specifier_type_from_string (name) != slang_spec_void) - return 1; - return slang_struct_scope_find (structs, a_name, 1) != NULL; + if (slang_type_specifier_type_from_string(name) != slang_spec_void) + return 1; + return slang_struct_scope_find(structs, a_name, 1) != NULL; } -static int parse_expression (slang_parse_ctx *C, slang_output_ctx *O, slang_operation *oper) +static int +parse_expression(slang_parse_ctx * C, slang_output_ctx * O, + slang_operation * oper) { - slang_operation *ops = NULL; - unsigned int num_ops = 0; - int number; - - while (*C->I != OP_END) - { - slang_operation *op; - const unsigned int op_code = *C->I++; - - /* allocate default operation, becomes a no-op if not used */ - ops = (slang_operation *) slang_alloc_realloc (ops, - num_ops * sizeof (slang_operation), (num_ops + 1) * sizeof (slang_operation)); - if (ops == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - op = &ops[num_ops]; - if (!slang_operation_construct (op)) - { - slang_info_log_memory (C->L); - return 0; - } - num_ops++; - op->locals->outer_scope = O->vars; - - switch (op_code) - { - case OP_PUSH_VOID: - op->type = slang_oper_void; - break; - case OP_PUSH_BOOL: - op->type = slang_oper_literal_bool; - if (!parse_number (C, &number)) - return 0; - op->literal = (GLfloat) number; - break; - case OP_PUSH_INT: - op->type = slang_oper_literal_int; - if (!parse_number (C, &number)) - return 0; - op->literal = (GLfloat) number; - break; - case OP_PUSH_FLOAT: - op->type = slang_oper_literal_float; - if (!parse_float (C, &op->literal)) - return 0; - break; - case OP_PUSH_IDENTIFIER: - op->type = slang_oper_identifier; - op->a_id = parse_identifier (C); - if (op->a_id == SLANG_ATOM_NULL) - return 0; - break; - case OP_SEQUENCE: - op->type = slang_oper_sequence; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_ASSIGN: - op->type = slang_oper_assign; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_ADDASSIGN: - op->type = slang_oper_addassign; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_SUBASSIGN: - op->type = slang_oper_subassign; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_MULASSIGN: - op->type = slang_oper_mulassign; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_DIVASSIGN: - op->type = slang_oper_divassign; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - /*case OP_MODASSIGN:*/ - /*case OP_LSHASSIGN:*/ - /*case OP_RSHASSIGN:*/ - /*case OP_ORASSIGN:*/ - /*case OP_XORASSIGN:*/ - /*case OP_ANDASSIGN:*/ - case OP_SELECT: - op->type = slang_oper_select; - if (!handle_nary_expression (C, op, &ops, &num_ops, 3)) - return 0; - break; - case OP_LOGICALOR: - op->type = slang_oper_logicalor; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_LOGICALXOR: - op->type = slang_oper_logicalxor; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_LOGICALAND: - op->type = slang_oper_logicaland; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - /*case OP_BITOR:*/ - /*case OP_BITXOR:*/ - /*case OP_BITAND:*/ - case OP_EQUAL: - op->type = slang_oper_equal; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_NOTEQUAL: - op->type = slang_oper_notequal; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_LESS: - op->type = slang_oper_less; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_GREATER: - op->type = slang_oper_greater; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_LESSEQUAL: - op->type = slang_oper_lessequal; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_GREATEREQUAL: - op->type = slang_oper_greaterequal; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - /*case OP_LSHIFT:*/ - /*case OP_RSHIFT:*/ - case OP_ADD: - op->type = slang_oper_add; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_SUBTRACT: - op->type = slang_oper_subtract; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_MULTIPLY: - op->type = slang_oper_multiply; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_DIVIDE: - op->type = slang_oper_divide; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - /*case OP_MODULUS:*/ - case OP_PREINCREMENT: - op->type = slang_oper_preincrement; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - case OP_PREDECREMENT: - op->type = slang_oper_predecrement; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - case OP_PLUS: - op->type = slang_oper_plus; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - case OP_MINUS: - op->type = slang_oper_minus; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - case OP_NOT: - op->type = slang_oper_not; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - /*case OP_COMPLEMENT:*/ - case OP_SUBSCRIPT: - op->type = slang_oper_subscript; - if (!handle_nary_expression (C, op, &ops, &num_ops, 2)) - return 0; - break; - case OP_CALL: - op->type = slang_oper_call; - op->a_id = parse_identifier (C); - if (op->a_id == SLANG_ATOM_NULL) - return 0; - while (*C->I != OP_END) - if (!parse_child_operation (C, O, op, 0)) - return 0; - C->I++; - if (!C->parsing_builtin && !slang_function_scope_find_by_name (O->funs, op->a_id, 1)) - { - const char *id; - - id = slang_atom_pool_id (C->atoms, op->a_id); - if (!is_constructor_name (id, op->a_id, O->structs)) - { - slang_info_log_error (C->L, "%s: undeclared function name.", id); - return 0; - } - } - break; - case OP_FIELD: - op->type = slang_oper_field; - op->a_id = parse_identifier (C); - if (op->a_id == SLANG_ATOM_NULL) - return 0; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - case OP_POSTINCREMENT: - op->type = slang_oper_postincrement; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - case OP_POSTDECREMENT: - op->type = slang_oper_postdecrement; - if (!handle_nary_expression (C, op, &ops, &num_ops, 1)) - return 0; - break; - default: - return 0; - } - } - C->I++; - - *oper = *ops; - slang_alloc_free (ops); - return 1; + slang_operation *ops = NULL; + unsigned int num_ops = 0; + int number; + + while (*C->I != OP_END) { + slang_operation *op; + const unsigned int op_code = *C->I++; + + /* allocate default operation, becomes a no-op if not used */ + ops = (slang_operation *) + slang_alloc_realloc(ops, + num_ops * sizeof(slang_operation), + (num_ops + 1) * sizeof(slang_operation)); + if (ops == NULL) { + slang_info_log_memory(C->L); + return 0; + } + op = &ops[num_ops]; + if (!slang_operation_construct(op)) { + slang_info_log_memory(C->L); + return 0; + } + num_ops++; + op->locals->outer_scope = O->vars; + + switch (op_code) { + case OP_PUSH_VOID: + op->type = slang_oper_void; + break; + case OP_PUSH_BOOL: + op->type = slang_oper_literal_bool; + if (!parse_number(C, &number)) + return 0; + op->literal = (GLfloat) number; + break; + case OP_PUSH_INT: + op->type = slang_oper_literal_int; + if (!parse_number(C, &number)) + return 0; + op->literal = (GLfloat) number; + break; + case OP_PUSH_FLOAT: + op->type = slang_oper_literal_float; + if (!parse_float(C, &op->literal)) + return 0; + break; + case OP_PUSH_IDENTIFIER: + op->type = slang_oper_identifier; + op->a_id = parse_identifier(C); + if (op->a_id == SLANG_ATOM_NULL) + return 0; + break; + case OP_SEQUENCE: + op->type = slang_oper_sequence; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_ASSIGN: + op->type = slang_oper_assign; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_ADDASSIGN: + op->type = slang_oper_addassign; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_SUBASSIGN: + op->type = slang_oper_subassign; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_MULASSIGN: + op->type = slang_oper_mulassign; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_DIVASSIGN: + op->type = slang_oper_divassign; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + /*case OP_MODASSIGN: */ + /*case OP_LSHASSIGN: */ + /*case OP_RSHASSIGN: */ + /*case OP_ORASSIGN: */ + /*case OP_XORASSIGN: */ + /*case OP_ANDASSIGN: */ + case OP_SELECT: + op->type = slang_oper_select; + if (!handle_nary_expression(C, op, &ops, &num_ops, 3)) + return 0; + break; + case OP_LOGICALOR: + op->type = slang_oper_logicalor; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_LOGICALXOR: + op->type = slang_oper_logicalxor; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_LOGICALAND: + op->type = slang_oper_logicaland; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + /*case OP_BITOR: */ + /*case OP_BITXOR: */ + /*case OP_BITAND: */ + case OP_EQUAL: + op->type = slang_oper_equal; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_NOTEQUAL: + op->type = slang_oper_notequal; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_LESS: + op->type = slang_oper_less; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_GREATER: + op->type = slang_oper_greater; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_LESSEQUAL: + op->type = slang_oper_lessequal; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_GREATEREQUAL: + op->type = slang_oper_greaterequal; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + /*case OP_LSHIFT: */ + /*case OP_RSHIFT: */ + case OP_ADD: + op->type = slang_oper_add; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_SUBTRACT: + op->type = slang_oper_subtract; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_MULTIPLY: + op->type = slang_oper_multiply; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_DIVIDE: + op->type = slang_oper_divide; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + /*case OP_MODULUS: */ + case OP_PREINCREMENT: + op->type = slang_oper_preincrement; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + case OP_PREDECREMENT: + op->type = slang_oper_predecrement; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + case OP_PLUS: + op->type = slang_oper_plus; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + case OP_MINUS: + op->type = slang_oper_minus; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + case OP_NOT: + op->type = slang_oper_not; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + /*case OP_COMPLEMENT: */ + case OP_SUBSCRIPT: + op->type = slang_oper_subscript; + if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) + return 0; + break; + case OP_CALL: + op->type = slang_oper_call; + op->a_id = parse_identifier(C); + if (op->a_id == SLANG_ATOM_NULL) + return 0; + while (*C->I != OP_END) + if (!parse_child_operation(C, O, op, 0)) + return 0; + C->I++; + if (!C->parsing_builtin + && !slang_function_scope_find_by_name(O->funs, op->a_id, 1)) { + const char *id; + + id = slang_atom_pool_id(C->atoms, op->a_id); + if (!is_constructor_name(id, op->a_id, O->structs)) { + slang_info_log_error(C->L, "%s: undeclared function name.", id); + return 0; + } + } + break; + case OP_FIELD: + op->type = slang_oper_field; + op->a_id = parse_identifier(C); + if (op->a_id == SLANG_ATOM_NULL) + return 0; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + case OP_POSTINCREMENT: + op->type = slang_oper_postincrement; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + case OP_POSTDECREMENT: + op->type = slang_oper_postdecrement; + if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) + return 0; + break; + default: + return 0; + } + } + C->I++; + + *oper = *ops; + slang_alloc_free(ops); + + return 1; } /* parameter qualifier */ @@ -1222,78 +1272,76 @@ static int parse_expression (slang_parse_ctx *C, slang_output_ctx *O, slang_oper #define PARAMETER_ARRAY_NOT_PRESENT 0 #define PARAMETER_ARRAY_PRESENT 1 -static int parse_parameter_declaration (slang_parse_ctx *C, slang_output_ctx *O, - slang_variable *param) +static int +parse_parameter_declaration(slang_parse_ctx * C, slang_output_ctx * O, + slang_variable * param) { - /* parse and validate the parameter's type qualifiers (there can be two at most) because - * not all combinations are valid */ - if (!parse_type_qualifier (C, ¶m->type.qualifier)) - return 0; - switch (*C->I++) - { - case PARAM_QUALIFIER_IN: - if (param->type.qualifier != slang_qual_const && param->type.qualifier != slang_qual_none) - { - slang_info_log_error (C->L, "Invalid type qualifier."); - return 0; - } - break; - case PARAM_QUALIFIER_OUT: - if (param->type.qualifier == slang_qual_none) - param->type.qualifier = slang_qual_out; - else - { - slang_info_log_error (C->L, "Invalid type qualifier."); - return 0; - } - break; - case PARAM_QUALIFIER_INOUT: - if (param->type.qualifier == slang_qual_none) - param->type.qualifier = slang_qual_inout; - else - { - slang_info_log_error (C->L, "Invalid type qualifier."); - return 0; - } - break; - default: - return 0; - } - - /* parse parameter's type specifier and name */ - if (!parse_type_specifier (C, O, ¶m->type.specifier)) - return 0; - param->a_name = parse_identifier (C); - if (param->a_name == SLANG_ATOM_NULL) - return 0; - - /* if the parameter is an array, parse its size (the size must be explicitly defined */ - if (*C->I++ == PARAMETER_ARRAY_PRESENT) - { - slang_type_specifier p; - - slang_type_specifier_ctr (&p); - if (!slang_type_specifier_copy (&p, ¶m->type.specifier)) - { - slang_type_specifier_dtr (&p); - return GL_FALSE; - } - if (!convert_to_array (C, param, &p)) - { - slang_type_specifier_dtr (&p); - return GL_FALSE; - } - slang_type_specifier_dtr (&p); - if (!parse_array_len (C, O, ¶m->array_len)) - return GL_FALSE; - } - - /* calculate the parameter size */ - if (!calculate_var_size (C, O, param)) - return GL_FALSE; - - /* TODO: allocate the local address here? */ - return 1; + /* parse and validate the parameter's type qualifiers (there can be + * two at most) because not all combinations are valid + */ + if (!parse_type_qualifier(C, ¶m->type.qualifier)) + return 0; + switch (*C->I++) { + case PARAM_QUALIFIER_IN: + if (param->type.qualifier != slang_qual_const + && param->type.qualifier != slang_qual_none) { + slang_info_log_error(C->L, "Invalid type qualifier."); + return 0; + } + break; + case PARAM_QUALIFIER_OUT: + if (param->type.qualifier == slang_qual_none) + param->type.qualifier = slang_qual_out; + else { + slang_info_log_error(C->L, "Invalid type qualifier."); + return 0; + } + break; + case PARAM_QUALIFIER_INOUT: + if (param->type.qualifier == slang_qual_none) + param->type.qualifier = slang_qual_inout; + else { + slang_info_log_error(C->L, "Invalid type qualifier."); + return 0; + } + break; + default: + return 0; + } + + /* parse parameter's type specifier and name */ + if (!parse_type_specifier(C, O, ¶m->type.specifier)) + return 0; + param->a_name = parse_identifier(C); + if (param->a_name == SLANG_ATOM_NULL) + return 0; + + /* if the parameter is an array, parse its size (the size must be + * explicitly defined + */ + if (*C->I++ == PARAMETER_ARRAY_PRESENT) { + slang_type_specifier p; + + slang_type_specifier_ctr(&p); + if (!slang_type_specifier_copy(&p, ¶m->type.specifier)) { + slang_type_specifier_dtr(&p); + return GL_FALSE; + } + if (!convert_to_array(C, param, &p)) { + slang_type_specifier_dtr(&p); + return GL_FALSE; + } + slang_type_specifier_dtr(&p); + if (!parse_array_len(C, O, ¶m->array_len)) + return GL_FALSE; + } + + /* calculate the parameter size */ + if (!calculate_var_size(C, O, param)) + return GL_FALSE; + + /* TODO: allocate the local address here? */ + return 1; } /* function type */ @@ -1336,251 +1384,256 @@ static int parse_parameter_declaration (slang_parse_ctx *C, slang_output_ctx *O, /*#define OPERATOR_COMPLEMENT 28*/ #define OPERATOR_NOT 29 -static const struct { - unsigned int o_code; - const char *o_name; +static const struct +{ + unsigned int o_code; + const char *o_name; } operator_names[] = { - { OPERATOR_INCREMENT, "++" }, - { OPERATOR_ADDASSIGN, "+=" }, - { OPERATOR_PLUS, "+" }, - { OPERATOR_DECREMENT, "--" }, - { OPERATOR_SUBASSIGN, "-=" }, - { OPERATOR_MINUS, "-" }, - { OPERATOR_NOT, "!" }, - { OPERATOR_MULASSIGN, "*=" }, - { OPERATOR_MULTIPLY, "*" }, - { OPERATOR_DIVASSIGN, "/=" }, - { OPERATOR_DIVIDE, "/" }, - { OPERATOR_LESSEQUAL, "<=" }, - /*{ OPERATOR_LSHASSIGN, "<<=" },*/ - /*{ OPERATOR_LSHIFT, "<<" },*/ - { OPERATOR_LESS, "<" }, - { OPERATOR_GREATEREQUAL, ">=" }, - /*{ OPERATOR_RSHASSIGN, ">>=" },*/ - /*{ OPERATOR_RSHIFT, ">>" },*/ - { OPERATOR_GREATER, ">" }, - /*{ OPERATOR_MODASSIGN, "%=" },*/ - /*{ OPERATOR_MODULUS, "%" },*/ - /*{ OPERATOR_ANDASSIGN, "&=" },*/ - /*{ OPERATOR_BITAND, "&" },*/ - /*{ OPERATOR_ORASSIGN, "|=" },*/ - /*{ OPERATOR_BITOR, "|" },*/ - /*{ OPERATOR_COMPLEMENT, "~" },*/ - /*{ OPERATOR_XORASSIGN, "^=" },*/ - { OPERATOR_LOGICALXOR, "^^" }, - /*{ OPERATOR_BITXOR, "^" }*/ + {OPERATOR_INCREMENT, "++"}, + {OPERATOR_ADDASSIGN, "+="}, + {OPERATOR_PLUS, "+"}, + {OPERATOR_DECREMENT, "--"}, + {OPERATOR_SUBASSIGN, "-="}, + {OPERATOR_MINUS, "-"}, + {OPERATOR_NOT, "!"}, + {OPERATOR_MULASSIGN, "*="}, + {OPERATOR_MULTIPLY, "*"}, + {OPERATOR_DIVASSIGN, "/="}, + {OPERATOR_DIVIDE, "/"}, + {OPERATOR_LESSEQUAL, "<="}, + /*{ OPERATOR_LSHASSIGN, "<<=" }, */ + /*{ OPERATOR_LSHIFT, "<<" }, */ + {OPERATOR_LESS, "<"}, + {OPERATOR_GREATEREQUAL, ">="}, + /*{ OPERATOR_RSHASSIGN, ">>=" }, */ + /*{ OPERATOR_RSHIFT, ">>" }, */ + {OPERATOR_GREATER, ">"}, + /*{ OPERATOR_MODASSIGN, "%=" }, */ + /*{ OPERATOR_MODULUS, "%" }, */ + /*{ OPERATOR_ANDASSIGN, "&=" }, */ + /*{ OPERATOR_BITAND, "&" }, */ + /*{ OPERATOR_ORASSIGN, "|=" }, */ + /*{ OPERATOR_BITOR, "|" }, */ + /*{ OPERATOR_COMPLEMENT, "~" }, */ + /*{ OPERATOR_XORASSIGN, "^=" }, */ + {OPERATOR_LOGICALXOR, "^^"}, + /*{ OPERATOR_BITXOR, "^" } */ }; -static slang_atom parse_operator_name (slang_parse_ctx *C) +static slang_atom +parse_operator_name(slang_parse_ctx * C) { - unsigned int i; - - for (i = 0; i < sizeof (operator_names) / sizeof (*operator_names); i++) - { - if (operator_names[i].o_code == (unsigned int) (*C->I)) - { - slang_atom atom = slang_atom_pool_atom (C->atoms, operator_names[i].o_name); - if (atom == SLANG_ATOM_NULL) - { - slang_info_log_memory (C->L); - return 0; - } - C->I++; - return atom; - } - } - return 0; + unsigned int i; + + for (i = 0; i < sizeof(operator_names) / sizeof(*operator_names); i++) { + if (operator_names[i].o_code == (unsigned int) (*C->I)) { + slang_atom atom = + slang_atom_pool_atom(C->atoms, operator_names[i].o_name); + if (atom == SLANG_ATOM_NULL) { + slang_info_log_memory(C->L); + return 0; + } + C->I++; + return atom; + } + } + return 0; } -static int parse_function_prototype (slang_parse_ctx *C, slang_output_ctx *O, slang_function *func) +static int +parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, + slang_function * func) { - /* parse function type and name */ - if (!parse_fully_specified_type (C, O, &func->header.type)) - return 0; - switch (*C->I++) - { - case FUNCTION_ORDINARY: - func->kind = slang_func_ordinary; - func->header.a_name = parse_identifier (C); - if (func->header.a_name == SLANG_ATOM_NULL) - return 0; - break; - case FUNCTION_CONSTRUCTOR: - func->kind = slang_func_constructor; - if (func->header.type.specifier.type == slang_spec_struct) - return 0; - func->header.a_name = slang_atom_pool_atom (C->atoms, - slang_type_specifier_type_to_string (func->header.type.specifier.type)); - if (func->header.a_name == SLANG_ATOM_NULL) - { - slang_info_log_memory (C->L); - return 0; - } - break; - case FUNCTION_OPERATOR: - func->kind = slang_func_operator; - func->header.a_name = parse_operator_name (C); - if (func->header.a_name == SLANG_ATOM_NULL) - return 0; - break; - default: - return 0; - } - - /* parse function parameters */ - while (*C->I++ == PARAMETER_NEXT) - { - slang_variable *p; - - func->parameters->variables = (slang_variable *) slang_alloc_realloc ( - func->parameters->variables, - func->parameters->num_variables * sizeof (slang_variable), - (func->parameters->num_variables + 1) * sizeof (slang_variable)); - if (func->parameters->variables == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - p = &func->parameters->variables[func->parameters->num_variables]; - if (!slang_variable_construct (p)) - return 0; - func->parameters->num_variables++; - if (!parse_parameter_declaration (C, O, p)) - return 0; - } - - /* function formal parameters and local variables share the same scope, so save - * the information about param count in a seperate place - * also link the scope to the global variable scope so when a given identifier is not - * found here, the search process continues in the global space */ - func->param_count = func->parameters->num_variables; - func->parameters->outer_scope = O->vars; - return 1; + /* parse function type and name */ + if (!parse_fully_specified_type(C, O, &func->header.type)) + return 0; + switch (*C->I++) { + case FUNCTION_ORDINARY: + func->kind = slang_func_ordinary; + func->header.a_name = parse_identifier(C); + if (func->header.a_name == SLANG_ATOM_NULL) + return 0; + break; + case FUNCTION_CONSTRUCTOR: + func->kind = slang_func_constructor; + if (func->header.type.specifier.type == slang_spec_struct) + return 0; + func->header.a_name = + slang_atom_pool_atom(C->atoms, + slang_type_specifier_type_to_string + (func->header.type.specifier.type)); + if (func->header.a_name == SLANG_ATOM_NULL) { + slang_info_log_memory(C->L); + return 0; + } + break; + case FUNCTION_OPERATOR: + func->kind = slang_func_operator; + func->header.a_name = parse_operator_name(C); + if (func->header.a_name == SLANG_ATOM_NULL) + return 0; + break; + default: + return 0; + } + + /* parse function parameters */ + while (*C->I++ == PARAMETER_NEXT) { + slang_variable *p; + + func->parameters->variables = (slang_variable *) + slang_alloc_realloc(func->parameters->variables, + func->parameters->num_variables * sizeof(slang_variable), + (func->parameters->num_variables + 1) * sizeof(slang_variable)); + if (func->parameters->variables == NULL) { + slang_info_log_memory(C->L); + return 0; + } + p = &func->parameters->variables[func->parameters->num_variables]; + if (!slang_variable_construct(p)) + return 0; + func->parameters->num_variables++; + if (!parse_parameter_declaration(C, O, p)) + return 0; + } + + /* function formal parameters and local variables share the same + * scope, so save the information about param count in a seperate + * place also link the scope to the global variable scope so when a + * given identifier is not found here, the search process continues + * in the global space + */ + func->param_count = func->parameters->num_variables; + func->parameters->outer_scope = O->vars; + return 1; } -static int parse_function_definition (slang_parse_ctx *C, slang_output_ctx *O, slang_function *func) +static int +parse_function_definition(slang_parse_ctx * C, slang_output_ctx * O, + slang_function * func) { - slang_output_ctx o = *O; - - if (!parse_function_prototype (C, O, func)) - return 0; - - /* create function's body operation */ - func->body = (slang_operation *) slang_alloc_malloc (sizeof (slang_operation)); - if (func->body == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - if (!slang_operation_construct (func->body)) - { - slang_alloc_free (func->body); - func->body = NULL; - slang_info_log_memory (C->L); - return 0; - } - - /* to parse the body the parse context is modified in order to capture parsed variables - * into function's local variable scope */ - C->global_scope = 0; - o.vars = func->parameters; - if (!parse_statement (C, &o, func->body)) - return 0; - C->global_scope = 1; - return 1; + slang_output_ctx o = *O; + + if (!parse_function_prototype(C, O, func)) + return 0; + + /* create function's body operation */ + func->body = + (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); + if (func->body == NULL) { + slang_info_log_memory(C->L); + return 0; + } + if (!slang_operation_construct(func->body)) { + slang_alloc_free(func->body); + func->body = NULL; + slang_info_log_memory(C->L); + return 0; + } + + /* to parse the body the parse context is modified in order to + * capture parsed variables into function's local variable scope + */ + C->global_scope = GL_FALSE; + o.vars = func->parameters; + if (!parse_statement(C, &o, func->body)) + return 0; + + C->global_scope = GL_TRUE; + return 1; } -static GLboolean initialize_global (slang_assemble_ctx *A, slang_variable *var) +static GLboolean +initialize_global(slang_assemble_ctx * A, slang_variable * var) { - slang_assembly_file_restore_point point; - slang_machine mach; - slang_assembly_local_info save_local = A->local; - slang_operation op_id, op_assign; - GLboolean result; - - /* save the current assembly */ - if (!slang_assembly_file_restore_point_save (A->file, &point)) - return GL_FALSE; - - /* setup the machine */ - mach = *A->mach; - mach.ip = A->file->count; - - /* allocate local storage for expression */ - A->local.ret_size = 0; - A->local.addr_tmp = 0; - A->local.swizzle_tmp = 4; - if (!slang_assembly_file_push_label (A->file, slang_asm_local_alloc, 20)) - return GL_FALSE; - if (!slang_assembly_file_push_label (A->file, slang_asm_enter, 20)) - return GL_FALSE; - - /* construct the left side of assignment */ - if (!slang_operation_construct (&op_id)) - return GL_FALSE; - op_id.type = slang_oper_identifier; - op_id.a_id = var->a_name; - - /* put the variable into operation's scope */ - op_id.locals->variables = (slang_variable *) slang_alloc_malloc (sizeof (slang_variable)); - if (op_id.locals->variables == NULL) - { - slang_operation_destruct (&op_id); - return GL_FALSE; - } - op_id.locals->num_variables = 1; - op_id.locals->variables[0] = *var; - - /* construct the assignment expression */ - if (!slang_operation_construct (&op_assign)) - { - op_id.locals->num_variables = 0; - slang_operation_destruct (&op_id); - return GL_FALSE; - } - op_assign.type = slang_oper_assign; - op_assign.children = (slang_operation *) slang_alloc_malloc (2 * sizeof (slang_operation)); - if (op_assign.children == NULL) - { - slang_operation_destruct (&op_assign); - op_id.locals->num_variables = 0; - slang_operation_destruct (&op_id); - return GL_FALSE; - } - op_assign.num_children = 2; - op_assign.children[0] = op_id; - op_assign.children[1] = *var->initializer; - - /* insert the actual expression */ - result = _slang_assemble_operation (A, &op_assign, slang_ref_forbid); - - /* carefully destroy the operations */ - op_assign.num_children = 0; - slang_alloc_free (op_assign.children); - op_assign.children = NULL; - slang_operation_destruct (&op_assign); - op_id.locals->num_variables = 0; - slang_operation_destruct (&op_id); - - if (!result) - return GL_FALSE; - if (!slang_assembly_file_push (A->file, slang_asm_exit)) - return GL_FALSE; - - /* execute the expression */ - if (!_slang_execute2 (A->file, &mach)) - return GL_FALSE; - - /* restore the old assembly */ - if (!slang_assembly_file_restore_point_load (A->file, &point)) - return GL_FALSE; - A->local = save_local; - - /* now we copy the contents of the initialized variable back to the original machine */ - _mesa_memcpy ((GLubyte *) A->mach->mem + var->address, (GLubyte *) mach.mem + var->address, - var->size); - - return GL_TRUE; + slang_assembly_file_restore_point point; + slang_machine mach; + slang_assembly_local_info save_local = A->local; + slang_operation op_id, op_assign; + GLboolean result; + + /* save the current assembly */ + if (!slang_assembly_file_restore_point_save(A->file, &point)) + return GL_FALSE; + + /* setup the machine */ + mach = *A->mach; + mach.ip = A->file->count; + + /* allocate local storage for expression */ + A->local.ret_size = 0; + A->local.addr_tmp = 0; + A->local.swizzle_tmp = 4; + if (!slang_assembly_file_push_label(A->file, slang_asm_local_alloc, 20)) + return GL_FALSE; + if (!slang_assembly_file_push_label(A->file, slang_asm_enter, 20)) + return GL_FALSE; + + /* construct the left side of assignment */ + if (!slang_operation_construct(&op_id)) + return GL_FALSE; + op_id.type = slang_oper_identifier; + op_id.a_id = var->a_name; + + /* put the variable into operation's scope */ + op_id.locals->variables = + (slang_variable *) slang_alloc_malloc(sizeof(slang_variable)); + if (op_id.locals->variables == NULL) { + slang_operation_destruct(&op_id); + return GL_FALSE; + } + op_id.locals->num_variables = 1; + op_id.locals->variables[0] = *var; + + /* construct the assignment expression */ + if (!slang_operation_construct(&op_assign)) { + op_id.locals->num_variables = 0; + slang_operation_destruct(&op_id); + return GL_FALSE; + } + op_assign.type = slang_oper_assign; + op_assign.children = + (slang_operation *) slang_alloc_malloc(2 * sizeof(slang_operation)); + if (op_assign.children == NULL) { + slang_operation_destruct(&op_assign); + op_id.locals->num_variables = 0; + slang_operation_destruct(&op_id); + return GL_FALSE; + } + op_assign.num_children = 2; + op_assign.children[0] = op_id; + op_assign.children[1] = *var->initializer; + + /* insert the actual expression */ + result = _slang_assemble_operation(A, &op_assign, slang_ref_forbid); + + /* carefully destroy the operations */ + op_assign.num_children = 0; + slang_alloc_free(op_assign.children); + op_assign.children = NULL; + slang_operation_destruct(&op_assign); + op_id.locals->num_variables = 0; + slang_operation_destruct(&op_id); + + if (!result) + return GL_FALSE; + if (!slang_assembly_file_push(A->file, slang_asm_exit)) + return GL_FALSE; + + /* execute the expression */ + if (!_slang_execute2(A->file, &mach)) + return GL_FALSE; + + /* restore the old assembly */ + if (!slang_assembly_file_restore_point_load(A->file, &point)) + return GL_FALSE; + A->local = save_local; + + /* now we copy the contents of the initialized variable back to the original machine */ + _mesa_memcpy((GLubyte *) A->mach->mem + var->address, + (GLubyte *) mach.mem + var->address, var->size); + + return GL_TRUE; } /* init declarator list */ @@ -1594,89 +1647,95 @@ static GLboolean initialize_global (slang_assemble_ctx *A, slang_variable *var) #define VARIABLE_ARRAY_EXPLICIT 3 #define VARIABLE_ARRAY_UNKNOWN 4 -static int parse_init_declarator (slang_parse_ctx *C, slang_output_ctx *O, - const slang_fully_specified_type *type) + +/** + * Parse the initializer for a variable declaration. + */ +static int +parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, + const slang_fully_specified_type * type) { - slang_variable *var; - - /* empty init declatator (without name, e.g. "float ;") */ - if (*C->I++ == VARIABLE_NONE) - return 1; - - /* make room for the new variable and initialize it */ - O->vars->variables = (slang_variable *) slang_alloc_realloc (O->vars->variables, - O->vars->num_variables * sizeof (slang_variable), - (O->vars->num_variables + 1) * sizeof (slang_variable)); - if (O->vars->variables == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - var = &O->vars->variables[O->vars->num_variables]; - if (!slang_variable_construct (var)) - return 0; - O->vars->num_variables++; - - /* copy the declarator qualifier type, parse the identifier */ - var->global = C->global_scope; - var->type.qualifier = type->qualifier; - var->a_name = parse_identifier (C); - if (var->a_name == SLANG_ATOM_NULL) - return 0; - - switch (*C->I++) - { - case VARIABLE_NONE: - /* simple variable declarator - just copy the specifier */ - if (!slang_type_specifier_copy (&var->type.specifier, &type->specifier)) - return 0; - break; - case VARIABLE_INITIALIZER: - /* initialized variable - copy the specifier and parse the expression */ - if (!slang_type_specifier_copy (&var->type.specifier, &type->specifier)) - return 0; - var->initializer = (slang_operation *) slang_alloc_malloc (sizeof (slang_operation)); - if (var->initializer == NULL) - { - slang_info_log_memory (C->L); - return 0; - } - if (!slang_operation_construct (var->initializer)) - { - slang_alloc_free (var->initializer); - var->initializer = NULL; - slang_info_log_memory (C->L); - return 0; - } - if (!parse_expression (C, O, var->initializer)) - return 0; - break; + slang_variable *var; + + /* empty init declatator (without name, e.g. "float ;") */ + if (*C->I++ == VARIABLE_NONE) + return 1; + + /* make room for the new variable and initialize it */ + O->vars->variables = (slang_variable *) + slang_alloc_realloc(O->vars->variables, + O->vars->num_variables * sizeof(slang_variable), + (O->vars->num_variables + 1) * sizeof(slang_variable)); + if (O->vars->variables == NULL) { + slang_info_log_memory(C->L); + return 0; + } + var = &O->vars->variables[O->vars->num_variables]; + if (!slang_variable_construct(var)) + return 0; + O->vars->num_variables++; + + /* copy the declarator qualifier type, parse the identifier */ + var->global = C->global_scope; + var->type.qualifier = type->qualifier; + var->a_name = parse_identifier(C); + if (var->a_name == SLANG_ATOM_NULL) + return 0; + + switch (*C->I++) { + case VARIABLE_NONE: + /* simple variable declarator - just copy the specifier */ + if (!slang_type_specifier_copy(&var->type.specifier, &type->specifier)) + return 0; + break; + case VARIABLE_INITIALIZER: + /* initialized variable - copy the specifier and parse the expression */ + if (!slang_type_specifier_copy(&var->type.specifier, &type->specifier)) + return 0; + var->initializer = + (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); + if (var->initializer == NULL) { + slang_info_log_memory(C->L); + return 0; + } + if (!slang_operation_construct(var->initializer)) { + slang_alloc_free(var->initializer); + var->initializer = NULL; + slang_info_log_memory(C->L); + return 0; + } + if (!parse_expression(C, O, var->initializer)) + return 0; + break; #if 0 - case VARIABLE_ARRAY_UNKNOWN: - /* unsized array - mark it as array and copy the specifier to the array element */ - if (!convert_to_array (C, var, &type->specifier)) - return GL_FALSE; - break; + case VARIABLE_ARRAY_UNKNOWN: + /* unsized array - mark it as array and copy the specifier to + the array element + */ + if (!convert_to_array(C, var, &type->specifier)) + return GL_FALSE; + break; #endif - case VARIABLE_ARRAY_EXPLICIT: - if (!convert_to_array (C, var, &type->specifier)) - return GL_FALSE; - if (!parse_array_len (C, O, &var->array_len)) - return GL_FALSE; - break; - default: - return 0; - } - - /* allocate global address space for a variable with a known size */ - if (C->global_scope && !(var->type.specifier.type == slang_spec_array && var->array_len == 0)) - { - if (!calculate_var_size (C, O, var)) - return GL_FALSE; - var->address = slang_var_pool_alloc (O->global_pool, var->size); - } - - /* initialize global variable */ + case VARIABLE_ARRAY_EXPLICIT: + if (!convert_to_array(C, var, &type->specifier)) + return GL_FALSE; + if (!parse_array_len(C, O, &var->array_len)) + return GL_FALSE; + break; + default: + return 0; + } + + /* allocate global address space for a variable with a known size */ + if (C->global_scope + && !(var->type.specifier.type == slang_spec_array + && var->array_len == 0)) { + if (!calculate_var_size(C, O, var)) + return GL_FALSE; + var->address = slang_var_pool_alloc(O->global_pool, var->size); + } + + /* initialize global variable */ if (C->global_scope) { if (var->initializer != NULL) { slang_assemble_ctx A; @@ -1687,160 +1746,171 @@ static int parse_init_declarator (slang_parse_ctx *C, slang_output_ctx *O, A.space.funcs = O->funs; A.space.structs = O->structs; A.space.vars = O->vars; - if (!initialize_global (&A, var)) + if (!initialize_global(&A, var)) return 0; } else { - _mesa_memset ((GLubyte *) (O->machine->mem) + var->address, 0, var->size); + _mesa_memset((GLubyte *) (O->machine->mem) + var->address, 0, + var->size); } - } - return 1; + } + return 1; } -static int parse_init_declarator_list (slang_parse_ctx *C, slang_output_ctx *O) +/** + * Parse a list of variable declarations. Each variable may have an + * initializer. + */ +static int +parse_init_declarator_list(slang_parse_ctx * C, slang_output_ctx * O) { - slang_fully_specified_type type; - - /* parse the fully specified type, common to all declarators */ - if (!slang_fully_specified_type_construct (&type)) - return 0; - if (!parse_fully_specified_type (C, O, &type)) - { - slang_fully_specified_type_destruct (&type); - return 0; - } - - /* parse declarators, pass-in the parsed type */ - do - { - if (!parse_init_declarator (C, O, &type)) - { - slang_fully_specified_type_destruct (&type); - return 0; - } - } - while (*C->I++ == DECLARATOR_NEXT); - - slang_fully_specified_type_destruct (&type); - return 1; + slang_fully_specified_type type; + + /* parse the fully specified type, common to all declarators */ + if (!slang_fully_specified_type_construct(&type)) + return 0; + if (!parse_fully_specified_type(C, O, &type)) { + slang_fully_specified_type_destruct(&type); + return 0; + } + + /* parse declarators, pass-in the parsed type */ + do { + if (!parse_init_declarator(C, O, &type)) { + slang_fully_specified_type_destruct(&type); + return 0; + } + } + while (*C->I++ == DECLARATOR_NEXT); + + slang_fully_specified_type_destruct(&type); + return 1; } -static int parse_function (slang_parse_ctx *C, slang_output_ctx *O, int definition, - slang_function **parsed_func_ret) + +/** + * Parse a function definition or declaration. + * \param C parsing context + * \param O output context + * \param definition if non-zero expect a definition, else a declaration + * \param parsed_func_ret returns the parsed function + * \return 1 if success, 0 if failure + */ +static int +parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, + slang_function ** parsed_func_ret) { - slang_function parsed_func, *found_func; - - /* parse function definition/declaration */ - if (!slang_function_construct (&parsed_func)) - return 0; - if (definition) - { - if (!parse_function_definition (C, O, &parsed_func)) - { - slang_function_destruct (&parsed_func); - return 0; - } - } - else - { - if (!parse_function_prototype (C, O, &parsed_func)) - { - slang_function_destruct (&parsed_func); - return 0; - } - } - - /* find a function with a prototype matching the parsed one - only the current scope - * is being searched to allow built-in function overriding */ - found_func = slang_function_scope_find (O->funs, &parsed_func, 0); - if (found_func == NULL) - { - /* add the parsed function to the function list */ - O->funs->functions = (slang_function *) slang_alloc_realloc (O->funs->functions, - O->funs->num_functions * sizeof (slang_function), - (O->funs->num_functions + 1) * sizeof (slang_function)); - if (O->funs->functions == NULL) - { - slang_info_log_memory (C->L); - slang_function_destruct (&parsed_func); - return 0; - } - O->funs->functions[O->funs->num_functions] = parsed_func; - O->funs->num_functions++; - - /* return the newly parsed function */ - *parsed_func_ret = &O->funs->functions[O->funs->num_functions - 1]; - } - else - { - /* TODO: check function return type qualifiers and specifiers */ - if (definition) - { - if (found_func->body != NULL) - { - slang_info_log_error (C->L, "%s: function already has a body.", - slang_atom_pool_id (C->atoms, parsed_func.header.a_name)); - slang_function_destruct (&parsed_func); - return 0; - } - - /* destroy the existing function declaration and replace it with the new one, - * remember to save the fixup table */ - parsed_func.fixups = found_func->fixups; - slang_fixup_table_init (&found_func->fixups); - slang_function_destruct (found_func); - *found_func = parsed_func; - } - else - { - /* another declaration of the same function prototype - ignore it */ - slang_function_destruct (&parsed_func); - } - - /* return the found function */ - *parsed_func_ret = found_func; - } - - /* assemble the parsed function */ - { - slang_assemble_ctx A; - - A.file = O->assembly; - A.mach = O->machine; - A.atoms = C->atoms; - A.space.funcs = O->funs; - A.space.structs = O->structs; - A.space.vars = O->vars; - if (!_slang_assemble_function (&A, *parsed_func_ret)) - return 0; - } - return 1; + slang_function parsed_func, *found_func; + + /* parse function definition/declaration */ + if (!slang_function_construct(&parsed_func)) + return 0; + if (definition) { + if (!parse_function_definition(C, O, &parsed_func)) { + slang_function_destruct(&parsed_func); + return 0; + } + } + else { + if (!parse_function_prototype(C, O, &parsed_func)) { + slang_function_destruct(&parsed_func); + return 0; + } + } + + /* find a function with a prototype matching the parsed one - only + * the current scope is being searched to allow built-in function + * overriding + */ + found_func = slang_function_scope_find(O->funs, &parsed_func, 0); + if (found_func == NULL) { + /* add the parsed function to the function list */ + O->funs->functions = + (slang_function *) slang_alloc_realloc(O->funs->functions, + O->funs->num_functions * + sizeof(slang_function), + (O->funs->num_functions + + 1) * sizeof(slang_function)); + if (O->funs->functions == NULL) { + slang_info_log_memory(C->L); + slang_function_destruct(&parsed_func); + return 0; + } + O->funs->functions[O->funs->num_functions] = parsed_func; + O->funs->num_functions++; + + /* return the newly parsed function */ + *parsed_func_ret = &O->funs->functions[O->funs->num_functions - 1]; + } + else { + /* TODO: check function return type qualifiers and specifiers */ + if (definition) { + if (found_func->body != NULL) { + slang_info_log_error(C->L, "%s: function already has a body.", + slang_atom_pool_id(C->atoms, + parsed_func.header. + a_name)); + slang_function_destruct(&parsed_func); + return 0; + } + + /* destroy the existing function declaration and replace it + * with the new one, remember to save the fixup table + */ + parsed_func.fixups = found_func->fixups; + slang_fixup_table_init(&found_func->fixups); + slang_function_destruct(found_func); + *found_func = parsed_func; + } + else { + /* another declaration of the same function prototype - ignore it */ + slang_function_destruct(&parsed_func); + } + + /* return the found function */ + *parsed_func_ret = found_func; + } + + /* assemble the parsed function */ + { + slang_assemble_ctx A; + + A.file = O->assembly; + A.mach = O->machine; + A.atoms = C->atoms; + A.space.funcs = O->funs; + A.space.structs = O->structs; + A.space.vars = O->vars; + if (!_slang_assemble_function(&A, *parsed_func_ret)) + return 0; + } + return 1; } /* declaration */ #define DECLARATION_FUNCTION_PROTOTYPE 1 #define DECLARATION_INIT_DECLARATOR_LIST 2 -static int parse_declaration (slang_parse_ctx *C, slang_output_ctx *O) +static int +parse_declaration(slang_parse_ctx * C, slang_output_ctx * O) { - switch (*C->I++) - { - case DECLARATION_INIT_DECLARATOR_LIST: - if (!parse_init_declarator_list (C, O)) - return 0; - break; - case DECLARATION_FUNCTION_PROTOTYPE: - { - slang_function *dummy_func; - - if (!parse_function (C, O, 0, &dummy_func)) - return 0; - } - break; - default: - return 0; - } - return 1; + switch (*C->I++) { + case DECLARATION_INIT_DECLARATOR_LIST: + if (!parse_init_declarator_list(C, O)) + return 0; + break; + case DECLARATION_FUNCTION_PROTOTYPE: + { + slang_function *dummy_func; + + if (!parse_function(C, O, 0, &dummy_func)) + return 0; + } + break; + default: + return 0; + } + return 1; } /* external declaration */ @@ -1849,9 +1919,9 @@ static int parse_declaration (slang_parse_ctx *C, slang_output_ctx *O) #define EXTERNAL_DECLARATION 2 static GLboolean -parse_code_unit (slang_parse_ctx *C, slang_code_unit *unit) +parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit) { - slang_output_ctx o; + slang_output_ctx o; /* setup output context */ o.funs = &unit->funs; @@ -1861,34 +1931,33 @@ parse_code_unit (slang_parse_ctx *C, slang_code_unit *unit) o.global_pool = &unit->object->varpool; o.machine = &unit->object->machine; - /* parse individual functions and declarations */ - while (*C->I != EXTERNAL_NULL) - { - switch (*C->I++) - { - case EXTERNAL_FUNCTION_DEFINITION: - { - slang_function *func; - - if (!parse_function (C, &o, 1, &func)) - return 0; - } - break; - case EXTERNAL_DECLARATION: - if (!parse_declaration (C, &o)) - return 0; - break; - default: - return 0; - } - } - C->I++; - return 1; + /* parse individual functions and declarations */ + while (*C->I != EXTERNAL_NULL) { + switch (*C->I++) { + case EXTERNAL_FUNCTION_DEFINITION: + { + slang_function *func; + + if (!parse_function(C, &o, 1, &func)) + return 0; + } + break; + case EXTERNAL_DECLARATION: + if (!parse_declaration(C, &o)) + return 0; + break; + default: + return 0; + } + } + C->I++; + return 1; } static GLboolean -compile_binary (const byte *prod, slang_code_unit *unit, slang_unit_type type, - slang_info_log *infolog, slang_code_unit *builtin, slang_code_unit *downlink) +compile_binary(const byte * prod, slang_code_unit * unit, + slang_unit_type type, slang_info_log * infolog, + slang_code_unit * builtin, slang_code_unit * downlink) { slang_parse_ctx C; @@ -1901,7 +1970,7 @@ compile_binary (const byte *prod, slang_code_unit *unit, slang_unit_type type, C.global_scope = GL_TRUE; C.atoms = &unit->object->atompool; - if (!check_revision (&C)) + if (!check_revision(&C)) return GL_FALSE; if (downlink != NULL) { @@ -1911,58 +1980,64 @@ compile_binary (const byte *prod, slang_code_unit *unit, slang_unit_type type, } /* parse translation unit */ - return parse_code_unit (&C, unit); + return parse_code_unit(&C, unit); } static GLboolean -compile_with_grammar (grammar id, const char *source, slang_code_unit *unit, slang_unit_type type, - slang_info_log *infolog, slang_code_unit *builtin) +compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, + slang_unit_type type, slang_info_log * infolog, + slang_code_unit * builtin) { byte *prod; GLuint size, start, version; slang_string preprocessed; /* First retrieve the version number. */ - if (!_slang_preprocess_version (source, &version, &start, infolog)) + if (!_slang_preprocess_version(source, &version, &start, infolog)) return GL_FALSE; if (version > 110) { - slang_info_log_error (infolog, "language version specified is not supported."); + slang_info_log_error(infolog, + "language version specified is not supported."); return GL_FALSE; } /* Now preprocess the source string. */ - slang_string_init (&preprocessed); - if (!_slang_preprocess_directives (&preprocessed, &source[start], infolog)) { - slang_string_free (&preprocessed); - slang_info_log_error (infolog, "failed to preprocess the source."); + slang_string_init(&preprocessed); + if (!_slang_preprocess_directives(&preprocessed, &source[start], infolog)) { + slang_string_free(&preprocessed); + slang_info_log_error(infolog, "failed to preprocess the source."); return GL_FALSE; } /* Finally check the syntax and generate its binary representation. */ - if (!grammar_fast_check (id, (const byte *) (slang_string_cstr (&preprocessed)), &prod, &size, 65536)) { + if (!grammar_fast_check + (id, (const byte *) (slang_string_cstr(&preprocessed)), &prod, &size, + 65536)) { char buf[1024]; GLint pos; - slang_string_free (&preprocessed); - grammar_get_last_error ((byte *) (buf), sizeof (buf), &pos); - slang_info_log_error (infolog, buf); + slang_string_free(&preprocessed); + grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); + slang_info_log_error(infolog, buf); return GL_FALSE; } - slang_string_free (&preprocessed); + slang_string_free(&preprocessed); /* Syntax is okay - translate it to internal representation. */ - if (!compile_binary (prod, unit, type, infolog, builtin, &builtin[SLANG_BUILTIN_TOTAL - 1])) { - grammar_alloc_free (prod); + if (!compile_binary + (prod, unit, type, infolog, builtin, + &builtin[SLANG_BUILTIN_TOTAL - 1])) { + grammar_alloc_free(prod); return GL_FALSE; } - grammar_alloc_free (prod); + grammar_alloc_free(prod); return GL_TRUE; } -static const char *slang_shader_syn = +LONGSTRING static const char *slang_shader_syn = #include "library/slang_shader_syn.h" -; + ; static const byte slang_core_gc[] = { #include "library/slang_core_gc.h" @@ -1987,106 +2062,111 @@ static const byte slang_builtin_vec4_gc[] = { #endif static GLboolean -compile_object (grammar *id, const char *source, slang_code_object *object, slang_unit_type type, - slang_info_log *infolog) +compile_object(grammar * id, const char *source, slang_code_object * object, + slang_unit_type type, slang_info_log * infolog) { slang_code_unit *builtins = NULL; /* load GLSL grammar */ - *id = grammar_load_from_text ((const byte *) (slang_shader_syn)); - if (*id == 0) - { - byte buf[1024]; - int pos; - - grammar_get_last_error (buf, 1024, &pos); - slang_info_log_error (infolog, (const char *) (buf)); + *id = grammar_load_from_text((const byte *) (slang_shader_syn)); + if (*id == 0) { + byte buf[1024]; + int pos; + + grammar_get_last_error(buf, 1024, &pos); + slang_info_log_error(infolog, (const char *) (buf)); return GL_FALSE; - } - - /* set shader type - the syntax is slightly different for different shaders */ - if (type == slang_unit_fragment_shader || type == slang_unit_fragment_builtin) - grammar_set_reg8 (*id, (const byte *) "shader_type", 1); - else - grammar_set_reg8 (*id, (const byte *) "shader_type", 2); - - /* enable language extensions */ - grammar_set_reg8 (*id, (const byte *) "parsing_builtin", 1); - - /* if parsing user-specified shader, load built-in library */ - if (type == slang_unit_fragment_shader || type == slang_unit_vertex_shader) - { - /* compile core functionality first */ - if (!compile_binary (slang_core_gc, &object->builtin[SLANG_BUILTIN_CORE], - slang_unit_fragment_builtin, infolog, NULL, NULL)) + } + + /* set shader type - the syntax is slightly different for different shaders */ + if (type == slang_unit_fragment_shader + || type == slang_unit_fragment_builtin) + grammar_set_reg8(*id, (const byte *) "shader_type", 1); + else + grammar_set_reg8(*id, (const byte *) "shader_type", 2); + + /* enable language extensions */ + grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); + + /* if parsing user-specified shader, load built-in library */ + if (type == slang_unit_fragment_shader || type == slang_unit_vertex_shader) { + /* compile core functionality first */ + if (!compile_binary(slang_core_gc, &object->builtin[SLANG_BUILTIN_CORE], + slang_unit_fragment_builtin, infolog, NULL, NULL)) return GL_FALSE; - /* compile common functions and variables, link to core */ - if (!compile_binary (slang_common_builtin_gc, &object->builtin[SLANG_BUILTIN_COMMON], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_CORE])) + /* compile common functions and variables, link to core */ + if (!compile_binary + (slang_common_builtin_gc, &object->builtin[SLANG_BUILTIN_COMMON], + slang_unit_fragment_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_CORE])) return GL_FALSE; - /* compile target-specific functions and variables, link to common */ - if (type == slang_unit_fragment_shader) - { - if (!compile_binary (slang_fragment_builtin_gc, &object->builtin[SLANG_BUILTIN_TARGET], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_COMMON])) + /* compile target-specific functions and variables, link to common */ + if (type == slang_unit_fragment_shader) { + if (!compile_binary + (slang_fragment_builtin_gc, + &object->builtin[SLANG_BUILTIN_TARGET], + slang_unit_fragment_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_COMMON])) return GL_FALSE; - } - else if (type == slang_unit_vertex_shader) - { - if (!compile_binary (slang_vertex_builtin_gc, &object->builtin[SLANG_BUILTIN_TARGET], - slang_unit_vertex_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_COMMON])) + } + else if (type == slang_unit_vertex_shader) { + if (!compile_binary + (slang_vertex_builtin_gc, &object->builtin[SLANG_BUILTIN_TARGET], + slang_unit_vertex_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_COMMON])) return GL_FALSE; - } + } #if defined(USE_X86_ASM) || defined(SLANG_X86) /* compile x86 4-component vector overrides, link to target */ - if (!compile_binary (slang_builtin_vec4_gc, &object->builtin[SLANG_BUILTIN_VEC4], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_TARGET])) + if (!compile_binary + (slang_builtin_vec4_gc, &object->builtin[SLANG_BUILTIN_VEC4], + slang_unit_fragment_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_TARGET])) return GL_FALSE; #endif - /* disable language extensions */ - grammar_set_reg8 (*id, (const byte *) "parsing_builtin", 0); + /* disable language extensions */ + grammar_set_reg8(*id, (const byte *) "parsing_builtin", 0); builtins = object->builtin; - } + } - /* compile the actual shader - pass-in built-in library for external shader */ - return compile_with_grammar (*id, source, &object->unit, type, infolog, builtins); + /* compile the actual shader - pass-in built-in library for external shader */ + return compile_with_grammar(*id, source, &object->unit, type, infolog, + builtins); } GLboolean -_slang_compile (const char *source, slang_code_object *object, slang_unit_type type, - slang_info_log *infolog) +_slang_compile(const char *source, slang_code_object * object, + slang_unit_type type, slang_info_log * infolog) { GLboolean success; grammar id = 0; - _slang_code_object_dtr (object); - _slang_code_object_ctr (object); + _slang_code_object_dtr(object); + _slang_code_object_ctr(object); - success = compile_object (&id, source, object, type, infolog); + success = compile_object(&id, source, object, type, infolog); if (id != 0) - grammar_destroy (id); + grammar_destroy(id); if (!success) return GL_FALSE; - if (!_slang_build_export_data_table (&object->expdata, &object->unit.vars)) + if (!_slang_build_export_data_table(&object->expdata, &object->unit.vars)) return GL_FALSE; - if (!_slang_build_export_code_table (&object->expcode, &object->unit.funs, &object->unit)) + if (!_slang_build_export_code_table + (&object->expcode, &object->unit.funs, &object->unit)) return GL_FALSE; #if defined(USE_X86_ASM) || defined(SLANG_X86) /* XXX: lookup the @main label */ - if (!_slang_x86_codegen (&object->machine, &object->assembly, object->expcode.entries[0].address)) + if (!_slang_x86_codegen + (&object->machine, &object->assembly, + object->expcode.entries[0].address)) return GL_FALSE; #endif return GL_TRUE; } - -- cgit v1.2.3 From 699a33ea77ecd164d7435811258eee96bd37aaa2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 23:19:52 +0000 Subject: Add new _mesa_lookup_parameter_constant() to search for a GLfloat4 constant in a parameter list. Use it in _mesa_add_named_constant() and _mesa_add_unnamed_constant() to avoid duplication of identical constants. --- src/mesa/shader/program.c | 92 +++++++++++++++++++++++++++++++++++++++++------ src/mesa/shader/program.h | 11 +++--- 2 files changed, 88 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index eabfbc24d7..5c03ad44c2 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -430,14 +430,20 @@ _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, * This will be used when the program contains something like this: * PARAM myVals = { 0, 1, 2, 3 }; * - * \param paramList - the parameter list - * \param values - four float values - * \return index of the new parameter. + * \param paramList the parameter list + * \param name the name for the constant + * \param values four float values + * \return index/position of the new parameter in the parameter list */ GLint _mesa_add_named_constant(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4]) { + GLuint pos, swizzle; + /* check if we already have this constant */ + if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { + return pos; + } return add_parameter(paramList, name, values, PROGRAM_CONSTANT); } @@ -447,14 +453,19 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, * This will be used when the program contains something like this: * MOV r, { 0, 1, 2, 3 }; * - * \param paramList - the parameter list - * \param values - four float values - * \return index of the new parameter. + * \param paramList the parameter list + * \param values four float values + * \return index/position of the new parameter in the parameter list. */ GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, const GLfloat values[4]) { + GLuint pos, swizzle; + /* check if we already have this constant */ + if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { + return pos; + } return add_parameter(paramList, NULL, values, PROGRAM_CONSTANT); } @@ -464,8 +475,8 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, * This will be used when the program contains something like this: * PARAM ambient = state.material.front.ambient; * - * \param paramList - the parameter list - * \param state - an array of 6 state tokens + * \param paramList the parameter list + * \param state an array of 6 state tokens * \return index of the new parameter. */ GLint @@ -500,7 +511,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, * \return pointer to the float[4] values. */ GLfloat * -_mesa_lookup_parameter_value(struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name) { GLuint i; @@ -530,11 +541,15 @@ _mesa_lookup_parameter_value(struct gl_program_parameter_list *paramList, /** - * Lookup a parameter index by name in the given parameter list. + * Given a program parameter name, find its position in the list of parameters. + * \param paramList the parameter list to search + * \param nameLen length of name (in chars). + * If length is negative, assume that name is null-terminated. + * \param name the name to search for * \return index of parameter in the list. */ GLint -_mesa_lookup_parameter_index(struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name) { GLint i; @@ -563,6 +578,61 @@ _mesa_lookup_parameter_index(struct gl_program_parameter_list *paramList, } +/** + * Look for a float vector in the given parameter list. The float vector + * may be of length 1, 2, 3 or 4. + * \param paramList the parameter list to search + * \param v the float vector to search for + * \param size number of element in v + * \param posOut returns the position of the constant, if found + * \param swizzleOut returns a swizzle mask describing location of the + * vector elements if found + * \return GL_TRUE if found, GL_FALSE if not found + */ +GLboolean +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, + const GLfloat v[], GLsizei vSize, + GLuint *posOut, GLuint *swizzleOut) +{ + GLuint i; + + assert(vSize >= 1); + assert(vSize <= 4); + + if (!paramList) + return -1; + + for (i = 0; i < paramList->NumParameters; i++) { + if (paramList->Parameters[i].Type == PROGRAM_CONSTANT) { + const GLint maxShift = 4 - vSize; + GLint shift, j; + for (shift = 0; shift <= maxShift; shift++) { + GLint matched = 0; + GLuint swizzle[4]; + swizzle[0] = swizzle[1] = swizzle[2] = swizzle[3] = 0; + /* XXX we could do out-of-order swizzle matches too, someday */ + for (j = 0; j < vSize; j++) { + assert(shift + j < 4); + if (paramList->ParameterValues[i][shift + j] == v[j]) { + matched++; + swizzle[j] = shift + j; + } + } + if (matched == vSize) { + /* found! */ + *posOut = i; + *swizzleOut = MAKE_SWIZZLE4(swizzle[0], swizzle[1], + swizzle[2], swizzle[3]); + return GL_TRUE; + } + } + } + } + + return GL_FALSE; +} + + /** * Use the list of tokens in the state[] array to find global GL state * and return it in . Usually, four values are returned in diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 50958394c2..3f84ea8a40 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -249,19 +249,22 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const GLint *stateTokens); extern GLfloat * -_mesa_lookup_parameter_value(struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name); extern GLint -_mesa_lookup_parameter_index(struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name); +extern GLboolean +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, + const GLfloat v[], GLsizei vSize, + GLuint *posOut, GLuint *swizzleOut); + extern void _mesa_load_state_parameters(GLcontext *ctx, struct gl_program_parameter_list *paramList); - - extern void _mesa_print_instruction(const struct prog_instruction *inst); -- cgit v1.2.3 From 0c6723aee564a7b320ca122c3c9b003c863cc714 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 15 Nov 2006 23:38:02 +0000 Subject: Add a size parameter to _mesa_add_unnamed_constant() and _mesa_add_named_constant() to indicate vector size (1, 2, 3 or 4). Always 4 for now... --- src/mesa/drivers/dri/i965/brw_vs_tnl.c | 2 +- src/mesa/drivers/dri/i965/brw_wm_fp.c | 2 +- src/mesa/main/texenvprogram.c | 2 +- src/mesa/shader/arbprogparse.c | 2 +- src/mesa/shader/nvfragparse.c | 8 ++++---- src/mesa/shader/program.c | 7 +++++-- src/mesa/shader/program.h | 5 +++-- src/mesa/shader/programopt.c | 2 +- src/mesa/tnl/t_vp_build.c | 4 ++-- 9 files changed, 19 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index 1df111f645..52bdb9d761 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -404,7 +404,7 @@ static struct ureg register_const4f( struct tnl_program *p, values[1] = s1; values[2] = s2; values[3] = s3; - idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values ); + idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4 ); return make_ureg(PROGRAM_STATE_VAR, idx); } diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index 04c7555b9b..bb0aa35615 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -432,7 +432,7 @@ static struct prog_src_register search_or_add_const4f( struct brw_wm_compile *c, return src_reg(PROGRAM_STATE_VAR, idx); } - idx = _mesa_add_unnamed_constant( paramList, values ); + idx = _mesa_add_unnamed_constant( paramList, values, 4 ); return src_reg(PROGRAM_STATE_VAR, idx); } diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index c99ff5cdc4..5329719cbb 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -575,7 +575,7 @@ static struct ureg register_const4f( struct texenv_fragment_program *p, values[1] = s1; values[2] = s2; values[3] = s3; - idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values ); + idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4 ); return make_ureg(PROGRAM_STATE_VAR, idx); } diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index a423e4ff13..5a61f30193 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1810,7 +1810,7 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, parse_constant (inst, const_values, Program, use); idx = _mesa_add_named_constant(Program->Base.Parameters, (char *) param_var->name, - const_values); + const_values, 4); if (param_var->param_binding_begin == ~0U) param_var->param_binding_begin = idx; param_var->param_binding_length++; diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 5f3a30b741..79e6dbd87b 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1041,7 +1041,7 @@ Parse_VectorSrc(struct parse_state *parseState, GLuint paramIndex; if (!Parse_ScalarConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; } @@ -1052,7 +1052,7 @@ Parse_VectorSrc(struct parse_state *parseState, (void) Parse_String(parseState, "{"); if (!Parse_VectorConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; } @@ -1142,7 +1142,7 @@ Parse_ScalarSrcReg(struct parse_state *parseState, (void) Parse_String(parseState, "{"); if (!Parse_VectorConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; } @@ -1166,7 +1166,7 @@ Parse_ScalarSrcReg(struct parse_state *parseState, GLuint paramIndex; if (!Parse_ScalarConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); srcReg->Index = paramIndex; srcReg->File = PROGRAM_NAMED_PARAM; needSuffix = GL_FALSE; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 5c03ad44c2..e903fd0305 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -437,9 +437,11 @@ _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, */ GLint _mesa_add_named_constant(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4]) + const char *name, const GLfloat values[4], + GLuint size) { GLuint pos, swizzle; + ASSERT(size == 4); /* XXX future feature */ /* check if we already have this constant */ if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { return pos; @@ -459,9 +461,10 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, */ GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4]) + const GLfloat values[4], GLuint size) { GLuint pos, swizzle; + ASSERT(size == 4); /* XXX future feature */ /* check if we already have this constant */ if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { return pos; diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 3f84ea8a40..a38a1a63f9 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -238,11 +238,12 @@ _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_named_constant(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4]); + const char *name, const GLfloat values[4], + GLuint size); extern GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4]); + const GLfloat values[4], GLuint size); extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index 172d373b57..783177739d 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -172,7 +172,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) fogVals[1] = 1.0 / SQRTF(log(2.0)); fogVals[2] = 0.0; fogVals[3] = 0.0; - fogConsts = _mesa_add_unnamed_constant(fprog->Base.Parameters, fogVals); + fogConsts = _mesa_add_unnamed_constant(fprog->Base.Parameters, fogVals, 4); /* Scan program to find where result.color is written */ inst = newInst; diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 894a13b704..805d05ae72 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -33,7 +33,7 @@ #include "glheader.h" #include "macros.h" #include "enums.h" -#include "t_context.h" +#include "t_context.h" /* NOTE: very light dependency on this */ #include "t_vp_build.h" #include "shader/program.h" @@ -386,7 +386,7 @@ static struct ureg register_const4f( struct tnl_program *p, values[1] = s1; values[2] = s2; values[3] = s3; - idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values ); + idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4 ); return make_ureg(PROGRAM_STATE_VAR, idx); } -- cgit v1.2.3 From 82eeb62a31ec96a55ba2349397b8e8549e07a6bb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 00:58:44 +0000 Subject: reindent, clean-up --- src/mesa/shader/slang/slang_assemble.h | 265 ++++++++++++++++++--------------- 1 file changed, 146 insertions(+), 119 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 95e4fa263a..54589ad7d1 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_ASSEMBLE_H +#ifndef SLANG_ASSEMBLE_H #define SLANG_ASSEMBLE_H #include "slang_utility.h" @@ -31,72 +31,73 @@ extern "C" { #endif + struct slang_operation_; typedef enum slang_assembly_type_ { - /* core */ - slang_asm_none, - slang_asm_float_copy, - slang_asm_float_move, - slang_asm_float_push, - slang_asm_float_deref, - slang_asm_float_add, - slang_asm_float_multiply, - slang_asm_float_divide, - slang_asm_float_negate, - slang_asm_float_less, - slang_asm_float_equal_exp, - slang_asm_float_equal_int, - slang_asm_float_to_int, - slang_asm_float_sine, - slang_asm_float_arcsine, - slang_asm_float_arctan, - slang_asm_float_power, - slang_asm_float_log2, - slang_asm_float_floor, - slang_asm_float_ceil, - slang_asm_float_noise1, - slang_asm_float_noise2, - slang_asm_float_noise3, - slang_asm_float_noise4, - slang_asm_int_copy, - slang_asm_int_move, - slang_asm_int_push, - slang_asm_int_deref, - slang_asm_int_to_float, - slang_asm_int_to_addr, - slang_asm_bool_copy, - slang_asm_bool_move, - slang_asm_bool_push, - slang_asm_bool_deref, - slang_asm_addr_copy, - slang_asm_addr_push, - slang_asm_addr_deref, - slang_asm_addr_add, - slang_asm_addr_multiply, - slang_asm_vec4_tex1d, - slang_asm_vec4_tex2d, - slang_asm_vec4_tex3d, - slang_asm_vec4_texcube, - slang_asm_vec4_shad1d, - slang_asm_vec4_shad2d, - slang_asm_jump, - slang_asm_jump_if_zero, - slang_asm_enter, - slang_asm_leave, - slang_asm_local_alloc, - slang_asm_local_free, - slang_asm_local_addr, - slang_asm_global_addr, - slang_asm_call, - slang_asm_return, - slang_asm_discard, - slang_asm_exit, + /* core */ + slang_asm_none, + slang_asm_float_copy, + slang_asm_float_move, + slang_asm_float_push, + slang_asm_float_deref, + slang_asm_float_add, + slang_asm_float_multiply, + slang_asm_float_divide, + slang_asm_float_negate, + slang_asm_float_less, + slang_asm_float_equal_exp, + slang_asm_float_equal_int, + slang_asm_float_to_int, + slang_asm_float_sine, + slang_asm_float_arcsine, + slang_asm_float_arctan, + slang_asm_float_power, + slang_asm_float_log2, + slang_asm_float_floor, + slang_asm_float_ceil, + slang_asm_float_noise1, + slang_asm_float_noise2, + slang_asm_float_noise3, + slang_asm_float_noise4, + slang_asm_int_copy, + slang_asm_int_move, + slang_asm_int_push, + slang_asm_int_deref, + slang_asm_int_to_float, + slang_asm_int_to_addr, + slang_asm_bool_copy, + slang_asm_bool_move, + slang_asm_bool_push, + slang_asm_bool_deref, + slang_asm_addr_copy, + slang_asm_addr_push, + slang_asm_addr_deref, + slang_asm_addr_add, + slang_asm_addr_multiply, + slang_asm_vec4_tex1d, + slang_asm_vec4_tex2d, + slang_asm_vec4_tex3d, + slang_asm_vec4_texcube, + slang_asm_vec4_shad1d, + slang_asm_vec4_shad2d, + slang_asm_jump, + slang_asm_jump_if_zero, + slang_asm_enter, + slang_asm_leave, + slang_asm_local_alloc, + slang_asm_local_free, + slang_asm_local_addr, + slang_asm_global_addr, + slang_asm_call, + slang_asm_return, + slang_asm_discard, + slang_asm_exit, /* GL_MESA_shader_debug */ - slang_asm_float_print, - slang_asm_int_print, - slang_asm_bool_print, + slang_asm_float_print, + slang_asm_int_print, + slang_asm_bool_print, /* vec4 */ slang_asm_float_to_vec4, slang_asm_vec4_add, @@ -109,111 +110,138 @@ typedef enum slang_assembly_type_ slang_asm_vec4_deref, slang_asm_vec4_equal_int, /* not a real assembly instruction */ - slang_asm__last + slang_asm__last } slang_assembly_type; typedef struct slang_assembly_ { - slang_assembly_type type; - GLfloat literal; - GLuint param[2]; + slang_assembly_type type; + GLfloat literal; + GLuint param[2]; } slang_assembly; typedef struct slang_assembly_file_ { - slang_assembly *code; - GLuint count; - GLuint capacity; + slang_assembly *code; + GLuint count; + GLuint capacity; } slang_assembly_file; extern GLvoid -_slang_assembly_file_ctr (slang_assembly_file *); +_slang_assembly_file_ctr(slang_assembly_file *); + +extern GLvoid +slang_assembly_file_destruct(slang_assembly_file *); + +extern GLboolean +slang_assembly_file_push(slang_assembly_file *, slang_assembly_type); + +extern GLboolean +slang_assembly_file_push_label(slang_assembly_file *, + slang_assembly_type, GLuint); + +extern GLboolean +slang_assembly_file_push_label2(slang_assembly_file *, slang_assembly_type, + GLuint, GLuint); + +extern GLboolean +slang_assembly_file_push_literal(slang_assembly_file *, + slang_assembly_type, GLfloat); -GLvoid slang_assembly_file_destruct (slang_assembly_file *); -GLboolean slang_assembly_file_push (slang_assembly_file *, slang_assembly_type); -GLboolean slang_assembly_file_push_label (slang_assembly_file *, slang_assembly_type, GLuint); -GLboolean slang_assembly_file_push_label2 (slang_assembly_file *, slang_assembly_type, GLuint, GLuint); -GLboolean slang_assembly_file_push_literal (slang_assembly_file *, slang_assembly_type, GLfloat); typedef struct slang_assembly_file_restore_point_ { - GLuint count; + GLuint count; } slang_assembly_file_restore_point; -GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *, - slang_assembly_file_restore_point *); -GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *, - slang_assembly_file_restore_point *); + +extern GLboolean +slang_assembly_file_restore_point_save(slang_assembly_file *, + slang_assembly_file_restore_point *); + +extern GLboolean +slang_assembly_file_restore_point_load(slang_assembly_file *, + slang_assembly_file_restore_point *); + typedef struct slang_assembly_flow_control_ { - GLuint loop_start; /* for "continue" statement */ - GLuint loop_end; /* for "break" statement */ - GLuint function_end; /* for "return" statement */ + GLuint loop_start; /**< for "continue" statement */ + GLuint loop_end; /**< for "break" statement */ + GLuint function_end; /**< for "return" statement */ } slang_assembly_flow_control; typedef struct slang_assembly_local_info_ { - GLuint ret_size; - GLuint addr_tmp; - GLuint swizzle_tmp; + GLuint ret_size; + GLuint addr_tmp; + GLuint swizzle_tmp; } slang_assembly_local_info; typedef enum { - slang_ref_force, - slang_ref_forbid/*, - slang_ref_freelance*/ + slang_ref_force, + slang_ref_forbid /**< slang_ref_freelance */ } slang_ref_type; -/* - * Holds a complete information about vector swizzle - the array contains - * vector component source indices, where 0 is "x", 1 is "y", 2 is "z" and 3 is "w". +/** + * Holds complete information about vector swizzle - the + * array contains vector component source indices, where 0 is "x", 1 + * is "y", 2 is "z" and 3 is "w". * Example: "xwz" --> { 3, { 0, 3, 2, not used } }. */ typedef struct slang_swizzle_ { - GLuint num_components; - GLuint swizzle[4]; + GLuint num_components; + GLuint swizzle[4]; } slang_swizzle; typedef struct slang_assembly_name_space_ { - struct slang_function_scope_ *funcs; - struct slang_struct_scope_ *structs; - struct slang_variable_scope_ *vars; + struct slang_function_scope_ *funcs; + struct slang_struct_scope_ *structs; + struct slang_variable_scope_ *vars; } slang_assembly_name_space; typedef struct slang_assemble_ctx_ { - slang_assembly_file *file; - struct slang_machine_ *mach; - slang_atom_pool *atoms; - slang_assembly_name_space space; - slang_assembly_flow_control flow; - slang_assembly_local_info local; - slang_ref_type ref; - slang_swizzle swz; + slang_assembly_file *file; + struct slang_machine_ *mach; + slang_atom_pool *atoms; + slang_assembly_name_space space; + slang_assembly_flow_control flow; + slang_assembly_local_info local; + slang_ref_type ref; + slang_swizzle swz; } slang_assemble_ctx; -struct slang_function_ *_slang_locate_function (struct slang_function_scope_ *funcs, slang_atom name, - struct slang_operation_ *params, GLuint num_params, slang_assembly_name_space *space, - slang_atom_pool *); +extern struct slang_function_ * +_slang_locate_function(struct slang_function_scope_ *funcs, slang_atom name, + struct slang_operation_ *params, GLuint num_params, + slang_assembly_name_space *space, slang_atom_pool *); + +extern GLboolean +_slang_assemble_function(slang_assemble_ctx *, struct slang_function_ *); -GLboolean _slang_assemble_function (slang_assemble_ctx *, struct slang_function_ *); +extern GLboolean +_slang_cleanup_stack(slang_assemble_ctx *, struct slang_operation_ *); -GLboolean _slang_cleanup_stack (slang_assemble_ctx *, struct slang_operation_ *); +extern GLboolean +_slang_dereference(slang_assemble_ctx *, struct slang_operation_ *); -GLboolean _slang_dereference (slang_assemble_ctx *, struct slang_operation_ *); +extern GLboolean +_slang_assemble_function_call(slang_assemble_ctx *, struct slang_function_ *, + struct slang_operation_ *, GLuint, GLboolean); -GLboolean _slang_assemble_function_call (slang_assemble_ctx *, struct slang_function_ *, - struct slang_operation_ *, GLuint, GLboolean); +extern GLboolean +_slang_assemble_function_call_name(slang_assemble_ctx *, const char *, + struct slang_operation_ *, GLuint, + GLboolean); -GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *, const char *, - struct slang_operation_ *, GLuint, GLboolean); +extern GLboolean +_slang_assemble_operation(slang_assemble_ctx *, struct slang_operation_ *, + slang_ref_type); -GLboolean _slang_assemble_operation (slang_assemble_ctx *, struct slang_operation_ *, - slang_ref_type); #ifdef __cplusplus } @@ -225,4 +253,3 @@ GLboolean _slang_assemble_operation (slang_assemble_ctx *, struct slang_operatio #include "slang_assemble_conditional.h" #endif - -- cgit v1.2.3 From b97947972193b6b004a0ee49da31146230d43dd8 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 16 Nov 2006 02:33:38 +0000 Subject: Make sure vbo's are mapped before accessing their contents in api_arrayelt.c. Reported by Haihao Xiang. --- src/mesa/drivers/dri/i965/brw_save_api.c | 8 +++ src/mesa/main/api_arrayelt.c | 95 ++++++++++++++++++++++++++++++-- src/mesa/main/api_arrayelt.h | 5 ++ src/mesa/tnl/t_save_api.c | 8 +++ 4 files changed, 110 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_save_api.c b/src/mesa/drivers/dri/i965/brw_save_api.c index 9c0e4af48a..b2f255d095 100644 --- a/src/mesa/drivers/dri/i965/brw_save_api.c +++ b/src/mesa/drivers/dri/i965/brw_save_api.c @@ -855,10 +855,14 @@ static void GLAPIENTRY _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei co if (!_mesa_validate_DrawArrays( ctx, mode, start, count )) return; + _ae_map_vbos( ctx ); + brw_save_NotifyBegin( ctx, mode | BRW_SAVE_PRIM_WEAK ); for (i = 0; i < count; i++) CALL_ArrayElement(GET_DISPATCH(), (start + i)); CALL_End(GET_DISPATCH(), ()); + + _ae_unmap_vbos( ctx ); } /* Could do better by copying the arrays and element list intact and @@ -873,6 +877,8 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices )) return; + _ae_map_vbos( ctx ); + brw_save_NotifyBegin( ctx, mode | BRW_SAVE_PRIM_WEAK ); switch (type) { @@ -894,6 +900,8 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum } CALL_End(GET_DISPATCH(), ()); + + _ae_unmap_vbos( ctx ); } static void GLAPIENTRY _save_OBE_DrawRangeElements(GLenum mode, diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index dda659bbc3..3c26c2c590 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -53,6 +53,11 @@ typedef struct { AEarray arrays[32]; AEattrib attribs[VERT_ATTRIB_MAX + 1]; GLuint NewState; + + struct gl_buffer_object *vbo[VERT_ATTRIB_MAX]; + GLuint nr_vbos; + GLboolean mapped_vbos; + } AEcontext; #define AE_CONTEXT(ctx) ((AEcontext *)(ctx)->aelt_context) @@ -1063,6 +1068,18 @@ void _ae_destroy_context( GLcontext *ctx ) } } +static void check_vbo( AEcontext *actx, + struct gl_buffer_object *vbo ) +{ + if (vbo->Name && !vbo->Pointer) { + GLuint i; + for (i = 0; i < actx->nr_vbos; i++) + if (actx->vbo[i] == vbo) + return; + actx->vbo[actx->nr_vbos++] = vbo; + } +} + /** * Make a list of per-vertex functions to call for each glArrayElement call. @@ -1081,31 +1098,37 @@ static void _ae_update_state( GLcontext *ctx ) if (ctx->Array.ArrayObj->Index.Enabled) { aa->array = &ctx->Array.ArrayObj->Index; aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } if (ctx->Array.ArrayObj->EdgeFlag.Enabled) { aa->array = &ctx->Array.ArrayObj->EdgeFlag; aa->offset = _gloffset_EdgeFlagv; + check_vbo(actx, aa->array->BufferObj); aa++; } if (ctx->Array.ArrayObj->Normal.Enabled) { aa->array = &ctx->Array.ArrayObj->Normal; aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } if (ctx->Array.ArrayObj->Color.Enabled) { aa->array = &ctx->Array.ArrayObj->Color; aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } if (ctx->Array.ArrayObj->SecondaryColor.Enabled) { aa->array = &ctx->Array.ArrayObj->SecondaryColor; aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } if (ctx->Array.ArrayObj->FogCoord.Enabled) { aa->array = &ctx->Array.ArrayObj->FogCoord; aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { @@ -1120,11 +1143,12 @@ static void _ae_update_state( GLcontext *ctx ) [at->array->Size-1] [TYPE_IDX(at->array->Type)]; at->index = VERT_ATTRIB_TEX0 + i; + check_vbo(actx, aa->array->BufferObj); at++; } } - /* generic vertex attribute arrays */ + /* generic vertex attribute arrays */ for (i = 1; i < VERT_ATTRIB_MAX; i++) { /* skip zero! */ struct gl_client_array *attribArray = &ctx->Array.ArrayObj->VertexAttrib[i]; if (attribArray->Enabled) { @@ -1146,6 +1170,7 @@ static void _ae_update_state( GLcontext *ctx ) [TYPE_IDX(at->array->Type)]; } at->index = i; + check_vbo(actx, aa->array->BufferObj); at++; } } @@ -1158,14 +1183,18 @@ static void _ae_update_state( GLcontext *ctx ) aa->array = &ctx->Array.ArrayObj->VertexAttrib[0]; assert(aa->array->Size >= 2); /* XXX fix someday? */ aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } else if (ctx->Array.ArrayObj->Vertex.Enabled) { aa->array = &ctx->Array.ArrayObj->Vertex; aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; + check_vbo(actx, aa->array->BufferObj); aa++; } + check_vbo(actx, ctx->Array.ElementArrayBufferObj); + ASSERT(at - actx->attribs <= VERT_ATTRIB_MAX); ASSERT(aa - actx->arrays < 32); at->func = NULL; /* terminate the list */ @@ -1174,6 +1203,45 @@ static void _ae_update_state( GLcontext *ctx ) actx->NewState = 0; } +void _ae_map_vbos( GLcontext *ctx ) +{ + AEcontext *actx = AE_CONTEXT(ctx); + GLuint i; + + if (actx->mapped_vbos) + return; + + if (actx->NewState) + _ae_update_state(ctx); + + for (i = 0; i < actx->nr_vbos; i++) + ctx->Driver.MapBuffer(ctx, + GL_ARRAY_BUFFER_ARB, + GL_DYNAMIC_DRAW_ARB, + actx->vbo[i]); + + actx->mapped_vbos = GL_TRUE; +} + +void _ae_unmap_vbos( GLcontext *ctx ) +{ + AEcontext *actx = AE_CONTEXT(ctx); + GLuint i; + + if (actx->mapped_vbos) + return; + + if (actx->NewState) + _ae_update_state(ctx); + + for (i = 0; i < actx->nr_vbos; i++) + ctx->Driver.UnmapBuffer(ctx, + GL_ARRAY_BUFFER_ARB, + actx->vbo[i]); + + actx->mapped_vbos = GL_TRUE; +} + /** * Called via glArrayElement() and glDrawArrays(). @@ -1188,15 +1256,24 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) const AEarray *aa; const AEattrib *at; const struct _glapi_table * const disp = GET_DISPATCH(); + GLboolean do_map; - - if (actx->NewState) + if (actx->NewState) { + assert(!actx->mapped_vbos); _ae_update_state( ctx ); + } + do_map = actx->nr_vbos && !actx->mapped_vbos; + + /* + */ + if (do_map) + _ae_map_vbos(ctx); + /* generic attributes */ for (at = actx->attribs; at->func; at++) { const GLubyte *src - = ADD_POINTERS(at->array->BufferObj->Data, at->array->Ptr) + = ADD_POINTERS(at->array->BufferObj->Pointer, at->array->Ptr) + elt * at->array->StrideB; at->func( at->index, src ); } @@ -1204,15 +1281,21 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) /* conventional arrays */ for (aa = actx->arrays; aa->offset != -1 ; aa++) { const GLubyte *src - = ADD_POINTERS(aa->array->BufferObj->Data, aa->array->Ptr) + = ADD_POINTERS(aa->array->BufferObj->Pointer, aa->array->Ptr) + elt * aa->array->StrideB; CALL_by_offset( disp, (array_func), aa->offset, ((const void *) src) ); } + + if (do_map) + _ae_unmap_vbos(ctx); } void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) { - AE_CONTEXT(ctx)->NewState |= new_state; + AEcontext *actx = AE_CONTEXT(ctx); + + assert(!actx->mapped_vbos); + actx->NewState |= new_state; } diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h index 1c0af9f3ea..e621724fb2 100644 --- a/src/mesa/main/api_arrayelt.h +++ b/src/mesa/main/api_arrayelt.h @@ -34,4 +34,9 @@ extern void _ae_destroy_context( GLcontext *ctx ); extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ); extern void GLAPIENTRY _ae_loopback_array_elt( GLint elt ); +/* May optionally be called before a batch of element calls: + */ +extern void _ae_map_vbos( GLcontext *ctx ); +extern void _ae_unmap_vbos( GLcontext *ctx ); + #endif diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c index 11d21301d9..dbbd095fe4 100644 --- a/src/mesa/tnl/t_save_api.c +++ b/src/mesa/tnl/t_save_api.c @@ -1413,10 +1413,14 @@ static void GLAPIENTRY _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei co if (!_mesa_validate_DrawArrays( ctx, mode, start, count )) return; + _ae_map_vbos( ctx ); + _save_NotifyBegin( ctx, mode | PRIM_WEAK ); for (i = 0; i < count; i++) CALL_ArrayElement(GET_DISPATCH(), (start + i)); CALL_End(GET_DISPATCH(), ()); + + _ae_unmap_vbos( ctx ); } @@ -1429,6 +1433,8 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices )) return; + _ae_map_vbos( ctx ); + _save_NotifyBegin( ctx, mode | PRIM_WEAK ); switch (type) { @@ -1450,6 +1456,8 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum } CALL_End(GET_DISPATCH(), ()); + + _ae_unmap_vbos( ctx ); } static void GLAPIENTRY _save_OBE_DrawRangeElements(GLenum mode, -- cgit v1.2.3 From ebe4c893f8c0e80fe474743574a377d460b5f3e8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 14:44:23 +0000 Subject: fix glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) bug 9044 --- docs/relnotes-6.5.2.html | 1 + src/mesa/main/image.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/docs/relnotes-6.5.2.html b/docs/relnotes-6.5.2.html index 1ba936413a..f582c3c593 100644 --- a/docs/relnotes-6.5.2.html +++ b/docs/relnotes-6.5.2.html @@ -66,6 +66,7 @@ copy texturing).
  • Fixed some fragment program bugs in Intel i915 DRI driver
  • Fixed glGetVertexAttribfvARB bug 8883
  • Implemented glGetUniform[fi]vARB() functions +
  • Fixed glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) segfault (bug 9044) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 695aab5227..6ff4089f0e 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1168,7 +1168,7 @@ _mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4], const GLint comps = _mesa_components_in_format(dstFormat); GLuint i; - if (dstType != GL_FLOAT) { + if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) { /* need to clamp to [0, 1] */ transferOps |= IMAGE_CLAMP_BIT; } @@ -1182,7 +1182,7 @@ _mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4], if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) { /* compute luminance values */ - if (ctx->Color.ClampReadColor == GL_TRUE || dstType != GL_FLOAT) { + if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) { for (i = 0; i < n; i++) { GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP]; luminance[i] = CLAMP(sum, 0.0F, 1.0F); @@ -4173,7 +4173,7 @@ _mesa_unpack_image( GLuint dimensions, if (width <= 0 || height <= 0 || depth <= 0) return NULL; /* generate error later */ - if (format == GL_BITMAP) { + if (type == GL_BITMAP) { bytesPerRow = (width + 7) >> 3; flipBytes = !unpack->LsbFirst; swap2 = swap4 = GL_FALSE; -- cgit v1.2.3 From 7438a78cf4c220be18134a1d8dde7c776edbbbd3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 16:12:10 +0000 Subject: use LONGSTRING to silence warning --- src/mesa/glapi/gl_enums.py | 2 +- src/mesa/main/enums.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/gl_enums.py b/src/mesa/glapi/gl_enums.py index e8c0576fd9..0e3c57042a 100644 --- a/src/mesa/glapi/gl_enums.py +++ b/src/mesa/glapi/gl_enums.py @@ -148,7 +148,7 @@ int _mesa_lookup_enum_by_name( const char *symbol ) string_offsets = {} i = 0; - print 'static const char enum_string_table[] = ' + print 'LONGSTRING static const char enum_string_table[] = ' for [name, enum] in name_table: print ' "%s\\0"' % (name) string_offsets[ name ] = i diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index d864cd22aa..fc56809e97 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -34,7 +34,7 @@ typedef struct { int n; } enum_elt; -static const char enum_string_table[] = +LONGSTRING static const char enum_string_table[] = "GL_2D\0" "GL_2_BYTES\0" "GL_3D\0" -- cgit v1.2.3 From 9021df2d2ad348e1299a74a8ac8df2c13325538c Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Thu, 16 Nov 2006 19:50:56 +0000 Subject: nv10 state copy/pasted from nv30 state --- src/mesa/drivers/dri/nouveau/nv10_state.c | 498 ++++++++++++++++++++++++++++++ 1 file changed, 498 insertions(+) create mode 100644 src/mesa/drivers/dri/nouveau/nv10_state.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c new file mode 100644 index 0000000000..e752905841 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -0,0 +1,498 @@ +/************************************************************************** + +Copyright 2006 Nouveau +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" + +#include "tnl/t_pipeline.h" + +#include "mtypes.h" +#include "colormac.h" + +void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte ubRef; + CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC, 2); + OUT_RING(func); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC */ + OUT_RING(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ +} + +void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte cf[4]; + + CLAMPED_FLOAT_TO_UBYTE(cf[0], color[0]); + CLAMPED_FLOAT_TO_UBYTE(cf[1], color[1]); + CLAMPED_FLOAT_TO_UBYTE(cf[2], color[2]); + CLAMPED_FLOAT_TO_UBYTE(cf[3], color[3]); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); + OUT_RING(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); +} + +void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); + OUT_RING((modeA<<16) | modeRGB); +} + + +void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); + OUT_RING((sfactorA<<16) | sfactorRGB); + OUT_RING((dfactorA<<16) | dfactorRGB); +} + +/* +void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte c[4]; + UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); + OUT_RING(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); +} + +void nv30ClearDepth(GLcontext *ctx, GLclampd d) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING(nmesa->clear_value); +} +*/ + +/* we're don't support indexed buffers + void (*ClearIndex)(GLcontext *ctx, GLuint index) + */ + +/* +void nv30ClearStencil(GLcontext *ctx, GLint s) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING(nmesa->clear_value); +} +*/ + +void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); + OUT_RINGf(equation[0]); + OUT_RINGf(equation[1]); + OUT_RINGf(equation[2]); + OUT_RINGf(equation[3]); +} + +/* Seems does not support alpha in color mask */ +void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, + GLboolean bmask, GLboolean amask ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_MASK, 1); + OUT_RING(/*((amask && 0x01) << 24) |*/ ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); +} + +void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) +{ + // TODO I need sex +} + +void nv10CullFace(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE, 1); + OUT_RING(mode); +} + +void nv10FrontFace(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FRONT_FACE, 1); + OUT_RING(mode); +} + +void nv10DepthFunc(GLcontext *ctx, GLenum func) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); + OUT_RING(func); +} + +void nv10DepthMask(GLcontext *ctx, GLboolean flag) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_MASK, 1); + OUT_RING(flag); +} + +void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); + OUT_RINGf(nearval); + OUT_RINGf(farval); +} + +/** Specify the current buffer for writing */ +//void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); +/** Specify the buffers for writing for fragment programs*/ +//void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); + +void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + switch(cap) + { + case GL_ALPHA_TEST: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE, 1); + OUT_RING(state); + break; +// case GL_AUTO_NORMAL: + case GL_BLEND: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE, 1); + OUT_RING(state); + break; + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); + OUT_RING(state); + break; + case GL_COLOR_LOGIC_OP: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE, 1); + OUT_RING(state); + break; +// case GL_COLOR_MATERIAL: +// case GL_COLOR_SUM_EXT: +// case GL_COLOR_TABLE: +// case GL_CONVOLUTION_1D: +// case GL_CONVOLUTION_2D: + case GL_CULL_FACE: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); + OUT_RING(state); + break; + case GL_DEPTH_TEST: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); + OUT_RING(state); + break; + case GL_DITHER: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); + OUT_RING(state); + break; + case GL_FOG: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); + OUT_RING(state); + break; +// case GL_HISTOGRAM: +// case GL_INDEX_LOGIC_OP: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + { + uint32_t mask=1<<(2*(cap-GL_LIGHT0)); + nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); + if (nmesa->lighting_enabled) + { + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING(nmesa->enabled_lights); + } + break; + } + case GL_LIGHTING: + nmesa->lighting_enabled=state; + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + if (nmesa->lighting_enabled) + OUT_RING(nmesa->enabled_lights); + else + OUT_RING(0x0); + break; +// case GL_LINE_SMOOTH: +// case GL_LINE_STIPPLE: +// case GL_MAP1_COLOR_4: +// case GL_MAP1_INDEX: +// case GL_MAP1_NORMAL: +// case GL_MAP1_TEXTURE_COORD_1: +// case GL_MAP1_TEXTURE_COORD_2: +// case GL_MAP1_TEXTURE_COORD_3: +// case GL_MAP1_TEXTURE_COORD_4: +// case GL_MAP1_VERTEX_3: +// case GL_MAP1_VERTEX_4: +// case GL_MAP2_COLOR_4: +// case GL_MAP2_INDEX: +// case GL_MAP2_NORMAL: +// case GL_MAP2_TEXTURE_COORD_1: +// case GL_MAP2_TEXTURE_COORD_2: +// case GL_MAP2_TEXTURE_COORD_3: +// case GL_MAP2_TEXTURE_COORD_4: +// case GL_MAP2_VERTEX_3: +// case GL_MAP2_VERTEX_4: +// case GL_MINMAX: + case GL_NORMALIZE: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING(state); + break; +// case GL_POINT_SMOOTH: + case GL_POLYGON_OFFSET_POINT: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_OFFSET_LINE: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_OFFSET_FILL: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; + case GL_LINE_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; + case GL_POINT_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; +// case GL_POLYGON_STIPPLE: +// case GL_POST_COLOR_MATRIX_COLOR_TABLE: +// case GL_POST_CONVOLUTION_COLOR_TABLE: +// case GL_RESCALE_NORMAL: +// case GL_SCISSOR_TEST: +// case GL_SEPARABLE_2D: + case GL_STENCIL_TEST: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE, 1); + OUT_RING(state); + break; +// case GL_TEXTURE_GEN_Q: +// case GL_TEXTURE_GEN_R: +// case GL_TEXTURE_GEN_S: +// case GL_TEXTURE_GEN_T: +// case GL_TEXTURE_1D: +// case GL_TEXTURE_2D: +// case GL_TEXTURE_3D: + } +} + +void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + switch(pname) + { + case GL_FOG_MODE: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //OUT_RING (params); + break; + /* TODO: unsure about the rest.*/ + default: + break; + } + +} + +void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) +{ + // TODO I need sex (fog and line_smooth hints) +} + +// void (*IndexMask)(GLcontext *ctx, GLuint mask); + +void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + /* not sure where the fourth param value goes...*/ + switch(pname) + { + case GL_AMBIENT: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_DIFFUSE: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPECULAR: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; +#if 0 + case GL_SPOT_DIRECTION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_POSITION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPOT_EXPONENT: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + OUT_RINGf(*params); + break; + case GL_SPOT_CUTOFF: + /* you can't factor these */ + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + OUT_RINGf(params[0]); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + OUT_RINGf(params[1]); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + OUT_RINGf(params[2]); + break; + case GL_CONSTANT_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + case GL_LINEAR_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + case GL_QUADRATIC_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; +#endif + default: + break; + } +} + +/** Set the lighting model parameters */ +void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); + +/* +void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); + OUT_RING((pattern << 16) | factor); +} + +void nv30LineWidth(GLcontext *ctx, GLfloat width) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); + OUT_RINGf(width); +} +*/ + +void nv10LogicOpcode(GLcontext *ctx, GLenum opcode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LOGIC_OP, 1); + OUT_RING(opcode); +} + +void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +{ + /*TODO: not sure what goes here. */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + +} + +/** Specify the diameter of rasterized points */ +void nv10PointSize(GLcontext *ctx, GLfloat size) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RINGf(size); +} + +/** Select a polygon rasterization mode */ +void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); +/** Set the scale and units used to calculate depth values */ +void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); +/** Set the polygon stippling pattern */ +void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); +/* Specifies the current buffer for reading */ +void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); +/** Set rasterization mode */ +void (*RenderMode)(GLcontext *ctx, GLenum mode ); +/** Define the scissor box */ +void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +/** Select flat or smooth shading */ +void (*ShadeModel)(GLcontext *ctx, GLenum mode); +/** OpenGL 2.0 two-sided StencilFunc */ +void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask); +/** OpenGL 2.0 two-sided StencilMask */ +void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); +/** OpenGL 2.0 two-sided StencilOp */ +void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass); +/** Control the generation of texture coordinates */ +void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, + const GLfloat *params); +/** Set texture environment parameters */ +void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, + const GLfloat *param); +/** Set texture parameters */ +void (*TexParameter)(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params); +void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); + +/** Set the viewport */ +void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ + /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); + OUT_RING((w << 16) | x); + OUT_RING((h << 16) | y); +} + -- cgit v1.2.3 From cba90c17adfaa18b6240a553939d2cd7a63c80d7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 20:58:26 +0000 Subject: fix bug 9046 --- src/mesa/main/texcompress_fxt1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index 2ac2c80a08..d3011cedce 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -105,7 +105,7 @@ texstore_rgb_fxt1(TEXSTORE_PARAMS) } dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, - GL_COMPRESSED_RGB_FXT1_3DFX, + dstFormat->MesaFormat, texWidth, (GLubyte *) dstAddr); fxt1_encode(srcWidth, srcHeight, 3, pixels, srcRowStride, @@ -162,7 +162,7 @@ texstore_rgba_fxt1(TEXSTORE_PARAMS) } dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0, - GL_COMPRESSED_RGBA_FXT1_3DFX, + dstFormat->MesaFormat, texWidth, (GLubyte *) dstAddr); fxt1_encode(srcWidth, srcHeight, 4, pixels, srcRowStride, -- cgit v1.2.3 From fa941e4267385427c27b5a35c29156b342cc3868 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 20:59:11 +0000 Subject: disable yesterday's _mesa_add_named_constant() change for now --- src/mesa/shader/program.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index e903fd0305..e8824426d4 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -440,12 +440,14 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4], GLuint size) { +#if 0 /* disable this for now -- we need to save the name! */ GLuint pos, swizzle; ASSERT(size == 4); /* XXX future feature */ /* check if we already have this constant */ if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { return pos; } +#endif return add_parameter(paramList, name, values, PROGRAM_CONSTANT); } -- cgit v1.2.3 From 3dedeaa0557f17770f6ab7f163dcdde8e93609b8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 21:28:35 +0000 Subject: Initial implementation work for CAL, RET, and BRA instructions for fragment programs. --- src/mesa/main/config.h | 1 + src/mesa/shader/program_instruction.h | 7 ++++- src/mesa/swrast/s_nvfragprog.c | 53 +++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 5a0481328f..13c6281f07 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -198,6 +198,7 @@ #define MAX_PROGRAM_LOCAL_PARAMS 128 /* KW: power of two */ #define MAX_PROGRAM_MATRICES 8 #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 +#define MAX_PROGRAM_CALL_DEPTH 8 /*@}*/ /** For GL_ARB_fragment_shader */ diff --git a/src/mesa/shader/program_instruction.h b/src/mesa/shader/program_instruction.h index cdec0ceb2a..ad3a6d4dd4 100644 --- a/src/mesa/shader/program_instruction.h +++ b/src/mesa/shader/program_instruction.h @@ -286,7 +286,7 @@ struct prog_instruction GLuint CondUpdate:1; /** - * If prog_instruction::cc_update is \c GL_TRUE, this value selects the + * If prog_instruction::CondUpdate is \c GL_TRUE, this value selects the * condition code register that is to be updated. * * In GL_NV_fragment_program or GL_NV_vertex_program2 mode, only condition @@ -339,6 +339,11 @@ struct prog_instruction */ GLuint TexSrcTarget:3; /*@}*/ + + /** + * For BRA and CAL instructions, the location to jump to. + */ + GLuint BranchTarget; }; diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c index 7a6785b1d2..028ddc0090 100644 --- a/src/mesa/swrast/s_nvfragprog.c +++ b/src/mesa/swrast/s_nvfragprog.c @@ -57,6 +57,9 @@ struct fp_machine GLfloat Inputs[MAX_NV_FRAGMENT_PROGRAM_INPUTS][4]; GLfloat Outputs[MAX_NV_FRAGMENT_PROGRAM_OUTPUTS][4]; GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ + + GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ + GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ }; @@ -697,6 +700,37 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_BRA: /* conditional branch */ + { + /* NOTE: The return is conditional! */ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + /* take branch */ + pc = inst->BranchTarget; + } + } + break; + case OPCODE_CAL: /* Call subroutine */ + { + /* NOTE: The call is conditional! */ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + machine->CallStack[machine->StackDepth++] = pc + 1; + pc = inst->BranchTarget; + } + } + break; case OPCODE_CMP: { GLfloat a[4], b[4], c[4], result[4]; @@ -1093,6 +1127,22 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; + case OPCODE_RET: /* return from subroutine */ + { + /* NOTE: The return is conditional! */ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + if (machine->StackDepth == 0) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + pc = machine->CallStack[--machine->StackDepth]; + } + } + break; case OPCODE_RFL: /* reflection vector */ { GLfloat axis[4], dir[4], result[4], tmpX, tmpW; @@ -1539,6 +1589,9 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, machine->CondCodes[1] = COND_EQ; machine->CondCodes[2] = COND_EQ; machine->CondCodes[3] = COND_EQ; + + /* init call stack */ + machine->StackDepth = 0; } -- cgit v1.2.3 From 01a5a9afd8884e0015d6f155192621b76fe8d94c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 21:40:54 +0000 Subject: remove unused imesa local var to silence warnings --- src/mesa/drivers/dri/savage/savagespan.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c index 2fe991a6b9..61ab9e6d64 100644 --- a/src/mesa/drivers/dri/savage/savagespan.c +++ b/src/mesa/drivers/dri/savage/savagespan.c @@ -33,7 +33,6 @@ #define DBG 0 #define LOCAL_VARS \ - savageContextPtr imesa = SAVAGE_CONTEXT(ctx); \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ __DRIdrawablePrivate *const dPriv = drb->dPriv; \ GLuint cpp = drb->cpp; \ @@ -44,7 +43,6 @@ (void) p #define LOCAL_DEPTH_VARS \ - savageContextPtr imesa = SAVAGE_CONTEXT(ctx); \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ __DRIdrawablePrivate *const dPriv = drb->dPriv; \ GLuint zpp = drb->cpp; \ -- cgit v1.2.3 From 1f0c86ee350f168a5b7420bfda7d80365432c811 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 21:58:35 +0000 Subject: reindent --- src/mesa/shader/slang/slang_assemble_typeinfo.c | 987 ++++++++++++------------ 1 file changed, 493 insertions(+), 494 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c index 58f4e24f25..340d6c1c58 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c @@ -36,552 +36,551 @@ * slang_type_specifier */ -GLvoid slang_type_specifier_ctr (slang_type_specifier *self) +GLvoid +slang_type_specifier_ctr(slang_type_specifier * self) { - self->type = slang_spec_void; - self->_struct = NULL; - self->_array = NULL; + self->type = slang_spec_void; + self->_struct = NULL; + self->_array = NULL; } -GLvoid slang_type_specifier_dtr (slang_type_specifier *self) +GLvoid +slang_type_specifier_dtr(slang_type_specifier * self) { - if (self->_struct != NULL) - { - slang_struct_destruct (self->_struct); - slang_alloc_free (self->_struct); - } - if (self->_array != NULL) - { - slang_type_specifier_dtr (self->_array); - slang_alloc_free (self->_array); - } + if (self->_struct != NULL) { + slang_struct_destruct(self->_struct); + slang_alloc_free(self->_struct); + } + if (self->_array != NULL) { + slang_type_specifier_dtr(self->_array); + slang_alloc_free(self->_array); + } } -GLboolean slang_type_specifier_copy (slang_type_specifier *x, const slang_type_specifier *y) +GLboolean +slang_type_specifier_copy(slang_type_specifier * x, + const slang_type_specifier * y) { - slang_type_specifier z; - - slang_type_specifier_ctr (&z); - z.type = y->type; - if (z.type == slang_spec_struct) - { - z._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct)); - if (z._struct == NULL) - { - slang_type_specifier_dtr (&z); - return GL_FALSE; - } - if (!slang_struct_construct (z._struct)) - { - slang_alloc_free (z._struct); - slang_type_specifier_dtr (&z); - return GL_FALSE; - } - if (!slang_struct_copy (z._struct, y->_struct)) - { - slang_type_specifier_dtr (&z); - return GL_FALSE; - } - } - else if (z.type == slang_spec_array) - { - z._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (slang_type_specifier)); - if (z._array == NULL) - { - slang_type_specifier_dtr (&z); - return GL_FALSE; - } - slang_type_specifier_ctr (z._array); - if (!slang_type_specifier_copy (z._array, y->_array)) - { - slang_type_specifier_dtr (&z); - return GL_FALSE; - } - } - slang_type_specifier_dtr (x); - *x = z; - return GL_TRUE; + slang_type_specifier z; + + slang_type_specifier_ctr(&z); + z.type = y->type; + if (z.type == slang_spec_struct) { + z._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); + if (z._struct == NULL) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + if (!slang_struct_construct(z._struct)) { + slang_alloc_free(z._struct); + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + if (!slang_struct_copy(z._struct, y->_struct)) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + } + else if (z.type == slang_spec_array) { + z._array = + (slang_type_specifier *) + slang_alloc_malloc(sizeof(slang_type_specifier)); + if (z._array == NULL) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + slang_type_specifier_ctr(z._array); + if (!slang_type_specifier_copy(z._array, y->_array)) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + } + slang_type_specifier_dtr(x); + *x = z; + return GL_TRUE; } -GLboolean slang_type_specifier_equal (const slang_type_specifier *x, const slang_type_specifier *y) +GLboolean +slang_type_specifier_equal(const slang_type_specifier * x, + const slang_type_specifier * y) { - if (x->type != y->type) - return 0; - if (x->type == slang_spec_struct) - return slang_struct_equal (x->_struct, y->_struct); - if (x->type == slang_spec_array) - return slang_type_specifier_equal (x->_array, y->_array); - return 1; + if (x->type != y->type) + return 0; + if (x->type == slang_spec_struct) + return slang_struct_equal(x->_struct, y->_struct); + if (x->type == slang_spec_array) + return slang_type_specifier_equal(x->_array, y->_array); + return 1; } /* slang_assembly_typeinfo */ -GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *ti) +GLboolean +slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) { - slang_type_specifier_ctr (&ti->spec); - ti->array_len = 0; - return GL_TRUE; + slang_type_specifier_ctr(&ti->spec); + ti->array_len = 0; + return GL_TRUE; } -GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *ti) +GLvoid +slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) { - slang_type_specifier_dtr (&ti->spec); + slang_type_specifier_dtr(&ti->spec); } /* _slang_typeof_operation() */ -static GLboolean typeof_existing_function (const char *name, slang_operation *params, - GLuint num_params, slang_assembly_name_space *space, slang_type_specifier *spec, - slang_atom_pool *atoms) +static GLboolean +typeof_existing_function(const char *name, slang_operation * params, + GLuint num_params, slang_assembly_name_space * space, + slang_type_specifier * spec, slang_atom_pool * atoms) { - slang_atom atom; - GLboolean exists; - - atom = slang_atom_pool_atom (atoms, name); - if (!_slang_typeof_function (atom, params, num_params, space, spec, &exists, atoms)) - return GL_FALSE; - return exists; + slang_atom atom; + GLboolean exists; + + atom = slang_atom_pool_atom(atoms, name); + if (!_slang_typeof_function + (atom, params, num_params, space, spec, &exists, atoms)) + return GL_FALSE; + return exists; } -GLboolean _slang_typeof_operation (slang_assemble_ctx *A, slang_operation *op, - slang_assembly_typeinfo *ti) +GLboolean +_slang_typeof_operation(slang_assemble_ctx * A, slang_operation * op, + slang_assembly_typeinfo * ti) { - return _slang_typeof_operation_ (op, &A->space, ti, A->atoms); + return _slang_typeof_operation_(op, &A->space, ti, A->atoms); } -GLboolean _slang_typeof_operation_ (slang_operation *op, slang_assembly_name_space *space, - slang_assembly_typeinfo *ti, slang_atom_pool *atoms) +GLboolean +_slang_typeof_operation_(slang_operation * op, + slang_assembly_name_space * space, + slang_assembly_typeinfo * ti, + slang_atom_pool * atoms) { - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - - switch (op->type) - { - case slang_oper_block_no_new_scope: - case slang_oper_block_new_scope: - case slang_oper_variable_decl: - case slang_oper_asm: - case slang_oper_break: - case slang_oper_continue: - case slang_oper_discard: - case slang_oper_return: - case slang_oper_if: - case slang_oper_while: - case slang_oper_do: - case slang_oper_for: - case slang_oper_void: - ti->spec.type = slang_spec_void; - break; - case slang_oper_expression: - case slang_oper_assign: - case slang_oper_addassign: - case slang_oper_subassign: - case slang_oper_mulassign: - case slang_oper_divassign: - case slang_oper_preincrement: - case slang_oper_predecrement: - if (!_slang_typeof_operation_ (op->children, space, ti, atoms)) - return 0; - break; - case slang_oper_literal_bool: - case slang_oper_logicalor: - case slang_oper_logicalxor: - case slang_oper_logicaland: - case slang_oper_equal: - case slang_oper_notequal: - case slang_oper_less: - case slang_oper_greater: - case slang_oper_lessequal: - case slang_oper_greaterequal: - case slang_oper_not: - ti->spec.type = slang_spec_bool; - break; - case slang_oper_literal_int: - ti->spec.type = slang_spec_int; - break; - case slang_oper_literal_float: - ti->spec.type = slang_spec_float; - break; - case slang_oper_identifier: - { - slang_variable *var; - - var = _slang_locate_variable (op->locals, op->a_id, GL_TRUE); - if (var == NULL) - return GL_FALSE; - if (!slang_type_specifier_copy (&ti->spec, &var->type.specifier)) - return GL_FALSE; - ti->can_be_referenced = GL_TRUE; - ti->array_len = var->array_len; - } - break; - case slang_oper_sequence: - /* TODO: check [0] and [1] if they match */ - if (!_slang_typeof_operation_ (&op->children[1], space, ti, atoms)) - return GL_FALSE; - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - /*case slang_oper_modassign:*/ - /*case slang_oper_lshassign:*/ - /*case slang_oper_rshassign:*/ - /*case slang_oper_orassign:*/ - /*case slang_oper_xorassign:*/ - /*case slang_oper_andassign:*/ - case slang_oper_select: - /* TODO: check [1] and [2] if they match */ - if (!_slang_typeof_operation_ (&op->children[1], space, ti, atoms)) - return GL_FALSE; - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - /*case slang_oper_bitor:*/ - /*case slang_oper_bitxor:*/ - /*case slang_oper_bitand:*/ - /*case slang_oper_lshift:*/ - /*case slang_oper_rshift:*/ - case slang_oper_add: - if (!typeof_existing_function ("+", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; - break; - case slang_oper_subtract: - if (!typeof_existing_function ("-", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; - break; - case slang_oper_multiply: - if (!typeof_existing_function ("*", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; - break; - case slang_oper_divide: - if (!typeof_existing_function ("/", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; - break; - /*case slang_oper_modulus:*/ - case slang_oper_plus: - if (!_slang_typeof_operation_ (op->children, space, ti, atoms)) - return GL_FALSE; - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - case slang_oper_minus: - if (!typeof_existing_function ("-", op->children, 1, space, &ti->spec, atoms)) - return GL_FALSE; - break; - /*case slang_oper_complement:*/ - case slang_oper_subscript: - { - slang_assembly_typeinfo _ti; - - if (!slang_assembly_typeinfo_construct (&_ti)) - return GL_FALSE; - if (!_slang_typeof_operation_ (op->children, space, &_ti, atoms)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - ti->can_be_referenced = _ti.can_be_referenced; - if (_ti.spec.type == slang_spec_array) - { - if (!slang_type_specifier_copy (&ti->spec, _ti.spec._array)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - } - else - { - if (!_slang_type_is_vector (_ti.spec.type) && !_slang_type_is_matrix (_ti.spec.type)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - ti->spec.type = _slang_type_base (_ti.spec.type); - } - slang_assembly_typeinfo_destruct (&_ti); - } - break; - case slang_oper_call: - { - GLboolean exists; - - if (!_slang_typeof_function (op->a_id, op->children, op->num_children, space, &ti->spec, - &exists, atoms)) - return GL_FALSE; - if (!exists) - { - slang_struct *s = slang_struct_scope_find (space->structs, op->a_id, GL_TRUE); - if (s != NULL) - { - ti->spec.type = slang_spec_struct; - ti->spec._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct)); - if (ti->spec._struct == NULL) - return GL_FALSE; - if (!slang_struct_construct (ti->spec._struct)) - { - slang_alloc_free (ti->spec._struct); - ti->spec._struct = NULL; - return GL_FALSE; - } - if (!slang_struct_copy (ti->spec._struct, s)) - return GL_FALSE; - } - else - { - const char *name; - slang_type_specifier_type type; - - name = slang_atom_pool_id (atoms, op->a_id); - type = slang_type_specifier_type_from_string (name); - if (type == slang_spec_void) - return GL_FALSE; - ti->spec.type = type; - } - } - } - break; - case slang_oper_field: - { - slang_assembly_typeinfo _ti; - - if (!slang_assembly_typeinfo_construct (&_ti)) - return GL_FALSE; - if (!_slang_typeof_operation_ (op->children, space, &_ti, atoms)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - if (_ti.spec.type == slang_spec_struct) - { - slang_variable *field; - - field = _slang_locate_variable (_ti.spec._struct->fields, op->a_id, GL_FALSE); - if (field == NULL) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - if (!slang_type_specifier_copy (&ti->spec, &field->type.specifier)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - ti->can_be_referenced = _ti.can_be_referenced; - } - else - { - GLuint rows; - const char *swizzle; - slang_type_specifier_type base; - - /* determine the swizzle of the field expression */ - if (!_slang_type_is_vector (_ti.spec.type)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - rows = _slang_type_dim (_ti.spec.type); - swizzle = slang_atom_pool_id (atoms, op->a_id); - if (!_slang_is_swizzle (swizzle, rows, &ti->swz)) - { - slang_assembly_typeinfo_destruct (&_ti); - return GL_FALSE; - } - ti->is_swizzled = GL_TRUE; - ti->can_be_referenced = _ti.can_be_referenced && _slang_is_swizzle_mask (&ti->swz, - rows); - if (_ti.is_swizzled) - { - slang_swizzle swz; - - /* swizzle the swizzle */ - _slang_multiply_swizzles (&swz, &_ti.swz, &ti->swz); - ti->swz = swz; - } - base = _slang_type_base (_ti.spec.type); - switch (ti->swz.num_components) - { - case 1: - ti->spec.type = base; - break; - case 2: - switch (base) - { - case slang_spec_float: - ti->spec.type = slang_spec_vec2; - break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec2; - break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec2; - break; - default: - break; - } - break; - case 3: - switch (base) - { - case slang_spec_float: - ti->spec.type = slang_spec_vec3; - break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec3; - break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec3; - break; - default: - break; - } - break; - case 4: - switch (base) - { - case slang_spec_float: - ti->spec.type = slang_spec_vec4; - break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec4; - break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec4; - break; - default: - break; - } - break; - default: - break; - } - } - slang_assembly_typeinfo_destruct (&_ti); - } - break; - case slang_oper_postincrement: - case slang_oper_postdecrement: - if (!_slang_typeof_operation_ (op->children, space, ti, atoms)) - return GL_FALSE; - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - default: - return GL_FALSE; - } - - return GL_TRUE; + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + + switch (op->type) { + case slang_oper_block_no_new_scope: + case slang_oper_block_new_scope: + case slang_oper_variable_decl: + case slang_oper_asm: + case slang_oper_break: + case slang_oper_continue: + case slang_oper_discard: + case slang_oper_return: + case slang_oper_if: + case slang_oper_while: + case slang_oper_do: + case slang_oper_for: + case slang_oper_void: + ti->spec.type = slang_spec_void; + break; + case slang_oper_expression: + case slang_oper_assign: + case slang_oper_addassign: + case slang_oper_subassign: + case slang_oper_mulassign: + case slang_oper_divassign: + case slang_oper_preincrement: + case slang_oper_predecrement: + if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + return 0; + break; + case slang_oper_literal_bool: + case slang_oper_logicalor: + case slang_oper_logicalxor: + case slang_oper_logicaland: + case slang_oper_equal: + case slang_oper_notequal: + case slang_oper_less: + case slang_oper_greater: + case slang_oper_lessequal: + case slang_oper_greaterequal: + case slang_oper_not: + ti->spec.type = slang_spec_bool; + break; + case slang_oper_literal_int: + ti->spec.type = slang_spec_int; + break; + case slang_oper_literal_float: + ti->spec.type = slang_spec_float; + break; + case slang_oper_identifier: + { + slang_variable *var; + + var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); + if (var == NULL) + return GL_FALSE; + if (!slang_type_specifier_copy(&ti->spec, &var->type.specifier)) + return GL_FALSE; + ti->can_be_referenced = GL_TRUE; + ti->array_len = var->array_len; + } + break; + case slang_oper_sequence: + /* TODO: check [0] and [1] if they match */ + if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) + return GL_FALSE; + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + /*case slang_oper_modassign: */ + /*case slang_oper_lshassign: */ + /*case slang_oper_rshassign: */ + /*case slang_oper_orassign: */ + /*case slang_oper_xorassign: */ + /*case slang_oper_andassign: */ + case slang_oper_select: + /* TODO: check [1] and [2] if they match */ + if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) + return GL_FALSE; + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + /*case slang_oper_bitor: */ + /*case slang_oper_bitxor: */ + /*case slang_oper_bitand: */ + /*case slang_oper_lshift: */ + /*case slang_oper_rshift: */ + case slang_oper_add: + if (!typeof_existing_function + ("+", op->children, 2, space, &ti->spec, atoms)) + return GL_FALSE; + break; + case slang_oper_subtract: + if (!typeof_existing_function + ("-", op->children, 2, space, &ti->spec, atoms)) + return GL_FALSE; + break; + case slang_oper_multiply: + if (!typeof_existing_function + ("*", op->children, 2, space, &ti->spec, atoms)) + return GL_FALSE; + break; + case slang_oper_divide: + if (!typeof_existing_function + ("/", op->children, 2, space, &ti->spec, atoms)) + return GL_FALSE; + break; + /*case slang_oper_modulus: */ + case slang_oper_plus: + if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + return GL_FALSE; + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + case slang_oper_minus: + if (!typeof_existing_function + ("-", op->children, 1, space, &ti->spec, atoms)) + return GL_FALSE; + break; + /*case slang_oper_complement: */ + case slang_oper_subscript: + { + slang_assembly_typeinfo _ti; + + if (!slang_assembly_typeinfo_construct(&_ti)) + return GL_FALSE; + if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + ti->can_be_referenced = _ti.can_be_referenced; + if (_ti.spec.type == slang_spec_array) { + if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + } + else { + if (!_slang_type_is_vector(_ti.spec.type) + && !_slang_type_is_matrix(_ti.spec.type)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + ti->spec.type = _slang_type_base(_ti.spec.type); + } + slang_assembly_typeinfo_destruct(&_ti); + } + break; + case slang_oper_call: + { + GLboolean exists; + + if (!_slang_typeof_function + (op->a_id, op->children, op->num_children, space, &ti->spec, + &exists, atoms)) + return GL_FALSE; + if (!exists) { + slang_struct *s = + slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); + if (s != NULL) { + ti->spec.type = slang_spec_struct; + ti->spec._struct = + (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); + if (ti->spec._struct == NULL) + return GL_FALSE; + if (!slang_struct_construct(ti->spec._struct)) { + slang_alloc_free(ti->spec._struct); + ti->spec._struct = NULL; + return GL_FALSE; + } + if (!slang_struct_copy(ti->spec._struct, s)) + return GL_FALSE; + } + else { + const char *name; + slang_type_specifier_type type; + + name = slang_atom_pool_id(atoms, op->a_id); + type = slang_type_specifier_type_from_string(name); + if (type == slang_spec_void) + return GL_FALSE; + ti->spec.type = type; + } + } + } + break; + case slang_oper_field: + { + slang_assembly_typeinfo _ti; + + if (!slang_assembly_typeinfo_construct(&_ti)) + return GL_FALSE; + if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + if (_ti.spec.type == slang_spec_struct) { + slang_variable *field; + + field = + _slang_locate_variable(_ti.spec._struct->fields, op->a_id, + GL_FALSE); + if (field == NULL) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + ti->can_be_referenced = _ti.can_be_referenced; + } + else { + GLuint rows; + const char *swizzle; + slang_type_specifier_type base; + + /* determine the swizzle of the field expression */ + if (!_slang_type_is_vector(_ti.spec.type)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + rows = _slang_type_dim(_ti.spec.type); + swizzle = slang_atom_pool_id(atoms, op->a_id); + if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { + slang_assembly_typeinfo_destruct(&_ti); + return GL_FALSE; + } + ti->is_swizzled = GL_TRUE; + ti->can_be_referenced = _ti.can_be_referenced + && _slang_is_swizzle_mask(&ti->swz, rows); + if (_ti.is_swizzled) { + slang_swizzle swz; + + /* swizzle the swizzle */ + _slang_multiply_swizzles(&swz, &_ti.swz, &ti->swz); + ti->swz = swz; + } + base = _slang_type_base(_ti.spec.type); + switch (ti->swz.num_components) { + case 1: + ti->spec.type = base; + break; + case 2: + switch (base) { + case slang_spec_float: + ti->spec.type = slang_spec_vec2; + break; + case slang_spec_int: + ti->spec.type = slang_spec_ivec2; + break; + case slang_spec_bool: + ti->spec.type = slang_spec_bvec2; + break; + default: + break; + } + break; + case 3: + switch (base) { + case slang_spec_float: + ti->spec.type = slang_spec_vec3; + break; + case slang_spec_int: + ti->spec.type = slang_spec_ivec3; + break; + case slang_spec_bool: + ti->spec.type = slang_spec_bvec3; + break; + default: + break; + } + break; + case 4: + switch (base) { + case slang_spec_float: + ti->spec.type = slang_spec_vec4; + break; + case slang_spec_int: + ti->spec.type = slang_spec_ivec4; + break; + case slang_spec_bool: + ti->spec.type = slang_spec_bvec4; + break; + default: + break; + } + break; + default: + break; + } + } + slang_assembly_typeinfo_destruct(&_ti); + } + break; + case slang_oper_postincrement: + case slang_oper_postdecrement: + if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + return GL_FALSE; + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + default: + return GL_FALSE; + } + + return GL_TRUE; } /* _slang_typeof_function() */ -GLboolean _slang_typeof_function (slang_atom a_name, slang_operation *params, GLuint num_params, - slang_assembly_name_space *space, slang_type_specifier *spec, GLboolean *exists, - slang_atom_pool *atoms) +GLboolean +_slang_typeof_function(slang_atom a_name, slang_operation * params, + GLuint num_params, slang_assembly_name_space * space, + slang_type_specifier * spec, GLboolean * exists, + slang_atom_pool * atoms) { - slang_function *fun; - - fun = _slang_locate_function (space->funcs, a_name, params, num_params, space, atoms); - *exists = fun != NULL; - if (fun == NULL) - return GL_TRUE; - return slang_type_specifier_copy (spec, &fun->header.type.specifier); + slang_function *fun; + + fun = + _slang_locate_function(space->funcs, a_name, params, num_params, space, + atoms); + *exists = fun != NULL; + if (fun == NULL) + return GL_TRUE; + return slang_type_specifier_copy(spec, &fun->header.type.specifier); } /* _slang_type_is_matrix() */ -GLboolean _slang_type_is_matrix (slang_type_specifier_type ty) +GLboolean +_slang_type_is_matrix(slang_type_specifier_type ty) { - switch (ty) - { - case slang_spec_mat2: - case slang_spec_mat3: - case slang_spec_mat4: - return GL_TRUE; - default: - return GL_FALSE; - } + switch (ty) { + case slang_spec_mat2: + case slang_spec_mat3: + case slang_spec_mat4: + return GL_TRUE; + default: + return GL_FALSE; + } } /* _slang_type_is_vector() */ -GLboolean _slang_type_is_vector (slang_type_specifier_type ty) +GLboolean +_slang_type_is_vector(slang_type_specifier_type ty) { - switch (ty) - { - case slang_spec_vec2: - case slang_spec_vec3: - case slang_spec_vec4: - case slang_spec_ivec2: - case slang_spec_ivec3: - case slang_spec_ivec4: - case slang_spec_bvec2: - case slang_spec_bvec3: - case slang_spec_bvec4: - return GL_TRUE; - default: - return GL_FALSE; - } + switch (ty) { + case slang_spec_vec2: + case slang_spec_vec3: + case slang_spec_vec4: + case slang_spec_ivec2: + case slang_spec_ivec3: + case slang_spec_ivec4: + case slang_spec_bvec2: + case slang_spec_bvec3: + case slang_spec_bvec4: + return GL_TRUE; + default: + return GL_FALSE; + } } /* _slang_type_base_of_vector() */ -slang_type_specifier_type _slang_type_base (slang_type_specifier_type ty) +slang_type_specifier_type +_slang_type_base(slang_type_specifier_type ty) { - switch (ty) - { - case slang_spec_float: - case slang_spec_vec2: - case slang_spec_vec3: - case slang_spec_vec4: - return slang_spec_float; - case slang_spec_int: - case slang_spec_ivec2: - case slang_spec_ivec3: - case slang_spec_ivec4: - return slang_spec_int; - case slang_spec_bool: - case slang_spec_bvec2: - case slang_spec_bvec3: - case slang_spec_bvec4: - return slang_spec_bool; - case slang_spec_mat2: - return slang_spec_vec2; - case slang_spec_mat3: - return slang_spec_vec3; - case slang_spec_mat4: - return slang_spec_vec4; - default: - return slang_spec_void; - } + switch (ty) { + case slang_spec_float: + case slang_spec_vec2: + case slang_spec_vec3: + case slang_spec_vec4: + return slang_spec_float; + case slang_spec_int: + case slang_spec_ivec2: + case slang_spec_ivec3: + case slang_spec_ivec4: + return slang_spec_int; + case slang_spec_bool: + case slang_spec_bvec2: + case slang_spec_bvec3: + case slang_spec_bvec4: + return slang_spec_bool; + case slang_spec_mat2: + return slang_spec_vec2; + case slang_spec_mat3: + return slang_spec_vec3; + case slang_spec_mat4: + return slang_spec_vec4; + default: + return slang_spec_void; + } } /* _slang_type_dim */ -GLuint _slang_type_dim (slang_type_specifier_type ty) +GLuint +_slang_type_dim(slang_type_specifier_type ty) { - switch (ty) - { - case slang_spec_float: - case slang_spec_int: - case slang_spec_bool: - return 1; - case slang_spec_vec2: - case slang_spec_ivec2: - case slang_spec_bvec2: - case slang_spec_mat2: - return 2; - case slang_spec_vec3: - case slang_spec_ivec3: - case slang_spec_bvec3: - case slang_spec_mat3: - return 3; - case slang_spec_vec4: - case slang_spec_ivec4: - case slang_spec_bvec4: - case slang_spec_mat4: - return 4; - default: - return 0; - } + switch (ty) { + case slang_spec_float: + case slang_spec_int: + case slang_spec_bool: + return 1; + case slang_spec_vec2: + case slang_spec_ivec2: + case slang_spec_bvec2: + case slang_spec_mat2: + return 2; + case slang_spec_vec3: + case slang_spec_ivec3: + case slang_spec_bvec3: + case slang_spec_mat3: + return 3; + case slang_spec_vec4: + case slang_spec_ivec4: + case slang_spec_bvec4: + case slang_spec_mat4: + return 4; + default: + return 0; + } } - -- cgit v1.2.3 From 523f5cfeb537e52baa892148b7b050fb076ef1b0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 22:31:34 +0000 Subject: Add a lot of const qualifiers for const-correctness. New comments, misc clean-ups. --- src/mesa/shader/slang/slang_assemble.c | 6 +- src/mesa/shader/slang/slang_assemble.h | 11 +- src/mesa/shader/slang/slang_assemble_typeinfo.c | 105 ++++++++++++------ src/mesa/shader/slang/slang_assemble_typeinfo.h | 138 +++++++++++++++--------- src/mesa/shader/slang/slang_utility.c | 21 ++-- src/mesa/shader/slang/slang_utility.h | 2 +- 6 files changed, 184 insertions(+), 99 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 603fd4f7f8..09b1df7cb0 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -232,9 +232,9 @@ collect_locals(slang_assemble_ctx * A, slang_operation * op, GLuint * size) /* _slang_locate_function() */ slang_function * -_slang_locate_function(slang_function_scope * funcs, slang_atom a_name, - slang_operation * params, GLuint num_params, - slang_assembly_name_space * space, +_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, + const slang_operation * params, GLuint num_params, + const slang_assembly_name_space * space, slang_atom_pool * atoms) { GLuint i; diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 54589ad7d1..3f75e971be 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -216,13 +216,18 @@ typedef struct slang_assemble_ctx_ } slang_assemble_ctx; extern struct slang_function_ * -_slang_locate_function(struct slang_function_scope_ *funcs, slang_atom name, - struct slang_operation_ *params, GLuint num_params, - slang_assembly_name_space *space, slang_atom_pool *); +_slang_locate_function(const struct slang_function_scope_ *funcs, + slang_atom name, const struct slang_operation_ *params, + GLuint num_params, + const slang_assembly_name_space *space, + slang_atom_pool *); extern GLboolean _slang_assemble_function(slang_assemble_ctx *, struct slang_function_ *); +extern GLboolean +_slang_assemble_function2(slang_assemble_ctx * , struct slang_function_ *); + extern GLboolean _slang_cleanup_stack(slang_assemble_ctx *, struct slang_operation_ *); diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c index 340d6c1c58..f4ee573df7 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c @@ -131,31 +131,53 @@ slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) /* _slang_typeof_operation() */ +/** + * Determine the return type of a function. + * \param name name of the function + * \param params array of function parameters + * \param num_params number of parameters + * \param space namespace to use + * \param spec returns the function's type + * \param atoms atom pool + * \return GL_TRUE for success, GL_FALSE if failure + */ static GLboolean -typeof_existing_function(const char *name, slang_operation * params, - GLuint num_params, slang_assembly_name_space * space, - slang_type_specifier * spec, slang_atom_pool * atoms) +typeof_existing_function(const char *name, const slang_operation * params, + GLuint num_params, + const slang_assembly_name_space * space, + slang_type_specifier * spec, + slang_atom_pool * atoms) { slang_atom atom; GLboolean exists; atom = slang_atom_pool_atom(atoms, name); - if (!_slang_typeof_function - (atom, params, num_params, space, spec, &exists, atoms)) + if (!_slang_typeof_function(atom, params, num_params, space, spec, + &exists, atoms)) return GL_FALSE; return exists; } GLboolean -_slang_typeof_operation(slang_assemble_ctx * A, slang_operation * op, +_slang_typeof_operation(const slang_assemble_ctx * A, + const slang_operation * op, slang_assembly_typeinfo * ti) { return _slang_typeof_operation_(op, &A->space, ti, A->atoms); } + +/** + * Determine the return type of an operation. + * \param op the operation node + * \param space the namespace to use + * \param ti the returned type + * \param atoms atom pool + * \return GL_TRUE for success, GL_FALSE if failure + */ GLboolean -_slang_typeof_operation_(slang_operation * op, - slang_assembly_name_space * space, +_slang_typeof_operation_(const slang_operation * op, + const slang_assembly_name_space * space, slang_assembly_typeinfo * ti, slang_atom_pool * atoms) { @@ -247,23 +269,23 @@ _slang_typeof_operation_(slang_operation * op, /*case slang_oper_lshift: */ /*case slang_oper_rshift: */ case slang_oper_add: - if (!typeof_existing_function - ("+", op->children, 2, space, &ti->spec, atoms)) + if (!typeof_existing_function("+", op->children, 2, space, + &ti->spec, atoms)) return GL_FALSE; break; case slang_oper_subtract: - if (!typeof_existing_function - ("-", op->children, 2, space, &ti->spec, atoms)) + if (!typeof_existing_function("-", op->children, 2, space, + &ti->spec, atoms)) return GL_FALSE; break; case slang_oper_multiply: - if (!typeof_existing_function - ("*", op->children, 2, space, &ti->spec, atoms)) + if (!typeof_existing_function("*", op->children, 2, space, + &ti->spec, atoms)) return GL_FALSE; break; case slang_oper_divide: - if (!typeof_existing_function - ("/", op->children, 2, space, &ti->spec, atoms)) + if (!typeof_existing_function("/", op->children, 2, space, + &ti->spec, atoms)) return GL_FALSE; break; /*case slang_oper_modulus: */ @@ -311,9 +333,8 @@ _slang_typeof_operation_(slang_operation * op, { GLboolean exists; - if (!_slang_typeof_function - (op->a_id, op->children, op->num_children, space, &ti->spec, - &exists, atoms)) + if (!_slang_typeof_function(op->a_id, op->children, op->num_children, + space, &ti->spec, &exists, atoms)) return GL_FALSE; if (!exists) { slang_struct *s = @@ -468,27 +489,38 @@ _slang_typeof_operation_(slang_operation * op, return GL_TRUE; } -/* _slang_typeof_function() */ + +/** + * Determine the return type of a function. + * \param a_name the function name + * \param param function parameters (overloading) + * \param num_params number of parameters to function + * \param space namespace to search + * \param exists returns GL_TRUE or GL_FALSE to indicate existance of function + * \return GL_TRUE for success, GL_FALSE if failure (bad function name) + */ GLboolean -_slang_typeof_function(slang_atom a_name, slang_operation * params, - GLuint num_params, slang_assembly_name_space * space, +_slang_typeof_function(slang_atom a_name, const slang_operation * params, + GLuint num_params, + const slang_assembly_name_space * space, slang_type_specifier * spec, GLboolean * exists, slang_atom_pool * atoms) { - slang_function *fun; - - fun = - _slang_locate_function(space->funcs, a_name, params, num_params, space, - atoms); + slang_function *fun = _slang_locate_function(space->funcs, a_name, params, + num_params, space, atoms); *exists = fun != NULL; - if (fun == NULL) - return GL_TRUE; + if (!fun) + return GL_TRUE; /* yes, not false */ return slang_type_specifier_copy(spec, &fun->header.type.specifier); } -/* _slang_type_is_matrix() */ + +/** + * Determine if a type is a matrix. + * \return GL_TRUE if is a matrix, GL_FALSE otherwise. + */ GLboolean _slang_type_is_matrix(slang_type_specifier_type ty) { @@ -502,8 +534,11 @@ _slang_type_is_matrix(slang_type_specifier_type ty) } } -/* _slang_type_is_vector() */ +/** + * Determine if a type is a vector. + * \return GL_TRUE if is a vector, GL_FALSE otherwise. + */ GLboolean _slang_type_is_vector(slang_type_specifier_type ty) { @@ -523,8 +558,10 @@ _slang_type_is_vector(slang_type_specifier_type ty) } } -/* _slang_type_base_of_vector() */ +/** + * Given a vector type, return the type of the vector's elements + */ slang_type_specifier_type _slang_type_base(slang_type_specifier_type ty) { @@ -555,8 +592,10 @@ _slang_type_base(slang_type_specifier_type ty) } } -/* _slang_type_dim */ +/** + * Return the number of elements in a vector or matrix type + */ GLuint _slang_type_dim(slang_type_specifier_type ty) { diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.h b/src/mesa/shader/slang/slang_assemble_typeinfo.h index 7e8af96915..5d951226a1 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.h +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.h @@ -29,84 +29,120 @@ extern "C" { #endif + +/** + * The basic shading language types (float, vec4, mat3, etc) + */ typedef enum slang_type_specifier_type_ { - slang_spec_void, - slang_spec_bool, - slang_spec_bvec2, - slang_spec_bvec3, - slang_spec_bvec4, - slang_spec_int, - slang_spec_ivec2, - slang_spec_ivec3, - slang_spec_ivec4, - slang_spec_float, - slang_spec_vec2, - slang_spec_vec3, - slang_spec_vec4, - slang_spec_mat2, - slang_spec_mat3, - slang_spec_mat4, - slang_spec_sampler1D, - slang_spec_sampler2D, - slang_spec_sampler3D, - slang_spec_samplerCube, - slang_spec_sampler1DShadow, - slang_spec_sampler2DShadow, - slang_spec_struct, - slang_spec_array + slang_spec_void, + slang_spec_bool, + slang_spec_bvec2, + slang_spec_bvec3, + slang_spec_bvec4, + slang_spec_int, + slang_spec_ivec2, + slang_spec_ivec3, + slang_spec_ivec4, + slang_spec_float, + slang_spec_vec2, + slang_spec_vec3, + slang_spec_vec4, + slang_spec_mat2, + slang_spec_mat3, + slang_spec_mat4, + slang_spec_sampler1D, + slang_spec_sampler2D, + slang_spec_sampler3D, + slang_spec_samplerCube, + slang_spec_sampler1DShadow, + slang_spec_sampler2DShadow, + slang_spec_struct, + slang_spec_array } slang_type_specifier_type; + +/** + * Describes more sophisticated types, like structs and arrays. + */ typedef struct slang_type_specifier_ { - slang_type_specifier_type type; - struct slang_struct_ *_struct; /* type: spec_struct */ - struct slang_type_specifier_ *_array; /* type: spec_array */ + slang_type_specifier_type type; + struct slang_struct_ *_struct; /**< type: spec_struct */ + struct slang_type_specifier_ *_array; /**< type: spec_array */ } slang_type_specifier; -GLvoid slang_type_specifier_ctr (slang_type_specifier *); -GLvoid slang_type_specifier_dtr (slang_type_specifier *); -GLboolean slang_type_specifier_copy (slang_type_specifier *, const slang_type_specifier *); -GLboolean slang_type_specifier_equal (const slang_type_specifier *, const slang_type_specifier *); + +extern GLvoid +slang_type_specifier_ctr(slang_type_specifier *); + +extern GLvoid +slang_type_specifier_dtr(slang_type_specifier *); + +extern GLboolean +slang_type_specifier_copy(slang_type_specifier *, const slang_type_specifier *); + +extern GLboolean +slang_type_specifier_equal(const slang_type_specifier *, + const slang_type_specifier *); + typedef struct slang_assembly_typeinfo_ { - GLboolean can_be_referenced; - GLboolean is_swizzled; - slang_swizzle swz; - slang_type_specifier spec; - GLuint array_len; + GLboolean can_be_referenced; + GLboolean is_swizzled; + slang_swizzle swz; + slang_type_specifier spec; + GLuint array_len; } slang_assembly_typeinfo; -GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *); -GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *); +extern GLboolean +slang_assembly_typeinfo_construct(slang_assembly_typeinfo *); -/* +extern GLvoid +slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); + + +/** * Retrieves type information about an operation. * Returns GL_TRUE on success. * Returns GL_FALSE otherwise. */ -GLboolean _slang_typeof_operation (slang_assemble_ctx *, struct slang_operation_ *, - slang_assembly_typeinfo *); -GLboolean _slang_typeof_operation_ (struct slang_operation_ *, slang_assembly_name_space *, - slang_assembly_typeinfo *, slang_atom_pool *); +extern GLboolean +_slang_typeof_operation(const slang_assemble_ctx *, + const struct slang_operation_ *, + slang_assembly_typeinfo *); -/* +extern GLboolean +_slang_typeof_operation_(const struct slang_operation_ *, + const slang_assembly_name_space *, + slang_assembly_typeinfo *, slang_atom_pool *); + +/** * Retrieves type of a function prototype, if one exists. * Returns GL_TRUE on success, even if the function was not found. * Returns GL_FALSE otherwise. */ -GLboolean _slang_typeof_function (slang_atom a_name, struct slang_operation_ *params, - GLuint num_params, slang_assembly_name_space *, slang_type_specifier *spec, GLboolean *exists, - slang_atom_pool *); +extern GLboolean +_slang_typeof_function(slang_atom a_name, + const struct slang_operation_ *params, + GLuint num_params, const slang_assembly_name_space *, + slang_type_specifier *spec, GLboolean *exists, + slang_atom_pool *); + +extern GLboolean +_slang_type_is_matrix(slang_type_specifier_type); + +extern GLboolean +_slang_type_is_vector(slang_type_specifier_type); -GLboolean _slang_type_is_matrix (slang_type_specifier_type); +extern slang_type_specifier_type +_slang_type_base(slang_type_specifier_type); -GLboolean _slang_type_is_vector (slang_type_specifier_type); +extern GLuint +_slang_type_dim(slang_type_specifier_type); -slang_type_specifier_type _slang_type_base (slang_type_specifier_type); -GLuint _slang_type_dim (slang_type_specifier_type); #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 54fcc8a238..28837248df 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -160,11 +160,16 @@ void slang_atom_pool_destruct (slang_atom_pool *pool) } } -slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id) +/** + * Search atom pool for atom with the given name. + * If name is not found, create new atom (but don't insert into pool?) + */ +slang_atom slang_atom_pool_atom (const slang_atom_pool *pool, const char *id) { GLuint hash; const char *p = id; - slang_atom_entry **entry; + slang_atom_entry * const * entry; + slang_atom_entry **newEntry = NULL; hash = 0; while (*p != '\0') @@ -187,15 +192,15 @@ slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id) entry = &(**entry).next; } - *entry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry)); - if (*entry == NULL) + *newEntry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry)); + if (*newEntry == NULL) return SLANG_ATOM_NULL; - (**entry).next = NULL; - (**entry).id = slang_string_duplicate (id); - if ((**entry).id == NULL) + (**newEntry).next = NULL; + (**newEntry).id = slang_string_duplicate (id); + if ((**newEntry).id == NULL) return SLANG_ATOM_NULL; - return (slang_atom) (**entry).id; + return (slang_atom) (**newEntry).id; } const char *slang_atom_pool_id (slang_atom_pool *pool, slang_atom atom) diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 565de4e4b0..3487e4ec51 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -99,7 +99,7 @@ typedef struct slang_atom_pool_ GLvoid slang_atom_pool_construct (slang_atom_pool *); GLvoid slang_atom_pool_destruct (slang_atom_pool *); -slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *); +slang_atom slang_atom_pool_atom (const slang_atom_pool *, const char *); const char *slang_atom_pool_id (slang_atom_pool *, slang_atom); #ifdef __cplusplus -- cgit v1.2.3 From 0da68e2e6e2756e26040df414bc7d1719c884646 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 16 Nov 2006 23:24:20 +0000 Subject: Add nv30InitStateFuncs --- src/mesa/drivers/dri/nouveau/nouveau_state.h | 2 + src/mesa/drivers/dri/nouveau/nv30_state.c | 117 ++++++++++++++++++++------- 2 files changed, 89 insertions(+), 30 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h index 70c50588a8..4e8eda83e1 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h @@ -32,6 +32,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. extern void nouveauDDInitState(nouveauContextPtr nmesa); extern void nouveauDDInitStateFuncs(GLcontext *ctx); +extern void nv30InitStateFuncs(struct dd_function_table *func); + /* extern void nouveauDDUpdateState(GLcontext *ctx); extern void nouveauDDUpdateHWState(GLcontext *ctx); diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index e6e5fdbd15..ded9d0934f 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -34,7 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mtypes.h" #include "colormac.h" -void nv30AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) +static void nv30AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte ubRef; @@ -45,7 +45,7 @@ void nv30AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) OUT_RING(ubRef); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ } -void nv30BlendColor(GLcontext *ctx, const GLfloat color[4]) +static void nv30BlendColor(GLcontext *ctx, const GLfloat color[4]) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte cf[4]; @@ -59,7 +59,7 @@ void nv30BlendColor(GLcontext *ctx, const GLfloat color[4]) OUT_RING(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); } -void nv30BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) +static void nv30BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); @@ -67,7 +67,7 @@ void nv30BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) } -void nv30BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, +static void nv30BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -76,7 +76,7 @@ void nv30BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, OUT_RING((dfactorA<<16) | dfactorRGB); } -void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) +static void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte c[4]; @@ -85,7 +85,7 @@ void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) OUT_RING(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); } -void nv30ClearDepth(GLcontext *ctx, GLclampd d) +static void nv30ClearDepth(GLcontext *ctx, GLclampd d) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); @@ -97,7 +97,7 @@ void nv30ClearDepth(GLcontext *ctx, GLclampd d) void (*ClearIndex)(GLcontext *ctx, GLuint index) */ -void nv30ClearStencil(GLcontext *ctx, GLint s) +static void nv30ClearStencil(GLcontext *ctx, GLint s) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); @@ -105,7 +105,7 @@ void nv30ClearStencil(GLcontext *ctx, GLint s) OUT_RING(nmesa->clear_value); } -void nv30ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) +static void nv30ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); @@ -115,7 +115,7 @@ void nv30ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) OUT_RINGf(equation[3]); } -void nv30ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, +static void nv30ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -123,40 +123,40 @@ void nv30ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, OUT_RING(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); } -void nv30ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) +static void nv30ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) { // TODO I need love } -void nv30CullFace(GLcontext *ctx, GLenum mode) +static void nv30CullFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE, 1); OUT_RING(mode); } -void nv30FrontFace(GLcontext *ctx, GLenum mode) +static void nv30FrontFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FRONT_FACE, 1); OUT_RING(mode); } -void nv30DepthFunc(GLcontext *ctx, GLenum func) +static void nv30DepthFunc(GLcontext *ctx, GLenum func) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); OUT_RING(func); } -void nv30DepthMask(GLcontext *ctx, GLboolean flag) +static void nv30DepthMask(GLcontext *ctx, GLboolean flag) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); OUT_RING(flag); } -void nv30DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) +static void nv30DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); @@ -169,7 +169,7 @@ void nv30DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) /** Specify the buffers for writing for fragment programs*/ //void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); -void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) +static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); switch(cap) @@ -311,7 +311,7 @@ void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) } } -void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +static void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); switch(pname) @@ -327,14 +327,14 @@ void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) } -void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) +static void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) { // TODO I need love (fog and line_smooth hints) } // void (*IndexMask)(GLcontext *ctx, GLuint mask); -void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) +static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); /* not sure where the fourth param value goes...*/ @@ -401,31 +401,31 @@ void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *para } /** Set the lighting model parameters */ -void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); +static void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); -void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) +static void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); OUT_RING((pattern << 16) | factor); } -void nv30LineWidth(GLcontext *ctx, GLfloat width) +static void nv30LineWidth(GLcontext *ctx, GLfloat width) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); OUT_RINGf(width); } -void nv30LogicOpcode(GLcontext *ctx, GLenum opcode) +static void nv30LogicOpcode(GLcontext *ctx, GLenum opcode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LOGIC_OP_OP, 1); OUT_RING(opcode); } -void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +static void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) { /*TODO: not sure what goes here. */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -433,15 +433,27 @@ void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) } /** Specify the diameter of rasterized points */ -void nv30PointSize(GLcontext *ctx, GLfloat size) +static void nv30PointSize(GLcontext *ctx, GLfloat size) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1); - OUT_RINGf(size); + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RINGf(size); } /** Select a polygon rasterization mode */ -void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); +static void nv30PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + int method; + + if (face == GL_FRONT) + method = NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT; + else + method = NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK; + BEGIN_RING_SIZE(NvSub3D, method, 1); + OUT_RING(mode); +} + /** Set the scale and units used to calculate depth values */ void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); /** Set the polygon stippling pattern */ @@ -475,7 +487,7 @@ void (*TexParameter)(GLcontext *ctx, GLenum target, void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); /** Set the viewport */ -void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +static void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -484,3 +496,48 @@ void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) OUT_RING((h << 16) | y); } +void nv30InitStateFuncs(struct dd_function_table *func) +{ + func->AlphaFunc = nv30AlphaFunc; + func->BlendColor = nv30BlendColor; + func->BlendEquationSeparate = nv30BlendEquationSeparate; + func->BlendFuncSeparate = nv30BlendFuncSeparate; + func->ClearColor = nv30ClearColor; + func->ClearDepth = nv30ClearDepth; + func->ClearStencil = nv30ClearStencil; + func->ClipPlane = nv30ClipPlane; + func->ColorMask = nv30ColorMask; + func->ColorMaterial = nv30ColorMaterial; + func->CullFace = nv30CullFace; + func->FrontFace = nv30FrontFace; + func->DepthFunc = nv30DepthFunc; + func->DepthMask = nv30DepthMask; + func->DepthRange = nv30DepthRange; + func->Enable = nv30Enable; + func->Fogfv = nv30Fogfv; + func->Hint = nv30Hint; + func->Lightfv = nv30Lightfv; +/* func->LightModelfv = nv30LightModelfv; */ + func->LineStipple = nv30LineStipple; + func->LineWidth = nv30LineWidth; + func->LogicOpcode = nv30LogicOpcode; + func->PointParameterfv = nv30PointParameterfv; + func->PointSize = nv30PointSize; + func->PolygonMode = nv30PolygonMode; +#if 0 + func->PolygonOffset = nv30PolygonOffset; + func->PolygonStipple = nv30PolygonStipple; + func->ReadBuffer = nv30ReadBuffer; + func->RenderMode = nv30RenderMode; + func->Scissor = nv30Scissor; + func->ShadeModel = nv30ShaderModel; + func->StencilFuncSeparate = nv30StencilFuncSeparate; + func->StencilMaskSeparate = nv30StencilMaskSeparate; + func->StencilOpSeparate = nv30StencilOpSeparate; + func->TexGen = nv30TexGen; + func->TexParameter = nv30TexParameter; + func->TextureMatrix = nv30TextureMatrix; +#endif + func->Viewport = nv30Viewport; +} + -- cgit v1.2.3 From 7984c70070ea3fee1600095b1f32b0f8adf2ad31 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Nov 2006 23:34:02 +0000 Subject: revert prev check-in --- src/mesa/shader/slang/slang_utility.c | 21 ++++++++------------- src/mesa/shader/slang/slang_utility.h | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 28837248df..54fcc8a238 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -160,16 +160,11 @@ void slang_atom_pool_destruct (slang_atom_pool *pool) } } -/** - * Search atom pool for atom with the given name. - * If name is not found, create new atom (but don't insert into pool?) - */ -slang_atom slang_atom_pool_atom (const slang_atom_pool *pool, const char *id) +slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id) { GLuint hash; const char *p = id; - slang_atom_entry * const * entry; - slang_atom_entry **newEntry = NULL; + slang_atom_entry **entry; hash = 0; while (*p != '\0') @@ -192,15 +187,15 @@ slang_atom slang_atom_pool_atom (const slang_atom_pool *pool, const char *id) entry = &(**entry).next; } - *newEntry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry)); - if (*newEntry == NULL) + *entry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry)); + if (*entry == NULL) return SLANG_ATOM_NULL; - (**newEntry).next = NULL; - (**newEntry).id = slang_string_duplicate (id); - if ((**newEntry).id == NULL) + (**entry).next = NULL; + (**entry).id = slang_string_duplicate (id); + if ((**entry).id == NULL) return SLANG_ATOM_NULL; - return (slang_atom) (**newEntry).id; + return (slang_atom) (**entry).id; } const char *slang_atom_pool_id (slang_atom_pool *pool, slang_atom atom) diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 3487e4ec51..565de4e4b0 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -99,7 +99,7 @@ typedef struct slang_atom_pool_ GLvoid slang_atom_pool_construct (slang_atom_pool *); GLvoid slang_atom_pool_destruct (slang_atom_pool *); -slang_atom slang_atom_pool_atom (const slang_atom_pool *, const char *); +slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *); const char *slang_atom_pool_id (slang_atom_pool *, slang_atom); #ifdef __cplusplus -- cgit v1.2.3 From 9daf0812a15ed7df0e3a329019290faed58d21ef Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 16 Nov 2006 23:43:39 +0000 Subject: jkolb pointed out that face can also be FRONT_AND_BACK. Added stencil funcs --- src/mesa/drivers/dri/nouveau/nv30_state.c | 75 ++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 12 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index ded9d0934f..470f18d80a 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -444,14 +444,15 @@ static void nv30PointSize(GLcontext *ctx, GLfloat size) static void nv30PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - int method; - if (face == GL_FRONT) - method = NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT; - else - method = NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK; - BEGIN_RING_SIZE(NvSub3D, method, 1); - OUT_RING(mode); + if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); + OUT_RING(mode); + } + if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); + OUT_RING(mode); + } } /** Set the scale and units used to calculate depth values */ @@ -466,14 +467,62 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ void (*ShadeModel)(GLcontext *ctx, GLenum mode); + /** OpenGL 2.0 two-sided StencilFunc */ -void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, - GLint ref, GLuint mask); +static void nv30StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_FUNC, 3); + OUT_RING(func); + OUT_RING(ref); + OUT_RING(mask); + } + if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_FUNC, 3); + OUT_RING(func); + OUT_RING(ref); + OUT_RING(mask); + } +} + /** OpenGL 2.0 two-sided StencilMask */ -void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); +static void nv30StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_MASK, 1); + OUT_RING(mask); + } + if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_MASK, 1); + OUT_RING(mask); + } +} + /** OpenGL 2.0 two-sided StencilOp */ -void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, - GLenum zfail, GLenum zpass); +static void nv30StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL, 1); + OUT_RING(fail); + OUT_RING(zfail); + OUT_RING(zpass); + } + if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL, 1); + OUT_RING(fail); + OUT_RING(zfail); + OUT_RING(zpass); + } +} + /** Control the generation of texture coordinates */ void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, const GLfloat *params); @@ -531,9 +580,11 @@ void nv30InitStateFuncs(struct dd_function_table *func) func->RenderMode = nv30RenderMode; func->Scissor = nv30Scissor; func->ShadeModel = nv30ShaderModel; +#endif func->StencilFuncSeparate = nv30StencilFuncSeparate; func->StencilMaskSeparate = nv30StencilMaskSeparate; func->StencilOpSeparate = nv30StencilOpSeparate; +#if 0 func->TexGen = nv30TexGen; func->TexParameter = nv30TexParameter; func->TextureMatrix = nv30TextureMatrix; -- cgit v1.2.3 From 10172f7485367182a5745a2114ed7e90830682f8 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 17 Nov 2006 04:50:37 +0000 Subject: Adapt FIFO code to deal with cases where the base GET/PUT value isn't 0. --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 1 + src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 16 ++++++++++------ src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 12 +++++++----- 3 files changed, 18 insertions(+), 11 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 1da5b6d61d..85d71cb04c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -43,6 +43,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. typedef struct nouveau_fifo_t{ u_int32_t* buffer; u_int32_t* mmio; + u_int32_t put_base; u_int32_t current; u_int32_t put; u_int32_t free; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 52c227cccc..8d2e88b1f3 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -46,19 +46,19 @@ void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) #endif u_int32_t fifo_get; while(nmesa->fifo.free < size+1) { - fifo_get = NV_FIFO_READ(NV03_FIFO_REGS_DMAGET); + fifo_get = NV_FIFO_READ_GET(); if(nmesa->fifo.put >= fifo_get) { nmesa->fifo.free = nmesa->fifo.max - nmesa->fifo.current; if(nmesa->fifo.free < size+1) { - OUT_RING(NV03_FIFO_CMD_REWIND); \ + OUT_RING(NV03_FIFO_CMD_JUMP | nmesa->fifo.put_base); if(fifo_get <= RING_SKIPS) { if(nmesa->fifo.put <= RING_SKIPS) /* corner case - will be idle */ - NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, RING_SKIPS + 1); - do { fifo_get = NV_FIFO_READ(NV03_FIFO_REGS_DMAGET); } + NV_FIFO_WRITE_PUT(RING_SKIPS + 1); + do { fifo_get = NV_FIFO_READ_GET(); } while(fifo_get <= RING_SKIPS); } - NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, RING_SKIPS); + NV_FIFO_WRITE_PUT(RING_SKIPS); nmesa->fifo.current = nmesa->fifo.put = RING_SKIPS; nmesa->fifo.free = fifo_get - (RING_SKIPS + 1); } @@ -134,7 +134,11 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa) } /* Setup our initial FIFO tracking params */ - nmesa->fifo.free = fifo_init.cmdbuf_size >> 2; + nmesa->fifo.put_base = fifo_init.put_base; + nmesa->fifo.current = 0; + nmesa->fifo.put = 0; + nmesa->fifo.max = (fifo_init.cmdbuf_size >> 2) - 1; + nmesa->fifo.free = nmesa->fifo.max - nmesa->fifo.current; MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); return GL_TRUE; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 0edb083388..c1e9fd5dc5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -38,6 +38,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) #define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) = value; +#define NV_FIFO_READ_GET() ((NV_FIFO_READ(NV03_FIFO_REGS_DMAGET) - nmesa->fifo.put_base) >> 2) +#define NV_FIFO_WRITE_PUT(val) NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, ((val)<<2) + nmesa->fifo.put_base) /* * Ring/fifo interface @@ -107,11 +109,11 @@ extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); #define RING_AHEAD() ((nmesa->fifo.put<=nmesa->fifo.current)?(nmesa->fifo.current-nmesa->fifo.put):nmesa->fifo.max-nmesa->fifo.put+nmesa->fifo.current) -#define FIRE_RING() do { \ - if (nmesa->fifo.current!=nmesa->fifo.put) {\ - nmesa->fifo.put=nmesa->fifo.current;\ - NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT,nmesa->fifo.put);\ - }\ +#define FIRE_RING() do { \ + if (nmesa->fifo.current!=nmesa->fifo.put) { \ + nmesa->fifo.put=nmesa->fifo.current; \ + NV_FIFO_WRITE_PUT(nmesa->fifo.put); \ + } \ }while(0) extern void nouveauWaitForIdle(nouveauContextPtr nmesa); -- cgit v1.2.3 From a4806c994e796f06675ebf8860fafc3dffe9ed05 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Nov 2006 15:23:32 +0000 Subject: add STATE_INTERNAL_DRIVER, etc (Rune Petersen) --- src/mesa/shader/program.c | 10 +++++++--- src/mesa/shader/program.h | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index e8824426d4..789d36eba0 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -993,7 +993,9 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], break; } default: - _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()"); + /* unknown state indexes are silently ignored + * should be handled by the driver. + */ return; } } @@ -1070,7 +1072,9 @@ make_state_flags(const GLint state[]) case STATE_TEXRECT_SCALE: return _NEW_TEXTURE; default: - _mesa_problem(NULL, "unexpected int. state in make_state_flags()"); + /* unknown state indexes are silently ignored and + * no flag set, since it is handled by the driver. + */ return 0; } @@ -1342,7 +1346,7 @@ make_state_string(const GLint state[6]) case STATE_INTERNAL: break; default: - _mesa_problem(NULL, "Invalid state in maka_state_string"); + _mesa_problem(NULL, "Invalid state in make_state_string"); break; } diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index a38a1a63f9..af06c03598 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -189,7 +189,8 @@ enum state_index { STATE_INTERNAL, /* Mesa additions */ STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, - STATE_POSITION_NORMALIZED /* normalized light position */ + STATE_POSITION_NORMALIZED, /* normalized light position */ + STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ }; -- cgit v1.2.3 From 83f52ffc529375c36f8822370739da587797e45b Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 17 Nov 2006 18:55:34 +0000 Subject: Comment and indent the atom functions. --- src/mesa/shader/slang/slang_utility.c | 125 +++++++++++++++++++--------------- 1 file changed, 71 insertions(+), 54 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 54fcc8a238..256d52455d 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -131,75 +131,92 @@ slang_string_cstr (slang_string *self) /* slang_atom_pool */ -void slang_atom_pool_construct (slang_atom_pool *pool) +void +slang_atom_pool_construct(slang_atom_pool * pool) { - GLuint i; + GLuint i; - for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++) - pool->entries[i] = NULL; + for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++) + pool->entries[i] = NULL; } -void slang_atom_pool_destruct (slang_atom_pool *pool) +void +slang_atom_pool_destruct (slang_atom_pool * pool) { - GLuint i; + GLuint i; - for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++) - { - slang_atom_entry *entry; + for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++) { + slang_atom_entry * entry; - entry = pool->entries[i]; - while (entry != NULL) - { - slang_atom_entry *next; - - next = entry->next; - slang_alloc_free (entry->id); - slang_alloc_free (entry); - entry = next; + entry = pool->entries[i]; + while (entry != NULL) { + slang_atom_entry *next; + + next = entry->next; + slang_alloc_free(entry->id); + slang_alloc_free(entry); + entry = next; } } } -slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id) +/* + * Search the atom pool for an atom with a given name. + * If atom is not found, create and add it to the pool. + * Returns ATOM_NULL if the atom was not found and the function failed to create a new atom. + */ +slang_atom +slang_atom_pool_atom(slang_atom_pool * pool, const char * id) { - GLuint hash; - const char *p = id; - slang_atom_entry **entry; - - hash = 0; - while (*p != '\0') - { - GLuint g; - - hash = (hash << 4) + (GLuint) *p++; - g = hash & 0xf0000000; - if (g != 0) - hash ^= g >> 24; - hash &= ~g; - } - hash %= SLANG_ATOM_POOL_SIZE; - - entry = &pool->entries[hash]; - while (*entry != NULL) - { - if (slang_string_compare ((**entry).id, id) == 0) - return (slang_atom) (**entry).id; - entry = &(**entry).next; - } - - *entry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry)); - if (*entry == NULL) - return SLANG_ATOM_NULL; + GLuint hash; + const char * p = id; + slang_atom_entry ** entry; + + /* Hash a given string to a number in the range [0, ATOM_POOL_SIZE). */ + hash = 0; + while (*p != '\0') { + GLuint g; + + hash = (hash << 4) + (GLuint) (*p++); + g = hash & 0xf0000000; + if (g != 0) + hash ^= g >> 24; + hash &= ~g; + } + hash %= SLANG_ATOM_POOL_SIZE; + + /* Now the hash points to a linked list of atoms with names that have the same hash value. + * Search the linked list for a given name. */ + entry = &pool->entries[hash]; + while (*entry != NULL) { + /* If the same, return the associated atom. */ + if (slang_string_compare((**entry).id, id) == 0) + return (slang_atom) (**entry).id; + /* Grab the next atom in the linked list. */ + entry = &(**entry).next; + } - (**entry).next = NULL; - (**entry).id = slang_string_duplicate (id); - if ((**entry).id == NULL) - return SLANG_ATOM_NULL; - return (slang_atom) (**entry).id; + /* Okay, we have not found an atom. Create a new entry for it. + * Note that the points to the last entry's field. */ + *entry = (slang_atom_entry *) (slang_alloc_malloc(sizeof(slang_atom_entry))); + if (*entry == NULL) + return SLANG_ATOM_NULL; + + /* Initialize a new entry. Because we'll need the actual name of the atom, we use the pointer + * to this string as an actual atom's value. */ + (**entry).next = NULL; + (**entry).id = slang_string_duplicate(id); + if ((**entry).id == NULL) + return SLANG_ATOM_NULL; + return (slang_atom) (**entry).id; } -const char *slang_atom_pool_id (slang_atom_pool *pool, slang_atom atom) +/* + * Return the name of a given atom. + */ +const char * +slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) { - return (const char *) atom; + return (const char *) (atom); } -- cgit v1.2.3 From 08d64dfbf623e21e4647ea8546283c42a15acecc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Nov 2006 19:06:32 +0000 Subject: reindent, doxygen-style comments --- src/mesa/shader/slang/slang_execute.c | 1018 +++++++++++++++++---------------- src/mesa/shader/slang/slang_execute.h | 66 ++- 2 files changed, 572 insertions(+), 512 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c index 98bfd896c4..d6689bc8a4 100644 --- a/src/mesa/shader/slang/slang_execute.c +++ b/src/mesa/shader/slang/slang_execute.c @@ -36,571 +36,611 @@ #define DEBUG_SLANG 0 -GLvoid slang_machine_ctr (slang_machine *self) +GLvoid +slang_machine_ctr(slang_machine * self) { - slang_machine_init (self); + slang_machine_init(self); self->infolog = NULL; #if defined(USE_X86_ASM) || defined(SLANG_X86) - self->x86.compiled_func = NULL; + self->x86.compiled_func = NULL; #endif } -GLvoid slang_machine_dtr (slang_machine *self) +GLvoid +slang_machine_dtr(slang_machine * self) { if (self->infolog != NULL) { - slang_info_log_destruct (self->infolog); - slang_alloc_free (self->infolog); + slang_info_log_destruct(self->infolog); + slang_alloc_free(self->infolog); } #if defined(USE_X86_ASM) || defined(SLANG_X86) - if (self->x86.compiled_func != NULL) - _mesa_exec_free (self->x86.compiled_func); + if (self->x86.compiled_func != NULL) + _mesa_exec_free(self->x86.compiled_func); #endif } -void slang_machine_init (slang_machine *mach) +void +slang_machine_init(slang_machine * mach) { - mach->ip = 0; - mach->sp = SLANG_MACHINE_STACK_SIZE; - mach->bp = 0; - mach->kill = 0; - mach->exit = 0; + mach->ip = 0; + mach->sp = SLANG_MACHINE_STACK_SIZE; + mach->bp = 0; + mach->kill = GL_FALSE; + mach->exit = GL_FALSE; } #if DEBUG_SLANG -static void dump_instruction (FILE *f, slang_assembly *a, unsigned int i) +foo static void +dump_instruction(FILE * f, slang_assembly * a, unsigned int i) { - fprintf (f, "%.5u:\t", i); - - switch (a->type) - { - /* core */ - case slang_asm_none: - fprintf (f, "none"); - break; - case slang_asm_float_copy: - fprintf (f, "float_copy\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_float_move: - fprintf (f, "float_move\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_float_push: - fprintf (f, "float_push\t%f", a->literal); - break; - case slang_asm_float_deref: - fprintf (f, "float_deref"); - break; - case slang_asm_float_add: - fprintf (f, "float_add"); - break; - case slang_asm_float_multiply: - fprintf (f, "float_multiply"); - break; - case slang_asm_float_divide: - fprintf (f, "float_divide"); - break; - case slang_asm_float_negate: - fprintf (f, "float_negate"); - break; - case slang_asm_float_less: - fprintf (f, "float_less"); - break; - case slang_asm_float_equal_exp: - fprintf (f, "float_equal"); - break; - case slang_asm_float_equal_int: - fprintf (f, "float_equal\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_float_to_int: - fprintf (f, "float_to_int"); - break; - case slang_asm_float_sine: - fprintf (f, "float_sine"); - break; - case slang_asm_float_arcsine: - fprintf (f, "float_arcsine"); - break; - case slang_asm_float_arctan: - fprintf (f, "float_arctan"); - break; - case slang_asm_float_power: - fprintf (f, "float_power"); - break; - case slang_asm_float_log2: - fprintf (f, "float_log2"); - break; - case slang_asm_float_floor: - fprintf (f, "float_floor"); - break; - case slang_asm_float_ceil: - fprintf (f, "float_ceil"); - break; - case slang_asm_float_noise1: - fprintf (f, "float_noise1"); - break; - case slang_asm_float_noise2: - fprintf (f, "float_noise2"); - break; - case slang_asm_float_noise3: - fprintf (f, "float_noise3"); - break; - case slang_asm_float_noise4: - fprintf (f, "float_noise4"); - break; - case slang_asm_int_copy: - fprintf (f, "int_copy\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_int_move: - fprintf (f, "int_move\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_int_push: - fprintf (f, "int_push\t%d", (GLint) a->literal); - break; - case slang_asm_int_deref: - fprintf (f, "int_deref"); - break; - case slang_asm_int_to_float: - fprintf (f, "int_to_float"); - break; - case slang_asm_int_to_addr: - fprintf (f, "int_to_addr"); - break; - case slang_asm_bool_copy: - fprintf (f, "bool_copy\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_bool_move: - fprintf (f, "bool_move\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_bool_push: - fprintf (f, "bool_push\t%d", a->literal != 0.0f); - break; - case slang_asm_bool_deref: - fprintf (f, "bool_deref"); - break; - case slang_asm_addr_copy: - fprintf (f, "addr_copy"); - break; - case slang_asm_addr_push: - fprintf (f, "addr_push\t%u", a->param[0]); - break; - case slang_asm_addr_deref: - fprintf (f, "addr_deref"); - break; - case slang_asm_addr_add: - fprintf (f, "addr_add"); - break; - case slang_asm_addr_multiply: - fprintf (f, "addr_multiply"); - break; - case slang_asm_vec4_tex1d: - fprintf (f, "vec4_tex1d"); - break; - case slang_asm_vec4_tex2d: - fprintf (f, "vec4_tex2d"); - break; - case slang_asm_vec4_tex3d: - fprintf (f, "vec4_tex3d"); - break; - case slang_asm_vec4_texcube: - fprintf (f, "vec4_texcube"); - break; - case slang_asm_vec4_shad1d: - fprintf (f, "vec4_shad1d"); - break; - case slang_asm_vec4_shad2d: - fprintf (f, "vec4_shad2d"); - break; - case slang_asm_jump: - fprintf (f, "jump\t%u", a->param[0]); - break; - case slang_asm_jump_if_zero: - fprintf (f, "jump_if_zero\t%u", a->param[0]); - break; - case slang_asm_enter: - fprintf (f, "enter\t%u", a->param[0]); - break; - case slang_asm_leave: - fprintf (f, "leave"); - break; - case slang_asm_local_alloc: - fprintf (f, "local_alloc\t%u", a->param[0]); - break; - case slang_asm_local_free: - fprintf (f, "local_free\t%u", a->param[0]); - break; - case slang_asm_local_addr: - fprintf (f, "local_addr\t%u, %u", a->param[0], a->param[1]); - break; - case slang_asm_global_addr: - fprintf (f, "global_addr\t%u", a->param[0]); - break; - case slang_asm_call: - fprintf (f, "call\t%u", a->param[0]); - break; - case slang_asm_return: - fprintf (f, "return"); - break; - case slang_asm_discard: - fprintf (f, "discard"); - break; - case slang_asm_exit: - fprintf (f, "exit"); - break; - /* GL_MESA_shader_debug */ - case slang_asm_float_print: - fprintf (f, "float_print"); - break; - case slang_asm_int_print: - fprintf (f, "int_print"); - break; - case slang_asm_bool_print: - fprintf (f, "bool_print"); - break; - /* vec4 */ + fprintf(f, "%.5u:\t", i); + + switch (a->type) { + /* core */ + case slang_asm_none: + fprintf(f, "none"); + break; + case slang_asm_float_copy: + fprintf(f, "float_copy\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_float_move: + fprintf(f, "float_move\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_float_push: + fprintf(f, "float_push\t%f", a->literal); + break; + case slang_asm_float_deref: + fprintf(f, "float_deref"); + break; + case slang_asm_float_add: + fprintf(f, "float_add"); + break; + case slang_asm_float_multiply: + fprintf(f, "float_multiply"); + break; + case slang_asm_float_divide: + fprintf(f, "float_divide"); + break; + case slang_asm_float_negate: + fprintf(f, "float_negate"); + break; + case slang_asm_float_less: + fprintf(f, "float_less"); + break; + case slang_asm_float_equal_exp: + fprintf(f, "float_equal"); + break; + case slang_asm_float_equal_int: + fprintf(f, "float_equal\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_float_to_int: + fprintf(f, "float_to_int"); + break; + case slang_asm_float_sine: + fprintf(f, "float_sine"); + break; + case slang_asm_float_arcsine: + fprintf(f, "float_arcsine"); + break; + case slang_asm_float_arctan: + fprintf(f, "float_arctan"); + break; + case slang_asm_float_power: + fprintf(f, "float_power"); + break; + case slang_asm_float_log2: + fprintf(f, "float_log2"); + break; + case slang_asm_float_floor: + fprintf(f, "float_floor"); + break; + case slang_asm_float_ceil: + fprintf(f, "float_ceil"); + break; + case slang_asm_float_noise1: + fprintf(f, "float_noise1"); + break; + case slang_asm_float_noise2: + fprintf(f, "float_noise2"); + break; + case slang_asm_float_noise3: + fprintf(f, "float_noise3"); + break; + case slang_asm_float_noise4: + fprintf(f, "float_noise4"); + break; + case slang_asm_int_copy: + fprintf(f, "int_copy\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_int_move: + fprintf(f, "int_move\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_int_push: + fprintf(f, "int_push\t%d", (GLint) a->literal); + break; + case slang_asm_int_deref: + fprintf(f, "int_deref"); + break; + case slang_asm_int_to_float: + fprintf(f, "int_to_float"); + break; + case slang_asm_int_to_addr: + fprintf(f, "int_to_addr"); + break; + case slang_asm_bool_copy: + fprintf(f, "bool_copy\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_bool_move: + fprintf(f, "bool_move\t%d, %d", a->param[0], a->param[1]); + break; + case slang_asm_bool_push: + fprintf(f, "bool_push\t%d", a->literal != 0.0f); + break; + case slang_asm_bool_deref: + fprintf(f, "bool_deref"); + break; + case slang_asm_addr_copy: + fprintf(f, "addr_copy"); + break; + case slang_asm_addr_push: + fprintf(f, "addr_push\t%u", a->param[0]); + break; + case slang_asm_addr_deref: + fprintf(f, "addr_deref"); + break; + case slang_asm_addr_add: + fprintf(f, "addr_add"); + break; + case slang_asm_addr_multiply: + fprintf(f, "addr_multiply"); + break; + case slang_asm_vec4_tex1d: + fprintf(f, "vec4_tex1d"); + break; + case slang_asm_vec4_tex2d: + fprintf(f, "vec4_tex2d"); + break; + case slang_asm_vec4_tex3d: + fprintf(f, "vec4_tex3d"); + break; + case slang_asm_vec4_texcube: + fprintf(f, "vec4_texcube"); + break; + case slang_asm_vec4_shad1d: + fprintf(f, "vec4_shad1d"); + break; + case slang_asm_vec4_shad2d: + fprintf(f, "vec4_shad2d"); + break; + case slang_asm_jump: + fprintf(f, "jump\t%u", a->param[0]); + break; + case slang_asm_jump_if_zero: + fprintf(f, "jump_if_zero\t%u", a->param[0]); + break; + case slang_asm_enter: + fprintf(f, "enter\t%u", a->param[0]); + break; + case slang_asm_leave: + fprintf(f, "leave"); + break; + case slang_asm_local_alloc: + fprintf(f, "local_alloc\t%u", a->param[0]); + break; + case slang_asm_local_free: + fprintf(f, "local_free\t%u", a->param[0]); + break; + case slang_asm_local_addr: + fprintf(f, "local_addr\t%u, %u", a->param[0], a->param[1]); + break; + case slang_asm_global_addr: + fprintf(f, "global_addr\t%u", a->param[0]); + break; + case slang_asm_call: + fprintf(f, "call\t%u", a->param[0]); + break; + case slang_asm_return: + fprintf(f, "return"); + break; + case slang_asm_discard: + fprintf(f, "discard"); + break; + case slang_asm_exit: + fprintf(f, "exit"); + break; + /* GL_MESA_shader_debug */ + case slang_asm_float_print: + fprintf(f, "float_print"); + break; + case slang_asm_int_print: + fprintf(f, "int_print"); + break; + case slang_asm_bool_print: + fprintf(f, "bool_print"); + break; + /* vec4 */ case slang_asm_float_to_vec4: - fprintf (f, "float_to_vec4"); + fprintf(f, "float_to_vec4"); break; case slang_asm_vec4_add: - fprintf (f, "vec4_add"); + fprintf(f, "vec4_add"); break; case slang_asm_vec4_subtract: - fprintf (f, "vec4_subtract"); + fprintf(f, "vec4_subtract"); break; case slang_asm_vec4_multiply: - fprintf (f, "vec4_multiply"); + fprintf(f, "vec4_multiply"); break; case slang_asm_vec4_divide: - fprintf (f, "vec4_divide"); + fprintf(f, "vec4_divide"); break; case slang_asm_vec4_negate: - fprintf (f, "vec4_negate"); + fprintf(f, "vec4_negate"); break; case slang_asm_vec4_dot: - fprintf (f, "vec4_dot"); + fprintf(f, "vec4_dot"); break; case slang_asm_vec4_copy: - fprintf (f, "vec4_copy"); + fprintf(f, "vec4_copy"); break; case slang_asm_vec4_deref: - fprintf (f, "vec4_deref"); + fprintf(f, "vec4_deref"); break; case slang_asm_vec4_equal_int: - fprintf (f, "vec4_equal"); + fprintf(f, "vec4_equal"); break; default: - break; - } + break; + } - fprintf (f, "\n"); + fprintf(f, "\n"); } -static void dump (const slang_assembly_file *file) +static void +dump(const slang_assembly_file * file) { - unsigned int i; - static unsigned int counter = 0; - FILE *f; - char filename[256]; + unsigned int i; + static unsigned int counter = 0; + FILE *f; + char filename[256]; - counter++; - _mesa_sprintf (filename, "~mesa-slang-assembly-dump-(%u).txt", counter); - f = fopen (filename, "w"); - if (f == NULL) - return; + counter++; + _mesa_sprintf(filename, "~mesa-slang-assembly-dump-(%u).txt", counter); + f = fopen(filename, "w"); + if (f == NULL) + return; - for (i = 0; i < file->count; i++) - dump_instruction (f, file->code + i, i); + for (i = 0; i < file->count; i++) + dump_instruction(f, file->code + i, i); - fclose (f); + fclose(f); } #endif static GLvoid -ensure_infolog_created (slang_info_log **infolog) +ensure_infolog_created(slang_info_log ** infolog) { if (*infolog == NULL) { - *infolog = slang_alloc_malloc (sizeof (slang_info_log)); + *infolog = slang_alloc_malloc(sizeof(slang_info_log)); if (*infolog == NULL) return; - slang_info_log_construct (*infolog); + slang_info_log_construct(*infolog); } } GLboolean -_slang_execute2 (const slang_assembly_file *file, slang_machine *mach) +_slang_execute2(const slang_assembly_file * file, slang_machine * mach) { - slang_machine_slot *stack; + slang_machine_slot *stack; #if DEBUG_SLANG - static unsigned int counter = 0; - char filename[256]; - FILE *f; + static unsigned int counter = 0; + char filename[256]; + FILE *f; #endif - /* assume 32-bit floats and uints; should work fine also on 64-bit platforms */ - static_assert(sizeof (GLfloat) == 4); - static_assert(sizeof (GLuint) == 4); + /* assume 32-bit floats and uints; should work fine also on 64-bit platforms */ + static_assert(sizeof(GLfloat) == 4); + static_assert(sizeof(GLuint) == 4); #if DEBUG_SLANG - dump (file); - counter++; - _mesa_sprintf (filename, "~mesa-slang-assembly-exec-(%u).txt", counter); - f = fopen (filename, "w"); + dump(file); + counter++; + _mesa_sprintf(filename, "~mesa-slang-assembly-exec-(%u).txt", counter); + f = fopen(filename, "w"); #endif #if defined(USE_X86_ASM) || defined(SLANG_X86) - if (mach->x86.compiled_func != NULL) - { - mach->x86.compiled_func (mach); - return GL_TRUE; - } + if (mach->x86.compiled_func != NULL) { + mach->x86.compiled_func(mach); + return GL_TRUE; + } #endif - stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE; + stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE; - while (!mach->exit) - { - slang_assembly *a = &file->code[mach->ip]; + while (!mach->exit) { + slang_assembly *a = &file->code[mach->ip]; #if DEBUG_SLANG - if (f != NULL && a->type != slang_asm_none) - { - unsigned int i; + if (f != NULL && a->type != slang_asm_none) { + unsigned int i; - dump_instruction (f, file->code + mach->ip, mach->ip); - fprintf (f, "\t\tsp=%u bp=%u\n", mach->sp, mach->bp); - for (i = mach->sp; i < SLANG_MACHINE_STACK_SIZE; i++) - fprintf (f, "\t%.5u\t%6f\t%u\n", i, stack[i]._float, stack[i]._addr); - fflush (f); - } + dump_instruction(f, file->code + mach->ip, mach->ip); + fprintf(f, "\t\tsp=%u bp=%u\n", mach->sp, mach->bp); + for (i = mach->sp; i < SLANG_MACHINE_STACK_SIZE; i++) + fprintf(f, "\t%.5u\t%6f\t%u\n", i, stack[i]._float, + stack[i]._addr); + fflush(f); + } #endif - mach->ip++; + mach->ip++; - switch (a->type) - { - /* core */ - case slang_asm_none: - break; - case slang_asm_float_copy: - case slang_asm_int_copy: - case slang_asm_bool_copy: - mach->mem[(stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / 4]._float = - stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_move: - case slang_asm_int_move: - case slang_asm_bool_move: - stack[mach->sp + a->param[0] / 4]._float = - stack[mach->sp + (stack[mach->sp]._addr + a->param[1]) / 4]._float; - break; - case slang_asm_float_push: - case slang_asm_int_push: - case slang_asm_bool_push: - mach->sp--; - stack[mach->sp]._float = a->literal; - break; - case slang_asm_float_deref: - case slang_asm_int_deref: - case slang_asm_bool_deref: - stack[mach->sp]._float = mach->mem[stack[mach->sp]._addr / 4]._float; - break; - case slang_asm_float_add: - stack[mach->sp + 1]._float += stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_multiply: - stack[mach->sp + 1]._float *= stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_divide: - stack[mach->sp + 1]._float /= stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_negate: - stack[mach->sp]._float = -stack[mach->sp]._float; - break; - case slang_asm_float_less: - stack[mach->sp + 1]._float = - stack[mach->sp + 1]._float < stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0; - mach->sp++; - break; - case slang_asm_float_equal_exp: - stack[mach->sp + 1]._float = - stack[mach->sp + 1]._float == stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0; - mach->sp++; - break; - case slang_asm_float_equal_int: - mach->sp--; - stack[mach->sp]._float = stack[mach->sp + 1 + a->param[0] / 4]._float == - stack[mach->sp + 1 + a->param[1] / 4]._float ? (GLfloat) 1 : (GLfloat) 0; - break; - case slang_asm_float_to_int: - stack[mach->sp]._float = (GLfloat) (GLint) stack[mach->sp]._float; - break; - case slang_asm_float_sine: - stack[mach->sp]._float = (GLfloat) _mesa_sin (stack[mach->sp]._float); - break; - case slang_asm_float_arcsine: - stack[mach->sp]._float = _mesa_asinf (stack[mach->sp]._float); - break; - case slang_asm_float_arctan: - stack[mach->sp]._float = _mesa_atanf (stack[mach->sp]._float); - break; - case slang_asm_float_power: - stack[mach->sp + 1]._float = - (GLfloat) _mesa_pow (stack[mach->sp + 1]._float, stack[mach->sp]._float); - mach->sp++; - break; - case slang_asm_float_log2: - stack[mach->sp]._float = LOG2 (stack[mach->sp]._float); - break; - case slang_asm_float_floor: - stack[mach->sp]._float = FLOORF (stack[mach->sp]._float); - break; - case slang_asm_float_ceil: - stack[mach->sp]._float = CEILF (stack[mach->sp]._float); - break; - case slang_asm_float_noise1: - stack[mach->sp]._float = _slang_library_noise1 (stack[mach->sp]._float); - break; - case slang_asm_float_noise2: - stack[mach->sp + 1]._float = _slang_library_noise2 (stack[mach->sp]._float, - stack[mach->sp + 1]._float); - mach->sp++; - break; - case slang_asm_float_noise3: - stack[mach->sp + 2]._float = _slang_library_noise3 (stack[mach->sp]._float, - stack[mach->sp + 1]._float, stack[mach->sp + 2]._float); - mach->sp += 2; - break; - case slang_asm_float_noise4: - stack[mach->sp + 3]._float = _slang_library_noise4 (stack[mach->sp]._float, - stack[mach->sp + 1]._float, stack[mach->sp + 2]._float, stack[mach->sp + 3]._float); - mach->sp += 3; - break; - case slang_asm_int_to_float: - break; - case slang_asm_int_to_addr: - stack[mach->sp]._addr = (GLuint) (GLint) stack[mach->sp]._float; - break; - case slang_asm_addr_copy: - mach->mem[stack[mach->sp + 1]._addr / 4]._addr = stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_addr_push: - case slang_asm_global_addr: - mach->sp--; - stack[mach->sp]._addr = a->param[0]; - break; - case slang_asm_addr_deref: - stack[mach->sp]._addr = mach->mem[stack[mach->sp]._addr / 4]._addr; - break; - case slang_asm_addr_add: - stack[mach->sp + 1]._addr += stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_addr_multiply: - stack[mach->sp + 1]._addr *= stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_vec4_tex1d: - _slang_library_tex1d (stack[mach->sp]._float, stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, &mach->mem[stack[mach->sp + 3]._addr / 4]._float); - mach->sp += 3; - break; - case slang_asm_vec4_tex2d: - _slang_library_tex2d (stack[mach->sp]._float, stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, - &mach->mem[stack[mach->sp + 4]._addr / 4]._float); - mach->sp += 4; - break; - case slang_asm_vec4_tex3d: - _slang_library_tex3d (stack[mach->sp]._float, stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / 4]._float); - mach->sp += 5; - break; - case slang_asm_vec4_texcube: - _slang_library_texcube (stack[mach->sp]._float, stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / 4]._float); - mach->sp += 5; - break; - case slang_asm_vec4_shad1d: - _slang_library_shad1d (stack[mach->sp]._float, stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / 4]._float); - mach->sp += 5; - break; - case slang_asm_vec4_shad2d: - _slang_library_shad2d (stack[mach->sp]._float, stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / 4]._float); - mach->sp += 5; - break; - case slang_asm_jump: - mach->ip = a->param[0]; - break; - case slang_asm_jump_if_zero: - if (stack[mach->sp]._float == 0.0f) - mach->ip = a->param[0]; - mach->sp++; - break; - case slang_asm_enter: - mach->sp--; - stack[mach->sp]._addr = mach->bp; - mach->bp = mach->sp + a->param[0] / 4; - break; - case slang_asm_leave: - mach->bp = stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_local_alloc: - mach->sp -= a->param[0] / 4; - break; - case slang_asm_local_free: - mach->sp += a->param[0] / 4; - break; - case slang_asm_local_addr: - mach->sp--; - stack[mach->sp]._addr = SLANG_MACHINE_GLOBAL_SIZE * 4 + mach->bp * 4 - - (a->param[0] + a->param[1]) + 4; - break; - case slang_asm_call: - mach->sp--; - stack[mach->sp]._addr = mach->ip; - mach->ip = a->param[0]; - break; - case slang_asm_return: - mach->ip = stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_discard: - mach->kill = 1; - break; - case slang_asm_exit: - mach->exit = 1; - break; - /* GL_MESA_shader_debug */ - case slang_asm_float_print: - _mesa_printf ("slang print: %f\n", stack[mach->sp]._float); - ensure_infolog_created (&mach->infolog); - slang_info_log_print (mach->infolog, "%f", stack[mach->sp]._float); - break; - case slang_asm_int_print: - _mesa_printf ("slang print: %d\n", (GLint) stack[mach->sp]._float); - ensure_infolog_created (&mach->infolog); - slang_info_log_print (mach->infolog, "%d", (GLint) (stack[mach->sp]._float)); - break; - case slang_asm_bool_print: - _mesa_printf ("slang print: %s\n", (GLint) stack[mach->sp]._float ? "true" : "false"); - ensure_infolog_created (&mach->infolog); - slang_info_log_print (mach->infolog, "%s", - (GLint) (stack[mach->sp]._float) ? "true" : "false"); - break; - /* vec4 */ + switch (a->type) { + /* core */ + case slang_asm_none: + break; + case slang_asm_float_copy: + case slang_asm_int_copy: + case slang_asm_bool_copy: + mach->mem[(stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / + 4]._float = stack[mach->sp]._float; + mach->sp++; + break; + case slang_asm_float_move: + case slang_asm_int_move: + case slang_asm_bool_move: + stack[mach->sp + a->param[0] / 4]._float = + stack[mach->sp + + (stack[mach->sp]._addr + a->param[1]) / 4]._float; + break; + case slang_asm_float_push: + case slang_asm_int_push: + case slang_asm_bool_push: + mach->sp--; + stack[mach->sp]._float = a->literal; + break; + case slang_asm_float_deref: + case slang_asm_int_deref: + case slang_asm_bool_deref: + stack[mach->sp]._float = mach->mem[stack[mach->sp]._addr / 4]._float; + break; + case slang_asm_float_add: + stack[mach->sp + 1]._float += stack[mach->sp]._float; + mach->sp++; + break; + case slang_asm_float_multiply: + stack[mach->sp + 1]._float *= stack[mach->sp]._float; + mach->sp++; + break; + case slang_asm_float_divide: + stack[mach->sp + 1]._float /= stack[mach->sp]._float; + mach->sp++; + break; + case slang_asm_float_negate: + stack[mach->sp]._float = -stack[mach->sp]._float; + break; + case slang_asm_float_less: + stack[mach->sp + 1]._float = + stack[mach->sp + 1]._float < + stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0; + mach->sp++; + break; + case slang_asm_float_equal_exp: + stack[mach->sp + 1]._float = + (stack[mach->sp + 1]._float == stack[mach->sp]._float) + ? (GLfloat) 1 : (GLfloat) 0; + mach->sp++; + break; + case slang_asm_float_equal_int: + mach->sp--; + stack[mach->sp]._float = + (stack[mach->sp + 1 + a->param[0] / 4]._float == + stack[mach->sp + 1 + a->param[1] / 4]._float) + ? (GLfloat) 1 : (GLfloat) 0; + break; + case slang_asm_float_to_int: + stack[mach->sp]._float = (GLfloat) (GLint) stack[mach->sp]._float; + break; + case slang_asm_float_sine: + stack[mach->sp]._float = (GLfloat) _mesa_sin(stack[mach->sp]._float); + break; + case slang_asm_float_arcsine: + stack[mach->sp]._float = _mesa_asinf(stack[mach->sp]._float); + break; + case slang_asm_float_arctan: + stack[mach->sp]._float = _mesa_atanf(stack[mach->sp]._float); + break; + case slang_asm_float_power: + stack[mach->sp + 1]._float = (GLfloat) + _mesa_pow(stack[mach->sp + 1]._float, stack[mach->sp]._float); + mach->sp++; + break; + case slang_asm_float_log2: + stack[mach->sp]._float = LOG2(stack[mach->sp]._float); + break; + case slang_asm_float_floor: + stack[mach->sp]._float = FLOORF(stack[mach->sp]._float); + break; + case slang_asm_float_ceil: + stack[mach->sp]._float = CEILF(stack[mach->sp]._float); + break; + case slang_asm_float_noise1: + stack[mach->sp]._float = + _slang_library_noise1(stack[mach->sp]._float); + break; + case slang_asm_float_noise2: + stack[mach->sp + 1]._float = + _slang_library_noise2(stack[mach->sp]._float, + stack[mach->sp + 1]._float); + mach->sp++; + break; + case slang_asm_float_noise3: + stack[mach->sp + 2]._float = + _slang_library_noise3(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float); + mach->sp += 2; + break; + case slang_asm_float_noise4: + stack[mach->sp + 3]._float = + _slang_library_noise4(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + stack[mach->sp + 3]._float); + mach->sp += 3; + break; + case slang_asm_int_to_float: + break; + case slang_asm_int_to_addr: + stack[mach->sp]._addr = (GLuint) (GLint) stack[mach->sp]._float; + break; + case slang_asm_addr_copy: + mach->mem[stack[mach->sp + 1]._addr / 4]._addr = + stack[mach->sp]._addr; + mach->sp++; + break; + case slang_asm_addr_push: + case slang_asm_global_addr: + mach->sp--; + stack[mach->sp]._addr = a->param[0]; + break; + case slang_asm_addr_deref: + stack[mach->sp]._addr = mach->mem[stack[mach->sp]._addr / 4]._addr; + break; + case slang_asm_addr_add: + stack[mach->sp + 1]._addr += stack[mach->sp]._addr; + mach->sp++; + break; + case slang_asm_addr_multiply: + stack[mach->sp + 1]._addr *= stack[mach->sp]._addr; + mach->sp++; + break; + case slang_asm_vec4_tex1d: + _slang_library_tex1d(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + &mach->mem[stack[mach->sp + 3]._addr / + 4]._float); + mach->sp += 3; + break; + case slang_asm_vec4_tex2d: + _slang_library_tex2d(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + stack[mach->sp + 3]._float, + &mach->mem[stack[mach->sp + 4]._addr / + 4]._float); + mach->sp += 4; + break; + case slang_asm_vec4_tex3d: + _slang_library_tex3d(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + stack[mach->sp + 3]._float, + stack[mach->sp + 4]._float, + &mach->mem[stack[mach->sp + 5]._addr / + 4]._float); + mach->sp += 5; + break; + case slang_asm_vec4_texcube: + _slang_library_texcube(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + stack[mach->sp + 3]._float, + stack[mach->sp + 4]._float, + &mach->mem[stack[mach->sp + 5]._addr / + 4]._float); + mach->sp += 5; + break; + case slang_asm_vec4_shad1d: + _slang_library_shad1d(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + stack[mach->sp + 3]._float, + stack[mach->sp + 4]._float, + &mach->mem[stack[mach->sp + 5]._addr / + 4]._float); + mach->sp += 5; + break; + case slang_asm_vec4_shad2d: + _slang_library_shad2d(stack[mach->sp]._float, + stack[mach->sp + 1]._float, + stack[mach->sp + 2]._float, + stack[mach->sp + 3]._float, + stack[mach->sp + 4]._float, + &mach->mem[stack[mach->sp + 5]._addr / + 4]._float); + mach->sp += 5; + break; + case slang_asm_jump: + mach->ip = a->param[0]; + break; + case slang_asm_jump_if_zero: + if (stack[mach->sp]._float == 0.0f) + mach->ip = a->param[0]; + mach->sp++; + break; + case slang_asm_enter: + mach->sp--; + stack[mach->sp]._addr = mach->bp; + mach->bp = mach->sp + a->param[0] / 4; + break; + case slang_asm_leave: + mach->bp = stack[mach->sp]._addr; + mach->sp++; + break; + case slang_asm_local_alloc: + mach->sp -= a->param[0] / 4; + break; + case slang_asm_local_free: + mach->sp += a->param[0] / 4; + break; + case slang_asm_local_addr: + mach->sp--; + stack[mach->sp]._addr = + SLANG_MACHINE_GLOBAL_SIZE * 4 + mach->bp * 4 - (a->param[0] + + a->param[1]) + 4; + break; + case slang_asm_call: + mach->sp--; + stack[mach->sp]._addr = mach->ip; + mach->ip = a->param[0]; + break; + case slang_asm_return: + mach->ip = stack[mach->sp]._addr; + mach->sp++; + break; + case slang_asm_discard: + mach->kill = GL_TRUE; + break; + case slang_asm_exit: + mach->exit = GL_TRUE; + break; + /* GL_MESA_shader_debug */ + case slang_asm_float_print: + _mesa_printf("slang print: %f\n", stack[mach->sp]._float); + ensure_infolog_created(&mach->infolog); + slang_info_log_print(mach->infolog, "%f", stack[mach->sp]._float); + break; + case slang_asm_int_print: + _mesa_printf("slang print: %d\n", (GLint) stack[mach->sp]._float); + ensure_infolog_created(&mach->infolog); + slang_info_log_print(mach->infolog, "%d", + (GLint) (stack[mach->sp]._float)); + break; + case slang_asm_bool_print: + _mesa_printf("slang print: %s\n", + (GLint) stack[mach->sp]._float ? "true" : "false"); + ensure_infolog_created(&mach->infolog); + slang_info_log_print(mach->infolog, "%s", + (GLint) (stack[mach->sp]. + _float) ? "true" : "false"); + break; + /* vec4 */ case slang_asm_float_to_vec4: /* [vec4] | float > [vec4] */ { @@ -660,7 +700,8 @@ _slang_execute2 (const slang_assembly_file *file, slang_machine *mach) mach->mem[da / 4]._float = -mach->mem[da / 4]._float; mach->mem[(da + 4) / 4]._float = -mach->mem[(da + 4) / 4]._float; mach->mem[(da + 8) / 4]._float = -mach->mem[(da + 8) / 4]._float; - mach->mem[(da + 12) / 4]._float = -mach->mem[(da + 12) / 4]._float; + mach->mem[(da + 12) / 4]._float = + -mach->mem[(da + 12) / 4]._float; } break; case slang_asm_vec4_dot: @@ -721,9 +762,8 @@ _slang_execute2 (const slang_assembly_file *file, slang_machine *mach) #if DEBUG_SLANG if (f != NULL) - fclose (f); + fclose(f); #endif return GL_TRUE; } - diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h index cb152c7142..138f139308 100644 --- a/src/mesa/shader/slang/slang_execute.h +++ b/src/mesa/shader/slang/slang_execute.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_EXECUTE_H +#ifndef SLANG_EXECUTE_H #define SLANG_EXECUTE_H #include "slang_assemble.h" @@ -31,55 +31,75 @@ extern "C" { #endif + +/** + * A memory location + */ typedef union slang_machine_slot_ { - GLfloat _float; - GLuint _addr; + GLfloat _float; + GLuint _addr; } slang_machine_slot; #define SLANG_MACHINE_GLOBAL_SIZE 3072 #define SLANG_MACHINE_STACK_SIZE 1024 #define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE) + #if defined(USE_X86_ASM) || defined(SLANG_X86) +/** + * Extra machine state for x86 execution. + */ typedef struct { - GLvoid (* compiled_func) (struct slang_machine_ *); - GLuint esp_restore; - GLshort fpucntl_rnd_neg; - GLshort fpucntl_restore; + GLvoid(*compiled_func) (struct slang_machine_ *); + GLuint esp_restore; + GLshort fpucntl_rnd_neg; + GLshort fpucntl_restore; } slang_machine_x86; #endif + +/** + * Runtime shader machine state. + */ typedef struct slang_machine_ { - GLuint ip; /* instruction pointer, for flow control */ - GLuint sp; /* stack pointer, for stack access */ - GLuint bp; /* base pointer, for local variable access */ - GLuint kill; /* discard the fragment */ - GLuint exit; /* terminate the shader */ - slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE]; - struct slang_info_log_ *infolog; /* printMESA() support */ + GLuint ip; /**< instruction pointer, for flow control */ + GLuint sp; /**< stack pointer, for stack access */ + GLuint bp; /**< base pointer, for local variable access */ + GLboolean kill; /**< discard the fragment? */ + GLboolean exit; /**< terminate the shader */ + /** Machine memory */ + slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE]; + struct slang_info_log_ *infolog; /**< printMESA() support */ #if defined(USE_X86_ASM) || defined(SLANG_X86) - slang_machine_x86 x86; + slang_machine_x86 x86; #endif } slang_machine; -GLvoid slang_machine_ctr (slang_machine *); -GLvoid slang_machine_dtr (slang_machine *); -void slang_machine_init (slang_machine *); +extern GLvoid +slang_machine_ctr(slang_machine *); + +extern GLvoid +slang_machine_dtr(slang_machine *); + +extern void +slang_machine_init(slang_machine *); + +extern GLboolean +_slang_execute2(const slang_assembly_file *, slang_machine *); -GLboolean -_slang_execute2 (const slang_assembly_file *, slang_machine *); #if defined(USE_X86_ASM) || defined(SLANG_X86) -GLboolean _slang_x86_codegen (slang_machine *, slang_assembly_file *, GLuint); +extern GLboolean +_slang_x86_codegen(slang_machine *, slang_assembly_file *, GLuint); #endif + #ifdef __cplusplus } #endif #endif - -- cgit v1.2.3 From 0f614df7974a7126324a7fa5d80ee5c588a76f03 Mon Sep 17 00:00:00 2001 From: Rune Petersen Date: Fri, 17 Nov 2006 19:08:05 +0000 Subject: r300_select_vertex_shader4: Makes the vertex program output from the fragment input. It makes the driver capable of catching output-input mismatches safely. Primarily based on some of Aapo Tahkola's code. --- src/mesa/drivers/dri/r300/r300_context.h | 24 +- src/mesa/drivers/dri/r300/r300_maos.c | 4 +- src/mesa/drivers/dri/r300/r300_shader.c | 17 +- src/mesa/drivers/dri/r300/r300_state.c | 9 +- src/mesa/drivers/dri/r300/r300_vertexprog.c | 328 +++++++++++++++------------- 5 files changed, 215 insertions(+), 167 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index df73cdedc1..2c8120ef18 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -592,7 +592,8 @@ struct r300_vertex_shader_state { extern int hw_tcl_on; -#define CURRENT_VERTEX_SHADER(ctx) (ctx->VertexProgram._Current) +//#define CURRENT_VERTEX_SHADER(ctx) (ctx->VertexProgram._Current) +#define CURRENT_VERTEX_SHADER(ctx) (R300_CONTEXT(ctx)->selected_vp) /* Should but doesnt work */ //#define CURRENT_VERTEX_SHADER(ctx) (R300_CONTEXT(ctx)->curr_vp) @@ -607,12 +608,18 @@ extern int hw_tcl_on; /* r300_vertex_shader_state and r300_vertex_program should probably be merged together someday. * Keeping them them seperate for now should ensure fixed pipeline keeps functioning properly. */ + +struct r300_vertex_program_key { + GLuint InputsRead; + GLuint OutputsWritten; +}; + struct r300_vertex_program { - struct gl_vertex_program mesa_program; /* Must be first */ + struct r300_vertex_program *next; + struct r300_vertex_program_key key; int translated; struct r300_vertex_shader_fragment program; - struct r300_vertex_shader_fragment params; int pos_end; int num_temporaries; /* Number of temp vars used by program */ @@ -623,6 +630,12 @@ struct r300_vertex_program { int use_ref_count; }; +struct r300_vertex_program_cont { + struct gl_vertex_program mesa_program; /* Must be first */ + struct r300_vertex_shader_fragment params; + struct r300_vertex_program *progs; +}; + #define PFS_MAX_ALU_INST 64 #define PFS_MAX_TEX_INST 64 #define PFS_MAX_TEX_INDIRECT 4 @@ -797,6 +810,7 @@ struct r300_context { struct r300_cmdbuf cmdbuf; struct r300_state state; struct gl_vertex_program *curr_vp; + struct r300_vertex_program *selected_vp; /* Vertex buffers */ @@ -854,9 +868,9 @@ extern GLboolean r300CreateContext(const __GLcontextModes * glVisual, extern int r300_get_num_verts(r300ContextPtr rmesa, int num_verts, int prim); -void r300_translate_vertex_shader(struct r300_vertex_program *vp); +extern void r300_select_vertex_shader(r300ContextPtr r300); extern void r300InitShaderFuncs(struct dd_function_table *functions); -extern int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program *vp, float *dst); +extern int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program_cont *vp, float *dst); extern int r300Fallback(GLcontext *ctx); extern void radeon_vb_to_rvb(r300ContextPtr rmesa, struct radeon_vertex_buffer *rvb, struct vertex_buffer *vb); diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c index 2fdad519fd..fcb87cbbb5 100644 --- a/src/mesa/drivers/dri/r300/r300_maos.c +++ b/src/mesa/drivers/dri/r300/r300_maos.c @@ -407,8 +407,8 @@ int r300EmitArrays(GLcontext *ctx) if (hw_tcl_on) { struct r300_vertex_program *prog=(struct r300_vertex_program *)CURRENT_VERTEX_SHADER(ctx); inputs = prog->inputs; - InputsRead = CURRENT_VERTEX_SHADER(ctx)->Base.InputsRead; - OutputsWritten = CURRENT_VERTEX_SHADER(ctx)->Base.OutputsWritten; + InputsRead = CURRENT_VERTEX_SHADER(ctx)->key.InputsRead; + OutputsWritten = CURRENT_VERTEX_SHADER(ctx)->key.OutputsWritten; } else { DECLARE_RENDERINPUTS(inputs_bitset); inputs = r300->state.sw_tcl_inputs; diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c index 576b18953f..26721e8dfd 100644 --- a/src/mesa/drivers/dri/r300/r300_shader.c +++ b/src/mesa/drivers/dri/r300/r300_shader.c @@ -12,13 +12,13 @@ r300BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog) { r300ContextPtr rmesa = R300_CONTEXT(ctx); - struct r300_vertex_program *vp=(void *)prog; + struct r300_vertex_program_cont *vp=(void *)prog; switch(target){ case GL_VERTEX_PROGRAM_ARB: - rmesa->curr_vp = (struct gl_vertex_program *)vp; - vp->ref_count++; + //rmesa->curr_vp = (struct gl_vertex_program *)vp; + //vp->ref_count++; #if 0 if((vp->ref_count % 1500) == 0) { fprintf(stderr, "id %p, ref_count %d\n", vp, vp->ref_count); @@ -37,13 +37,13 @@ r300BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog) static struct gl_program * r300NewProgram(GLcontext *ctx, GLenum target, GLuint id) { - struct r300_vertex_program *vp; + struct r300_vertex_program_cont *vp; struct r300_fragment_program *fp; switch(target){ case GL_VERTEX_STATE_PROGRAM_NV: case GL_VERTEX_PROGRAM_ARB: - vp=CALLOC_STRUCT(r300_vertex_program); + vp=CALLOC_STRUCT(r300_vertex_program_cont); return _mesa_init_vertex_program(ctx, &vp->mesa_program, target, id); case GL_FRAGMENT_PROGRAM_ARB: fp=CALLOC_STRUCT(r300_fragment_program); @@ -77,13 +77,14 @@ r300DeleteProgram(GLcontext *ctx, struct gl_program *prog) static void r300ProgramStringNotify(GLcontext *ctx, GLenum target, struct gl_program *prog) { - struct r300_vertex_program *vp=(void *)prog; + struct r300_vertex_program_cont *vp=(void *)prog; struct r300_fragment_program *fp = (struct r300_fragment_program *) prog; switch(target) { case GL_VERTEX_PROGRAM_ARB: - vp->translated = GL_FALSE; - memset(&vp->translated, 0, sizeof(struct r300_vertex_program) - sizeof(struct gl_vertex_program)); + vp->progs = NULL; + /*vp->translated = GL_FALSE; + memset(&vp->translated, 0, sizeof(struct r300_vertex_program) - sizeof(struct gl_vertex_program));*/ /*r300_translate_vertex_shader(vp);*/ break; case GL_FRAGMENT_PROGRAM_ARB: diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index b06336457d..aa49f05b51 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1285,7 +1285,7 @@ void r300_setup_rs_unit(GLcontext *ctx) int i; if(hw_tcl_on) - OutputsWritten.vp_outputs = CURRENT_VERTEX_SHADER(ctx)->Base.OutputsWritten; + OutputsWritten.vp_outputs = CURRENT_VERTEX_SHADER(ctx)->key.OutputsWritten; else RENDERINPUTS_COPY( OutputsWritten.index_bitset, r300->state.render_inputs_bitset ); @@ -1610,7 +1610,7 @@ void r300SetupVertexProgram(r300ContextPtr rmesa) ((drm_r300_cmd_header_t*)rmesa->hw.vpp.cmd)->vpu.count = 0; R300_STATECHANGE(rmesa, vpp); - param_count = r300VertexProgUpdateParams(ctx, prog, (float *)&rmesa->hw.vpp.cmd[R300_VPP_PARAM_0]); + param_count = r300VertexProgUpdateParams(ctx, (struct r300_vertex_program_cont *)ctx->VertexProgram._Current/*prog*/, (float *)&rmesa->hw.vpp.cmd[R300_VPP_PARAM_0]); bump_vpu_count(rmesa->hw.vpp.cmd, param_count); param_count /= 4; @@ -1669,9 +1669,10 @@ void r300UpdateShaders(r300ContextPtr rmesa) TNL_CONTEXT(ctx)->vb.AttribPtr[i] = rmesa->temp_attrib[i]; } + r300_select_vertex_shader(rmesa); vp = (struct r300_vertex_program *)CURRENT_VERTEX_SHADER(ctx); - if (vp->translated == GL_FALSE) - r300_translate_vertex_shader(vp); + /*if (vp->translated == GL_FALSE) + r300_translate_vertex_shader(vp);*/ if (vp->translated == GL_FALSE) { fprintf(stderr, "Failing back to sw-tcl\n"); hw_tcl_on = future_hw_tcl_on = 0; diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index cc932b86d9..c38db7e17b 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -95,7 +95,7 @@ static struct{ }; #undef OPN -int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program *vp, float *dst) +int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program_cont *vp, float *dst) { int pi; struct gl_vertex_program *mesa_vp = &vp->mesa_program; @@ -177,17 +177,9 @@ static unsigned long t_dst_class(enum register_file file) static unsigned long t_dst_index(struct r300_vertex_program *vp, struct prog_dst_register *dst) { - if(dst->File == PROGRAM_OUTPUT) { - if (vp->outputs[dst->Index] != -1) - return vp->outputs[dst->Index]; - else { - WARN_ONCE("Unknown output %d\n", dst->Index); - return 10; - } - }else if(dst->File == PROGRAM_ADDRESS) { - assert(dst->Index == 0); - } - + if(dst->File == PROGRAM_OUTPUT) + return vp->outputs[dst->Index]; + return dst->Index; } @@ -335,6 +327,18 @@ static unsigned long op_operands(enum prog_opcode opcode) return 0; } +static GLboolean valid_dst(struct r300_vertex_program *vp, struct prog_dst_register *dst) +{ + if(dst->File == PROGRAM_OUTPUT && vp->outputs[dst->Index] == -1){ + WARN_ONCE("Output %d not used by fragment program\n", dst->Index); + return GL_FALSE; + }else if(dst->File == PROGRAM_ADDRESS) { + assert(dst->Index == 0); + } + + return GL_TRUE; +} + /* TODO: Get rid of t_src_class call */ #define CMP_SRCS(a, b) ((a.RelAddr != b.RelAddr) || (a.Index != b.Index && \ ((t_src_class(a.File) == VSF_IN_CLASS_PARAM && \ @@ -384,10 +388,8 @@ static unsigned long op_operands(enum prog_opcode opcode) u_temp_i=VSF_MAX_FRAGMENT_TEMPS-1; \ } while (0) -void r300_translate_vertex_shader(struct r300_vertex_program *vp) +static void r300_translate_vertex_shader(struct r300_vertex_program *vp, struct prog_instruction *vpi) { - struct gl_vertex_program *mesa_vp= &vp->mesa_program; - struct prog_instruction *vpi; int i, cur_reg=0; VERTEX_SHADER_INSTRUCTION *o_inst; unsigned long operands; @@ -399,131 +401,9 @@ void r300_translate_vertex_shader(struct r300_vertex_program *vp) int u_temp_i=VSF_MAX_FRAGMENT_TEMPS-1; struct prog_src_register src[3]; - if (mesa_vp->Base.NumInstructions == 0) - return; - - if (getenv("R300_VP_SAFETY")) { - WARN_ONCE("R300_VP_SAFETY enabled.\n"); - - vpi = malloc((mesa_vp->Base.NumInstructions + VSF_MAX_FRAGMENT_TEMPS) * sizeof(struct prog_instruction)); - memset(vpi, 0, VSF_MAX_FRAGMENT_TEMPS * sizeof(struct prog_instruction)); - - for (i=0; i < VSF_MAX_FRAGMENT_TEMPS; i++) { - vpi[i].Opcode = OPCODE_MOV; - vpi[i].StringPos = 0; - vpi[i].Data = 0; - - vpi[i].DstReg.File = PROGRAM_TEMPORARY; - vpi[i].DstReg.Index = i; - vpi[i].DstReg.WriteMask = WRITEMASK_XYZW; - vpi[i].DstReg.CondMask = COND_TR; - - vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR; - vpi[i].SrcReg[0].Index = 0; - vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_ONE, SWIZZLE_ONE, SWIZZLE_ONE, SWIZZLE_ONE); - } - - memcpy(&vpi[i], mesa_vp->Base.Instructions, mesa_vp->Base.NumInstructions * sizeof(struct prog_instruction)); - - free(mesa_vp->Base.Instructions); - - mesa_vp->Base.Instructions = vpi; - - mesa_vp->Base.NumInstructions += VSF_MAX_FRAGMENT_TEMPS; - vpi = &mesa_vp->Base.Instructions[mesa_vp->Base.NumInstructions-1]; - - assert(vpi->Opcode == OPCODE_END); - } - - if (mesa_vp->IsPositionInvariant) { - struct gl_program_parameter_list *paramList; - GLint tokens[6] = { STATE_MATRIX, STATE_MVP, 0, 0, 0, STATE_MATRIX }; - -#ifdef PREFER_DP4 - tokens[5] = STATE_MATRIX; -#else - tokens[5] = STATE_MATRIX_TRANSPOSE; -#endif - paramList = mesa_vp->Base.Parameters; - - vpi = malloc((mesa_vp->Base.NumInstructions + 4) * sizeof(struct prog_instruction)); - memset(vpi, 0, 4 * sizeof(struct prog_instruction)); - - for (i=0; i < 4; i++) { - GLint idx; - tokens[3] = tokens[4] = i; - idx = _mesa_add_state_reference(paramList, tokens); -#ifdef PREFER_DP4 - vpi[i].Opcode = OPCODE_DP4; - vpi[i].StringPos = 0; - vpi[i].Data = 0; - - vpi[i].DstReg.File = PROGRAM_OUTPUT; - vpi[i].DstReg.Index = VERT_RESULT_HPOS; - vpi[i].DstReg.WriteMask = 1 << i; - vpi[i].DstReg.CondMask = COND_TR; - - vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR; - vpi[i].SrcReg[0].Index = idx; - vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); - - vpi[i].SrcReg[1].File = PROGRAM_INPUT; - vpi[i].SrcReg[1].Index = VERT_ATTRIB_POS; - vpi[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); -#else - if (i == 0) - vpi[i].Opcode = OPCODE_MUL; - else - vpi[i].Opcode = OPCODE_MAD; - - vpi[i].StringPos = 0; - vpi[i].Data = 0; - - if (i == 3) - vpi[i].DstReg.File = PROGRAM_OUTPUT; - else - vpi[i].DstReg.File = PROGRAM_TEMPORARY; - vpi[i].DstReg.Index = 0; - vpi[i].DstReg.WriteMask = 0xf; - vpi[i].DstReg.CondMask = COND_TR; - - vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR; - vpi[i].SrcReg[0].Index = idx; - vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); - - vpi[i].SrcReg[1].File = PROGRAM_INPUT; - vpi[i].SrcReg[1].Index = VERT_ATTRIB_POS; - vpi[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(i, i, i, i); - - if (i > 0) { - vpi[i].SrcReg[2].File = PROGRAM_TEMPORARY; - vpi[i].SrcReg[2].Index = 0; - vpi[i].SrcReg[2].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); - } -#endif - } - - memcpy(&vpi[i], mesa_vp->Base.Instructions, mesa_vp->Base.NumInstructions * sizeof(struct prog_instruction)); - - free(mesa_vp->Base.Instructions); - - mesa_vp->Base.Instructions = vpi; - - mesa_vp->Base.NumInstructions += 4; - vpi = &mesa_vp->Base.Instructions[mesa_vp->Base.NumInstructions-1]; - - assert(vpi->Opcode == OPCODE_END); - - mesa_vp->Base.InputsRead |= (1 << VERT_ATTRIB_POS); - mesa_vp->Base.OutputsWritten |= (1 << VERT_RESULT_HPOS); - - //fprintf(stderr, "IsPositionInvariant is set!\n"); - //_mesa_print_program(&mesa_vp->Base); - } - vp->pos_end=0; /* Not supported yet */ vp->program.length=0; - vp->num_temporaries=mesa_vp->Base.NumTemporaries; + /*vp->num_temporaries=mesa_vp->Base.NumTemporaries;*/ for(i=0; i < VERT_ATTRIB_MAX; i++) vp->inputs[i] = -1; @@ -531,42 +411,49 @@ void r300_translate_vertex_shader(struct r300_vertex_program *vp) for(i=0; i < VERT_RESULT_MAX; i++) vp->outputs[i] = -1; - assert(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS)); + assert(vp->key.OutputsWritten & (1 << VERT_RESULT_HPOS)); /* Assign outputs */ - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_HPOS)) vp->outputs[VERT_RESULT_HPOS] = cur_reg++; - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_PSIZ)) vp->outputs[VERT_RESULT_PSIZ] = cur_reg++; - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_COL0)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_COL0)) vp->outputs[VERT_RESULT_COL0] = cur_reg++; - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_COL1)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_COL1)) vp->outputs[VERT_RESULT_COL1] = cur_reg++; #if 0 /* Not supported yet */ - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_BFC0)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_BFC0)) vp->outputs[VERT_RESULT_BFC0] = cur_reg++; - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_BFC1)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_BFC1)) vp->outputs[VERT_RESULT_BFC1] = cur_reg++; - if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_FOGC)) + if(vp->key.OutputsWritten & (1 << VERT_RESULT_FOGC)) vp->outputs[VERT_RESULT_FOGC] = cur_reg++; #endif for(i=VERT_RESULT_TEX0; i <= VERT_RESULT_TEX7; i++) - if(mesa_vp->Base.OutputsWritten & (1 << i)) + if(vp->key.OutputsWritten & (1 << i)) vp->outputs[i] = cur_reg++; vp->translated = GL_TRUE; vp->native = GL_TRUE; o_inst=vp->program.body.i; - for(vpi=mesa_vp->Base.Instructions; vpi->Opcode != OPCODE_END; vpi++, o_inst++){ + for(; vpi->Opcode != OPCODE_END; vpi++, o_inst++){ FREE_TEMPS(); + + if(!valid_dst(vp, &vpi->DstReg)) + { + /* redirect result to unused temp */ + vpi->DstReg.File = PROGRAM_TEMPORARY; + vpi->DstReg.Index = u_temp_i; + } operands=op_operands(vpi->Opcode); are_srcs_scalar=operands & SCALAR_FLAG; @@ -987,3 +874,148 @@ void r300_translate_vertex_shader(struct r300_vertex_program *vp) #endif } +static void position_invariant(struct gl_program *prog) +{ + struct prog_instruction *vpi; + struct gl_program_parameter_list *paramList; + int i; + + GLint tokens[6] = { STATE_MATRIX, STATE_MVP, 0, 0, 0, STATE_MATRIX }; + +#ifdef PREFER_DP4 + tokens[5] = STATE_MATRIX; +#else + tokens[5] = STATE_MATRIX_TRANSPOSE; +#endif + paramList = prog->Parameters; + + vpi = malloc((prog->NumInstructions + 4) * sizeof(struct prog_instruction)); + memset(vpi, 0, 4 * sizeof(struct prog_instruction)); + + for (i=0; i < 4; i++) { + GLint idx; + tokens[3] = tokens[4] = i; + idx = _mesa_add_state_reference(paramList, tokens); +#ifdef PREFER_DP4 + vpi[i].Opcode = OPCODE_DP4; + vpi[i].StringPos = 0; + vpi[i].Data = 0; + + vpi[i].DstReg.File = PROGRAM_OUTPUT; + vpi[i].DstReg.Index = VERT_RESULT_HPOS; + vpi[i].DstReg.WriteMask = 1 << i; + vpi[i].DstReg.CondMask = COND_TR; + + vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR; + vpi[i].SrcReg[0].Index = idx; + vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); + + vpi[i].SrcReg[1].File = PROGRAM_INPUT; + vpi[i].SrcReg[1].Index = VERT_ATTRIB_POS; + vpi[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); +#else + if (i == 0) + vpi[i].Opcode = OPCODE_MUL; + else + vpi[i].Opcode = OPCODE_MAD; + + vpi[i].StringPos = 0; + vpi[i].Data = 0; + + if (i == 3) + vpi[i].DstReg.File = PROGRAM_OUTPUT; + else + vpi[i].DstReg.File = PROGRAM_TEMPORARY; + vpi[i].DstReg.Index = 0; + vpi[i].DstReg.WriteMask = 0xf; + vpi[i].DstReg.CondMask = COND_TR; + + vpi[i].SrcReg[0].File = PROGRAM_STATE_VAR; + vpi[i].SrcReg[0].Index = idx; + vpi[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); + + vpi[i].SrcReg[1].File = PROGRAM_INPUT; + vpi[i].SrcReg[1].Index = VERT_ATTRIB_POS; + vpi[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(i, i, i, i); + + if (i > 0) { + vpi[i].SrcReg[2].File = PROGRAM_TEMPORARY; + vpi[i].SrcReg[2].Index = 0; + vpi[i].SrcReg[2].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); + } +#endif + } + + memcpy(&vpi[i], prog->Instructions, prog->NumInstructions * sizeof(struct prog_instruction)); + + free(prog->Instructions); + + prog->Instructions = vpi; + + prog->NumInstructions += 4; + vpi = &prog->Instructions[prog->NumInstructions-1]; + + assert(vpi->Opcode == OPCODE_END); +} + +static struct r300_vertex_program *build_program(struct r300_vertex_program_key *wanted_key, + struct gl_vertex_program *mesa_vp) +{ + struct r300_vertex_program *vp; + + vp = _mesa_calloc(sizeof(*vp)); + _mesa_memcpy(&vp->key, wanted_key, sizeof(vp->key)); + + if(mesa_vp->IsPositionInvariant) + position_invariant(&mesa_vp->Base); + + assert(mesa_vp->Base.NumInstructions); + + vp->num_temporaries=mesa_vp->Base.NumTemporaries; + + r300_translate_vertex_shader(vp, mesa_vp->Base.Instructions); + + return vp; +} + +void r300_select_vertex_shader(r300ContextPtr r300) +{ + GLcontext *ctx = ctx = r300->radeon.glCtx; + GLuint InputsRead; + struct r300_vertex_program_key wanted_key = { 0 }; + GLint i; + struct r300_vertex_program_cont *vpc; + struct r300_vertex_program *vp; + + vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current; + InputsRead = ctx->FragmentProgram._Current->Base.InputsRead; + + wanted_key.OutputsWritten |= 1 << VERT_RESULT_HPOS; + + if (InputsRead & FRAG_BIT_COL0) + wanted_key.OutputsWritten |= 1 << VERT_RESULT_COL0; + + if ((InputsRead & FRAG_BIT_COL1) /*|| + (InputsRead & FRAG_BIT_FOGC)*/) + wanted_key.OutputsWritten |= 1 << VERT_RESULT_COL1; + + for (i = 0; i < ctx->Const.MaxTextureUnits; i++) + if (InputsRead & (FRAG_BIT_TEX0 << i)) + wanted_key.OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i); + + wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead; + + for (vp = vpc->progs; vp; vp = vp->next) + if (_mesa_memcmp(&vp->key, &wanted_key, sizeof(wanted_key)) == 0) { + r300->selected_vp = vp; + return ; + } + + //_mesa_print_program(&vpc->mesa_program.Base); + + vp = build_program(&wanted_key, &vpc->mesa_program); + vp->next = vpc->progs; + vpc->progs = vp; + + r300->selected_vp = vp; +} -- cgit v1.2.3 From 6c9cc81601e87b87f11b89669175dc5bbae4c36b Mon Sep 17 00:00:00 2001 From: Rune Petersen Date: Fri, 17 Nov 2006 19:12:42 +0000 Subject: fragment.position support World position is calculated in the vertex shader and passed to the fragment shader via an unused texcoord. --- src/mesa/drivers/dri/r300/r300_context.h | 2 + src/mesa/drivers/dri/r300/r300_fragprog.c | 7 ++ src/mesa/drivers/dri/r300/r300_state.c | 71 +++++++++++++ src/mesa/drivers/dri/r300/r300_vertexprog.c | 158 +++++++++++++++++++++++++++- 4 files changed, 236 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 2c8120ef18..dd3ecbb235 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -549,6 +549,7 @@ struct r300_stencilbuffer_state { /* Can be tested with colormat currently. */ #define VSF_MAX_FRAGMENT_TEMPS (14) +#define STATE_R300_WINDOW_DIMENSION (STATE_INTERNAL_DRIVER+0) struct r300_vertex_shader_fragment { int length; @@ -623,6 +624,7 @@ struct r300_vertex_program { int pos_end; int num_temporaries; /* Number of temp vars used by program */ + int wpos_idx; int inputs[VERT_ATTRIB_MAX]; int outputs[VERT_RESULT_MAX]; int native; diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 7793c5eb2e..cab5451214 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -1555,6 +1555,13 @@ static void init_program(struct r300_fragment_program *rp) } InputsRead &= ~FRAG_BITS_TEX_ANY; + /* fragment position treated as a texcoord */ + if (InputsRead & FRAG_BIT_WPOS) { + cs->inputs[FRAG_ATTRIB_WPOS].refcount = 0; + cs->inputs[FRAG_ATTRIB_WPOS].reg = get_hw_temp(rp); + } + InputsRead &= ~FRAG_BIT_WPOS; + /* Then primary colour */ if (InputsRead & FRAG_BIT_COL0) { cs->inputs[FRAG_ATTRIB_COL0].refcount = 0; diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index aa49f05b51..72255066d5 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1044,6 +1044,59 @@ r300UpdateDrawBuffer(GLcontext *ctx) #endif } +static void r300FetchStateParameter(GLcontext *ctx, const enum state_index state[], + GLfloat *value) +{ + r300ContextPtr r300 = R300_CONTEXT(ctx); + + switch(state[0]) + { + case STATE_INTERNAL: + switch(state[1]) + { + case STATE_R300_WINDOW_DIMENSION: + value[0] = r300->radeon.dri.drawable->w; /* width */ + value[1] = r300->radeon.dri.drawable->h; /* height */ + value[2] = 0.5F; /* for moving range [-1 1] -> [0 1] */ + value[3] = 1.0F; /* not used */ + break; + default:; + } + default:; + } +} + +/** + * Update R300's own internal state parameters. + * For now just STATE_R300_WINDOW_DIMENSION + */ +static void r300UpdateStateParameters(GLcontext * ctx, GLuint new_state) +{ + struct r300_vertex_program_cont *vpc; + struct gl_program_parameter_list *paramList; + GLuint i; + + if(!(new_state & (_NEW_BUFFERS|_NEW_PROGRAM))) + return; + + vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current; + if (!vpc) + return; + + paramList = vpc->mesa_program.Base.Parameters; + + if (!paramList) + return; + + for (i = 0; i < paramList->NumParameters; i++) { + if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR){ + r300FetchStateParameter(ctx, + paramList->Parameters[i].StateIndexes, + paramList->ParameterValues[i]); + } + } +} + /* ============================================================= * Polygon state */ @@ -1304,6 +1357,20 @@ void r300_setup_rs_unit(GLcontext *ctx) r300->hw.rr.cmd[R300_RR_ROUTE_1] = 0; + if (InputsRead & FRAG_BIT_WPOS){ + for (i = 0; i < ctx->Const.MaxTextureUnits; i++) + if (!(InputsRead & (FRAG_BIT_TEX0 << i))) + break; + + if(i == ctx->Const.MaxTextureUnits){ + fprintf(stderr, "\tno free texcoord found...\n"); + exit(0); + } + + InputsRead |= (FRAG_BIT_TEX0 << i); + InputsRead &= ~FRAG_BIT_WPOS; + } + for (i=0;iConst.MaxTextureUnits;i++) { r300->hw.ri.cmd[R300_RI_INTERP_0+i] = 0 | R300_RS_INTERP_USED @@ -1680,6 +1747,7 @@ void r300UpdateShaders(r300ContextPtr rmesa) return ; } + r300UpdateStateParameters(ctx, _NEW_PROGRAM); } } @@ -1813,6 +1881,9 @@ static void r300InvalidateState(GLcontext * ctx, GLuint new_state) if (new_state & (_NEW_BUFFERS | _NEW_COLOR | _NEW_PIXEL)) { r300UpdateDrawBuffer(ctx); } + + r300UpdateStateParameters(ctx, new_state); + #ifndef CB_DPATH /* Go inefficiency! */ r300ResetHwState(r300); diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index c38db7e17b..2492a4a3a0 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -958,17 +958,155 @@ static void position_invariant(struct gl_program *prog) assert(vpi->Opcode == OPCODE_END); } +static void insert_wpos(struct r300_vertex_program *vp, + struct gl_program *prog, + GLint pos) +{ + + GLint tokens[6] = { STATE_INTERNAL, STATE_R300_WINDOW_DIMENSION, 0, 0, 0, 0 }; + struct prog_instruction *vpi; + struct prog_instruction *vpi_insert; + GLuint temp_index; + GLuint window_index; + int i = 0; + + vpi = malloc((prog->NumInstructions + 5) * sizeof(struct prog_instruction)); + memcpy(vpi, prog->Instructions, (pos+1) * sizeof(struct prog_instruction)); + + vpi_insert = &vpi[pos]; + + /* make a copy before outputting VERT_RESULT_HPOS */ + vpi_insert->DstReg.File = vpi_insert->SrcReg[2].File; + vpi_insert->DstReg.Index = temp_index = vpi_insert->SrcReg[2].Index; + + vpi_insert++; + memset(vpi_insert, 0, 5 * sizeof(struct prog_instruction)); + + vpi_insert[i].Opcode = OPCODE_MOV; + + vpi_insert[i].DstReg.File = PROGRAM_OUTPUT; + vpi_insert[i].DstReg.Index = VERT_RESULT_HPOS; + vpi_insert[i].DstReg.WriteMask = WRITEMASK_XYZW; + vpi_insert[i].DstReg.CondMask = COND_TR; + + vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY; + vpi_insert[i].SrcReg[0].Index = temp_index; + vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); + i++; + + /* perspective divide */ + vpi_insert[i].Opcode = OPCODE_RCP; + + vpi_insert[i].DstReg.File = PROGRAM_TEMPORARY; + vpi_insert[i].DstReg.Index = temp_index; + vpi_insert[i].DstReg.WriteMask = WRITEMASK_W; + vpi_insert[i].DstReg.CondMask = COND_TR; + + vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY; + vpi_insert[i].SrcReg[0].Index = temp_index; + vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_W, SWIZZLE_ZERO, SWIZZLE_ZERO, SWIZZLE_ZERO); + i++; + + vpi_insert[i].Opcode = OPCODE_MUL; + + vpi_insert[i].DstReg.File = PROGRAM_TEMPORARY; + vpi_insert[i].DstReg.Index = temp_index; + vpi_insert[i].DstReg.WriteMask = WRITEMASK_XYZ; + vpi_insert[i].DstReg.CondMask = COND_TR; + + vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY; + vpi_insert[i].SrcReg[0].Index = temp_index; + vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ZERO); + + vpi_insert[i].SrcReg[1].File = PROGRAM_TEMPORARY; + vpi_insert[i].SrcReg[1].Index = temp_index; + vpi_insert[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_ZERO); + i++; + + /* viewport transformation */ + window_index = _mesa_add_state_reference(prog->Parameters, tokens); + + vpi_insert[i].Opcode = OPCODE_MAD; + + vpi_insert[i].DstReg.File = PROGRAM_TEMPORARY; + vpi_insert[i].DstReg.Index = temp_index; + vpi_insert[i].DstReg.WriteMask = WRITEMASK_XYZ; + vpi_insert[i].DstReg.CondMask = COND_TR; + + vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY; + vpi_insert[i].SrcReg[0].Index = temp_index; + vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ZERO); + + vpi_insert[i].SrcReg[1].File = PROGRAM_STATE_VAR; + vpi_insert[i].SrcReg[1].Index = window_index; + vpi_insert[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_ZERO); + + vpi_insert[i].SrcReg[2].File = PROGRAM_STATE_VAR; + vpi_insert[i].SrcReg[2].Index = window_index; + vpi_insert[i].SrcReg[2].Swizzle = MAKE_SWIZZLE4(SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_ZERO); + i++; + + vpi_insert[i].Opcode = OPCODE_MUL; + + vpi_insert[i].DstReg.File = PROGRAM_OUTPUT; + vpi_insert[i].DstReg.Index = VERT_RESULT_TEX0+vp->wpos_idx; + vpi_insert[i].DstReg.WriteMask = WRITEMASK_XYZW; + vpi_insert[i].DstReg.CondMask = COND_TR; + + vpi_insert[i].SrcReg[0].File = PROGRAM_TEMPORARY; + vpi_insert[i].SrcReg[0].Index = temp_index; + vpi_insert[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W); + + vpi_insert[i].SrcReg[1].File = PROGRAM_STATE_VAR; + vpi_insert[i].SrcReg[1].Index = window_index; + vpi_insert[i].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_ONE, SWIZZLE_ONE); + i++; + + memcpy(&vpi_insert[i], &prog->Instructions[pos+1], (prog->NumInstructions-(pos+1)) * sizeof(struct prog_instruction)); + + free(prog->Instructions); + + prog->Instructions = vpi; + + prog->NumInstructions += i; + vpi = &prog->Instructions[prog->NumInstructions-1]; + + assert(vpi->Opcode == OPCODE_END); +} + +static void pos_as_texcoord(struct r300_vertex_program *vp, + struct gl_program *prog) +{ + struct prog_instruction *vpi; + int pos = 0; + + for(vpi = prog->Instructions; vpi->Opcode != OPCODE_END; vpi++, pos++){ + if( vpi->DstReg.File == PROGRAM_OUTPUT && + vpi->DstReg.Index == VERT_RESULT_HPOS ){ + insert_wpos(vp, prog, pos); + break; + } + } + +} + static struct r300_vertex_program *build_program(struct r300_vertex_program_key *wanted_key, - struct gl_vertex_program *mesa_vp) + struct gl_vertex_program *mesa_vp, + GLint wpos_idx) { struct r300_vertex_program *vp; vp = _mesa_calloc(sizeof(*vp)); _mesa_memcpy(&vp->key, wanted_key, sizeof(vp->key)); + vp->wpos_idx = wpos_idx; + if(mesa_vp->IsPositionInvariant) position_invariant(&mesa_vp->Base); + if(wpos_idx > -1) + pos_as_texcoord(vp, &mesa_vp->Base); + assert(mesa_vp->Base.NumInstructions); vp->num_temporaries=mesa_vp->Base.NumTemporaries; @@ -986,12 +1124,28 @@ void r300_select_vertex_shader(r300ContextPtr r300) GLint i; struct r300_vertex_program_cont *vpc; struct r300_vertex_program *vp; + GLint wpos_idx; vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current; InputsRead = ctx->FragmentProgram._Current->Base.InputsRead; wanted_key.OutputsWritten |= 1 << VERT_RESULT_HPOS; + wpos_idx = -1; + if (InputsRead & FRAG_BIT_WPOS){ + for (i = 0; i < ctx->Const.MaxTextureUnits; i++) + if (!(InputsRead & (FRAG_BIT_TEX0 << i))) + break; + + if(i == ctx->Const.MaxTextureUnits){ + fprintf(stderr, "\tno free texcoord found\n"); + exit(0); + } + + InputsRead |= (FRAG_BIT_TEX0 << i); + wpos_idx = i; + } + if (InputsRead & FRAG_BIT_COL0) wanted_key.OutputsWritten |= 1 << VERT_RESULT_COL0; @@ -1013,7 +1167,7 @@ void r300_select_vertex_shader(r300ContextPtr r300) //_mesa_print_program(&vpc->mesa_program.Base); - vp = build_program(&wanted_key, &vpc->mesa_program); + vp = build_program(&wanted_key, &vpc->mesa_program, wpos_idx); vp->next = vpc->progs; vpc->progs = vp; -- cgit v1.2.3 From 08020927e826068a1ebc208e63c6a0d53711e96e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 17 Nov 2006 21:58:02 +0000 Subject: Use RENDERINPUTS macros to access render_inputs_bitset --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 +- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 85d71cb04c..09972bebac 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -114,7 +114,7 @@ typedef struct nouveau_context { /* The rendering context information */ GLenum current_primitive; /* the current primitive enum */ - GLuint render_inputs_bitset; /* the current render inputs */ + DECLARE_RENDERINPUTS(render_inputs_bitset); /* the current render inputs */ nouveauScreenRec *screen; drm_nouveau_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 510704f7d4..772a5368e9 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -627,10 +627,11 @@ static void nv10ChooseRenderState(GLcontext *ctx) -static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint index) +static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa) { GLcontext* ctx=nmesa->glCtx; TNLcontext *tnl = TNL_CONTEXT(ctx); + DECLARE_RENDERINPUTS(index); struct vertex_buffer *VB = &tnl->vb; int attr_size[16]; int default_attr_size[8]={3,3,3,4,3,1,4,4}; @@ -638,20 +639,22 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint int slots=0; int total_size=0; + RENDERINPUTS_COPY(index, nmesa->render_inputs_bitset); + /* * Determine attribute sizes */ for(i=0;i<8;i++) { - if (index&(1<TexCoordPtr[i]->size; + if (RENDERINPUTS_TEST(index, i)) + attr_size[i]=VB->TexCoordPtr[i-8]->size; else attr_size[i]=0; } @@ -661,7 +664,7 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa, GLuint */ for(i=0;i<16;i++) { - if (index&(1<render_inputs_bitset; - - if (index!=nmesa->render_inputs_bitset) + DECLARE_RENDERINPUTS(index); + + RENDERINPUTS_COPY(index, tnl->render_inputs_bitset); + if (!RENDERINPUTS_EQUAL(index, nmesa->render_inputs_bitset)) { - nmesa->render_inputs_bitset=index; - nv10OutputVertexFormat(nmesa,index); + RENDERINPUTS_COPY(nmesa->render_inputs_bitset, index); + nv10OutputVertexFormat(nmesa); } } -- cgit v1.2.3 From 8532b6e0a56b09e03e034e37850589d26c20805b Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Fri, 17 Nov 2006 22:11:13 +0000 Subject: Small unneeded nv03 fix --- src/mesa/drivers/dri/nouveau/nouveau_card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card.c b/src/mesa/drivers/dri/nouveau/nouveau_card.c index c36f62aff6..4a5d5eb9d7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_card.c @@ -3,7 +3,7 @@ #include "nouveau_reg.h" static nouveau_card nouveau_card_list[]={ -//x0010, "Riva 128", ????, NV_03, 0}, +//{0x0010, "Riva 128", ????, NV_03, 0}, {0x0020, "TNT/TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, {0x00A0, "TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, {0x0100, "GeForce", NV10_TCL_PRIMITIVE_3D, NV_10, 0}, -- cgit v1.2.3 From e722e3480f3a5b975c05b584f9acef222c2c9d6b Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 18 Nov 2006 00:19:22 +0000 Subject: Add nv20_state.c ; hook nv10_state.c into the build ; do the renaming required by the renouveau changes. --- src/mesa/drivers/dri/nouveau/Makefile | 2 + src/mesa/drivers/dri/nouveau/nouveau_reg.h | 61 +-- src/mesa/drivers/dri/nouveau/nv10_state.c | 21 +- src/mesa/drivers/dri/nouveau/nv20_state.c | 575 +++++++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv30_state.c | 4 +- 5 files changed, 621 insertions(+), 42 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nv20_state.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index ed700a7085..2db6f8989d 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -20,6 +20,8 @@ DRIVER_SOURCES = \ nouveau_tex.c \ nouveau_swtcl.c \ nv10_swtcl.c \ + nv10_state.c \ + nv20_state.c \ nv30_state.c C_SOURCES = \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index c5052d7c4b..389c541e1c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -43,7 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************** - Created from objects.c rev. 1.332 + Created from objects.c rev. 1.337 */ #ifndef _NOUVEAU_REG_H @@ -239,7 +239,7 @@ Object NV04_SCALED_IMAGE_FROM_MEMORY used on: NV04 # define NV04_SCALED_IMAGE_FROM_MEMORY_DU_DX 0x00000318 /* Parameters: int frac*0x100000 */ # define NV04_SCALED_IMAGE_FROM_MEMORY_DV_DY 0x0000031c /* Parameters: int frac*0x100000 */ # define NV04_SCALED_IMAGE_FROM_MEMORY_SIZE 0x00000400 /* Parameters: width height */ -# define NV04_SCALED_IMAGE_FROM_MEMORY_FORMAT 0x00000404 /* Parameters: pitch */ +# define NV04_SCALED_IMAGE_FROM_MEMORY_FORMAT 0x00000404 /* Parameters: pitch origin filter */ # define NV04_SCALED_IMAGE_FROM_MEMORY_OFFSET 0x00000408 # define NV04_SCALED_IMAGE_FROM_MEMORY_POINT 0x0000040c /* Parameters: u_int u_frac*0x10 v_int v_frac*0x10 */ @@ -328,7 +328,7 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_FOG_COLOR 0x000002a8 /* Parameters: a b g r */ # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ -# define NV10_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE 0x00000300 +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 # define NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 # define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c @@ -339,11 +339,11 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 # define NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 # define NV10_TCL_PRIMITIVE_3D_VERTEX_WEIGHT_ENABLE 0x00000328 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE 0x0000032c +# define NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE 0x0000032c # define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 # define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 # define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 -# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC 0x0000033c +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC 0x0000033c # define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00000340 # define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000344 # define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000348 @@ -351,7 +351,7 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 # define NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 # define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: r g b */ -# define NV10_TCL_PRIMITIVE_3D_DEPTH_MASK 0x0000035c +# define NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x0000035c # define NV10_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 # define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 # define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 @@ -534,7 +534,7 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV17_TCL_PRIMITIVE_3D_COLOR_MASK_ENABLE 0x000002bc # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ -# define NV10_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE 0x00000300 +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 # define NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 # define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c @@ -545,11 +545,11 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 # define NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 # define NV10_TCL_PRIMITIVE_3D_VERTEX_WEIGHT_ENABLE 0x00000328 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE 0x0000032c +# define NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE 0x0000032c # define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 # define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 # define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 -# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC 0x0000033c +# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC 0x0000033c # define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00000340 # define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000344 # define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000348 @@ -557,7 +557,7 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 # define NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 # define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: r g b */ -# define NV10_TCL_PRIMITIVE_3D_DEPTH_MASK 0x0000035c +# define NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x0000035c # define NV10_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 # define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 # define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 @@ -797,17 +797,17 @@ Object NV10_CONTEXT_SURFACES_2D used on: NV10 NV15 NV20 NV30 NV40 G70 # define NV10_CONTEXT_SURFACES_2D_OFFSET_DST 0x0000030c /****************************************** -Object NV04_SURFACE used on: NV04 NV10 NV15 +Object NV04_CONTEXT_SURFACES_2D used on: NV04 NV10 NV15 */ -#define NV04_SURFACE 0x00000042 -# define NV04_SURFACE_NOTIFY 0x00000104 -# define NV04_SURFACE_DMA_NOTIFY 0x00000180 -# define NV04_SURFACE_DMA_IMAGE_SOURCE 0x00000184 -# define NV04_SURFACE_DMA_IMAGE_DESTIN 0x00000188 -# define NV04_SURFACE_FORMAT 0x00000300 -# define NV04_SURFACE_PITCH 0x00000304 /* Parameters: source destin */ -# define NV04_SURFACE_OFFSET_SOURCE 0x00000308 -# define NV04_SURFACE_OFFSET_DESTIN 0x0000030c +#define NV04_CONTEXT_SURFACES_2D 0x00000042 +# define NV04_CONTEXT_SURFACES_2D_NOTIFY 0x00000104 +# define NV04_CONTEXT_SURFACES_2D_SET_DMA_NOTIFY 0x00000180 +# define NV04_CONTEXT_SURFACES_2D_SET_DMA_IMAGE_SRC 0x00000184 +# define NV04_CONTEXT_SURFACES_2D_SET_DMA_IMAGE_DST 0x00000188 +# define NV04_CONTEXT_SURFACES_2D_FORMAT 0x00000300 +# define NV04_CONTEXT_SURFACES_2D_PITCH 0x00000304 /* Parameters: src dst */ +# define NV04_CONTEXT_SURFACES_2D_OFFSET_SRC 0x00000308 +# define NV04_CONTEXT_SURFACES_2D_OFFSET_DST 0x0000030c /****************************************** Object NV04_IMAGE_PATTERN used on: NV04 NV10 NV15 NV20 NV30 NV40 G70 @@ -858,16 +858,18 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_CONTROL 0x00000298 /* Parameters: back_specular back_ambient back_diffuse back_emission front_specular front_ambient front_diffuse front_emission */ # define NV20_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c # define NV20_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 -# define NV20_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE 0x00000300 -# define NV20_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 +# define NV20_TCL_PRIMITIVE_3D_FOG_ENABLE 0x000002a4 +# define NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 +# define NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE 0x00000304 # define NV20_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 # define NV20_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c # define NV20_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 # define NV20_TCL_PRIMITIVE_3D_LIGHTING_ENABLE 0x00000314 +# define NV20_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE 0x0000031c # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE 0x00000318 # define NV20_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 # define NV20_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 -# define NV20_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE 0x0000032c +# define NV20_TCL_PRIMITIVE_3D_STENCIL_ENABLE 0x0000032c # define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 # define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 # define NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 @@ -879,7 +881,7 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 # define NV20_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 # define NV20_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: a r g b */ -# define NV20_TCL_PRIMITIVE_3D_DEPTH_MASK 0x0000035c +# define NV20_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x0000035c # define NV20_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 # define NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 # define NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 @@ -1081,11 +1083,12 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x000017a0 # define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK 0x000017b0 # define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x000017bc -# define NV20_TCL_PRIMITIVE_3D_LOGIC_OP 0x000017c0 +# define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x000017c0 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_TWO_SIDE_ENABLE 0x000017c4 # define NV20_TCL_PRIMITIVE_3D_BEGIN_END 0x000017fc -# define NV20_TCL_PRIMITIVE_3D_CLEAR_COLOR 0x00001d90 -# define NV20_TCL_PRIMITIVE_3D_CLEAR_MASK 0x00001d94 /* Parameters: clear color a clear color b clear color g clear color r clear depth clear stencil */ +# define NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH 0x00001d8c +# define NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB 0x00001d90 +# define NV20_TCL_PRIMITIVE_3D_CLEAR_WHICH_BUFFERS 0x00001d94 /* Parameters: clear color a clear color b clear color g clear color r clear depth clear stencil */ # define NV20_TCL_PRIMITIVE_3D_INDEX_DATA 0x00001800 /* Parameters: index1 index0 */ # define NV20_TCL_PRIMITIVE_3D_VB_VERTEX_BATCH 0x00001810 /* Parameters: count_vertices offset_vertices */ # define NV20_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001818 @@ -1330,8 +1333,8 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_TX_DEPTH_UNIT(d) (0x00001840 + d * 0x0004) /* Parameters: depth NPOT pitch */ # define NV30_TCL_PRIMITIVE_3D_VB_VERTEX_BATCH 0x00001814 /* Parameters: count_vertices offset_vertices */ # define NV30_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001818 -# define NV30_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE 0x00000374 -# define NV30_TCL_PRIMITIVE_3D_LOGIC_OP_OP 0x00000378 +# define NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000374 +# define NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x00000378 # define NV30_TCL_PRIMITIVE_3D_SET_DISPLAY_LIST_MEM_OFFSET 0x0000181c # define NV30_TCL_PRIMITIVE_3D_EXECUTE_DISPLAY_LIST 0x00001824 /* Parameters: length start offset */ # define NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x00001828 diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index e752905841..a8592acc84 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -40,8 +40,8 @@ void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) GLubyte ubRef; CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC, 2); - OUT_RING(func); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC */ + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); + OUT_RING(func); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ OUT_RING(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ } @@ -157,7 +157,7 @@ void nv10DepthFunc(GLcontext *ctx, GLenum func) void nv10DepthMask(GLcontext *ctx, GLboolean flag) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_MASK, 1); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); OUT_RING(flag); } @@ -180,7 +180,7 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) switch(cap) { case GL_ALPHA_TEST: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_TEST_ENABLE, 1); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); OUT_RING(state); break; // case GL_AUTO_NORMAL: @@ -198,7 +198,7 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) OUT_RING(state); break; case GL_COLOR_LOGIC_OP: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE, 1); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); OUT_RING(state); break; // case GL_COLOR_MATERIAL: @@ -250,7 +250,10 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) else OUT_RING(0x0); break; -// case GL_LINE_SMOOTH: + case GL_LINE_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; // case GL_LINE_STIPPLE: // case GL_MAP1_COLOR_4: // case GL_MAP1_INDEX: @@ -292,10 +295,6 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); OUT_RING(state); break; - case GL_LINE_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); - OUT_RING(state); - break; case GL_POINT_SMOOTH: BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE, 1); OUT_RING(state); @@ -307,7 +306,7 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_SCISSOR_TEST: // case GL_SEPARABLE_2D: case GL_STENCIL_TEST: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_TEST_ENABLE, 1); + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); OUT_RING(state); break; // case GL_TEXTURE_GEN_Q: diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c new file mode 100644 index 0000000000..88b8d6d204 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -0,0 +1,575 @@ +/************************************************************************** + +Copyright 2006 Nouveau +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#include "nouveau_context.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" + +#include "tnl/t_pipeline.h" + +#include "mtypes.h" +#include "colormac.h" + +static void nv20AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte ubRef; + CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); + + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); + OUT_RING(func); /* NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ + OUT_RING(ubRef); /* NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ +} + +static void nv20BlendColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte cf[4]; + + CLAMPED_FLOAT_TO_UBYTE(cf[0], color[0]); + CLAMPED_FLOAT_TO_UBYTE(cf[1], color[1]); + CLAMPED_FLOAT_TO_UBYTE(cf[2], color[2]); + CLAMPED_FLOAT_TO_UBYTE(cf[3], color[3]); + + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); + OUT_RING(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); +} + +static void nv20BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); + OUT_RING((modeA<<16) | modeRGB); +} + + +static void nv20BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); + OUT_RING((sfactorA<<16) | sfactorRGB); + OUT_RING((dfactorA<<16) | dfactorRGB); +} + +static void nv20ClearColor(GLcontext *ctx, const GLfloat color[4]) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte c[4]; + UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); + OUT_RING(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); +} + +static void nv20ClearDepth(GLcontext *ctx, GLclampd d) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING(nmesa->clear_value); +} + +/* we're don't support indexed buffers + void (*ClearIndex)(GLcontext *ctx, GLuint index) + */ + +static void nv20ClearStencil(GLcontext *ctx, GLint s) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING(nmesa->clear_value); +} + +static void nv20ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); + OUT_RINGf(equation[0]); + OUT_RINGf(equation[1]); + OUT_RINGf(equation[2]); + OUT_RINGf(equation[3]); +} + +static void nv20ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, + GLboolean bmask, GLboolean amask ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_MASK, 1); + OUT_RING(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); +} + +static void nv20ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) +{ + // TODO I need love +} + +static void nv20CullFace(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CULL_FACE, 1); + OUT_RING(mode); +} + +static void nv20FrontFace(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FRONT_FACE, 1); + OUT_RING(mode); +} + +static void nv20DepthFunc(GLcontext *ctx, GLenum func) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); + OUT_RING(func); +} + +static void nv20DepthMask(GLcontext *ctx, GLboolean flag) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); + OUT_RING(flag); +} + +static void nv20DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); + OUT_RINGf(nearval); + OUT_RINGf(farval); +} + +/** Specify the current buffer for writing */ +//void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); +/** Specify the buffers for writing for fragment programs*/ +//void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); + +static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + switch(cap) + { + case GL_ALPHA_TEST: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); + OUT_RING(state); + break; +// case GL_AUTO_NORMAL: + case GL_BLEND: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); + OUT_RING(state); + break; + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); + OUT_RING(state); + break; + case GL_COLOR_LOGIC_OP: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); + OUT_RING(state); + break; +// case GL_COLOR_MATERIAL: +// case GL_COLOR_SUM_EXT: +// case GL_COLOR_TABLE: +// case GL_CONVOLUTION_1D: +// case GL_CONVOLUTION_2D: + case GL_CULL_FACE: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); + OUT_RING(state); + break; + case GL_DEPTH_TEST: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); + OUT_RING(state); + break; + case GL_DITHER: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); + OUT_RING(state); + break; + case GL_FOG: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); + OUT_RING(state); + break; +// case GL_HISTOGRAM: +// case GL_INDEX_LOGIC_OP: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + { + uint32_t mask=0x11<<(2*(cap-GL_LIGHT0)); + nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); + if (nmesa->lighting_enabled) + { + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING(nmesa->enabled_lights); + } + break; + } + case GL_LIGHTING: + nmesa->lighting_enabled=state; + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + if (nmesa->lighting_enabled) + OUT_RING(nmesa->enabled_lights); + else + OUT_RING(0x0); + break; + case GL_LINE_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; +// case GL_LINE_STIPPLE: +// case GL_MAP1_COLOR_4: +// case GL_MAP1_INDEX: +// case GL_MAP1_NORMAL: +// case GL_MAP1_TEXTURE_COORD_1: +// case GL_MAP1_TEXTURE_COORD_2: +// case GL_MAP1_TEXTURE_COORD_3: +// case GL_MAP1_TEXTURE_COORD_4: +// case GL_MAP1_VERTEX_3: +// case GL_MAP1_VERTEX_4: +// case GL_MAP2_COLOR_4: +// case GL_MAP2_INDEX: +// case GL_MAP2_NORMAL: +// case GL_MAP2_TEXTURE_COORD_1: +// case GL_MAP2_TEXTURE_COORD_2: +// case GL_MAP2_TEXTURE_COORD_3: +// case GL_MAP2_TEXTURE_COORD_4: +// case GL_MAP2_VERTEX_3: +// case GL_MAP2_VERTEX_4: +// case GL_MINMAX: + case GL_NORMALIZE: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING(state); + break; +// case GL_POINT_SMOOTH: + case GL_POLYGON_OFFSET_POINT: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_OFFSET_LINE: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_OFFSET_FILL: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_SMOOTH: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); + OUT_RING(state); + break; + case GL_POLYGON_STIPPLE: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE, 1); + OUT_RING(state); + break; +// case GL_POST_COLOR_MATRIX_COLOR_TABLE: +// case GL_POST_CONVOLUTION_COLOR_TABLE: +// case GL_RESCALE_NORMAL: +// case GL_SCISSOR_TEST: +// case GL_SEPARABLE_2D: + case GL_STENCIL_TEST: + // TODO BACK and FRONT ? + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); + OUT_RING(state); + break; +// case GL_TEXTURE_GEN_Q: +// case GL_TEXTURE_GEN_R: +// case GL_TEXTURE_GEN_S: +// case GL_TEXTURE_GEN_T: +// case GL_TEXTURE_1D: +// case GL_TEXTURE_2D: +// case GL_TEXTURE_3D: + } +} + +static void nv20Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + switch(pname) + { + case GL_FOG_MODE: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //OUT_RING (params); + break; + /* TODO: unsure about the rest.*/ + default: + break; + } + +} + +static void nv20Hint(GLcontext *ctx, GLenum target, GLenum mode) +{ + // TODO I need love (fog and line_smooth hints) +} + +// void (*IndexMask)(GLcontext *ctx, GLuint mask); + +static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + /* not sure where the fourth param value goes...*/ + switch(pname) + { + case GL_AMBIENT: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_DIFFUSE: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPECULAR: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPOT_DIRECTION: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_POSITION: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + OUT_RINGf(params[0]); + OUT_RINGf(params[1]); + OUT_RINGf(params[2]); + break; + case GL_SPOT_EXPONENT: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + OUT_RINGf(*params); + break; + case GL_SPOT_CUTOFF: + /* you can't factor these */ + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + OUT_RINGf(params[0]); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + OUT_RINGf(params[1]); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + OUT_RINGf(params[2]); + break; + case GL_CONSTANT_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + case GL_LINEAR_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + case GL_QUADRATIC_ATTENUATION: + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + OUT_RINGf(*params); + break; + default: + break; + } +} + +/** Set the lighting model parameters */ +static void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); + + +static void nv20LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) +{ +/* nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); + OUT_RING((pattern << 16) | factor);*/ +} + +static void nv20LineWidth(GLcontext *ctx, GLfloat width) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_WIDTH, 1); + OUT_RINGf(width); +} + +static void nv20LogicOpcode(GLcontext *ctx, GLenum opcode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); + OUT_RING(opcode); +} + +static void nv20PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +{ + /*TODO: not sure what goes here. */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + +} + +/** Specify the diameter of rasterized points */ +static void nv20PointSize(GLcontext *ctx, GLfloat size) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RINGf(size); +} + +/** Select a polygon rasterization mode */ +static void nv20PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); + OUT_RING(mode); + } + if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); + OUT_RING(mode); + } +} + +/** Set the scale and units used to calculate depth values */ +void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); +/** Set the polygon stippling pattern */ +void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); +/* Specifies the current buffer for reading */ +void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); +/** Set rasterization mode */ +void (*RenderMode)(GLcontext *ctx, GLenum mode ); +/** Define the scissor box */ +void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +/** Select flat or smooth shading */ +void (*ShadeModel)(GLcontext *ctx, GLenum mode); + +/** OpenGL 2.0 two-sided StencilFunc */ +static void nv20StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); + OUT_RING(func); + OUT_RING(ref); + OUT_RING(mask); +} + +/** OpenGL 2.0 two-sided StencilMask */ +static void nv20StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); + OUT_RING(mask); +} + +/** OpenGL 2.0 two-sided StencilOp */ +static void nv20StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); + OUT_RING(fail); + OUT_RING(zfail); + OUT_RING(zpass); +} + +/** Control the generation of texture coordinates */ +void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, + const GLfloat *params); +/** Set texture environment parameters */ +void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, + const GLfloat *param); +/** Set texture parameters */ +void (*TexParameter)(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params); +void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); + +/** Set the viewport */ +static void nv20Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ + /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); + OUT_RING((w << 16) | x); + OUT_RING((h << 16) | y); +} + +void nv20InitStateFuncs(struct dd_function_table *func) +{ + func->AlphaFunc = nv20AlphaFunc; + func->BlendColor = nv20BlendColor; + func->BlendEquationSeparate = nv20BlendEquationSeparate; + func->BlendFuncSeparate = nv20BlendFuncSeparate; + func->ClearColor = nv20ClearColor; + func->ClearDepth = nv20ClearDepth; + func->ClearStencil = nv20ClearStencil; + func->ClipPlane = nv20ClipPlane; + func->ColorMask = nv20ColorMask; + func->ColorMaterial = nv20ColorMaterial; + func->CullFace = nv20CullFace; + func->FrontFace = nv20FrontFace; + func->DepthFunc = nv20DepthFunc; + func->DepthMask = nv20DepthMask; + func->DepthRange = nv20DepthRange; + func->Enable = nv20Enable; + func->Fogfv = nv20Fogfv; + func->Hint = nv20Hint; + func->Lightfv = nv20Lightfv; +/* func->LightModelfv = nv20LightModelfv; */ + func->LineStipple = nv20LineStipple; + func->LineWidth = nv20LineWidth; + func->LogicOpcode = nv20LogicOpcode; + func->PointParameterfv = nv20PointParameterfv; + func->PointSize = nv20PointSize; + func->PolygonMode = nv20PolygonMode; +#if 0 + func->PolygonOffset = nv20PolygonOffset; + func->PolygonStipple = nv20PolygonStipple; + func->ReadBuffer = nv20ReadBuffer; + func->RenderMode = nv20RenderMode; + func->Scissor = nv20Scissor; + func->ShadeModel = nv20ShaderModel; +#endif + func->StencilFuncSeparate = nv20StencilFuncSeparate; + func->StencilMaskSeparate = nv20StencilMaskSeparate; + func->StencilOpSeparate = nv20StencilOpSeparate; +#if 0 + func->TexGen = nv20TexGen; + func->TexParameter = nv20TexParameter; + func->TextureMatrix = nv20TextureMatrix; +#endif + func->Viewport = nv20Viewport; +} + diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 470f18d80a..dffd97b4e5 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -193,7 +193,7 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) OUT_RING(state); break; case GL_COLOR_LOGIC_OP: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE, 1); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); OUT_RING(state); break; // case GL_COLOR_MATERIAL: @@ -421,7 +421,7 @@ static void nv30LineWidth(GLcontext *ctx, GLfloat width) static void nv30LogicOpcode(GLcontext *ctx, GLenum opcode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LOGIC_OP_OP, 1); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); OUT_RING(opcode); } -- cgit v1.2.3 From ae9c633a21a20394f39cd3c8adfa34d212945fae Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 18 Nov 2006 00:36:22 +0000 Subject: More state functions --- src/mesa/drivers/dri/nouveau/nv10_state.c | 45 ++++++++++++++++++++++++++----- src/mesa/drivers/dri/nouveau/nv20_state.c | 11 ++++++-- src/mesa/drivers/dri/nouveau/nv30_state.c | 10 +++++-- 3 files changed, 56 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index a8592acc84..368235ac58 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -463,16 +463,49 @@ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); void (*RenderMode)(GLcontext *ctx, GLenum mode ); /** Define the scissor box */ void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + /** Select flat or smooth shading */ -void (*ShadeModel)(GLcontext *ctx, GLenum mode); +void nv10ShadeModel(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); + OUT_RING(mode); +} + /** OpenGL 2.0 two-sided StencilFunc */ -void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, - GLint ref, GLuint mask); +static void nv10StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); + OUT_RING(func); + OUT_RING(ref); + OUT_RING(mask); +} + /** OpenGL 2.0 two-sided StencilMask */ -void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); +static void nv10StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); + OUT_RING(mask); +} + /** OpenGL 2.0 two-sided StencilOp */ -void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, - GLenum zfail, GLenum zpass); +static void nv10StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); + OUT_RING(fail); + OUT_RING(zfail); + OUT_RING(zpass); +} + /** Control the generation of texture coordinates */ void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, const GLfloat *params); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index 88b8d6d204..3ad5f5bc44 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -468,8 +468,15 @@ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); void (*RenderMode)(GLcontext *ctx, GLenum mode ); /** Define the scissor box */ void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + /** Select flat or smooth shading */ -void (*ShadeModel)(GLcontext *ctx, GLenum mode); +void nv20ShadeModel(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); + OUT_RING(mode); +} /** OpenGL 2.0 two-sided StencilFunc */ static void nv20StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, @@ -560,8 +567,8 @@ void nv20InitStateFuncs(struct dd_function_table *func) func->ReadBuffer = nv20ReadBuffer; func->RenderMode = nv20RenderMode; func->Scissor = nv20Scissor; - func->ShadeModel = nv20ShaderModel; #endif + func->ShadeModel = nv20ShadeModel; func->StencilFuncSeparate = nv20StencilFuncSeparate; func->StencilMaskSeparate = nv20StencilMaskSeparate; func->StencilOpSeparate = nv20StencilOpSeparate; diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index dffd97b4e5..12a45d3ea9 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -466,7 +466,13 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); /** Define the scissor box */ void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ -void (*ShadeModel)(GLcontext *ctx, GLenum mode); +void nv30ShadeModel(GLcontext *ctx, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); + OUT_RING(mode); +} /** OpenGL 2.0 two-sided StencilFunc */ static void nv30StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, @@ -579,8 +585,8 @@ void nv30InitStateFuncs(struct dd_function_table *func) func->ReadBuffer = nv30ReadBuffer; func->RenderMode = nv30RenderMode; func->Scissor = nv30Scissor; - func->ShadeModel = nv30ShaderModel; #endif + func->ShadeModel = nv30ShadeModel; func->StencilFuncSeparate = nv30StencilFuncSeparate; func->StencilMaskSeparate = nv30StencilMaskSeparate; func->StencilOpSeparate = nv30StencilOpSeparate; -- cgit v1.2.3 From 1e04ff1741b4631c8c37d7cac3706760374b48c1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 18 Nov 2006 16:40:09 +0000 Subject: fix mgl name mangling problem --- src/mesa/glapi/gl_procs.py | 10 ++++++++++ src/mesa/glapi/glprocs.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/glapi/gl_procs.py b/src/mesa/glapi/gl_procs.py index 425943d25d..96e59a58ca 100644 --- a/src/mesa/glapi/gl_procs.py +++ b/src/mesa/glapi/gl_procs.py @@ -123,6 +123,16 @@ typedef struct { else: print '};' + print '' + print '' + print "#ifdef USE_MGL_NAMESPACE" + for func in api.functionIterateByOffset(): + for n in func.entry_points: + if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)): + print '#define gl_dispatch_stub_%u mgl_dispatch_stub_%u' % (func.offset, func.offset) + break + print "#endif /* USE_MGL_NAMESPACE */" + print '' print '' print '/* FIXME: Having these (incorrect) prototypes here is ugly. */' print '#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)' diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h index 548c271bdf..905c65862d 100644 --- a/src/mesa/glapi/glprocs.h +++ b/src/mesa/glapi/glprocs.h @@ -1094,6 +1094,56 @@ static const char gl_string_table[] = "glBlendEquationSeparateATI\0" ; + +#ifdef USE_MGL_NAMESPACE +#define gl_dispatch_stub_343 mgl_dispatch_stub_343 +#define gl_dispatch_stub_344 mgl_dispatch_stub_344 +#define gl_dispatch_stub_345 mgl_dispatch_stub_345 +#define gl_dispatch_stub_356 mgl_dispatch_stub_356 +#define gl_dispatch_stub_357 mgl_dispatch_stub_357 +#define gl_dispatch_stub_358 mgl_dispatch_stub_358 +#define gl_dispatch_stub_359 mgl_dispatch_stub_359 +#define gl_dispatch_stub_361 mgl_dispatch_stub_361 +#define gl_dispatch_stub_362 mgl_dispatch_stub_362 +#define gl_dispatch_stub_363 mgl_dispatch_stub_363 +#define gl_dispatch_stub_364 mgl_dispatch_stub_364 +#define gl_dispatch_stub_365 mgl_dispatch_stub_365 +#define gl_dispatch_stub_366 mgl_dispatch_stub_366 +#define gl_dispatch_stub_562 mgl_dispatch_stub_562 +#define gl_dispatch_stub_563 mgl_dispatch_stub_563 +#define gl_dispatch_stub_564 mgl_dispatch_stub_564 +#define gl_dispatch_stub_565 mgl_dispatch_stub_565 +#define gl_dispatch_stub_566 mgl_dispatch_stub_566 +#define gl_dispatch_stub_567 mgl_dispatch_stub_567 +#define gl_dispatch_stub_568 mgl_dispatch_stub_568 +#define gl_dispatch_stub_569 mgl_dispatch_stub_569 +#define gl_dispatch_stub_580 mgl_dispatch_stub_580 +#define gl_dispatch_stub_581 mgl_dispatch_stub_581 +#define gl_dispatch_stub_606 mgl_dispatch_stub_606 +#define gl_dispatch_stub_648 mgl_dispatch_stub_648 +#define gl_dispatch_stub_649 mgl_dispatch_stub_649 +#define gl_dispatch_stub_650 mgl_dispatch_stub_650 +#define gl_dispatch_stub_651 mgl_dispatch_stub_651 +#define gl_dispatch_stub_652 mgl_dispatch_stub_652 +#define gl_dispatch_stub_653 mgl_dispatch_stub_653 +#define gl_dispatch_stub_654 mgl_dispatch_stub_654 +#define gl_dispatch_stub_655 mgl_dispatch_stub_655 +#define gl_dispatch_stub_656 mgl_dispatch_stub_656 +#define gl_dispatch_stub_737 mgl_dispatch_stub_737 +#define gl_dispatch_stub_738 mgl_dispatch_stub_738 +#define gl_dispatch_stub_739 mgl_dispatch_stub_739 +#define gl_dispatch_stub_740 mgl_dispatch_stub_740 +#define gl_dispatch_stub_741 mgl_dispatch_stub_741 +#define gl_dispatch_stub_748 mgl_dispatch_stub_748 +#define gl_dispatch_stub_749 mgl_dispatch_stub_749 +#define gl_dispatch_stub_767 mgl_dispatch_stub_767 +#define gl_dispatch_stub_768 mgl_dispatch_stub_768 +#define gl_dispatch_stub_769 mgl_dispatch_stub_769 +#define gl_dispatch_stub_770 mgl_dispatch_stub_770 +#define gl_dispatch_stub_771 mgl_dispatch_stub_771 +#endif /* USE_MGL_NAMESPACE */ + + /* FIXME: Having these (incorrect) prototypes here is ugly. */ #if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) extern void gl_dispatch_stub_343(void); -- cgit v1.2.3 From 61068ba46bbf2c2bb2b1e434602a9361125e76e5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 18 Nov 2006 17:22:44 +0000 Subject: reindent --- src/mesa/shader/slang/slang_compile_variable.h | 98 +++++++++++++++++--------- 1 file changed, 63 insertions(+), 35 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 0b62ad2f1d..3b6e1987c8 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -29,67 +29,95 @@ extern "C" { #endif + typedef enum slang_type_qualifier_ { - slang_qual_none, - slang_qual_const, - slang_qual_attribute, - slang_qual_varying, - slang_qual_uniform, - slang_qual_out, - slang_qual_inout, - slang_qual_fixedoutput, /* internal */ - slang_qual_fixedinput /* internal */ + slang_qual_none, + slang_qual_const, + slang_qual_attribute, + slang_qual_varying, + slang_qual_uniform, + slang_qual_out, + slang_qual_inout, + slang_qual_fixedoutput, /* internal */ + slang_qual_fixedinput /* internal */ } slang_type_qualifier; -slang_type_specifier_type slang_type_specifier_type_from_string (const char *); -const char *slang_type_specifier_type_to_string (slang_type_specifier_type); +extern slang_type_specifier_type +slang_type_specifier_type_from_string(const char *); + +extern const char * +slang_type_specifier_type_to_string(slang_type_specifier_type); + + typedef struct slang_fully_specified_type_ { - slang_type_qualifier qualifier; - slang_type_specifier specifier; + slang_type_qualifier qualifier; + slang_type_specifier specifier; } slang_fully_specified_type; -int slang_fully_specified_type_construct (slang_fully_specified_type *); -void slang_fully_specified_type_destruct (slang_fully_specified_type *); -int slang_fully_specified_type_copy (slang_fully_specified_type *, const slang_fully_specified_type *); +extern int +slang_fully_specified_type_construct(slang_fully_specified_type *); + +extern void +slang_fully_specified_type_destruct(slang_fully_specified_type *); + +extern int +slang_fully_specified_type_copy(slang_fully_specified_type *, + const slang_fully_specified_type *); + typedef struct slang_variable_scope_ { - struct slang_variable_ *variables; + struct slang_variable_ *variables; GLuint num_variables; - struct slang_variable_scope_ *outer_scope; + struct slang_variable_scope_ *outer_scope; } slang_variable_scope; extern GLvoid -_slang_variable_scope_ctr (slang_variable_scope *); +_slang_variable_scope_ctr(slang_variable_scope *); + +extern void +slang_variable_scope_destruct(slang_variable_scope *); + +extern int +slang_variable_scope_copy(slang_variable_scope *, + const slang_variable_scope *); -void slang_variable_scope_destruct (slang_variable_scope *); -int slang_variable_scope_copy (slang_variable_scope *, const slang_variable_scope *); typedef struct slang_variable_ { - slang_fully_specified_type type; - slang_atom a_name; - GLuint array_len; /* type: spec_array */ - struct slang_operation_ *initializer; - unsigned int address; - unsigned int size; - GLboolean global; + slang_fully_specified_type type; + slang_atom a_name; + GLuint array_len; /* type: spec_array */ + struct slang_operation_ *initializer; + unsigned int address; + unsigned int size; + GLboolean global; } slang_variable; -int slang_variable_construct (slang_variable *); -void slang_variable_destruct (slang_variable *); -int slang_variable_copy (slang_variable *, const slang_variable *); -slang_variable *_slang_locate_variable (slang_variable_scope *, slang_atom a_name, GLboolean all); +extern int +slang_variable_construct(slang_variable *); + +extern void +slang_variable_destruct(slang_variable *); + +extern int +slang_variable_copy(slang_variable *, const slang_variable *); + +extern slang_variable * +_slang_locate_variable(slang_variable_scope *, slang_atom a_name, + GLboolean all); + +extern GLboolean +_slang_build_export_data_table(slang_export_data_table *, + slang_variable_scope *); -GLboolean _slang_build_export_data_table (slang_export_data_table *, slang_variable_scope *); #ifdef __cplusplus } #endif #endif - -- cgit v1.2.3 From a89e063149e183760e8dc2783922cbd389fc106e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 18 Nov 2006 17:23:30 +0000 Subject: comments --- src/mesa/shader/slang/slang_assemble.h | 42 ++++++++++++++++++++++++---------- src/mesa/shader/slang/slang_execute.c | 26 ++++++++++++++++----- 2 files changed, 50 insertions(+), 18 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 3f75e971be..d004e66500 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -42,56 +42,65 @@ typedef enum slang_assembly_type_ slang_asm_float_move, slang_asm_float_push, slang_asm_float_deref, - slang_asm_float_add, + slang_asm_float_add, /* a = pop(); b = pop(); push(a + b); */ slang_asm_float_multiply, slang_asm_float_divide, - slang_asm_float_negate, - slang_asm_float_less, + slang_asm_float_negate, /* push(-pop()) */ + slang_asm_float_less, /* a = pop(); b = pop(); push(a < b); */ slang_asm_float_equal_exp, slang_asm_float_equal_int, - slang_asm_float_to_int, - slang_asm_float_sine, + slang_asm_float_to_int, /* push(floatToInt(pop())) */ + slang_asm_float_sine, /* push(sin(pop()) */ slang_asm_float_arcsine, slang_asm_float_arctan, - slang_asm_float_power, + slang_asm_float_power, /* push(pow(pop(), pop())) */ slang_asm_float_log2, slang_asm_float_floor, slang_asm_float_ceil, - slang_asm_float_noise1, - slang_asm_float_noise2, + slang_asm_float_noise1, /* push(noise1(pop()) */ + slang_asm_float_noise2, /* push(noise2(pop(), pop())) */ slang_asm_float_noise3, slang_asm_float_noise4, + slang_asm_int_copy, slang_asm_int_move, slang_asm_int_push, slang_asm_int_deref, slang_asm_int_to_float, slang_asm_int_to_addr, + slang_asm_bool_copy, slang_asm_bool_move, slang_asm_bool_push, slang_asm_bool_deref, + slang_asm_addr_copy, slang_asm_addr_push, slang_asm_addr_deref, slang_asm_addr_add, slang_asm_addr_multiply, + slang_asm_vec4_tex1d, slang_asm_vec4_tex2d, slang_asm_vec4_tex3d, slang_asm_vec4_texcube, slang_asm_vec4_shad1d, slang_asm_vec4_shad2d, + slang_asm_jump, slang_asm_jump_if_zero, + slang_asm_enter, slang_asm_leave, + slang_asm_local_alloc, slang_asm_local_free, slang_asm_local_addr, slang_asm_global_addr, - slang_asm_call, + + slang_asm_call, /* push(ip); jump(inst->param[0]); */ slang_asm_return, + slang_asm_discard, slang_asm_exit, /* GL_MESA_shader_debug */ @@ -113,13 +122,21 @@ typedef enum slang_assembly_type_ slang_asm__last } slang_assembly_type; + +/** + * An assembly-level shader instruction. + */ typedef struct slang_assembly_ { - slang_assembly_type type; - GLfloat literal; - GLuint param[2]; + slang_assembly_type type; /**< The instruction opcode */ + GLfloat literal; /**< float literal */ + GLuint param[2]; /**< Two integer/address parameters */ } slang_assembly; + +/** + * A list of slang_assembly instructions + */ typedef struct slang_assembly_file_ { slang_assembly *code; @@ -127,6 +144,7 @@ typedef struct slang_assembly_file_ GLuint capacity; } slang_assembly_file; + extern GLvoid _slang_assembly_file_ctr(slang_assembly_file *); diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c index d6689bc8a4..e469de0207 100644 --- a/src/mesa/shader/slang/slang_execute.c +++ b/src/mesa/shader/slang/slang_execute.c @@ -59,6 +59,11 @@ slang_machine_dtr(slang_machine * self) #endif } + +/** + * Initialize the shader virtual machine. + * NOTE: stack grows downward in memory. + */ void slang_machine_init(slang_machine * mach) { @@ -71,7 +76,7 @@ slang_machine_init(slang_machine * mach) #if DEBUG_SLANG -foo static void +static void dump_instruction(FILE * f, slang_assembly * a, unsigned int i) { fprintf(f, "%.5u:\t", i); @@ -362,7 +367,7 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE; while (!mach->exit) { - slang_assembly *a = &file->code[mach->ip]; + const slang_assembly *a = &file->code[mach->ip]; #if DEBUG_SLANG if (f != NULL && a->type != slang_asm_none) { @@ -386,8 +391,13 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) case slang_asm_float_copy: case slang_asm_int_copy: case slang_asm_bool_copy: - mach->mem[(stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / - 4]._float = stack[mach->sp]._float; + /* store top value on stack to memory */ + { + GLuint address + = (stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / 4; + GLfloat value = stack[mach->sp]._float; + mach->mem[address]._float = value; + } mach->sp++; break; case slang_asm_float_move: @@ -400,15 +410,18 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) case slang_asm_float_push: case slang_asm_int_push: case slang_asm_bool_push: + /* push float/int/bool literal onto stop of stack */ mach->sp--; stack[mach->sp]._float = a->literal; break; case slang_asm_float_deref: case slang_asm_int_deref: case slang_asm_bool_deref: + /* load value from memory, replace stop of stack with it */ stack[mach->sp]._float = mach->mem[stack[mach->sp]._addr / 4]._float; break; case slang_asm_float_add: + /* pop two top floats, push sum */ stack[mach->sp + 1]._float += stack[mach->sp]._float; mach->sp++; break; @@ -425,8 +438,8 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) break; case slang_asm_float_less: stack[mach->sp + 1]._float = - stack[mach->sp + 1]._float < - stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0; + (stack[mach->sp + 1]._float < stack[mach->sp]._float) + ? (GLfloat) 1 : (GLfloat) 0; mach->sp++; break; case slang_asm_float_equal_exp: @@ -436,6 +449,7 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) mach->sp++; break; case slang_asm_float_equal_int: + /* pop top two values, compare, push 0 or 1 */ mach->sp--; stack[mach->sp]._float = (stack[mach->sp + 1 + a->param[0] / 4]._float == -- cgit v1.2.3 From 4d4373bb0fa06093d82796950ede5a26fbfdd1d4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 18 Nov 2006 17:44:28 +0000 Subject: delete shader objects when destroying shared context state --- src/mesa/main/context.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index c8acc6b55c..44ee046569 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -876,6 +876,16 @@ delete_arrayobj_cb(GLuint id, void *data, void *userData) _mesa_delete_array_object(ctx, arrayObj); } +/** + * Callback for deleting an shader object. Called by _mesa_HashDeleteAll(). + */ +static void +delete_shaderobj_cb(GLuint id, void *data, void *userData) +{ + /* XXX probably need to fix this */ + _mesa_free(data); +} + /** * Deallocate a shared state object and all children structures. @@ -938,6 +948,7 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) _mesa_DeleteHashTable(ss->ArrayObjects); #if FEATURE_ARB_shader_objects + _mesa_HashDeleteAll(ss->GL2Objects, delete_shaderobj_cb, ctx); _mesa_DeleteHashTable(ss->GL2Objects); #endif -- cgit v1.2.3 From 2164cf77306856f7d20965354b4eeff3736ddf64 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 18 Nov 2006 17:45:01 +0000 Subject: move fix-up code into new slang_fixup_save() function --- src/mesa/shader/slang/slang_assemble.c | 18 ++++++------------ src/mesa/shader/slang/slang_compile_function.c | 19 +++++++++++++++++++ src/mesa/shader/slang/slang_compile_function.h | 8 +++++++- 3 files changed, 32 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 09b1df7cb0..0cba5d5d00 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -289,24 +289,18 @@ _slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) fun->address = A->file->count; if (fun->body == NULL) { - /* jump to the actual function body - we do not know it, so add the instruction - * to fixup table */ - fun->fixups.table = (GLuint *) - slang_alloc_realloc(fun->fixups.table, - fun->fixups.count * sizeof(GLuint), - (fun->fixups.count + 1) * sizeof(GLuint)); - if (fun->fixups.table == NULL) - return GL_FALSE; - fun->fixups.table[fun->fixups.count] = fun->address; - fun->fixups.count++; + /* jump to the actual function body - we do not know it, so add + * the instruction to fixup table + */ + if (!slang_fixup_save(&fun->fixups, fun->address)) + return GL_FALSE; if (!PUSH(A->file, slang_asm_jump)) return GL_FALSE; return GL_TRUE; } else { - GLuint i; - /* resolve all fixup table entries and delete it */ + GLuint i; for (i = 0; i < fun->fixups.count; i++) A->file->code[fun->fixups.table[i]].param[0] = fun->address; slang_fixup_table_free(&fun->fixups); diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index b0e2b62d42..e6e0d89ddb 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -47,6 +47,25 @@ slang_fixup_table_free(slang_fixup_table * fix) slang_fixup_table_init(fix); } +/** + * Add a new fixup address to the table. + */ +GLboolean +slang_fixup_save(slang_fixup_table *fixups, GLuint address) +{ + fixups->table = (GLuint *) + slang_alloc_realloc(fixups->table, + fixups->count * sizeof(GLuint), + (fixups->count + 1) * sizeof(GLuint)); + if (fixups->table == NULL) + return GL_FALSE; + fixups->table[fixups->count] = address; + fixups->count++; + return GL_TRUE; +} + + + /* slang_function */ int diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 6d3b85399c..8835544bf3 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -41,14 +41,20 @@ typedef enum slang_function_kind_ slang_func_operator } slang_function_kind; + +/** + * When we need to fill in addresses which we won't know until the future, + * we keep track of them with a fix-up table. + */ typedef struct slang_fixup_table_ { - GLuint *table; + GLuint *table; /**< array[count] of addresses */ GLuint count; } slang_fixup_table; extern void slang_fixup_table_init(slang_fixup_table *); extern void slang_fixup_table_free(slang_fixup_table *); +extern GLboolean slang_fixup_save(slang_fixup_table *fixups, GLuint address); /** -- cgit v1.2.3 From 82d0fd26d49f98517d3668dc1c78a7b4ac8e48e6 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 19 Nov 2006 12:00:59 +0000 Subject: poke the correct FIFO regs --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index c1e9fd5dc5..58fb378c39 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -36,8 +36,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) -#define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) -#define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg)) = value; +#define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg/4)) +#define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg/4)) = value; #define NV_FIFO_READ_GET() ((NV_FIFO_READ(NV03_FIFO_REGS_DMAGET) - nmesa->fifo.put_base) >> 2) #define NV_FIFO_WRITE_PUT(val) NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, ((val)<<2) + nmesa->fifo.put_base) -- cgit v1.2.3 From 08a0946fcc51a0980d1d7a06e11d72ef71efafcf Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 19 Nov 2006 14:10:54 +0000 Subject: Stupid bug.. --- src/mesa/drivers/dri/nouveau/nv30_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 12a45d3ea9..00ab1c3202 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -516,13 +516,13 @@ static void nv30StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL, 1); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL, 3); OUT_RING(fail); OUT_RING(zfail); OUT_RING(zpass); } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL, 1); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL, 3); OUT_RING(fail); OUT_RING(zfail); OUT_RING(zpass); -- cgit v1.2.3 From b3fd1556f9e94d6d6f6d3933c404fc37aec7b1a3 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 19 Nov 2006 15:45:36 +0000 Subject: More FIFO fixes. --- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 5 +++++ src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 8d2e88b1f3..9fac6a48df 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -112,6 +112,7 @@ void nouveauWaitForIdle(nouveauContextPtr nmesa) GLboolean nouveauFifoInit(nouveauContextPtr nmesa) { drm_nouveau_fifo_alloc_t fifo_init; + int i; #ifdef NOUVEAU_RING_DEBUG return GL_TRUE; @@ -140,6 +141,10 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa) nmesa->fifo.max = (fifo_init.cmdbuf_size >> 2) - 1; nmesa->fifo.free = nmesa->fifo.max - nmesa->fifo.current; + for (i=0; ififo.free -= RING_SKIPS; + MESSAGE("Fifo init ok. Using context %d\n", fifo_init.channel); return GL_TRUE; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 58fb378c39..c5e5d6934f 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -100,9 +100,10 @@ extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); }while(0) #define BEGIN_RING_SIZE(subchannel,tag,size) do { \ - if (nmesa->fifo.freefifo.free <= (size)) \ WAIT_RING(nmesa,(size)); \ - OUT_RING( (size<<18) | ((subchannel) << 13) | (tag)); \ + OUT_RING( ((size)<<18) | ((subchannel) << 13) | (tag)); \ + nmesa->fifo.free -= ((size) + 1); \ }while(0) #define RING_AVAILABLE() (nmesa->fifo.free-1) -- cgit v1.2.3 From a2a747704d1b9572532ec0afd0ede6a4308ef032 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 19 Nov 2006 15:46:31 +0000 Subject: Avoid sharing subchannels with the ddx until context switching is done properly.. --- src/mesa/drivers/dri/nouveau/nouveau_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index 1065a0be59..e9a30d127a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -10,7 +10,7 @@ enum DMAObjects { }; enum DMASubchannel { - NvSub3D = 1, + NvSub3D = 7, }; #endif -- cgit v1.2.3 From 80a0ce37df7b7afef9cd1994527c5ed472c5c4cd Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 19 Nov 2006 15:52:18 +0000 Subject: Fix nv30LineWidth, hw expects a ubyte. --- src/mesa/drivers/dri/nouveau/nv30_state.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 00ab1c3202..bf3338d499 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -414,8 +414,12 @@ static void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) static void nv30LineWidth(GLcontext *ctx, GLfloat width) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte ubWidth; + + CLAMPED_FLOAT_TO_UBYTE(ubWidth, width); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); - OUT_RINGf(width); + OUT_RING(ubWidth); } static void nv30LogicOpcode(GLcontext *ctx, GLenum opcode) -- cgit v1.2.3 From a7139168d29e2cb112227ee6f2b5967c34eb91bd Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 19 Nov 2006 16:05:59 +0000 Subject: Don't bother touching lighting stuff if shaders are in use --- src/mesa/drivers/dri/nouveau/nv30_state.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index bf3338d499..66d94d19cd 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -34,6 +34,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mtypes.h" #include "colormac.h" +#define NOUVEAU_CARD_USING_SHADERS (nmesa->screen->card->type >= NV_40) + static void nv30AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -229,6 +231,10 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) case GL_LIGHT7: { uint32_t mask=0x11<<(2*(cap-GL_LIGHT0)); + + if (NOUVEAU_CARD_USING_SHADERS) + break; + nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); if (nmesa->lighting_enabled) { @@ -238,6 +244,9 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) break; } case GL_LIGHTING: + if (NOUVEAU_CARD_USING_SHADERS) + break; + nmesa->lighting_enabled=state; BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); if (nmesa->lighting_enabled) @@ -337,6 +346,10 @@ static void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (NOUVEAU_CARD_USING_SHADERS) + return; + /* not sure where the fourth param value goes...*/ switch(pname) { @@ -469,8 +482,9 @@ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); void (*RenderMode)(GLcontext *ctx, GLenum mode ); /** Define the scissor box */ void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + /** Select flat or smooth shading */ -void nv30ShadeModel(GLcontext *ctx, GLenum mode) +static void nv30ShadeModel(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); -- cgit v1.2.3 From 327e2c9220772724173ae7c53f4215400ed94355 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 19 Nov 2006 20:18:45 +0000 Subject: New swtcl implementation. It's simpler than the previous one (doesn't use templates) and it is probably faster as well --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 6 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 2 +- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 572 ++++++++----------------- 3 files changed, 171 insertions(+), 409 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 34a65d6d4b..a2b6f1c674 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -137,6 +137,9 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, _math_matrix_ctr(&nmesa->viewport); + nouveauDDInitStateFuncs( ctx ); + nouveauSpanInitFunctions( ctx ); + nouveauDDInitState( nmesa ); switch(nmesa->screen->card->type) { case NV_03: @@ -155,9 +158,6 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, nv10TriInitFunctions( ctx ); break; } - nouveauDDInitStateFuncs( ctx ); - nouveauSpanInitFunctions( ctx ); - nouveauDDInitState( nmesa ); driContextPriv->driverPrivate = (void *)nmesa; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index c5e5d6934f..39e67176de 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -74,7 +74,7 @@ int i; printf("OUT_RINGp:\n"); for(i=0;ififo.buffer+nmesa->fifo.current,ptr,sz); \ - nmesa->fifo.current+=(sz/sizeof(*ptr)); \ + nmesa->fifo.current+=(sz/4); \ }while(0) #define OUT_RING(n) do { \ diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 772a5368e9..1afba77966 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -71,7 +71,7 @@ static void nv10ResetLineStipple( GLcontext *ctx ); /* the size above which we fire the ring. this is a performance-tunable */ #define NOUVEAU_FIRE_SIZE (2048/4) -static inline void nv10StartPrimitive(struct nouveau_context* nmesa) +static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t primitive,uint32_t size) { if (nmesa->screen->card->type==NV_10) BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); @@ -79,14 +79,14 @@ static inline void nv10StartPrimitive(struct nouveau_context* nmesa) BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_BEGIN_END,1); else BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_BEGIN_END,1); - OUT_RING(nmesa->current_primitive); + OUT_RING(primitive); if (nmesa->screen->card->type==NV_10) - BEGIN_RING_PRIM(NvSub3D,NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA,NOUVEAU_MIN_PRIM_SIZE); + BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA,size); else if (nmesa->screen->card->type==NV_20) - BEGIN_RING_PRIM(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_DATA,NOUVEAU_MIN_PRIM_SIZE); + BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_DATA,size); else - BEGIN_RING_PRIM(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_DATA,NOUVEAU_MIN_PRIM_SIZE); + BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_DATA,size); } inline void nv10FinishPrimitive(struct nouveau_context *nmesa) @@ -105,15 +105,8 @@ inline void nv10FinishPrimitive(struct nouveau_context *nmesa) static inline void nv10ExtendPrimitive(struct nouveau_context* nmesa, int size) { - /* when the fifo has enough stuff (2048 bytes) or there is not enough room, fire */ - if ((RING_AHEAD()>=NOUVEAU_FIRE_SIZE)||(RING_AVAILABLE()verts; + GLuint vertsize = nmesa->vertex_size; + GLuint size_dword = vertsize*(count-start); -#define CTX_ARG nouveauContextPtr nmesa -#define GET_VERTEX_DWORDS() nmesa->vertex_size -#define LOCAL_VARS \ - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \ - const char *nouveauverts = (char *)nmesa->verts; -#define VERT(x) (nouveauVertex *)(nouveauverts + ((x) * vertsize * sizeof(int))) -#define VERTEX nouveauVertex - -#undef TAG -#define TAG(x) nouveau_##x -#include "tnl_dd/t_dd_triemit.h" - -/*********************************************************************** - * Macros for nouveau_dd_tritmp.h to draw basic primitives * - ***********************************************************************/ - -#define TRI(a, b, c) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_tri(nmesa, a, b, c); \ - else \ - nv10_draw_triangle(nmesa, a, b, c); \ - } while (0) - -#define QUAD(a, b, c, d) \ - do { \ - if (DO_FALLBACK) { \ - nmesa->draw_tri(nmesa, a, b, d); \ - nmesa->draw_tri(nmesa, b, c, d); \ - } \ - else \ - nv10_draw_quad(nmesa, a, b, c, d); \ - } while (0) - -#define LINE(v0, v1) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_line(nmesa, v0, v1); \ - else \ - nv10_draw_line(nmesa, v0, v1); \ - } while (0) + nv10ExtendPrimitive(nmesa, size_dword); + nv10StartPrimitive(nmesa,prim+1,size_dword); + OUT_RINGp((nouveauVertex*)(vertptr+(start*vertsize*4)),size_dword); + nv10FinishPrimitive(nmesa); +} -#define POINT(v0) \ - do { \ - if (DO_FALLBACK) \ - nmesa->draw_point(nmesa, v0); \ - else \ - nv10_draw_point(nmesa, v0); \ - } while (0) +static void nv10_render_points_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_POINTS); +} -#undef TAG +static void nv10_render_lines_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_LINES); +} -/*********************************************************************** - * Build render functions from dd templates * - ***********************************************************************/ +static void nv10_render_line_strip_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_LINE_STRIP); +} -#define NOUVEAU_OFFSET_BIT 0x01 -#define NOUVEAU_TWOSIDE_BIT 0x02 -#define NOUVEAU_UNFILLED_BIT 0x04 -#define NOUVEAU_FALLBACK_BIT 0x08 -#define NOUVEAU_MAX_TRIFUNC 0x10 - - -static struct { - tnl_points_func points; - tnl_line_func line; - tnl_triangle_func triangle; - tnl_quad_func quad; -} rast_tab[NOUVEAU_MAX_TRIFUNC + 1]; - - -#define DO_FALLBACK (IND & NOUVEAU_FALLBACK_BIT) -#define DO_OFFSET (IND & NOUVEAU_OFFSET_BIT) -#define DO_UNFILLED (IND & NOUVEAU_UNFILLED_BIT) -#define DO_TWOSIDE (IND & NOUVEAU_TWOSIDE_BIT) -#define DO_FLAT 0 -#define DO_TRI 1 -#define DO_QUAD 1 -#define DO_LINE 1 -#define DO_POINTS 1 -#define DO_FULL_QUAD 1 - -#define HAVE_RGBA 1 -#define HAVE_SPEC 1 -#define HAVE_BACK_COLORS 0 -#define HAVE_HW_FLATSHADE 1 -#define VERTEX nouveauVertex -#define TAB rast_tab - - -#define DEPTH_SCALE 1.0 -#define UNFILLED_TRI unfilled_tri -#define UNFILLED_QUAD unfilled_quad -#define VERT_X(_v) _v->v.x -#define VERT_Y(_v) _v->v.y -#define VERT_Z(_v) _v->v.z -#define AREA_IS_CCW(a) (a > 0) -#define GET_VERTEX(e) (nmesa->verts + (e * nmesa->vertex_size * sizeof(int))) - -#define VERT_SET_RGBA( v, c ) \ - do { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->f[coloroffset]); \ - color->red=(c)[0]; \ - color->green=(c)[1]; \ - color->blue=(c)[2]; \ - color->alpha=(c)[3]; \ - } while (0) +static void nv10_render_line_loop_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_LINE_LOOP); +} -#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +static void nv10_render_triangles_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_TRIANGLES); +} -#define VERT_SET_SPEC( v, c ) \ - do { \ - if (specoffset) { \ - nouveau_color_t *color = (nouveau_color_t *)&((v)->f[specoffset]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ - } \ - } while (0) -#define VERT_COPY_SPEC( v0, v1 ) \ - do { \ - if (specoffset) { \ - nouveau_color_t *spec0 = (nouveau_color_t *)&((v0)->ui[specoffset]); \ - nouveau_color_t *spec1 = (nouveau_color_t *)&((v1)->ui[specoffset]); \ - spec0->red = spec1->red; \ - spec0->green = spec1->green; \ - spec0->blue = spec1->blue; \ - } \ - } while (0) +static void nv10_render_tri_strip_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_TRIANGLE_STRIP); +} +static void nv10_render_tri_fan_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_TRIANGLE_FAN); +} -#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->f[coloroffset] -#define VERT_RESTORE_RGBA( idx ) v[idx]->f[coloroffset] = color[idx] -#define VERT_SAVE_SPEC( idx ) if (specoffset) spec[idx] = v[idx]->f[specoffset] -#define VERT_RESTORE_SPEC( idx ) if (specoffset) v[idx]->f[specoffset] = spec[idx] +static void nv10_render_quads_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_QUADS); +} +static void nv10_render_quad_strip_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_QUAD_STRIP); +} -#undef LOCAL_VARS -#define LOCAL_VARS(n) \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLuint color[n], spec[n]; \ -GLuint coloroffset = nmesa->color_offset; \ -GLuint specoffset = nmesa->specular_offset; \ -(void)color; (void)spec; (void)coloroffset; (void)specoffset; +static void nv10_render_poly_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_verts(ctx,start,count,flags,GL_POLYGON); +} +static void nv10_render_noop_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ +} -/*********************************************************************** - * Helpers for rendering unfilled primitives * - ***********************************************************************/ +static inline void nv10_render_generic_primitive_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags,GLuint prim) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte *vertptr = (GLubyte *)nmesa->verts; + GLuint vertsize = nmesa->vertex_size; + GLuint size_dword = vertsize*(count-start); + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; + GLuint j; + + nv10ExtendPrimitive(nmesa, size_dword); + nv10StartPrimitive(nmesa,prim+1,size_dword); + for (j=start; jcurrent_primitive -#define TAG(x) x -#define IND NOUVEAU_FALLBACK_BIT -#include "tnl_dd/t_dd_unfilled.h" -#undef IND -#undef RASTERIZE -/*********************************************************************** - * Generate GL render functions * - ***********************************************************************/ -#define RASTERIZE(x) - -#define IND (0) -#define TAG(x) x -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT) -#define TAG(x) x##_twoside_offset -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT) -#define TAG(x) x##_twoside_offset_unfilled -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_UNFILLED_BIT|NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - -#define IND (NOUVEAU_TWOSIDE_BIT|NOUVEAU_OFFSET_BIT|NOUVEAU_UNFILLED_BIT| \ - NOUVEAU_FALLBACK_BIT) -#define TAG(x) x##_twoside_offset_unfilled_fallback -#include "tnl_dd/t_dd_tritmp.h" - - -/* Catchall case for flat, separate specular triangles */ -#undef DO_FALLBACK -#undef DO_OFFSET -#undef DO_UNFILLED -#undef DO_TWOSIDE -#undef DO_FLAT -#define DO_FALLBACK (0) -#define DO_OFFSET (ctx->_TriangleCaps & DD_TRI_OFFSET) -#define DO_UNFILLED (ctx->_TriangleCaps & DD_TRI_UNFILLED) -#define DO_TWOSIDE (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) -#define DO_FLAT 1 -#define TAG(x) x##_flat_specular -#define IND NOUVEAU_MAX_TRIFUNC -#include "tnl_dd/t_dd_tritmp.h" - - -static void init_rast_tab(void) -{ - init(); - init_offset(); - init_twoside(); - init_twoside_offset(); - init_unfilled(); - init_offset_unfilled(); - init_twoside_unfilled(); - init_twoside_offset_unfilled(); - init_fallback(); - init_offset_fallback(); - init_twoside_fallback(); - init_twoside_offset_fallback(); - init_unfilled_fallback(); - init_offset_unfilled_fallback(); - init_twoside_unfilled_fallback(); - init_twoside_offset_unfilled_fallback(); - - init_flat_specular(); /* special! */ +static void nv10_render_points_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_POINTS); } +static void nv10_render_lines_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_LINES); +} -/**********************************************************************/ -/* Render unclipped begin/end objects */ -/**********************************************************************/ -#define IND 0 -#define V(x) (nouveauVertex *)(vertptr + ((x) * vertsize * sizeof(int))) -#define RENDER_POINTS(start, count) \ - for (; start < count; start++) POINT(V(ELT(start))); -#define RENDER_LINE(v0, v1) LINE(V(v0), V(v1)) -#define RENDER_TRI( v0, v1, v2) TRI( V(v0), V(v1), V(v2)) -#define RENDER_QUAD(v0, v1, v2, v3) QUAD(V(v0), V(v1), V(v2), V(v3)) -#define INIT(x) nv10RasterPrimitive(ctx, x, hw_prim[x]) -#undef LOCAL_VARS -#define LOCAL_VARS \ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); \ -GLubyte *vertptr = (GLubyte *)nmesa->verts; \ -const GLuint vertsize = nmesa->vertex_size; \ -const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ -const GLboolean stipple = ctx->Line.StippleFlag; \ -(void) elt; (void) stipple; -#define RESET_STIPPLE if ( stipple ) nv10ResetLineStipple( ctx ); -#define RESET_OCCLUSION -#define PRESERVE_VB_DEFS -#define ELT(x) x -#define TAG(x) nouveau_##x##_verts -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#define TAG(x) nouveau_##x##_elts -#define ELT(x) elt[x] -#include "tnl/t_vb_rendertmp.h" -#undef ELT -#undef TAG -#undef NEED_EDGEFLAG_SETUP -#undef EDGEFLAG_GET -#undef EDGEFLAG_SET -#undef RESET_OCCLUSION +static void nv10_render_line_strip_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_LINE_STRIP); +} +static void nv10_render_line_loop_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_LINE_LOOP); +} -/**********************************************************************/ -/* Render clipped primitives */ -/**********************************************************************/ +static void nv10_render_triangles_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_TRIANGLES); +} +static void nv10_render_tri_strip_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_TRIANGLE_STRIP); +} +static void nv10_render_tri_fan_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_TRIANGLE_FAN); +} -static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) +static void nv10_render_quads_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) { - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint prim = NOUVEAU_CONTEXT(ctx)->current_primitive; + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_QUADS); +} - /* Render the new vertices as an unclipped polygon. - */ - { - GLuint *tmp = VB->Elts; - VB->Elts = (GLuint *)elts; - tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, - PRIM_BEGIN|PRIM_END); - VB->Elts = tmp; - } +static void nv10_render_quad_strip_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_QUAD_STRIP); +} - /* Restore the render primitive - */ - if (prim != GL_POLYGON && - prim != GL_POLYGON + 1) - tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +static void nv10_render_poly_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + nv10_render_generic_primitive_elts(ctx,start,count,flags,GL_POLYGON); } -static void nouveauRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) +static void nv10_render_noop_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) { - TNLcontext *tnl = TNL_CONTEXT(ctx); - tnl->Driver.Render.Line(ctx, ii, jj); } -static void nouveauFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts, - GLuint n) +static void (*nv10_render_tab_elts[GL_POLYGON+2])(GLcontext *, + GLuint, + GLuint, + GLuint) = { - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint vertsize = nmesa->vertex_size; - nv10ExtendPrimitive(nmesa, (n - 2) * 3 * 4 * vertsize); - GLubyte *vertptr = (GLubyte *)nmesa->verts; - const GLuint *start = (const GLuint *)V(elts[0]); - int i; + nv10_render_points_elts, + nv10_render_lines_elts, + nv10_render_line_loop_elts, + nv10_render_line_strip_elts, + nv10_render_triangles_elts, + nv10_render_tri_strip_elts, + nv10_render_tri_fan_elts, + nv10_render_quads_elts, + nv10_render_quad_strip_elts, + nv10_render_poly_elts, + nv10_render_noop_elts, +}; - for (i = 2; i < n; i++) { - OUT_RINGp(V(elts[i-1]),vertsize); - OUT_RINGp(V(elts[i]),vertsize); - OUT_RINGp(start,vertsize); - } -} /**********************************************************************/ /* Choose render functions */ @@ -571,58 +370,15 @@ static void nv10ChooseRenderState(GLcontext *ctx) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLuint flags = ctx->_TriangleCaps; - GLuint index = 0; nmesa->draw_point = nv10_draw_point; nmesa->draw_line = nv10_draw_line; nmesa->draw_tri = nv10_draw_triangle; - if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= NOUVEAU_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= NOUVEAU_OFFSET_BIT; - if (flags & DD_TRI_UNFILLED) index |= NOUVEAU_UNFILLED_BIT; - if (flags & ANY_FALLBACK_FLAGS) index |= NOUVEAU_FALLBACK_BIT; - - /* Hook in fallbacks for specific primitives. - */ - if (flags & POINT_FALLBACK) - nmesa->draw_point = nouveau_fallback_point; - - if (flags & LINE_FALLBACK) - nmesa->draw_line = nouveau_fallback_line; - - if (flags & TRI_FALLBACK) - nmesa->draw_tri = nouveau_fallback_tri; - } - - - if ((flags & DD_SEPARATE_SPECULAR) && - ctx->Light.ShadeModel == GL_FLAT) { - index = NOUVEAU_MAX_TRIFUNC; /* flat specular */ - } - - if (nmesa->render_index != index) { - nmesa->render_index = index; - - tnl->Driver.Render.Points = rast_tab[index].points; - tnl->Driver.Render.Line = rast_tab[index].line; - tnl->Driver.Render.Triangle = rast_tab[index].triangle; - tnl->Driver.Render.Quad = rast_tab[index].quad; - - if (index == 0) { - tnl->Driver.Render.PrimTabVerts = nouveau_render_tab_verts; - tnl->Driver.Render.PrimTabElts = nouveau_render_tab_elts; - tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ - tnl->Driver.Render.ClippedPolygon = nouveauFastRenderClippedPoly; - } - else { - tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; - tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; - tnl->Driver.Render.ClippedLine = nouveauRenderClippedLine; - tnl->Driver.Render.ClippedPolygon = nouveauRenderClippedPoly; - } - } + tnl->Driver.Render.PrimTabVerts = nv10_render_tab_verts; + tnl->Driver.Render.PrimTabElts = nv10_render_tab_elts; + tnl->Driver.Render.ClippedLine = NULL; + tnl->Driver.Render.ClippedPolygon = NULL; } @@ -817,6 +573,19 @@ void nv10RasterPrimitive(GLcontext *ctx, } } +static const GLuint hw_prim[GL_POLYGON+1] = { + GL_POINTS+1, + GL_LINES+1, + GL_LINE_STRIP+1, + GL_LINE_LOOP+1, + GL_TRIANGLES+1, + GL_TRIANGLE_STRIP+1, + GL_TRIANGLE_FAN+1, + GL_QUADS+1, + GL_QUAD_STRIP+1, + GL_POLYGON+1 +}; + /* Callback for mesa: */ static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim ) @@ -839,12 +608,6 @@ void nv10TriInitFunctions(GLcontext *ctx) { struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); - static int firsttime = 1; - - if (firsttime) { - init_rast_tab(); - firsttime = 0; - } tnl->Driver.RunPipeline = nouveauRunPipeline; tnl->Driver.Render.Start = nv10RenderStart; @@ -856,10 +619,9 @@ void nv10TriInitFunctions(GLcontext *ctx) tnl->Driver.Render.Interp = _tnl_interp; _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, - (6 + 2*ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); + 16 * sizeof(GLfloat) ); nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; - } -- cgit v1.2.3 From 3613eba085dea61d11cda61d1f70bf9824282661 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 19 Nov 2006 21:29:41 +0000 Subject: Fix the fifo debugging feature. --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 39e67176de..92acc002d9 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_ctrlreg.h" -//#define NOUVEAU_RING_DEBUG +#define NOUVEAU_RING_DEBUG #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) @@ -67,7 +67,7 @@ int i; printf("OUT_RINGp:\n"); for(i=0;i Date: Sun, 19 Nov 2006 21:51:28 +0000 Subject: Oops. --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 1afba77966..c1348b1363 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -91,7 +91,6 @@ static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t pri inline void nv10FinishPrimitive(struct nouveau_context *nmesa) { - FINISH_RING_PRIM(); if (nmesa->screen->card->type==NV_10) BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); else if (nmesa->screen->card->type==NV_20) -- cgit v1.2.3 From fe2e6100ece780437c622c8469efbec2b98f7a6f Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 19 Nov 2006 22:16:54 +0000 Subject: More fifo debug fixes --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 92acc002d9..b738fa8ee1 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_ctrlreg.h" -#define NOUVEAU_RING_DEBUG +//#define NOUVEAU_RING_DEBUG #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) @@ -59,15 +59,16 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef NOUVEAU_RING_DEBUG #define OUT_RINGp(ptr,sz) do { \ -int i; printf("OUT_RINGp:\n"); for(i=0;i Date: Sun, 19 Nov 2006 23:16:29 +0000 Subject: More work on the swtcl --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 6 +++--- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index b738fa8ee1..da2dadada7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -60,7 +60,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define OUT_RINGp(ptr,sz) do { \ uint32_t* p=(uint32_t*)ptr; \ -int i; printf("OUT_RINGp:\n"); for(i=0;ififo.buffer+nmesa->fifo.current,ptr,sz); \ - nmesa->fifo.current+=(sz/4); \ + memcpy(nmesa->fifo.buffer+nmesa->fifo.current,ptr,sz*4); \ + nmesa->fifo.current+=sz; \ }while(0) #define OUT_RING(n) do { \ diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index c1348b1363..48f41cf2fa 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -549,8 +549,6 @@ static void nv10RenderStart(GLcontext *ctx) static void nv10RenderFinish(GLcontext *ctx) { - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - nv10FinishPrimitive(nmesa); } @@ -618,7 +616,7 @@ void nv10TriInitFunctions(GLcontext *ctx) tnl->Driver.Render.Interp = _tnl_interp; _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, - 16 * sizeof(GLfloat) ); + 64 * sizeof(GLfloat) ); nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; } -- cgit v1.2.3 From ac208c95cdef7711a9f4ba1a451dbb497912a40e Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 19 Nov 2006 23:39:16 +0000 Subject: Use NONINC_METHOD for vertex data. --- src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h | 2 ++ src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h b/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h index 2f4c3f6d5d..c9b2d59007 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_ctrlreg.h @@ -40,3 +40,5 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK)) +#define NONINC_METHOD 0x40000000 + diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 48f41cf2fa..f128926182 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -82,11 +82,11 @@ static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t pri OUT_RING(primitive); if (nmesa->screen->card->type==NV_10) - BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA,size); + BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA|NONINC_METHOD,size); else if (nmesa->screen->card->type==NV_20) - BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_DATA,size); + BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_DATA|NONINC_METHOD,size); else - BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_DATA,size); + BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_DATA|NONINC_METHOD,size); } inline void nv10FinishPrimitive(struct nouveau_context *nmesa) -- cgit v1.2.3 From 50c85daf02b90fcee239172d7067b582680d2169 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 19 Nov 2006 23:47:24 +0000 Subject: Cleanup the swtcl code. --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index f128926182..832ce4ad21 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -56,18 +56,6 @@ static void nv10ResetLineStipple( GLcontext *ctx ); -/*********************************************************************** - * Emit primitives as inline vertices * - ***********************************************************************/ -#define LINE_FALLBACK (0) -#define POINT_FALLBACK (0) -#define TRI_FALLBACK (0) -#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) -#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) - - -/* the free room we want before we start a vertex batch. this is a performance-tunable */ -#define NOUVEAU_MIN_PRIM_SIZE (32/4) /* the size above which we fire the ring. this is a performance-tunable */ #define NOUVEAU_FIRE_SIZE (2048/4) @@ -342,21 +330,6 @@ static void (*nv10_render_tab_elts[GL_POLYGON+2])(GLcontext *, /**********************************************************************/ - - -#define _NOUVEAU_NEW_VERTEX (_NEW_TEXTURE | \ - _DD_NEW_SEPARATE_SPECULAR | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _NEW_FOG) - -#define _NOUVEAU_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ - _DD_NEW_TRI_UNFILLED | \ - _DD_NEW_TRI_LIGHT_TWOSIDE | \ - _DD_NEW_TRI_OFFSET | \ - _DD_NEW_TRI_STIPPLE | \ - _NEW_POLYGONSTIPPLE) - #define EMIT_ATTR( ATTR, STYLE ) \ do { \ nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ -- cgit v1.2.3 From 87f602dd820b8cca5293bd30ba356123ab0f9e36 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 20 Nov 2006 11:45:34 +0000 Subject: Don't perform dangling attribute check on POS attribute. It can't by definition dangle (every vertex has a position). However save->currentsz isn't properly maintained for this attribute, as there is no current position value to track. Reported by Haihao Xiang. --- src/mesa/drivers/dri/i965/brw_save_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_save_api.c b/src/mesa/drivers/dri/i965/brw_save_api.c index b2f255d095..c541fbe0f4 100644 --- a/src/mesa/drivers/dri/i965/brw_save_api.c +++ b/src/mesa/drivers/dri/i965/brw_save_api.c @@ -529,7 +529,7 @@ static void _save_upgrade_vertex( GLcontext *ctx, /* Need to note this and fix up at runtime (or loopback): */ - if (save->currentsz[attr][0] == 0) { + if (attr != BRW_ATTRIB_POS && save->currentsz[attr][0] == 0) { assert(oldsz == 0); save->dangling_attr_ref = GL_TRUE; } -- cgit v1.2.3 From d2fc1c8384da403930e8d4b9ca95da55846d1696 Mon Sep 17 00:00:00 2001 From: Jouk Jansen Date: Mon, 20 Nov 2006 14:04:04 +0000 Subject: Committing in . Solve small definition problem for OpenVMS Modified Files: Mesa/src/mesa/shader/descrip.mms --- src/mesa/shader/descrip.mms | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/descrip.mms b/src/mesa/shader/descrip.mms index 95569a6f25..d70cec3830 100644 --- a/src/mesa/shader/descrip.mms +++ b/src/mesa/shader/descrip.mms @@ -1,7 +1,6 @@ # Makefile for core library for VMS -# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl -# Last revision : 1 June 2005 - +# contributed by Jouk Jansen joukj@hrem.nano.tudelft.nl +# Last revision : 20 November 2006 .first define gl [---.include.gl] define math [-.math] @@ -16,7 +15,7 @@ VPATH = RCS INCDIR = [---.include],[.grammar],[-.main],[-.glapi],[.slang] LIBDIR = [---.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm +CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1,"__extension__=")/name=(as_is,short)/float=ieee/ieee=denorm SOURCES = \ atifragshader.c \ -- cgit v1.2.3 From 7cc5522f86026a5058e4594a51685e96de2ca91a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 20 Nov 2006 15:14:35 +0000 Subject: fix glPopAttrib/color material bug #9091 --- src/mesa/main/attrib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index e22edc1bbc..9993a0021b 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -1009,9 +1009,6 @@ _mesa_PopAttrib(void) (GLfloat) light->Model.TwoSide); _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, (GLfloat) light->Model.ColorControl); - /* materials */ - MEMCPY(&ctx->Light.Material, &light->Material, - sizeof(struct gl_material)); /* shade model */ _mesa_ShadeModel(light->ShadeModel); /* color material */ @@ -1019,6 +1016,9 @@ _mesa_PopAttrib(void) light->ColorMaterialMode); _mesa_set_enable(ctx, GL_COLOR_MATERIAL, light->ColorMaterialEnabled); + /* materials */ + MEMCPY(&ctx->Light.Material, &light->Material, + sizeof(struct gl_material)); } break; case GL_LINE_BIT: -- cgit v1.2.3 From 479aca6bf10b9546deb523f42bc3be48b17081cf Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 20 Nov 2006 15:15:24 +0000 Subject: Fix typos that meant vbos were never unmapped --- src/mesa/main/api_arrayelt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 3c26c2c590..804700118f 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1228,18 +1228,17 @@ void _ae_unmap_vbos( GLcontext *ctx ) AEcontext *actx = AE_CONTEXT(ctx); GLuint i; - if (actx->mapped_vbos) + if (!actx->mapped_vbos) return; - if (actx->NewState) - _ae_update_state(ctx); + assert (!actx->NewState); for (i = 0; i < actx->nr_vbos; i++) ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, actx->vbo[i]); - actx->mapped_vbos = GL_TRUE; + actx->mapped_vbos = GL_FALSE; } -- cgit v1.2.3 From afb49fef9033d84d989d62928a03615ec5dbda04 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 20 Nov 2006 17:25:54 +0000 Subject: Add state initialization to context creation. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 + src/mesa/drivers/dri/nouveau/nouveau_state.c | 114 ++++++++++++++++++++++++- src/mesa/drivers/dri/nouveau/nouveau_state.h | 3 + 3 files changed, 118 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index a2b6f1c674..a2ac056010 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -159,6 +159,8 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, break; } + nouveauInitState(ctx); + driContextPriv->driverPrivate = (void *)nmesa; NOUVEAU_DEBUG = driParseDebugString( getenv( "NOUVEAU_DEBUG" ), diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 94c92aeb8a..9811606311 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -154,7 +154,26 @@ static void nouveauDDInvalidateState(GLcontext *ctx, GLuint new_state) /* Initialize the context's hardware state. */ void nouveauDDInitState(nouveauContextPtr nmesa) { - + uint32_t type = nmesa->screen->card->type; + switch(type) + { + case NV_03: + case NV_04: + case NV_05: + case NV_10: + //nv10InitStateFuncs(&nmesa->glCtx->Driver); + break; + case NV_20: + nv20InitStateFuncs(&nmesa->glCtx->Driver); + break; + case NV_30: + case NV_40: + case G_70: + nv30InitStateFuncs(&nmesa->glCtx->Driver); + break; + default: + break; + } } /* Initialize the driver's state functions */ @@ -211,3 +230,96 @@ void nouveauDDInitStateFuncs(GLcontext *ctx) ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } + +void nouveauInitState(GLcontext *ctx) +{ + /* + * Mesa should do this for us: + */ + ctx->Driver.AlphaFunc( ctx, + ctx->Color.AlphaFunc, + ctx->Color.AlphaRef); + + ctx->Driver.BlendColor( ctx, + ctx->Color.BlendColor ); + + ctx->Driver.BlendEquationSeparate( ctx, + ctx->Color.BlendEquationRGB, + ctx->Color.BlendEquationA); + + ctx->Driver.BlendFuncSeparate( ctx, + ctx->Color.BlendSrcRGB, + ctx->Color.BlendDstRGB, + ctx->Color.BlendSrcA, + ctx->Color.BlendDstA); + + ctx->Driver.ColorMask( ctx, + ctx->Color.ColorMask[RCOMP], + ctx->Color.ColorMask[GCOMP], + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP]); + + ctx->Driver.CullFace( ctx, ctx->Polygon.CullFaceMode ); + ctx->Driver.DepthFunc( ctx, ctx->Depth.Func ); + ctx->Driver.DepthMask( ctx, ctx->Depth.Mask ); + + ctx->Driver.Enable( ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled ); + ctx->Driver.Enable( ctx, GL_BLEND, ctx->Color.BlendEnabled ); + ctx->Driver.Enable( ctx, GL_COLOR_LOGIC_OP, ctx->Color.ColorLogicOpEnabled ); + ctx->Driver.Enable( ctx, GL_COLOR_SUM, ctx->Fog.ColorSumEnabled ); + ctx->Driver.Enable( ctx, GL_CULL_FACE, ctx->Polygon.CullFlag ); + ctx->Driver.Enable( ctx, GL_DEPTH_TEST, ctx->Depth.Test ); + ctx->Driver.Enable( ctx, GL_DITHER, ctx->Color.DitherFlag ); + ctx->Driver.Enable( ctx, GL_FOG, ctx->Fog.Enabled ); + ctx->Driver.Enable( ctx, GL_LIGHTING, ctx->Light.Enabled ); + ctx->Driver.Enable( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag ); + ctx->Driver.Enable( ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag ); + ctx->Driver.Enable( ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled ); + ctx->Driver.Enable( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled ); + ctx->Driver.Enable( ctx, GL_TEXTURE_1D, GL_FALSE ); + ctx->Driver.Enable( ctx, GL_TEXTURE_2D, GL_FALSE ); + ctx->Driver.Enable( ctx, GL_TEXTURE_RECTANGLE_NV, GL_FALSE ); + ctx->Driver.Enable( ctx, GL_TEXTURE_3D, GL_FALSE ); + ctx->Driver.Enable( ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE ); + + ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color ); + ctx->Driver.Fogfv( ctx, GL_FOG_MODE, 0 ); + ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density ); + ctx->Driver.Fogfv( ctx, GL_FOG_START, &ctx->Fog.Start ); + ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End ); + + ctx->Driver.FrontFace( ctx, ctx->Polygon.FrontFace ); + + { + GLfloat f = (GLfloat)ctx->Light.Model.ColorControl; + ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_COLOR_CONTROL, &f ); + } + + ctx->Driver.LineWidth( ctx, ctx->Line.Width ); + ctx->Driver.LogicOpcode( ctx, ctx->Color.LogicOp ); + ctx->Driver.PointSize( ctx, ctx->Point.Size ); + ctx->Driver.PolygonStipple( ctx, (const GLubyte *)ctx->PolygonStipple ); + ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height ); + ctx->Driver.ShadeModel( ctx, ctx->Light.ShadeModel ); + ctx->Driver.StencilFuncSeparate( ctx, GL_FRONT, + ctx->Stencil.Function[0], + ctx->Stencil.Ref[0], + ctx->Stencil.ValueMask[0] ); + ctx->Driver.StencilFuncSeparate( ctx, GL_BACK, + ctx->Stencil.Function[1], + ctx->Stencil.Ref[1], + ctx->Stencil.ValueMask[1] ); + ctx->Driver.StencilMaskSeparate( ctx, GL_FRONT, ctx->Stencil.WriteMask[0] ); + ctx->Driver.StencilMaskSeparate( ctx, GL_BACK, ctx->Stencil.WriteMask[1] ); + ctx->Driver.StencilOpSeparate( ctx, GL_FRONT, + ctx->Stencil.FailFunc[0], + ctx->Stencil.ZFailFunc[0], + ctx->Stencil.ZPassFunc[0]); + ctx->Driver.StencilOpSeparate( ctx, GL_BACK, + ctx->Stencil.FailFunc[1], + ctx->Stencil.ZFailFunc[1], + ctx->Stencil.ZPassFunc[1]); + + ctx->Driver.DrawBuffer( ctx, ctx->Color.DrawBuffer[0] ); +} diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h index 4e8eda83e1..f8fd0cea50 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h @@ -32,8 +32,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. extern void nouveauDDInitState(nouveauContextPtr nmesa); extern void nouveauDDInitStateFuncs(GLcontext *ctx); +extern void nv10InitStateFuncs(struct dd_function_table *func); +extern void nv20InitStateFuncs(struct dd_function_table *func); extern void nv30InitStateFuncs(struct dd_function_table *func); +extern void nouveauInitState(GLcontext *ctx); /* extern void nouveauDDUpdateState(GLcontext *ctx); extern void nouveauDDUpdateHWState(GLcontext *ctx); -- cgit v1.2.3 From 25e495d6050d3fbf2745ba78a85b0a68b3734d91 Mon Sep 17 00:00:00 2001 From: Rune Petersen Date: Mon, 20 Nov 2006 19:57:10 +0000 Subject: Disable fragment program debug messages. --- src/mesa/drivers/dri/r300/r300_fragprog.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index cab5451214..32c0128eaa 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -544,8 +544,6 @@ static pfs_reg_t t_scalar_src(struct r300_fragment_program *rp, struct prog_src_register src = fpsrc; int sc = GET_SWZ(fpsrc.Swizzle, 0); /* X */ - printf("sc %d\n",sc); - src.Swizzle = ((sc<<0)|(sc<<3)|(sc<<6)|(sc<<9)); return t_src(rp, src); @@ -1670,7 +1668,7 @@ void r300_translate_fragment_shader(struct r300_fragment_program *rp) assert(rp->alu_end >= 0); rp->translated = GL_TRUE; - if (1) dump_program(rp); + if (0) dump_program(rp); } update_params(rp); -- cgit v1.2.3 From a20cf73053c2c834abe971c9dc824f14c31884fb Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Tue, 21 Nov 2006 02:47:13 +0000 Subject: More state. --- src/mesa/drivers/dri/nouveau/nv30_state.c | 56 ++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 66d94d19cd..a6cbcb8c8d 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -28,6 +28,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_object.h" #include "nouveau_fifo.h" #include "nouveau_reg.h" +#include "nouveau_state.h" #include "tnl/t_pipeline.h" @@ -414,7 +415,7 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa } /** Set the lighting model parameters */ -static void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); +void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); static void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) @@ -473,15 +474,37 @@ static void nv30PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) } /** Set the scale and units used to calculate depth values */ -void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); +static void nv30PolygonOffset(GLcontext *ctx, GLfloat factor, GLfloat units) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR, 2); + OUT_RINGf(factor); + + /* Looks like we always multiply units by 2.0... according to the dumps.*/ + OUT_RINGf(units * 2.0); +} + /** Set the polygon stippling pattern */ -void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); +static void nv30PolygonStipple(GLcontext *ctx, const GLubyte *mask ) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN(0), 32); + OUT_RINGp(mask, 32); +} + /* Specifies the current buffer for reading */ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); /** Set rasterization mode */ void (*RenderMode)(GLcontext *ctx, GLenum mode ); + /** Define the scissor box */ -void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2); + OUT_RING((w << 16) | x); + OUT_RING((y << 16) | y); +} /** Select flat or smooth shading */ static void nv30ShadeModel(GLcontext *ctx, GLenum mode) @@ -557,16 +580,23 @@ void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, void (*TexParameter)(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params); -void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); + +static void nv30TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16); + /*XXX: This SHOULD work.*/ + OUT_RINGp(mat->m, 16); +} /** Set the viewport */ static void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { - /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); - OUT_RING((w << 16) | x); - OUT_RING((h << 16) | y); + /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); + OUT_RING((w << 16) | x); + OUT_RING((h << 16) | y); } void nv30InitStateFuncs(struct dd_function_table *func) @@ -597,13 +627,13 @@ void nv30InitStateFuncs(struct dd_function_table *func) func->PointParameterfv = nv30PointParameterfv; func->PointSize = nv30PointSize; func->PolygonMode = nv30PolygonMode; -#if 0 func->PolygonOffset = nv30PolygonOffset; func->PolygonStipple = nv30PolygonStipple; +#if 0 func->ReadBuffer = nv30ReadBuffer; func->RenderMode = nv30RenderMode; - func->Scissor = nv30Scissor; #endif + func->Scissor = nv30Scissor; func->ShadeModel = nv30ShadeModel; func->StencilFuncSeparate = nv30StencilFuncSeparate; func->StencilMaskSeparate = nv30StencilMaskSeparate; @@ -611,8 +641,8 @@ void nv30InitStateFuncs(struct dd_function_table *func) #if 0 func->TexGen = nv30TexGen; func->TexParameter = nv30TexParameter; - func->TextureMatrix = nv30TextureMatrix; #endif + func->TextureMatrix = nv30TextureMatrix; func->Viewport = nv30Viewport; } -- cgit v1.2.3 From 0337e5635f8d18fdf9dac734141e5302db6d1d49 Mon Sep 17 00:00:00 2001 From: Sean D'Epagnier Date: Tue, 21 Nov 2006 08:48:44 +0000 Subject: glTexCoord3dv was not using third coordinate --- src/mesa/main/api_loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 51d5af6f5f..717ef1fc8f 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -510,7 +510,7 @@ loopback_TexCoord2sv( const GLshort *v ) static void GLAPIENTRY loopback_TexCoord3dv( const GLdouble *v ) { - TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); + TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]); } static void GLAPIENTRY -- cgit v1.2.3 From d6f89107ba42724803321c9819f9c836d508b899 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 21 Nov 2006 10:11:02 +0000 Subject: Commit Gary Wong & Keith Packard's changes for bug 8867 -- adjust code after repositioning of INDEX value in BRW_ATTRIB enum. --- src/mesa/drivers/dri/i965/brw_attrib.h | 1 + src/mesa/drivers/dri/i965/brw_save_api.c | 6 +++--- src/mesa/drivers/dri/i965/brw_save_draw.c | 26 +++++++++++++++++++------- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_attrib.h b/src/mesa/drivers/dri/i965/brw_attrib.h index a8efc3a528..12659bd1cf 100644 --- a/src/mesa/drivers/dri/i965/brw_attrib.h +++ b/src/mesa/drivers/dri/i965/brw_attrib.h @@ -95,6 +95,7 @@ enum { } ; #define BRW_ATTRIB_FIRST_MATERIAL BRW_ATTRIB_MAT_FRONT_AMBIENT +#define BRW_ATTRIB_LAST_MATERIAL BRW_ATTRIB_MAT_BACK_INDEXES #define BRW_MAX_COPIED_VERTS 3 diff --git a/src/mesa/drivers/dri/i965/brw_save_api.c b/src/mesa/drivers/dri/i965/brw_save_api.c index c541fbe0f4..06ed1d23aa 100644 --- a/src/mesa/drivers/dri/i965/brw_save_api.c +++ b/src/mesa/drivers/dri/i965/brw_save_api.c @@ -417,7 +417,7 @@ static void _save_copy_to_current( GLcontext *ctx ) struct brw_save_context *save = IMM_CONTEXT(ctx)->save; GLuint i; - for (i = BRW_ATTRIB_POS+1 ; i <= BRW_ATTRIB_INDEX ; i++) { + for (i = BRW_ATTRIB_POS+1 ; i < BRW_ATTRIB_MAX ; i++) { if (save->attrsz[i]) { save->currentsz[i][0] = save->attrsz[i]; COPY_CLEAN_4V(save->current[i], @@ -445,7 +445,7 @@ static void _save_copy_from_current( GLcontext *ctx ) struct brw_save_context *save = IMM_CONTEXT(ctx)->save; GLint i; - for (i = BRW_ATTRIB_POS+1 ; i <= BRW_ATTRIB_INDEX ; i++) + for (i = BRW_ATTRIB_POS+1 ; i < BRW_ATTRIB_MAX ; i++) switch (save->attrsz[i]) { case 4: save->attrptr[i][3] = save->current[i][3]; case 3: save->attrptr[i][2] = save->current[i][2]; @@ -1121,7 +1121,7 @@ static void _save_current_init( GLcontext *ctx ) save->current[i] = ctx->ListState.CurrentAttrib[i]; } - for (i = BRW_ATTRIB_FIRST_MATERIAL; i < BRW_ATTRIB_INDEX; i++) { + for (i = BRW_ATTRIB_FIRST_MATERIAL; i <= BRW_ATTRIB_LAST_MATERIAL; i++) { const GLuint j = i - BRW_ATTRIB_FIRST_MATERIAL; ASSERT(j < MAT_ATTRIB_MAX); save->currentsz[i] = &ctx->ListState.ActiveMaterialSize[j]; diff --git a/src/mesa/drivers/dri/i965/brw_save_draw.c b/src/mesa/drivers/dri/i965/brw_save_draw.c index 84f74d3f6c..cebdd8d060 100644 --- a/src/mesa/drivers/dri/i965/brw_save_draw.c +++ b/src/mesa/drivers/dri/i965/brw_save_draw.c @@ -38,7 +38,10 @@ #include "brw_draw.h" #include "brw_fallback.h" - +/* + * After playback, copy everything but the position from the + * last vertex to the saved state + */ static void _playback_copy_to_current( GLcontext *ctx, const struct brw_save_vertex_list *node ) { @@ -47,21 +50,30 @@ static void _playback_copy_to_current( GLcontext *ctx, GLuint i, offset; if (node->count) - offset = node->buffer_offset + (node->count-1) * node->vertex_size; + offset = (node->buffer_offset + + (node->count-1) * node->vertex_size * sizeof(GLfloat)); else offset = node->buffer_offset; - ctx->Driver.GetBufferSubData( ctx, 0, offset, node->vertex_size, + ctx->Driver.GetBufferSubData( ctx, 0, offset, + node->vertex_size * sizeof(GLfloat), data, node->vertex_store->bufferobj ); - for (i = BRW_ATTRIB_POS+1 ; i <= BRW_ATTRIB_INDEX ; i++) { + for (i = 0 ; i < BRW_ATTRIB_MAX ; i++) { if (node->attrsz[i]) { - COPY_CLEAN_4V(save->current[i], node->attrsz[i], data); - data += node->attrsz[i]; + if (i != BRW_ATTRIB_POS) + COPY_CLEAN_4V(save->current[i], node->attrsz[i], data); if (i >= BRW_ATTRIB_MAT_FRONT_AMBIENT && i <= BRW_ATTRIB_MAT_BACK_INDEXES) ctx->NewState |= _NEW_LIGHT; + + /* Edgeflag requires special treatment: + */ + if (i == BRW_ATTRIB_EDGEFLAG) + ctx->Current.EdgeFlag = (data[0] == 1.0); + + data += node->attrsz[i] * sizeof(GLfloat); } } @@ -105,7 +117,7 @@ static void brw_bind_vertex_list( struct brw_save_context *save, memset(arrays, 0, BRW_ATTRIB_MAX * sizeof(arrays[0])); - for (attr = 0; attr <= BRW_ATTRIB_INDEX; attr++) { + for (attr = 0; attr < BRW_ATTRIB_MAX; attr++) { if (node->attrsz[attr]) { arrays[attr].Ptr = (const GLubyte *)data; arrays[attr].Size = node->attrsz[attr]; -- cgit v1.2.3 From f58ec215c5669f36c2649acc9cbeda7383b86879 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 21 Nov 2006 10:16:37 +0000 Subject: Gary Wong's fix for 64 bit cleanness of vertex program inputs bitmask. --- src/mesa/drivers/dri/i965/brw_draw.c | 2 +- src/mesa/drivers/dri/i965/brw_draw_upload.c | 6 +++--- src/mesa/drivers/dri/i965/brw_vs_emit.c | 2 +- src/mesa/drivers/dri/i965/brw_vs_tnl.c | 9 +++++---- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 5c0c5da7ea..471fda9f7e 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -209,7 +209,7 @@ static void brw_merge_inputs( struct brw_context *brw, if (arrays[i] && arrays[i]->Enabled) { brw->vb.inputs[i].glarray = arrays[i]; - brw->vb.info.varying |= 1 << i; + brw->vb.info.varying |= (GLuint64EXT) 1 << i; } else { diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index cde0aa6481..57ee294f0c 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -393,7 +393,7 @@ GLboolean brw_upload_vertices( struct brw_context *brw, { GLcontext *ctx = &brw->intel.ctx; struct intel_context *intel = intel_context(ctx); - GLuint tmp = brw->vs.prog_data->inputs_read; + GLuint64EXT tmp = brw->vs.prog_data->inputs_read; struct brw_vertex_element_packet vep; struct brw_array_state vbp; GLuint i; @@ -414,10 +414,10 @@ GLboolean brw_upload_vertices( struct brw_context *brw, */ while (tmp) { - GLuint i = ffs(tmp)-1; + GLuint i = ffsll(tmp)-1; struct brw_vertex_element *input = &brw->vb.inputs[i]; - tmp &= ~(1<index = i; diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index da9d3bacb0..8403e1bd7b 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -78,7 +78,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c ) */ c->nr_inputs = 0; for (i = 0; i < BRW_ATTRIB_MAX; i++) { - if (c->prog_data.inputs_read & (1<prog_data.inputs_read & ((GLuint64EXT)1<nr_inputs++; c->regs[PROGRAM_INPUT][i] = brw_vec8_grf(reg, 0); reg++; diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index 52bdb9d761..b7893ca3e5 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -146,8 +146,8 @@ static void make_state_key( GLcontext *ctx, struct state_key *key ) } /* BRW_NEW_INPUT_VARYING */ - for (i = BRW_ATTRIB_MAT_FRONT_AMBIENT ; i < BRW_ATTRIB_INDEX ; i++) - if (brw->vb.info.varying & (1<vb.info.varying & ((GLuint64EXT)1<light_material_mask |= 1<<(i-BRW_ATTRIB_MAT_FRONT_AMBIENT); for (i = 0; i < MAX_LIGHTS; i++) { @@ -374,16 +374,17 @@ static void release_temps( struct tnl_program *p ) static struct ureg register_input( struct tnl_program *p, GLuint input ) { + GLuint orig_input = input; /* Cram the material flags into the generic range. We'll translate * them back later. */ if (input >= BRW_ATTRIB_MAT_FRONT_AMBIENT) - input -= BRW_ATTRIB_MAT_FRONT_AMBIENT; + input -= BRW_ATTRIB_MAT_FRONT_AMBIENT - BRW_ATTRIB_GENERIC0; assert(input < 32); p->program->Base.InputsRead |= (1< Date: Tue, 21 Nov 2006 10:43:16 +0000 Subject: Gary Wong's patches for CopyPixels Logiop (enable) and Blend (disallow). Slightly cleaned to disallow on all blend states for code consiseness and turn a table lookup into a function to match other code in the driver. --- src/mesa/drivers/dri/i965/intel_blit.c | 38 ++++++++++++++++++++++++---- src/mesa/drivers/dri/i965/intel_blit.h | 3 ++- src/mesa/drivers/dri/i965/intel_pixel_copy.c | 8 +++--- src/mesa/drivers/dri/i965/intel_regions.c | 3 ++- 4 files changed, 42 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index 0974f1f80a..c8c5bf93c9 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.c +++ b/src/mesa/drivers/dri/i965/intel_blit.c @@ -221,6 +221,29 @@ void intelEmitFillBlit( struct intel_context *intel, ADVANCE_BATCH(); } +static GLuint translate_raster_op(GLenum logicop) +{ + switch(logicop) { + case GL_CLEAR: return 0x00; + case GL_AND: return 0x88; + case GL_AND_REVERSE: return 0x44; + case GL_COPY: return 0xCC; + case GL_AND_INVERTED: return 0x22; + case GL_NOOP: return 0xAA; + case GL_XOR: return 0x66; + case GL_OR: return 0xEE; + case GL_NOR: return 0x11; + case GL_EQUIV: return 0x99; + case GL_INVERT: return 0x55; + case GL_OR_REVERSE: return 0xDD; + case GL_COPY_INVERTED: return 0x33; + case GL_OR_INVERTED: return 0xBB; + case GL_NAND: return 0x77; + case GL_SET: return 0xFF; + default: return 0; + } +} + /* Copy BitBlt */ @@ -236,7 +259,8 @@ void intelEmitCopyBlit( struct intel_context *intel, GLboolean dst_tiled, GLshort src_x, GLshort src_y, GLshort dst_x, GLshort dst_y, - GLshort w, GLshort h ) + GLshort w, GLshort h, + GLenum logic_op ) { GLuint CMD, BR13; int dst_y2 = dst_y + h; @@ -244,12 +268,15 @@ void intelEmitCopyBlit( struct intel_context *intel, BATCH_LOCALS; - DBG("%s src:buf(%d)/%d %d,%d dst:buf(%d)/%d %d,%d sz:%dx%d\n", + DBG("%s src:buf(%d)/%d %d,%d dst:buf(%d)/%d %d,%d sz:%dx%d op:%d\n", __FUNCTION__, src_buffer, src_pitch, src_x, src_y, dst_buffer, dst_pitch, dst_x, dst_y, - w,h); + w,h,logic_op); + assert( logic_op - GL_CLEAR >= 0 ); + assert( logic_op - GL_CLEAR < 0x10 ); + src_pitch *= cpp; dst_pitch *= cpp; @@ -257,11 +284,12 @@ void intelEmitCopyBlit( struct intel_context *intel, case 1: case 2: case 3: - BR13 = (0xCC << 16) | (1<<24); + BR13 = (translate_raster_op(logic_op) << 16) | (1<<24); CMD = XY_SRC_COPY_BLT_CMD; break; case 4: - BR13 = (0xCC << 16) | (1<<24) | (1<<25); + BR13 = (translate_raster_op(logic_op) << 16) | (1<<24) | + (1<<25); CMD = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | XY_SRC_COPY_BLT_WRITE_RGB); break; diff --git a/src/mesa/drivers/dri/i965/intel_blit.h b/src/mesa/drivers/dri/i965/intel_blit.h index b15fb1c2b7..8b0cc65243 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.h +++ b/src/mesa/drivers/dri/i965/intel_blit.h @@ -49,7 +49,8 @@ extern void intelEmitCopyBlit( struct intel_context *intel, GLboolean dst_tiled, GLshort srcx, GLshort srcy, GLshort dstx, GLshort dsty, - GLshort w, GLshort h ); + GLshort w, GLshort h, + GLenum logic_op ); extern void intelEmitFillBlit( struct intel_context *intel, GLuint cpp, diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c index d5d4899452..55b58a8f67 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c @@ -92,9 +92,9 @@ intel_check_blit_fragment_ops(GLcontext * ctx) !ctx->Color.ColorMask[1] || !ctx->Color.ColorMask[2] || !ctx->Color.ColorMask[3] || /* can do this! */ - ctx->Color.ColorLogicOpEnabled || /* can do this! */ ctx->Texture._EnabledUnits || - ctx->FragmentProgram._Enabled); + ctx->FragmentProgram._Enabled || + ctx->Color.BlendEnabled); } @@ -210,7 +210,9 @@ do_blit_copypixels(GLcontext * ctx, rect.x1 + delta_x, rect.y1 + delta_y, /* srcx, srcy */ rect.x1, rect.y1, /* dstx, dsty */ - rect.x2 - rect.x1, rect.y2 - rect.y1); + rect.x2 - rect.x1, rect.y2 - rect.y1, + ctx->Color.ColorLogicOpEnabled ? + ctx->Color.LogicOp : GL_COPY); } intel->need_flush = GL_TRUE; diff --git a/src/mesa/drivers/dri/i965/intel_regions.c b/src/mesa/drivers/dri/i965/intel_regions.c index 53f0561237..398b0a0a3b 100644 --- a/src/mesa/drivers/dri/i965/intel_regions.c +++ b/src/mesa/drivers/dri/i965/intel_regions.c @@ -269,7 +269,8 @@ void intel_region_copy( struct intel_context *intel, dst->pitch, dst->buffer, dst_offset, dst->tiled, srcx, srcy, dstx, dsty, - width, height); + width, height, + GL_COPY ); } /* Fill a rectangular sub-region. Need better logic about when to -- cgit v1.2.3 From 64920ed10ac702ed9be33d4045faa71f06e05029 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 21 Nov 2006 10:50:01 +0000 Subject: Fix more typos. --- src/mesa/main/api_arrayelt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 804700118f..f0164a80f6 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1143,7 +1143,7 @@ static void _ae_update_state( GLcontext *ctx ) [at->array->Size-1] [TYPE_IDX(at->array->Type)]; at->index = VERT_ATTRIB_TEX0 + i; - check_vbo(actx, aa->array->BufferObj); + check_vbo(actx, at->array->BufferObj); at++; } } @@ -1170,7 +1170,7 @@ static void _ae_update_state( GLcontext *ctx ) [TYPE_IDX(at->array->Type)]; } at->index = i; - check_vbo(actx, aa->array->BufferObj); + check_vbo(actx, at->array->BufferObj); at++; } } -- cgit v1.2.3 From 0ea45b1ad822ebdce2af3faef77ed776ca32d46b Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Tue, 21 Nov 2006 12:43:16 +0000 Subject: Add the state caching mechanism. It seems to work, from what I can see. --- src/mesa/drivers/dri/nouveau/Makefile | 3 +- src/mesa/drivers/dri/nouveau/nouveau_context.h | 5 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 37 ++- src/mesa/drivers/dri/nouveau/nouveau_state.c | 104 ++++---- src/mesa/drivers/dri/nouveau/nouveau_state_cache.c | 64 +++++ src/mesa/drivers/dri/nouveau/nouveau_state_cache.h | 23 ++ src/mesa/drivers/dri/nouveau/nv10_state.c | 260 +++++++++---------- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 53 ++-- src/mesa/drivers/dri/nouveau/nv20_state.c | 268 +++++++++---------- src/mesa/drivers/dri/nouveau/nv30_state.c | 284 ++++++++++----------- 10 files changed, 605 insertions(+), 496 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_state_cache.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_state_cache.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 2db6f8989d..4d1e3e6c70 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -22,7 +22,8 @@ DRIVER_SOURCES = \ nv10_swtcl.c \ nv10_state.c \ nv20_state.c \ - nv30_state.c + nv30_state.c \ + nouveau_state_cache.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 09972bebac..8ae7be015d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -37,6 +37,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "tnl/t_vertex.h" #include "nouveau_screen.h" +#include "nouveau_state_cache.h" #include "xmlconfig.h" @@ -73,7 +74,6 @@ typedef void (*nouveau_line_func)( struct nouveau_context*, typedef void (*nouveau_point_func)( struct nouveau_context*, nouveauVertex * ); - typedef struct nouveau_context { /* Mesa context */ GLcontext *glCtx; @@ -102,6 +102,9 @@ typedef struct nouveau_context { GLboolean lighting_enabled; uint32_t enabled_lights; + /* Cached state */ + nouveau_state_cache state_cache; + /* The drawing fallbacks */ GLuint Fallback; nouveau_tri_func draw_tri; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index da2dadada7..259e5a1dc7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -45,7 +45,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * Ring/fifo interface * * - Begin a ring section with BEGIN_RING_SIZE (if you know the full size in advance) - * - Begin a ring section with BEGIN_RING_PRIM otherwise (and then finish with FINISH_RING_PRIM) * - Output stuff to the ring with either OUT_RINGp (outputs a raw mem chunk), OUT_RING (1 uint32_t) or OUT_RINGf (1 float) * - RING_AVAILABLE returns the available fifo (in uint32_ts) * - RING_AHEAD returns how much ahead of the last submission point we are @@ -59,7 +58,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef NOUVEAU_RING_DEBUG #define OUT_RINGp(ptr,sz) do { \ -uint32_t* p=(uint32_t*)ptr; \ +uint32_t* p=(uint32_t*)(ptr); \ int i; printf("OUT_RINGp: (size 0x%x dwords)\n",sz); for(i=0;ififo.buffer+nmesa->fifo.current,ptr,sz*4); \ - nmesa->fifo.current+=sz; \ + memcpy(nmesa->fifo.buffer+nmesa->fifo.current,ptr,(sz)*4); \ + nmesa->fifo.current+=(sz); \ }while(0) #define OUT_RING(n) do { \ -nmesa->fifo.buffer[nmesa->fifo.current++]=n; \ +nmesa->fifo.buffer[nmesa->fifo.current++]=(n); \ }while(0) #define OUT_RINGf(n) do { \ -*((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=n; \ +*((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=(n); \ }while(0) #endif extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); +extern void nouveau_state_cache_flush(nouveauContextPtr nmesa); +extern void nouveau_state_cache_init(nouveauContextPtr nmesa); -#define BEGIN_RING_PRIM(subchannel,tag,size) do { \ - if (nmesa->fifo.freestate_cache.dirty=1; \ + nmesa->state_cache.current_pos=((tag)/4); \ +}while(0) + +#define OUT_RING_CACHE(n) do { \ + if (nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value!=(n)) { \ + nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ + nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value=(n); \ + } \ + nmesa->state_cache.current_pos++; \ }while(0) -#define FINISH_RING_PRIM() do{ \ - nmesa->fifo.buffer[nmesa->fifo.put]|=((nmesa->fifo.current-nmesa->fifo.put) << 18); \ +#define OUT_RING_CACHEf(n) do { \ + if ((*(float*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))!=(n)){ \ + nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ + (*(float*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))=(n);\ + } \ + nmesa->state_cache.current_pos++; \ }while(0) #define BEGIN_RING_SIZE(subchannel,tag,size) do { \ + nouveau_state_cache_flush(nmesa); \ if (nmesa->fifo.free <= (size)) \ WAIT_RING(nmesa,(size)); \ OUT_RING( ((size)<<18) | ((subchannel) << 13) | (tag)); \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 9811606311..2f8f3248ce 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -108,8 +108,6 @@ static void nouveauDDUpdateHWState(GLcontext *ctx) if ( new_state || nmesa->new_render_state & _NEW_TEXTURE ) { - FINISH_RING_PRIM(); - nmesa->new_state = 0; /* Update the various parts of the context's state. @@ -174,6 +172,7 @@ void nouveauDDInitState(nouveauContextPtr nmesa) default: break; } + nouveau_state_cache_init(nmesa); } /* Initialize the driver's state functions */ @@ -231,95 +230,98 @@ void nouveauDDInitStateFuncs(GLcontext *ctx) ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } +#define STATE_INIT(a) if (ctx->Driver.a) ctx->Driver.a + void nouveauInitState(GLcontext *ctx) { /* * Mesa should do this for us: */ - ctx->Driver.AlphaFunc( ctx, + + STATE_INIT(AlphaFunc)( ctx, ctx->Color.AlphaFunc, ctx->Color.AlphaRef); - ctx->Driver.BlendColor( ctx, + STATE_INIT(BlendColor)( ctx, ctx->Color.BlendColor ); - ctx->Driver.BlendEquationSeparate( ctx, + STATE_INIT(BlendEquationSeparate)( ctx, ctx->Color.BlendEquationRGB, ctx->Color.BlendEquationA); - ctx->Driver.BlendFuncSeparate( ctx, + STATE_INIT(BlendFuncSeparate)( ctx, ctx->Color.BlendSrcRGB, ctx->Color.BlendDstRGB, ctx->Color.BlendSrcA, ctx->Color.BlendDstA); - ctx->Driver.ColorMask( ctx, + STATE_INIT(ColorMask)( ctx, ctx->Color.ColorMask[RCOMP], ctx->Color.ColorMask[GCOMP], ctx->Color.ColorMask[BCOMP], ctx->Color.ColorMask[ACOMP]); - ctx->Driver.CullFace( ctx, ctx->Polygon.CullFaceMode ); - ctx->Driver.DepthFunc( ctx, ctx->Depth.Func ); - ctx->Driver.DepthMask( ctx, ctx->Depth.Mask ); - - ctx->Driver.Enable( ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled ); - ctx->Driver.Enable( ctx, GL_BLEND, ctx->Color.BlendEnabled ); - ctx->Driver.Enable( ctx, GL_COLOR_LOGIC_OP, ctx->Color.ColorLogicOpEnabled ); - ctx->Driver.Enable( ctx, GL_COLOR_SUM, ctx->Fog.ColorSumEnabled ); - ctx->Driver.Enable( ctx, GL_CULL_FACE, ctx->Polygon.CullFlag ); - ctx->Driver.Enable( ctx, GL_DEPTH_TEST, ctx->Depth.Test ); - ctx->Driver.Enable( ctx, GL_DITHER, ctx->Color.DitherFlag ); - ctx->Driver.Enable( ctx, GL_FOG, ctx->Fog.Enabled ); - ctx->Driver.Enable( ctx, GL_LIGHTING, ctx->Light.Enabled ); - ctx->Driver.Enable( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag ); - ctx->Driver.Enable( ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag ); - ctx->Driver.Enable( ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled ); - ctx->Driver.Enable( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled ); - ctx->Driver.Enable( ctx, GL_TEXTURE_1D, GL_FALSE ); - ctx->Driver.Enable( ctx, GL_TEXTURE_2D, GL_FALSE ); - ctx->Driver.Enable( ctx, GL_TEXTURE_RECTANGLE_NV, GL_FALSE ); - ctx->Driver.Enable( ctx, GL_TEXTURE_3D, GL_FALSE ); - ctx->Driver.Enable( ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE ); - - ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color ); - ctx->Driver.Fogfv( ctx, GL_FOG_MODE, 0 ); - ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density ); - ctx->Driver.Fogfv( ctx, GL_FOG_START, &ctx->Fog.Start ); - ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End ); - - ctx->Driver.FrontFace( ctx, ctx->Polygon.FrontFace ); + STATE_INIT(CullFace)( ctx, ctx->Polygon.CullFaceMode ); + STATE_INIT(DepthFunc)( ctx, ctx->Depth.Func ); + STATE_INIT(DepthMask)( ctx, ctx->Depth.Mask ); + + STATE_INIT(Enable)( ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled ); + STATE_INIT(Enable)( ctx, GL_BLEND, ctx->Color.BlendEnabled ); + STATE_INIT(Enable)( ctx, GL_COLOR_LOGIC_OP, ctx->Color.ColorLogicOpEnabled ); + STATE_INIT(Enable)( ctx, GL_COLOR_SUM, ctx->Fog.ColorSumEnabled ); + STATE_INIT(Enable)( ctx, GL_CULL_FACE, ctx->Polygon.CullFlag ); + STATE_INIT(Enable)( ctx, GL_DEPTH_TEST, ctx->Depth.Test ); + STATE_INIT(Enable)( ctx, GL_DITHER, ctx->Color.DitherFlag ); + STATE_INIT(Enable)( ctx, GL_FOG, ctx->Fog.Enabled ); + STATE_INIT(Enable)( ctx, GL_LIGHTING, ctx->Light.Enabled ); + STATE_INIT(Enable)( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag ); + STATE_INIT(Enable)( ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag ); + STATE_INIT(Enable)( ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled ); + STATE_INIT(Enable)( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled ); + STATE_INIT(Enable)( ctx, GL_TEXTURE_1D, GL_FALSE ); + STATE_INIT(Enable)( ctx, GL_TEXTURE_2D, GL_FALSE ); + STATE_INIT(Enable)( ctx, GL_TEXTURE_RECTANGLE_NV, GL_FALSE ); + STATE_INIT(Enable)( ctx, GL_TEXTURE_3D, GL_FALSE ); + STATE_INIT(Enable)( ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE ); + + STATE_INIT(Fogfv)( ctx, GL_FOG_COLOR, ctx->Fog.Color ); + STATE_INIT(Fogfv)( ctx, GL_FOG_MODE, 0 ); + STATE_INIT(Fogfv)( ctx, GL_FOG_DENSITY, &ctx->Fog.Density ); + STATE_INIT(Fogfv)( ctx, GL_FOG_START, &ctx->Fog.Start ); + STATE_INIT(Fogfv)( ctx, GL_FOG_END, &ctx->Fog.End ); + + STATE_INIT(FrontFace)( ctx, ctx->Polygon.FrontFace ); { GLfloat f = (GLfloat)ctx->Light.Model.ColorControl; - ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_COLOR_CONTROL, &f ); + STATE_INIT(LightModelfv)( ctx, GL_LIGHT_MODEL_COLOR_CONTROL, &f ); } - ctx->Driver.LineWidth( ctx, ctx->Line.Width ); - ctx->Driver.LogicOpcode( ctx, ctx->Color.LogicOp ); - ctx->Driver.PointSize( ctx, ctx->Point.Size ); - ctx->Driver.PolygonStipple( ctx, (const GLubyte *)ctx->PolygonStipple ); - ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y, + STATE_INIT(LineWidth)( ctx, ctx->Line.Width ); + STATE_INIT(LogicOpcode)( ctx, ctx->Color.LogicOp ); + STATE_INIT(PointSize)( ctx, ctx->Point.Size ); + STATE_INIT(PolygonStipple)( ctx, (const GLubyte *)ctx->PolygonStipple ); + STATE_INIT(Scissor)( ctx, ctx->Scissor.X, ctx->Scissor.Y, ctx->Scissor.Width, ctx->Scissor.Height ); - ctx->Driver.ShadeModel( ctx, ctx->Light.ShadeModel ); - ctx->Driver.StencilFuncSeparate( ctx, GL_FRONT, + STATE_INIT(ShadeModel)( ctx, ctx->Light.ShadeModel ); + STATE_INIT(StencilFuncSeparate)( ctx, GL_FRONT, ctx->Stencil.Function[0], ctx->Stencil.Ref[0], ctx->Stencil.ValueMask[0] ); - ctx->Driver.StencilFuncSeparate( ctx, GL_BACK, + STATE_INIT(StencilFuncSeparate)( ctx, GL_BACK, ctx->Stencil.Function[1], ctx->Stencil.Ref[1], ctx->Stencil.ValueMask[1] ); - ctx->Driver.StencilMaskSeparate( ctx, GL_FRONT, ctx->Stencil.WriteMask[0] ); - ctx->Driver.StencilMaskSeparate( ctx, GL_BACK, ctx->Stencil.WriteMask[1] ); - ctx->Driver.StencilOpSeparate( ctx, GL_FRONT, + STATE_INIT(StencilMaskSeparate)( ctx, GL_FRONT, ctx->Stencil.WriteMask[0] ); + STATE_INIT(StencilMaskSeparate)( ctx, GL_BACK, ctx->Stencil.WriteMask[1] ); + STATE_INIT(StencilOpSeparate)( ctx, GL_FRONT, ctx->Stencil.FailFunc[0], ctx->Stencil.ZFailFunc[0], ctx->Stencil.ZPassFunc[0]); - ctx->Driver.StencilOpSeparate( ctx, GL_BACK, + STATE_INIT(StencilOpSeparate)( ctx, GL_BACK, ctx->Stencil.FailFunc[1], ctx->Stencil.ZFailFunc[1], ctx->Stencil.ZPassFunc[1]); - ctx->Driver.DrawBuffer( ctx, ctx->Color.DrawBuffer[0] ); + STATE_INIT(DrawBuffer)( ctx, ctx->Color.DrawBuffer[0] ); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c new file mode 100644 index 0000000000..36f0c1024b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c @@ -0,0 +1,64 @@ + +#include "nouveau_state_cache.h" +#include "nouveau_context.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" + +#define BEGIN_RING_NOFLUSH(subchannel,tag,size) do { \ + if (nmesa->fifo.free <= (size)) \ + WAIT_RING(nmesa,(size)); \ + OUT_RING( ((size)<<18) | ((subchannel) << 13) | (tag)); \ + nmesa->fifo.free -= ((size) + 1); \ +}while(0) + +// flush all the dirty state +void nouveau_state_cache_flush(nouveauContextPtr nmesa) +{ + int i=0; + int run=0; + + // fast-path no state changes + if (!nmesa->state_cache.dirty) + return; + nmesa->state_cache.dirty=0; + + do + { + // jump to a dirty state + while((nmesa->state_cache.atoms[i].dirty==0)&&(istate_cache.atoms[i+run].dirty)&&(i+run0) { + int j; + + BEGIN_RING_NOFLUSH(NvSub3D, i*4, run); + for(j=0;jstate_cache.atoms[i+j].value); + nmesa->state_cache.atoms[i+j].dirty=0; + } + i+=run; + } + } + while(istate_cache.atoms[i].dirty=0; + nmesa->state_cache.atoms[i].value=0xDEADBEEF; // nvidia cards like beef + } + nmesa->state_cache.dirty=0; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h new file mode 100644 index 0000000000..2488274846 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h @@ -0,0 +1,23 @@ + +#ifndef __NOUVEAU_STATE_CACHE_H__ +#define __NOUVEAU_STATE_CACHE_H__ + +#include "mtypes.h" + +#define NOUVEAU_STATE_CACHE_ENTRIES 2048 + +typedef struct nouveau_state_atom_t{ + uint32_t value; + uint32_t dirty; +}nouveau_state_atom; + +typedef struct nouveau_state_cache_t{ + nouveau_state_atom atoms[NOUVEAU_STATE_CACHE_ENTRIES]; + uint32_t current_pos; + // master dirty flag + uint32_t dirty; +}nouveau_state_cache; + + +#endif + diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 368235ac58..0d19ce94af 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -40,9 +40,9 @@ void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) GLubyte ubRef; CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); - OUT_RING(func); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ - OUT_RING(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); + OUT_RING_CACHE(func); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ + OUT_RING_CACHE(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ } void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) @@ -55,15 +55,15 @@ void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) CLAMPED_FLOAT_TO_UBYTE(cf[2], color[2]); CLAMPED_FLOAT_TO_UBYTE(cf[3], color[3]); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); - OUT_RING(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); + OUT_RING_CACHE(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); } void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); - OUT_RING((modeA<<16) | modeRGB); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); + OUT_RING_CACHE((modeA<<16) | modeRGB); } @@ -71,9 +71,9 @@ void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); - OUT_RING((sfactorA<<16) | sfactorRGB); - OUT_RING((dfactorA<<16) | dfactorRGB); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); + OUT_RING_CACHE((sfactorA<<16) | sfactorRGB); + OUT_RING_CACHE((dfactorA<<16) | dfactorRGB); } /* @@ -82,16 +82,16 @@ void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte c[4]; UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); - OUT_RING(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); + OUT_RING_CACHE(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); } void nv30ClearDepth(GLcontext *ctx, GLclampd d) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING(nmesa->clear_value); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING_CACHE(nmesa->clear_value); } */ @@ -104,19 +104,19 @@ void nv30ClearStencil(GLcontext *ctx, GLint s) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING(nmesa->clear_value); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING_CACHE(nmesa->clear_value); } */ void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); - OUT_RINGf(equation[0]); - OUT_RINGf(equation[1]); - OUT_RINGf(equation[2]); - OUT_RINGf(equation[3]); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); + OUT_RING_CACHEf(equation[0]); + OUT_RING_CACHEf(equation[1]); + OUT_RING_CACHEf(equation[2]); + OUT_RING_CACHEf(equation[3]); } /* Seems does not support alpha in color mask */ @@ -124,8 +124,8 @@ void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_MASK, 1); - OUT_RING(/*((amask && 0x01) << 24) |*/ ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_MASK, 1); + OUT_RING_CACHE(/*((amask && 0x01) << 24) |*/ ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); } void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) @@ -136,37 +136,37 @@ void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) void nv10CullFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE, 1); + OUT_RING_CACHE(mode); } void nv10FrontFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FRONT_FACE, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FRONT_FACE, 1); + OUT_RING_CACHE(mode); } void nv10DepthFunc(GLcontext *ctx, GLenum func) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); - OUT_RING(func); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); + OUT_RING_CACHE(func); } void nv10DepthMask(GLcontext *ctx, GLboolean flag) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); - OUT_RING(flag); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); + OUT_RING_CACHE(flag); } void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); - OUT_RINGf(nearval); - OUT_RINGf(farval); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); + OUT_RING_CACHEf(nearval); + OUT_RING_CACHEf(farval); } /** Specify the current buffer for writing */ @@ -180,13 +180,13 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) switch(cap) { case GL_ALPHA_TEST: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_AUTO_NORMAL: case GL_BLEND: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: @@ -194,12 +194,12 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) case GL_CLIP_PLANE3: case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); + OUT_RING_CACHE(state); break; case GL_COLOR_LOGIC_OP: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_COLOR_MATERIAL: // case GL_COLOR_SUM_EXT: @@ -207,20 +207,20 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_CONVOLUTION_1D: // case GL_CONVOLUTION_2D: case GL_CULL_FACE: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_DEPTH_TEST: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_DITHER: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_FOG: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_HISTOGRAM: // case GL_INDEX_LOGIC_OP: @@ -237,22 +237,22 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); if (nmesa->lighting_enabled) { - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); - OUT_RING(nmesa->enabled_lights); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING_CACHE(nmesa->enabled_lights); } break; } case GL_LIGHTING: nmesa->lighting_enabled=state; - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); if (nmesa->lighting_enabled) - OUT_RING(nmesa->enabled_lights); + OUT_RING_CACHE(nmesa->enabled_lights); else - OUT_RING(0x0); + OUT_RING_CACHE(0x0); break; case GL_LINE_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_LINE_STIPPLE: // case GL_MAP1_COLOR_4: @@ -275,29 +275,29 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_MAP2_VERTEX_4: // case GL_MINMAX: case GL_NORMALIZE: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_POINT_SMOOTH: case GL_POLYGON_OFFSET_POINT: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_OFFSET_LINE: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_OFFSET_FILL: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POINT_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_POLYGON_STIPPLE: // case GL_POST_COLOR_MATRIX_COLOR_TABLE: @@ -306,8 +306,8 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_SCISSOR_TEST: // case GL_SEPARABLE_2D: case GL_STENCIL_TEST: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_TEXTURE_GEN_Q: // case GL_TEXTURE_GEN_R: @@ -325,8 +325,8 @@ void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) switch(pname) { case GL_FOG_MODE: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1); - //OUT_RING (params); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //OUT_RING_CACHE (params); break; /* TODO: unsure about the rest.*/ default: @@ -349,60 +349,60 @@ void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *para switch(pname) { case GL_AMBIENT: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; #if 0 case GL_SPOT_DIRECTION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_POSITION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPOT_EXPONENT: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); - OUT_RINGf(params[0]); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); - OUT_RINGf(params[1]); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + OUT_RING_CACHEf(params[0]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + OUT_RING_CACHEf(params[1]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + OUT_RING_CACHEf(params[2]); break; case GL_CONSTANT_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; #endif default: @@ -417,23 +417,23 @@ void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); - OUT_RING((pattern << 16) | factor); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); + OUT_RING_CACHE((pattern << 16) | factor); } void nv30LineWidth(GLcontext *ctx, GLfloat width) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); - OUT_RINGf(width); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); + OUT_RING_CACHEf(width); } */ void nv10LogicOpcode(GLcontext *ctx, GLenum opcode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LOGIC_OP, 1); - OUT_RING(opcode); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LOGIC_OP, 1); + OUT_RING_CACHE(opcode); } void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) @@ -447,8 +447,8 @@ void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) void nv10PointSize(GLcontext *ctx, GLfloat size) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SIZE, 1); - OUT_RINGf(size); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RING_CACHEf(size); } /** Select a polygon rasterization mode */ @@ -469,8 +469,8 @@ void nv10ShadeModel(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); + OUT_RING_CACHE(mode); } /** OpenGL 2.0 two-sided StencilFunc */ @@ -479,10 +479,10 @@ static void nv10StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); - OUT_RING(func); - OUT_RING(ref); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); + OUT_RING_CACHE(func); + OUT_RING_CACHE(ref); + OUT_RING_CACHE(mask); } /** OpenGL 2.0 two-sided StencilMask */ @@ -490,8 +490,8 @@ static void nv10StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); + OUT_RING_CACHE(mask); } /** OpenGL 2.0 two-sided StencilOp */ @@ -500,10 +500,10 @@ static void nv10StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); - OUT_RING(fail); - OUT_RING(zfail); - OUT_RING(zpass); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); + OUT_RING_CACHE(fail); + OUT_RING_CACHE(zfail); + OUT_RING_CACHE(zpass); } /** Control the generation of texture coordinates */ @@ -523,8 +523,8 @@ void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); - OUT_RING((w << 16) | x); - OUT_RING((h << 16) | y); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); + OUT_RING_CACHE((w << 16) | x); + OUT_RING_CACHE((h << 16) | y); } diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 832ce4ad21..198e3a2668 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -61,6 +61,7 @@ static void nv10ResetLineStipple( GLcontext *ctx ); static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t primitive,uint32_t size) { + // FIXME the primitive type can probably go trough the caching system as well if (nmesa->screen->card->type==NV_10) BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); else if (nmesa->screen->card->type==NV_20) @@ -79,6 +80,7 @@ static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t pri inline void nv10FinishPrimitive(struct nouveau_context *nmesa) { + // FIXME this is probably not needed if (nmesa->screen->card->type==NV_10) BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); else if (nmesa->screen->card->type==NV_20) @@ -216,23 +218,6 @@ static void nv10_render_noop_verts(GLcontext *ctx,GLuint start,GLuint count,GLui { } -static inline void nv10_render_generic_primitive_elts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags,GLuint prim) -{ - struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - GLubyte *vertptr = (GLubyte *)nmesa->verts; - GLuint vertsize = nmesa->vertex_size; - GLuint size_dword = vertsize*(count-start); - const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; - GLuint j; - - nv10ExtendPrimitive(nmesa, size_dword); - nv10StartPrimitive(nmesa,prim+1,size_dword); - for (j=start; jverts; + GLuint vertsize = nmesa->vertex_size; + GLuint size_dword = vertsize*(count-start); + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; + GLuint j; + + nv10ExtendPrimitive(nmesa, size_dword); + nv10StartPrimitive(nmesa,prim+1,size_dword); + for (j=start; jscreen->card->type==NV_20) { for(i=0;i<16;i++) { int size=attr_size[i]; - BEGIN_RING_SIZE(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR(i),1); - OUT_RING(NV_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); + BEGIN_RING_CACHE(NvSub3D,NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR(i),1); + OUT_RING_CACHE(NV_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); } } else { - BEGIN_RING_SIZE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR0_POS,slots); + BEGIN_RING_CACHE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR0_POS,slots); for(i=0;iclear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING(nmesa->clear_value); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING_CACHE(nmesa->clear_value); } /* we're don't support indexed buffers @@ -101,26 +101,26 @@ static void nv20ClearStencil(GLcontext *ctx, GLint s) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING(nmesa->clear_value); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING_CACHE(nmesa->clear_value); } static void nv20ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); - OUT_RINGf(equation[0]); - OUT_RINGf(equation[1]); - OUT_RINGf(equation[2]); - OUT_RINGf(equation[3]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); + OUT_RING_CACHEf(equation[0]); + OUT_RING_CACHEf(equation[1]); + OUT_RING_CACHEf(equation[2]); + OUT_RING_CACHEf(equation[3]); } static void nv20ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_MASK, 1); - OUT_RING(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_MASK, 1); + OUT_RING_CACHE(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); } static void nv20ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) @@ -131,37 +131,37 @@ static void nv20ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) static void nv20CullFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CULL_FACE, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CULL_FACE, 1); + OUT_RING_CACHE(mode); } static void nv20FrontFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FRONT_FACE, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FRONT_FACE, 1); + OUT_RING_CACHE(mode); } static void nv20DepthFunc(GLcontext *ctx, GLenum func) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); - OUT_RING(func); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); + OUT_RING_CACHE(func); } static void nv20DepthMask(GLcontext *ctx, GLboolean flag) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); - OUT_RING(flag); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); + OUT_RING_CACHE(flag); } static void nv20DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); - OUT_RINGf(nearval); - OUT_RINGf(farval); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); + OUT_RING_CACHEf(nearval); + OUT_RING_CACHEf(farval); } /** Specify the current buffer for writing */ @@ -175,13 +175,13 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) switch(cap) { case GL_ALPHA_TEST: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_AUTO_NORMAL: case GL_BLEND: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: @@ -189,12 +189,12 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) case GL_CLIP_PLANE3: case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); + OUT_RING_CACHE(state); break; case GL_COLOR_LOGIC_OP: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_COLOR_MATERIAL: // case GL_COLOR_SUM_EXT: @@ -202,20 +202,20 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_CONVOLUTION_1D: // case GL_CONVOLUTION_2D: case GL_CULL_FACE: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_DEPTH_TEST: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_DITHER: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_FOG: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_HISTOGRAM: // case GL_INDEX_LOGIC_OP: @@ -232,22 +232,22 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); if (nmesa->lighting_enabled) { - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); - OUT_RING(nmesa->enabled_lights); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING_CACHE(nmesa->enabled_lights); } break; } case GL_LIGHTING: nmesa->lighting_enabled=state; - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); if (nmesa->lighting_enabled) - OUT_RING(nmesa->enabled_lights); + OUT_RING_CACHE(nmesa->enabled_lights); else - OUT_RING(0x0); + OUT_RING_CACHE(0x0); break; case GL_LINE_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_LINE_STIPPLE: // case GL_MAP1_COLOR_4: @@ -270,29 +270,29 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_MAP2_VERTEX_4: // case GL_MINMAX: case GL_NORMALIZE: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_POINT_SMOOTH: case GL_POLYGON_OFFSET_POINT: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_OFFSET_LINE: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_OFFSET_FILL: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_STIPPLE: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_POST_COLOR_MATRIX_COLOR_TABLE: // case GL_POST_CONVOLUTION_COLOR_TABLE: @@ -301,8 +301,8 @@ static void nv20Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_SEPARABLE_2D: case GL_STENCIL_TEST: // TODO BACK and FRONT ? - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_TEXTURE_GEN_Q: // case GL_TEXTURE_GEN_R: @@ -320,8 +320,8 @@ static void nv20Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) switch(pname) { case GL_FOG_MODE: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FOG_MODE, 1); - //OUT_RING (params); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //OUT_RING_CACHE (params); break; /* TODO: unsure about the rest.*/ default: @@ -344,59 +344,59 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa switch(pname) { case GL_AMBIENT: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_POSITION: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPOT_EXPONENT: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); - OUT_RINGf(params[0]); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); - OUT_RINGf(params[1]); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + OUT_RING_CACHEf(params[0]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + OUT_RING_CACHEf(params[1]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + OUT_RING_CACHEf(params[2]); break; case GL_CONSTANT_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; default: break; @@ -410,22 +410,22 @@ static void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params) static void nv20LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) { /* nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); - OUT_RING((pattern << 16) | factor);*/ + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); + OUT_RING_CACHE((pattern << 16) | factor);*/ } static void nv20LineWidth(GLcontext *ctx, GLfloat width) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_WIDTH, 1); - OUT_RINGf(width); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LINE_WIDTH, 1); + OUT_RING_CACHEf(width); } static void nv20LogicOpcode(GLcontext *ctx, GLenum opcode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); - OUT_RING(opcode); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); + OUT_RING_CACHE(opcode); } static void nv20PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) @@ -439,8 +439,8 @@ static void nv20PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *pa static void nv20PointSize(GLcontext *ctx, GLfloat size) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POINT_SIZE, 1); - OUT_RINGf(size); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RING_CACHEf(size); } /** Select a polygon rasterization mode */ @@ -449,12 +449,12 @@ static void nv20PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); + OUT_RING_CACHE(mode); } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); + OUT_RING_CACHE(mode); } } @@ -474,8 +474,8 @@ void nv20ShadeModel(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); + OUT_RING_CACHE(mode); } /** OpenGL 2.0 two-sided StencilFunc */ @@ -484,10 +484,10 @@ static void nv20StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); - OUT_RING(func); - OUT_RING(ref); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); + OUT_RING_CACHE(func); + OUT_RING_CACHE(ref); + OUT_RING_CACHE(mask); } /** OpenGL 2.0 two-sided StencilMask */ @@ -495,8 +495,8 @@ static void nv20StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); + OUT_RING_CACHE(mask); } /** OpenGL 2.0 two-sided StencilOp */ @@ -505,10 +505,10 @@ static void nv20StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); - OUT_RING(fail); - OUT_RING(zfail); - OUT_RING(zpass); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); + OUT_RING_CACHE(fail); + OUT_RING_CACHE(zfail); + OUT_RING_CACHE(zpass); } /** Control the generation of texture coordinates */ @@ -528,9 +528,9 @@ static void nv20Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); - OUT_RING((w << 16) | x); - OUT_RING((h << 16) | y); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); + OUT_RING_CACHE((w << 16) | x); + OUT_RING_CACHE((h << 16) | y); } void nv20InitStateFuncs(struct dd_function_table *func) diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index a6cbcb8c8d..7b50cbc461 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -43,9 +43,9 @@ static void nv30AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) GLubyte ubRef; CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); - OUT_RING(func); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ - OUT_RING(ubRef); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); + OUT_RING_CACHE(func); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ + OUT_RING_CACHE(ubRef); /* NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ } static void nv30BlendColor(GLcontext *ctx, const GLfloat color[4]) @@ -58,15 +58,15 @@ static void nv30BlendColor(GLcontext *ctx, const GLfloat color[4]) CLAMPED_FLOAT_TO_UBYTE(cf[2], color[2]); CLAMPED_FLOAT_TO_UBYTE(cf[3], color[3]); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); - OUT_RING(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_COLOR, 1); + OUT_RING_CACHE(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); } static void nv30BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); - OUT_RING((modeA<<16) | modeRGB); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); + OUT_RING_CACHE((modeA<<16) | modeRGB); } @@ -74,9 +74,9 @@ static void nv30BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfac GLenum sfactorA, GLenum dfactorA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); - OUT_RING((sfactorA<<16) | sfactorRGB); - OUT_RING((dfactorA<<16) | dfactorRGB); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); + OUT_RING_CACHE((sfactorA<<16) | sfactorRGB); + OUT_RING_CACHE((dfactorA<<16) | dfactorRGB); } static void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) @@ -84,16 +84,16 @@ static void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte c[4]; UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); - OUT_RING(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); + OUT_RING_CACHE(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); } static void nv30ClearDepth(GLcontext *ctx, GLclampd d) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING(nmesa->clear_value); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING_CACHE(nmesa->clear_value); } /* we're don't support indexed buffers @@ -104,26 +104,26 @@ static void nv30ClearStencil(GLcontext *ctx, GLint s) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING(nmesa->clear_value); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); + OUT_RING_CACHE(nmesa->clear_value); } static void nv30ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); - OUT_RINGf(equation[0]); - OUT_RINGf(equation[1]); - OUT_RINGf(equation[2]); - OUT_RINGf(equation[3]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); + OUT_RING_CACHEf(equation[0]); + OUT_RING_CACHEf(equation[1]); + OUT_RING_CACHEf(equation[2]); + OUT_RING_CACHEf(equation[3]); } static void nv30ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_MASK, 1); - OUT_RING(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_MASK, 1); + OUT_RING_CACHE(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); } static void nv30ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) @@ -134,37 +134,37 @@ static void nv30ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) static void nv30CullFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE, 1); + OUT_RING_CACHE(mode); } static void nv30FrontFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FRONT_FACE, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FRONT_FACE, 1); + OUT_RING_CACHE(mode); } static void nv30DepthFunc(GLcontext *ctx, GLenum func) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); - OUT_RING(func); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); + OUT_RING_CACHE(func); } static void nv30DepthMask(GLcontext *ctx, GLboolean flag) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); - OUT_RING(flag); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); + OUT_RING_CACHE(flag); } static void nv30DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); - OUT_RINGf(nearval); - OUT_RINGf(farval); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); + OUT_RING_CACHEf(nearval); + OUT_RING_CACHEf(farval); } /** Specify the current buffer for writing */ @@ -178,13 +178,13 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) switch(cap) { case GL_ALPHA_TEST: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_AUTO_NORMAL: case GL_BLEND: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: @@ -192,12 +192,12 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) case GL_CLIP_PLANE3: case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(cap-GL_CLIP_PLANE0), 1); + OUT_RING_CACHE(state); break; case GL_COLOR_LOGIC_OP: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_COLOR_MATERIAL: // case GL_COLOR_SUM_EXT: @@ -205,20 +205,20 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_CONVOLUTION_1D: // case GL_CONVOLUTION_2D: case GL_CULL_FACE: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_DEPTH_TEST: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_DITHER: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DITHER_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_FOG: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_HISTOGRAM: // case GL_INDEX_LOGIC_OP: @@ -239,8 +239,8 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) nmesa->enabled_lights=((nmesa->enabled_lights&mask)|(mask*state)); if (nmesa->lighting_enabled) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); - OUT_RING(nmesa->enabled_lights); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + OUT_RING_CACHE(nmesa->enabled_lights); } break; } @@ -249,11 +249,11 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) break; nmesa->lighting_enabled=state; - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1); if (nmesa->lighting_enabled) - OUT_RING(nmesa->enabled_lights); + OUT_RING_CACHE(nmesa->enabled_lights); else - OUT_RING(0x0); + OUT_RING_CACHE(0x0); break; // case GL_LINE_SMOOTH: // case GL_LINE_STIPPLE: @@ -277,29 +277,29 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_MAP2_VERTEX_4: // case GL_MINMAX: case GL_NORMALIZE: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_POINT_SMOOTH: case GL_POLYGON_OFFSET_POINT: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_OFFSET_LINE: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_OFFSET_FILL: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_SMOOTH: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); + OUT_RING_CACHE(state); break; case GL_POLYGON_STIPPLE: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_POST_COLOR_MATRIX_COLOR_TABLE: // case GL_POST_CONVOLUTION_COLOR_TABLE: @@ -308,8 +308,8 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_SEPARABLE_2D: case GL_STENCIL_TEST: // TODO BACK and FRONT ? - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_ENABLE, 1); - OUT_RING(state); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_ENABLE, 1); + OUT_RING_CACHE(state); break; // case GL_TEXTURE_GEN_Q: // case GL_TEXTURE_GEN_R: @@ -327,8 +327,8 @@ static void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) switch(pname) { case GL_FOG_MODE: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); - //OUT_RING (params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //OUT_RING_CACHE (params); break; /* TODO: unsure about the rest.*/ default: @@ -355,59 +355,59 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa switch(pname) { case GL_AMBIENT: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_POSITION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); - OUT_RINGf(params[0]); - OUT_RINGf(params[1]); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + OUT_RING_CACHEf(params[0]); + OUT_RING_CACHEf(params[1]); + OUT_RING_CACHEf(params[2]); break; case GL_SPOT_EXPONENT: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); - OUT_RINGf(params[0]); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); - OUT_RINGf(params[1]); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); - OUT_RINGf(params[2]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + OUT_RING_CACHEf(params[0]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + OUT_RING_CACHEf(params[1]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + OUT_RING_CACHEf(params[2]); break; case GL_CONSTANT_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); - OUT_RINGf(*params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + OUT_RING_CACHEf(*params); break; default: break; @@ -421,8 +421,8 @@ void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); static void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); - OUT_RING((pattern << 16) | factor); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); + OUT_RING_CACHE((pattern << 16) | factor); } static void nv30LineWidth(GLcontext *ctx, GLfloat width) @@ -432,15 +432,15 @@ static void nv30LineWidth(GLcontext *ctx, GLfloat width) CLAMPED_FLOAT_TO_UBYTE(ubWidth, width); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); - OUT_RING(ubWidth); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); + OUT_RING_CACHE(ubWidth); } static void nv30LogicOpcode(GLcontext *ctx, GLenum opcode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); - OUT_RING(opcode); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); + OUT_RING_CACHE(opcode); } static void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) @@ -454,8 +454,8 @@ static void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *pa static void nv30PointSize(GLcontext *ctx, GLfloat size) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1); - OUT_RINGf(size); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RING_CACHEf(size); } /** Select a polygon rasterization mode */ @@ -464,12 +464,12 @@ static void nv30PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); + OUT_RING_CACHE(mode); } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); + OUT_RING_CACHE(mode); } } @@ -511,8 +511,8 @@ static void nv30ShadeModel(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); - OUT_RING(mode); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SHADE_MODEL, 1); + OUT_RING_CACHE(mode); } /** OpenGL 2.0 two-sided StencilFunc */ @@ -522,16 +522,16 @@ static void nv30StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_FUNC, 3); - OUT_RING(func); - OUT_RING(ref); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_FUNC, 3); + OUT_RING_CACHE(func); + OUT_RING_CACHE(ref); + OUT_RING_CACHE(mask); } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_FUNC, 3); - OUT_RING(func); - OUT_RING(ref); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_FUNC, 3); + OUT_RING_CACHE(func); + OUT_RING_CACHE(ref); + OUT_RING_CACHE(mask); } } @@ -541,12 +541,12 @@ static void nv30StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_MASK, 1); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_MASK, 1); + OUT_RING_CACHE(mask); } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_MASK, 1); - OUT_RING(mask); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_MASK, 1); + OUT_RING_CACHE(mask); } } @@ -557,16 +557,16 @@ static void nv30StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL, 3); - OUT_RING(fail); - OUT_RING(zfail); - OUT_RING(zpass); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL, 3); + OUT_RING_CACHE(fail); + OUT_RING_CACHE(zfail); + OUT_RING_CACHE(zpass); } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL, 3); - OUT_RING(fail); - OUT_RING(zfail); - OUT_RING(zpass); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL, 3); + OUT_RING_CACHE(fail); + OUT_RING_CACHE(zfail); + OUT_RING_CACHE(zpass); } } @@ -594,9 +594,9 @@ static void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); - OUT_RING((w << 16) | x); - OUT_RING((h << 16) | y); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); + OUT_RING_CACHE((w << 16) | x); + OUT_RING_CACHE((h << 16) | y); } void nv30InitStateFuncs(struct dd_function_table *func) -- cgit v1.2.3 From fb6545070418820609a57f4dd975b41c93d499a9 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Tue, 21 Nov 2006 13:07:48 +0000 Subject: Remaining state cache changes --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 5 +++++ src/mesa/drivers/dri/nouveau/nv30_state.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 259e5a1dc7..ce465cdca5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -112,6 +112,11 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); nmesa->state_cache.current_pos++; \ }while(0) +#define OUT_RING_CACHEp(ptr,sz) do { \ +uint32_t* p=(uint32_t*)(ptr); \ +int i; for(i=0;ififo.free <= (size)) \ diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 7b50cbc461..0fc3d16751 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -477,19 +477,19 @@ static void nv30PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) static void nv30PolygonOffset(GLcontext *ctx, GLfloat factor, GLfloat units) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR, 2); - OUT_RINGf(factor); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR, 2); + OUT_RING_CACHEf(factor); /* Looks like we always multiply units by 2.0... according to the dumps.*/ - OUT_RINGf(units * 2.0); + OUT_RING_CACHEf(units * 2.0); } /** Set the polygon stippling pattern */ static void nv30PolygonStipple(GLcontext *ctx, const GLubyte *mask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN(0), 32); - OUT_RINGp(mask, 32); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN(0), 32); + OUT_RING_CACHEp(mask, 32); } /* Specifies the current buffer for reading */ @@ -501,9 +501,9 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2); - OUT_RING((w << 16) | x); - OUT_RING((y << 16) | y); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2); + OUT_RING_CACHE((w << 16) | x); + OUT_RING_CACHE((y << 16) | y); } /** Select flat or smooth shading */ @@ -584,9 +584,9 @@ void (*TexParameter)(GLcontext *ctx, GLenum target, static void nv30TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16); /*XXX: This SHOULD work.*/ - OUT_RINGp(mat->m, 16); + OUT_RING_CACHEp(mat->m, 16); } /** Set the viewport */ -- cgit v1.2.3 From b1c102d37bb3c273a2623358cb8ebff00bdfb65e Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 21 Nov 2006 13:22:34 +0000 Subject: More fixes, glean seems to run now. --- src/mesa/main/api_arrayelt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index f0164a80f6..b3c33f2a79 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1051,7 +1051,7 @@ GLboolean _ae_create_context( GLcontext *ctx ) FogCoordFuncs[6] = _gloffset_FogCoordfvEXT; FogCoordFuncs[7] = _gloffset_FogCoorddvEXT; - ctx->aelt_context = MALLOC( sizeof(AEcontext) ); + ctx->aelt_context = CALLOC( sizeof(AEcontext) ); if (!ctx->aelt_context) return GL_FALSE; @@ -1220,7 +1220,8 @@ void _ae_map_vbos( GLcontext *ctx ) GL_DYNAMIC_DRAW_ARB, actx->vbo[i]); - actx->mapped_vbos = GL_TRUE; + if (actx->nr_vbos) + actx->mapped_vbos = GL_TRUE; } void _ae_unmap_vbos( GLcontext *ctx ) -- cgit v1.2.3 From a75440bcf04efb7a4840e9b0d1f0903b40b952bf Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 21 Nov 2006 14:03:06 +0000 Subject: nouveauCreateDmaObject --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 + src/mesa/drivers/dri/nouveau/nouveau_object.c | 37 +++++++++++++++++++++++--- src/mesa/drivers/dri/nouveau/nouveau_object.h | 2 ++ 3 files changed, 36 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index a2ac056010..d3fbdab9f3 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -45,6 +45,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_object.h" #include "nouveau_fifo.h" #include "nouveau_tex.h" +#include "nouveau_msg.h" #include "nv10_swtcl.h" #include "vblank.h" diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index 9003fb1eae..fe3b44df69 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -3,8 +3,7 @@ #include "nouveau_object.h" -static GLboolean NVDmaCreateContextObject(nouveauContextPtr nmesa, int handle, int class, uint32_t flags, - uint32_t dma_in, uint32_t dma_out, uint32_t dma_notifier) +static GLboolean nouveauCreateContextObject(nouveauContextPtr nmesa, int handle, int class, uint32_t flags, uint32_t dma_in, uint32_t dma_out, uint32_t dma_notifier) { drm_nouveau_object_init_t cto; int ret; @@ -20,7 +19,27 @@ static GLboolean NVDmaCreateContextObject(nouveauContextPtr nmesa, int handle, i return ret == 0; } -static void nouveauObjectOnSubchannel(nouveauContextPtr nmesa, int handle, int subchannel) +static GLboolean nouveauCreateDmaObject(nouveauContextPtr nmesa, + uint32_t handle, + uint32_t offset, + uint32_t size, + int target, + int access) +{ + drm_nouveau_dma_object_init_t dma; + int ret; + + dma.handle = handle; + dma.target = target; + dma.access = access; + dma.offset = offset; + dma.handle = handle; + ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_DMA_OBJECT_INIT, + &dma, sizeof(dma)); + return ret == 0; +} + +void nouveauObjectOnSubchannel(nouveauContextPtr nmesa, int subchannel, int handle) { BEGIN_RING_SIZE(subchannel, 0, 1); OUT_RING(handle); @@ -28,8 +47,18 @@ static void nouveauObjectOnSubchannel(nouveauContextPtr nmesa, int handle, int s void nouveauObjectInit(nouveauContextPtr nmesa) { - NVDmaCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, 0, 0, 0, 0); +#ifdef NOUVEAU_RING_DEBUG + return; +#endif + + nouveauCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, 0, 0, 0, 0); nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); +/* We need to know vram size.. */ +#if 0 + nouveauCreateDmaObject( nmesa, NvDmaFB, + 0, (256*1024*1024), + 0 /*NV_DMA_TARGET_FB*/, 0 /*NV_DMA_ACCESS_RW*/); +#endif } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index e9a30d127a..8386f923c3 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -7,10 +7,12 @@ void nouveauObjectInit(nouveauContextPtr nmesa); enum DMAObjects { Nv3D = 0x80000019, + NvDmaFB = 0xD0FB0001 }; enum DMASubchannel { NvSub3D = 7, }; +extern void nouveauObjectOnSubchannel(nouveauContextPtr nmesa, int subchannel, int handle); #endif -- cgit v1.2.3 From f332da515cdb8cacc3fdba8a74267d015b7c08be Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 21 Nov 2006 14:43:30 +0000 Subject: blend, logicop changes for intelEmitCopyBlit backported to i915 --- src/mesa/drivers/dri/i915tex/intel_blit.c | 35 ++++++++++++++++++++++--- src/mesa/drivers/dri/i915tex/intel_blit.h | 3 ++- src/mesa/drivers/dri/i915tex/intel_pixel.c | 5 ++-- src/mesa/drivers/dri/i915tex/intel_pixel_copy.c | 11 +++++--- src/mesa/drivers/dri/i915tex/intel_pixel_draw.c | 14 +++++----- src/mesa/drivers/dri/i915tex/intel_pixel_read.c | 8 +++--- src/mesa/drivers/dri/i915tex/intel_regions.c | 11 +++++--- src/mesa/drivers/dri/i915tex/intel_tex_copy.c | 3 ++- src/mesa/drivers/dri/i915tex/intel_tex_image.c | 3 ++- 9 files changed, 68 insertions(+), 25 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_blit.c b/src/mesa/drivers/dri/i915tex/intel_blit.c index b6b6543908..550669ab0c 100644 --- a/src/mesa/drivers/dri/i915tex/intel_blit.c +++ b/src/mesa/drivers/dri/i915tex/intel_blit.c @@ -277,6 +277,30 @@ intelEmitFillBlit(struct intel_context *intel, } +static GLuint translate_raster_op(GLenum logicop) +{ + switch(logicop) { + case GL_CLEAR: return 0x00; + case GL_AND: return 0x88; + case GL_AND_REVERSE: return 0x44; + case GL_COPY: return 0xCC; + case GL_AND_INVERTED: return 0x22; + case GL_NOOP: return 0xAA; + case GL_XOR: return 0x66; + case GL_OR: return 0xEE; + case GL_NOR: return 0x11; + case GL_EQUIV: return 0x99; + case GL_INVERT: return 0x55; + case GL_OR_REVERSE: return 0xDD; + case GL_COPY_INVERTED: return 0x33; + case GL_OR_INVERTED: return 0xBB; + case GL_NAND: return 0x77; + case GL_SET: return 0xFF; + default: return 0; + } +} + + /* Copy BitBlt */ void @@ -289,7 +313,9 @@ intelEmitCopyBlit(struct intel_context *intel, struct _DriBufferObject *dst_buffer, GLuint dst_offset, GLshort src_x, GLshort src_y, - GLshort dst_x, GLshort dst_y, GLshort w, GLshort h) + GLshort dst_x, GLshort dst_y, + GLshort w, GLshort h, + GLenum logic_op) { GLuint CMD, BR13; int dst_y2 = dst_y + h; @@ -309,13 +335,14 @@ intelEmitCopyBlit(struct intel_context *intel, case 1: case 2: case 3: - BR13 = (((GLint) dst_pitch) & 0xffff) | (0xCC << 16) | (1 << 24); + BR13 = (((GLint) dst_pitch) & 0xffff) | + (translate_raster_op(logic_op) << 16) | (1 << 24); CMD = XY_SRC_COPY_BLT_CMD; break; case 4: BR13 = - (((GLint) dst_pitch) & 0xffff) | (0xCC << 16) | (1 << 24) | (1 << - 25); + (((GLint) dst_pitch) & 0xffff) | + (translate_raster_op(logic_op) << 16) | (1 << 24) | (1 << 25); CMD = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | XY_SRC_COPY_BLT_WRITE_RGB); diff --git a/src/mesa/drivers/dri/i915tex/intel_blit.h b/src/mesa/drivers/dri/i915tex/intel_blit.h index ee85c62633..e7bc280f58 100644 --- a/src/mesa/drivers/dri/i915tex/intel_blit.h +++ b/src/mesa/drivers/dri/i915tex/intel_blit.h @@ -47,7 +47,8 @@ extern void intelEmitCopyBlit(struct intel_context *intel, GLuint dst_offset, GLshort srcx, GLshort srcy, GLshort dstx, GLshort dsty, - GLshort w, GLshort h); + GLshort w, GLshort h, + GLenum logicop ); extern void intelEmitFillBlit(struct intel_context *intel, GLuint cpp, diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel.c b/src/mesa/drivers/dri/i915tex/intel_pixel.c index 4fe128deea..9018e3daef 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel.c @@ -56,8 +56,9 @@ intel_check_blit_fragment_ops(GLcontext * ctx) !ctx->Color.ColorMask[1] || !ctx->Color.ColorMask[2] || !ctx->Color.ColorMask[3] || - ctx->Color.ColorLogicOpEnabled || - ctx->Texture._EnabledUnits || ctx->FragmentProgram._Enabled); + ctx->Texture._EnabledUnits || + ctx->FragmentProgram._Enabled || + ctx->Color.BlendEnabled); } diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c b/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c index 5eb021f008..9d478283e4 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel_copy.c @@ -95,9 +95,9 @@ intel_check_copypixel_blit_fragment_ops(GLcontext * ctx) !ctx->Color.ColorMask[1] || !ctx->Color.ColorMask[2] || !ctx->Color.ColorMask[3] || - ctx->Color.ColorLogicOpEnabled || ctx->Texture._EnabledUnits || - ctx->FragmentProgram._Enabled); + ctx->FragmentProgram._Enabled || + ctx->Color.BlendEnabled); } /* Doesn't work for overlapping regions. Could do a double copy or @@ -344,9 +344,12 @@ do_blit_copypixels(GLcontext * ctx, intelEmitCopyBlit(intel, dst->cpp, src->pitch, src->buffer, 0, dst->pitch, dst->buffer, 0, - rect.x1 + delta_x, rect.y1 + delta_y, /* srcx, srcy */ + rect.x1 + delta_x, + rect.y1 + delta_y, /* srcx, srcy */ rect.x1, rect.y1, /* dstx, dsty */ - rect.x2 - rect.x1, rect.y2 - rect.y1); + rect.x2 - rect.x1, rect.y2 - rect.y1, + ctx->Color.ColorLogicOpEnabled ? + ctx->Color.LogicOp : GL_COPY); } out: diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c b/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c index 616101aef9..10a079896a 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c @@ -252,9 +252,9 @@ do_blit_drawpixels(GLcontext * ctx, return GL_FALSE; } - if (!intel_check_meta_tex_fragment_ops(ctx)) { + if (!intel_check_blit_fragment_ops(ctx)) { if (INTEL_DEBUG & DEBUG_PIXEL) - _mesa_printf("%s - bad GL fragment state for meta tex\n", + _mesa_printf("%s - bad GL fragment state for blitter\n", __FUNCTION__); return GL_FALSE; } @@ -320,17 +320,19 @@ do_blit_drawpixels(GLcontext * ctx, rect.x1 - dest_rect.x1, rect.y2 - dest_rect.y2, rect.x1, - rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1); + rect.y1, rect.x2 - rect.x1, rect.y2 - rect.y1, + ctx->Color.ColorLogicOpEnabled ? + ctx->Color.LogicOp : GL_COPY); } fence = intel_batchbuffer_flush(intel->batch); driFenceReference(fence); } UNLOCK_HARDWARE(intel); - if (intel->driDrawable->numClipRects) + if (fence) { driFenceFinish(fence, DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE); - - driFenceUnReference(fence); + driFenceUnReference(fence); + } if (INTEL_DEBUG & DEBUG_PIXEL) _mesa_printf("%s - DONE\n", __FUNCTION__); diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_read.c b/src/mesa/drivers/dri/i915tex/intel_pixel_read.c index c1cc65674d..24e49ae066 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel_read.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel_read.c @@ -271,7 +271,8 @@ do_blit_readpixels(GLcontext * ctx, rect.y1, rect.x1 - src_rect.x1, rect.y2 - src_rect.y2, - rect.x2 - rect.x1, rect.y2 - rect.y1); + rect.x2 - rect.x1, rect.y2 - rect.y1, + GL_COPY); } fence = intel_batchbuffer_flush(intel->batch); @@ -280,11 +281,12 @@ do_blit_readpixels(GLcontext * ctx, } UNLOCK_HARDWARE(intel); - if (intel->driDrawable->numClipRects) + if (fence) { driFenceFinish(fence, DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE); + driFenceUnReference(fence); + } - driFenceUnReference(fence); if (INTEL_DEBUG & DEBUG_PIXEL) _mesa_printf("%s - DONE\n", __FUNCTION__); diff --git a/src/mesa/drivers/dri/i915tex/intel_regions.c b/src/mesa/drivers/dri/i915tex/intel_regions.c index 064a34cda8..1205b180ca 100644 --- a/src/mesa/drivers/dri/i915tex/intel_regions.c +++ b/src/mesa/drivers/dri/i915tex/intel_regions.c @@ -318,7 +318,8 @@ intel_region_copy(intelScreenPrivate *intelScreen, dst->cpp, src->pitch, src->buffer, src_offset, dst->pitch, dst->buffer, dst_offset, - srcx, srcy, dstx, dsty, width, height); + srcx, srcy, dstx, dsty, width, height, + GL_COPY); } /* Fill a rectangular sub-region. Need better logic about when to @@ -433,7 +434,9 @@ intel_region_cow(intelScreenPrivate *intelScreen, struct intel_region *region) region->buffer, 0, region->pitch, pbo->buffer, 0, - 0, 0, 0, 0, region->pitch, region->height); + 0, 0, 0, 0, + region->pitch, region->height, + GL_COPY); intel_batchbuffer_flush(intel->batch); UNLOCK_HARDWARE(intel); @@ -445,7 +448,9 @@ intel_region_cow(intelScreenPrivate *intelScreen, struct intel_region *region) region->buffer, 0, region->pitch, pbo->buffer, 0, - 0, 0, 0, 0, region->pitch, region->height); + 0, 0, 0, 0, + region->pitch, region->height, + GL_COPY); intel_batchbuffer_flush(intel->batch); } diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c index 88b62e781c..b85a25642a 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c @@ -145,7 +145,8 @@ do_copy_texsubimage(struct intel_context *intel, intelImage->mt->pitch, intelImage->mt->region->buffer, image_offset, - x, y + height, dstx, dsty, width, height); + x, y + height, dstx, dsty, width, height, + GL_COPY); /* ? */ intel_batchbuffer_flush(intel->batch); } diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_image.c b/src/mesa/drivers/dri/i915tex/intel_tex_image.c index 79f377a4b7..22221e7322 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_image.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_image.c @@ -232,7 +232,8 @@ try_pbo_upload(struct intel_context *intel, intelImage->mt->cpp, src_stride, src_buffer, src_offset, dst_stride, dst_buffer, dst_offset, - 0, 0, 0, 0, width, height); + 0, 0, 0, 0, width, height, + GL_COPY); intel_batchbuffer_flush(intel->batch); } -- cgit v1.2.3 From 8f008056b2e6347850ec52fdd6da7928b56c4ef9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 21 Nov 2006 16:04:22 +0000 Subject: list header files in sources files (Dan Nicholson) --- src/mesa/array_cache/sources | 4 +++ src/mesa/glapi/sources | 9 +++++ src/mesa/main/sources | 76 ++++++++++++++++++++++++++++++++++++++++- src/mesa/math/sources | 16 +++++++++ src/mesa/shader/grammar/sources | 6 ++++ src/mesa/shader/slang/sources | 23 +++++++++++++ src/mesa/shader/sources | 15 ++++++++ src/mesa/swrast/sources | 35 ++++++++++++++++++- src/mesa/swrast_setup/sources | 7 ++++ src/mesa/tnl/sources | 17 ++++++++- 10 files changed, 205 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/array_cache/sources b/src/mesa/array_cache/sources index 210ec202d6..fb3328d10e 100644 --- a/src/mesa/array_cache/sources +++ b/src/mesa/array_cache/sources @@ -1,3 +1,7 @@ MESA_ARRAY_CACHE_SOURCES = \ ac_context.c \ ac_import.c + +MESA_ARRAY_CACHE_HEADERS = \ +ac_context.h \ +acache.h diff --git a/src/mesa/glapi/sources b/src/mesa/glapi/sources index 384b0830ac..1d5c252821 100644 --- a/src/mesa/glapi/sources +++ b/src/mesa/glapi/sources @@ -1,3 +1,12 @@ MESA_GLAPI_SOURCES = \ glapi.c \ glthread.c + +MESA_GLAPI_HEADERS = \ +dispatch.h \ +glapi.h \ +glapioffsets.h \ +glapitable.h \ +glapitemp.h \ +glprocs.h \ +glthread.h diff --git a/src/mesa/main/sources b/src/mesa/main/sources index 8820461f91..dfcff89e4b 100644 --- a/src/mesa/main/sources +++ b/src/mesa/main/sources @@ -1,4 +1,4 @@ -# List of ource files in this directory used for X.org xserver build +# List of source files in this directory used for X.org xserver build MESA_MAIN_SOURCES = \ accum.c \ api_arrayelt.c \ @@ -62,3 +62,77 @@ texstore.c \ varray.c \ $(VSNPRINTF_SOURCES) \ vtxfmt.c + +MESA_VSNPRINTF_SOURCES = \ +vsnprintf.c + +MESA_MAIN_HEADERS = \ +accum.h \ +api_arrayelt.h \ +api_eval.h \ +api_loopback.h \ +api_noop.h \ +api_validate.h \ +arrayobj.h \ +attrib.h \ +bitset.h \ +blend.h \ +bufferobj.h \ +buffers.h \ +clip.h \ +colormac.h \ +colortab.h \ +config.h \ +context.h \ +convolve.h \ +dd.h \ +debug.h \ +depth.h \ +depthstencil.h \ +dlist.h \ +drawpix.h \ +enable.h \ +enums.h \ +eval.h \ +extensions.h \ +fbobject.h \ +feedback.h \ +fog.h \ +framebuffer.h \ +get.h \ +glheader.h \ +hash.h \ +hint.h \ +histogram.h \ +image.h \ +imports.h \ +light.h \ +lines.h \ +macros.h \ +matrix.h \ +mipmap.h \ +mm.h \ +mtypes.h \ +occlude.h \ +pixel.h \ +points.h \ +polygon.h \ +rastpos.h \ +rbadaptors.h \ +renderbuffer.h \ +simple_list.h \ +state.h \ +stencil.h \ +texcompress.h \ +texenvprogram.h \ +texformat.h \ +texformat_tmp.h \ +teximage.h \ +texobj.h \ +texrender.h \ +texstate.h \ +texstore.h \ +varray.h \ +version.h \ +vtxfmt.h \ +vtxfmt_tmp.h diff --git a/src/mesa/math/sources b/src/mesa/math/sources index 2374be80eb..7c7dcccedf 100644 --- a/src/mesa/math/sources +++ b/src/mesa/math/sources @@ -7,3 +7,19 @@ m_matrix.c \ m_translate.c \ m_vector.c \ m_xform.c + +MESA_MATH_HEADERS = \ +m_clip_tmp.h \ +m_copy_tmp.h \ +m_debug.h \ +m_debug_util.h \ +m_dotprod_tmp.h \ +m_eval.h \ +m_matrix.h \ +m_norm_tmp.h \ +m_trans_tmp.h \ +m_translate.h \ +m_vector.h \ +m_xform.h \ +m_xform_tmp.h \ +mathmod.h diff --git a/src/mesa/shader/grammar/sources b/src/mesa/shader/grammar/sources index b1f8530ee5..a6bbfd3ffd 100644 --- a/src/mesa/shader/grammar/sources +++ b/src/mesa/shader/grammar/sources @@ -1,2 +1,8 @@ MESA_SHADER_GRAMMAR_SOURCES = \ grammar_mesa.c + +MESA_SHADER_GRAMMAR_HEADERS = \ +grammar.c \ +grammar.h \ +grammar_mesa.h \ +grammar_syn.h diff --git a/src/mesa/shader/slang/sources b/src/mesa/shader/slang/sources index f03f1ed187..00d617fa8a 100644 --- a/src/mesa/shader/slang/sources +++ b/src/mesa/shader/slang/sources @@ -19,3 +19,26 @@ slang_link.c \ slang_preprocess.c \ slang_storage.c \ slang_utility.c + +MESA_SHADER_SLANG_HEADERS = \ +slang_analyse.h \ +slang_assemble.h \ +slang_assemble_assignment.h \ +slang_assemble_conditional.h \ +slang_assemble_constructor.h \ +slang_assemble_typeinfo.h \ +slang_compile.h \ +slang_compile_function.h \ +slang_compile_operation.h \ +slang_compile_struct.h \ +slang_compile_variable.h \ +slang_execute.h \ +slang_export.h \ +slang_library_noise.h \ +slang_library_texsample.h \ +slang_link.h \ +slang_mesa.h \ +slang_preprocess.h \ +slang_storage.h \ +slang_utility.h \ +traverse_wrap.h diff --git a/src/mesa/shader/sources b/src/mesa/shader/sources index 573be89b9a..3db2de92e0 100644 --- a/src/mesa/shader/sources +++ b/src/mesa/shader/sources @@ -11,3 +11,18 @@ program.c \ programopt.c \ shaderobjects.c \ shaderobjects_3dlabs.c + +MESA_SHADER_HEADERS = \ +arbprogparse.h \ +arbprogram.h \ +arbprogram_syn.h \ +atifragshader.h \ +nvfragparse.h \ +nvprogram.h \ +nvvertexec.h \ +nvvertparse.h \ +programopt.h \ +program.h \ +program_instruction.h \ +shaderobjects.h \ +shaderobjects_3dlabs.h diff --git a/src/mesa/swrast/sources b/src/mesa/swrast/sources index 8807b56a61..9ffd4cca72 100644 --- a/src/mesa/swrast/sources +++ b/src/mesa/swrast/sources @@ -1,4 +1,4 @@ -# List of ource files in this directory used for X.org xserver build +# List of source files in this directory used for X.org xserver build MESA_SWRAST_SOURCES = \ s_aaline.c \ s_aatriangle.c \ @@ -30,3 +30,36 @@ s_texfilter.c \ s_texstore.c \ s_triangle.c \ s_zoom.c + +MESA_SWRAST_HEADERS = \ +s_aaline.h \ +s_aalinetemp.h \ +s_aatriangle.h \ +s_aatritemp.h \ +s_accum.h \ +s_alpha.h \ +s_arbshader.h \ +s_atifragshader.h \ +s_blend.h \ +s_context.h \ +s_depth.h \ +s_drawpix.h \ +s_feedback.h \ +s_fog.h \ +s_lines.h \ +s_linetemp.h \ +s_logic.h \ +s_masking.h \ +s_nvfragprog.h \ +s_points.h \ +s_pointtemp.h \ +s_span.h \ +s_spantemp.h \ +s_stencil.h \ +s_texcombine.h \ +s_texfilter.h \ +s_triangle.h \ +s_trispan.h \ +s_tritemp.h \ +s_zoom.h \ +swrast.h diff --git a/src/mesa/swrast_setup/sources b/src/mesa/swrast_setup/sources index d5b606d65e..dee14b6774 100644 --- a/src/mesa/swrast_setup/sources +++ b/src/mesa/swrast_setup/sources @@ -1,3 +1,10 @@ MESA_SWRAST_SETUP_SOURCES = \ ss_context.c \ ss_triangle.c + +MESA_SWRAST_SETUP_HEADERS = \ +ss_context.h \ +ss_triangle.h \ +ss_tritmp.h \ +ss_vb.h \ +swrast_setup.h diff --git a/src/mesa/tnl/sources b/src/mesa/tnl/sources index 2c4f4c49ea..e01f55dbaf 100644 --- a/src/mesa/tnl/sources +++ b/src/mesa/tnl/sources @@ -1,4 +1,4 @@ -# List of ource files in this directory used for X.org xserver build +# List of source files in this directory used for X.org xserver build MESA_TNL_SOURCES = \ t_array_api.c \ t_array_import.c \ @@ -29,3 +29,18 @@ t_vtx_eval.c \ t_vtx_exec.c \ t_vtx_generic.c \ t_vtx_x86.c + +MESA_TNL_HEADERS = \ +t_array_api.h \ +t_array_import.h \ +t_context.h \ +t_pipeline.h \ +t_save_api.h \ +t_vb_arbprogram.h \ +t_vb_cliptmp.h \ +t_vb_lighttmp.h \ +t_vb_rendertmp.h \ +t_vertex.h \ +t_vp_build.h \ +t_vtx_api.h \ +tnl.h -- cgit v1.2.3 From b5e800068b8a5102bb7a7a34f1fa1b890ff9d443 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 21 Nov 2006 19:56:15 +0000 Subject: nv10: update state --- src/mesa/drivers/dri/nouveau/nv10_state.c | 188 ++++++++++++++++++------------ 1 file changed, 116 insertions(+), 72 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 0d19ce94af..d77816a117 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -34,7 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mtypes.h" #include "colormac.h" -void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) +static void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte ubRef; @@ -45,7 +45,7 @@ void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) OUT_RING_CACHE(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ } -void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) +static void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLubyte cf[4]; @@ -59,7 +59,7 @@ void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) OUT_RING_CACHE(PACK_COLOR_8888(cf[3], cf[1], cf[2], cf[0])); } -void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) +static void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); @@ -67,7 +67,7 @@ void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) } -void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, +static void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -77,21 +77,12 @@ void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, } /* -void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) +static void nv10ClearColor(GLcontext *ctx, const GLfloat color[4]) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - GLubyte c[4]; - UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB, 1); - OUT_RING_CACHE(PACK_COLOR_8888(c[3],c[0],c[1],c[2])); } -void nv30ClearDepth(GLcontext *ctx, GLclampd d) +static void nv10ClearDepth(GLcontext *ctx, GLclampd d) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING_CACHE(nmesa->clear_value); } */ @@ -100,16 +91,12 @@ void nv30ClearDepth(GLcontext *ctx, GLclampd d) */ /* -void nv30ClearStencil(GLcontext *ctx, GLint s) +static void nv10ClearStencil(GLcontext *ctx, GLint s) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH, 1); - OUT_RING_CACHE(nmesa->clear_value); } */ -void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) +static void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(plane), 4); @@ -120,7 +107,7 @@ void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) } /* Seems does not support alpha in color mask */ -void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, +static void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -128,40 +115,40 @@ void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, OUT_RING_CACHE(/*((amask && 0x01) << 24) |*/ ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); } -void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) +static void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) { - // TODO I need sex + // TODO I need love } -void nv10CullFace(GLcontext *ctx, GLenum mode) +static void nv10CullFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE, 1); OUT_RING_CACHE(mode); } -void nv10FrontFace(GLcontext *ctx, GLenum mode) +static void nv10FrontFace(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FRONT_FACE, 1); OUT_RING_CACHE(mode); } -void nv10DepthFunc(GLcontext *ctx, GLenum func) +static void nv10DepthFunc(GLcontext *ctx, GLenum func) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1); OUT_RING_CACHE(func); } -void nv10DepthMask(GLcontext *ctx, GLboolean flag) +static void nv10DepthMask(GLcontext *ctx, GLboolean flag) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1); OUT_RING_CACHE(flag); } -void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) +static void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2); @@ -174,7 +161,7 @@ void nv10DepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) /** Specify the buffers for writing for fragment programs*/ //void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); -void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) +static void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); switch(cap) @@ -185,7 +172,7 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) break; // case GL_AUTO_NORMAL: case GL_BLEND: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE, 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1); OUT_RING_CACHE(state); break; case GL_CLIP_PLANE0: @@ -295,10 +282,6 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1); OUT_RING_CACHE(state); break; - case GL_POINT_SMOOTH: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE, 1); - OUT_RING_CACHE(state); - break; // case GL_POLYGON_STIPPLE: // case GL_POST_COLOR_MATRIX_COLOR_TABLE: // case GL_POST_CONVOLUTION_COLOR_TABLE: @@ -306,6 +289,7 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_SCISSOR_TEST: // case GL_SEPARABLE_2D: case GL_STENCIL_TEST: + // TODO BACK and FRONT ? BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE, 1); OUT_RING_CACHE(state); break; @@ -319,7 +303,7 @@ void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state) } } -void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +static void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); switch(pname) @@ -335,108 +319,106 @@ void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) } -void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) +static void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) { - // TODO I need sex (fog and line_smooth hints) + // TODO I need love (fog and line_smooth hints) } // void (*IndexMask)(GLcontext *ctx, GLuint mask); -void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) +static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); /* not sure where the fourth param value goes...*/ switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; -#if 0 +#if 0 /* FIXME, should be easy to do */ case GL_SPOT_DIRECTION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; +#endif case GL_POSITION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; +#if 0 /* FIXME, should be easy to do */ case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); OUT_RING_CACHEf(params[2]); break; +#endif case GL_CONSTANT_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); OUT_RING_CACHEf(*params); break; -#endif default: break; } } /** Set the lighting model parameters */ -void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); +static void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); -/* -void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) + +static void nv10LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN, 1); - OUT_RING_CACHE((pattern << 16) | factor); } -void nv30LineWidth(GLcontext *ctx, GLfloat width) +static void nv10LineWidth(GLcontext *ctx, GLfloat width) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1); - OUT_RING_CACHEf(width); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LINE_WIDTH, 1); + OUT_RING_CACHE(((int) (width * 8.0)) & -4); } -*/ -void nv10LogicOpcode(GLcontext *ctx, GLenum opcode) +static void nv10LogicOpcode(GLcontext *ctx, GLenum opcode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LOGIC_OP, 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1); OUT_RING_CACHE(opcode); } -void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) +static void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) { /*TODO: not sure what goes here. */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -444,15 +426,28 @@ void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params) } /** Specify the diameter of rasterized points */ -void nv10PointSize(GLcontext *ctx, GLfloat size) +static void nv10PointSize(GLcontext *ctx, GLfloat size) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SIZE, 1); - OUT_RING_CACHEf(size); + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POINT_SIZE, 1); + OUT_RING_CACHE(((int) (size * 8.0)) & -4); } /** Select a polygon rasterization mode */ -void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); +static void nv10PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 1); + OUT_RING_CACHE(mode); + } + if (face == GL_BACK || face == GL_FRONT_AND_BACK) { + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK, 1); + OUT_RING_CACHE(mode); + } +} + /** Set the scale and units used to calculate depth values */ void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); /** Set the polygon stippling pattern */ @@ -519,7 +514,7 @@ void (*TexParameter)(GLcontext *ctx, GLenum target, void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); /** Set the viewport */ -void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +static void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -528,3 +523,52 @@ void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) OUT_RING_CACHE((h << 16) | y); } +void nv10InitStateFuncs(struct dd_function_table *func) +{ + func->AlphaFunc = nv10AlphaFunc; + func->BlendColor = nv10BlendColor; + func->BlendEquationSeparate = nv10BlendEquationSeparate; + func->BlendFuncSeparate = nv10BlendFuncSeparate; +#if 0 + func->ClearColor = nv10ClearColor; + func->ClearDepth = nv10ClearDepth; + func->ClearStencil = nv10ClearStencil; +#endif + func->ClipPlane = nv10ClipPlane; + func->ColorMask = nv10ColorMask; + func->ColorMaterial = nv10ColorMaterial; + func->CullFace = nv10CullFace; + func->FrontFace = nv10FrontFace; + func->DepthFunc = nv10DepthFunc; + func->DepthMask = nv10DepthMask; + func->DepthRange = nv10DepthRange; + func->Enable = nv10Enable; + func->Fogfv = nv10Fogfv; + func->Hint = nv10Hint; + func->Lightfv = nv10Lightfv; +/* func->LightModelfv = nv10LightModelfv; */ + func->LineStipple = nv10LineStipple; + func->LineWidth = nv10LineWidth; + func->LogicOpcode = nv10LogicOpcode; + func->PointParameterfv = nv10PointParameterfv; + func->PointSize = nv10PointSize; + func->PolygonMode = nv10PolygonMode; +#if 0 + func->PolygonOffset = nv10PolygonOffset; + func->PolygonStipple = nv10PolygonStipple; + func->ReadBuffer = nv10ReadBuffer; + func->RenderMode = nv10RenderMode; + func->Scissor = nv10Scissor; +#endif + func->ShadeModel = nv10ShadeModel; + func->StencilFuncSeparate = nv10StencilFuncSeparate; + func->StencilMaskSeparate = nv10StencilMaskSeparate; + func->StencilOpSeparate = nv10StencilOpSeparate; +#if 0 + func->TexGen = nv10TexGen; + func->TexParameter = nv10TexParameter; + func->TextureMatrix = nv10TextureMatrix; +#endif + func->Viewport = nv10Viewport; +} + -- cgit v1.2.3 From 4ed78e20a4aa23d11e67a29a99aafb27e7f9f661 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 21 Nov 2006 20:29:09 +0000 Subject: update from renouveau --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 195 ++++++++++++++++++++--------- 1 file changed, 137 insertions(+), 58 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 389c541e1c..b2ccf141fb 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -43,7 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************** - Created from objects.c rev. 1.337 + Created from objects.c rev. 1.335 */ #ifndef _NOUVEAU_REG_H @@ -329,7 +329,7 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ # define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 -# define NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 +# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE 0x00000304 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 # define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c # define NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 @@ -370,7 +370,7 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c # define NV10_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 # define NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 -# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA 0x000003b4 +# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 # define NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL 0x000003b8 /* Parameters: color_control */ # define NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ # define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE( d) (0x000003c0 + d * 0x0004) @@ -388,13 +388,15 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x00000680 # define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x00000684 # define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x00000688 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_A 0x000006a0 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_B 0x000006a4 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_C 0x000006a8 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_D 0x000006ac -# define NV10_TCL_PRIMITIVE_3D_SHININESS_E 0x000006b0 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_F 0x000006b4 -# define NV10_TCL_PRIMITIVE_3D_MATERIAL_AMBIENT_EMISSION 0x000006c4 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_A 0x000006a0 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_B 0x000006a4 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_C 0x000006a8 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_D 0x000006ac +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x000006b0 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x000006b4 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000006c4 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000006c8 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000006cc # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X 0x000006e8 # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Y 0x000006ec # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Z 0x000006f0 @@ -407,14 +409,28 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x0000070c # define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000710 # define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000714 -# define NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(d) (0x00000800 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(d) (0x0000080c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(d) (0x00000818 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR(d) (0x00000828 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION0(d) (0x00000834 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(d) (0x00000800 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(d) (0x00000804 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00000808 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(d) (0x0000080c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(d) (0x00000810 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00000814 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(d) (0x00000818 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(d) (0x0000081c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x00000820 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_X(d) (0x00000828 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Y(d) (0x0000082c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Z(d) (0x00000830 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00000834 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00000838 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000083c + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_LIGHT(d) (0x00000840 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION1(d) (0x0000085c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_NORMAL(d) (0x00000868 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000085c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00000860 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00000864 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(d) (0x00000868 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(d) (0x0000086c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(d) (0x00000870 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00000c00 # define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00000c04 # define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00000c08 @@ -478,7 +494,7 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_FOG 0x00000d38 # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_FOG 0x00000d3c /* Parameters: stride fields type */ # define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40 -# define NV10_TCL_PRIMITIVE_3D_LOGIC_OP 0x00000d44 +# define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x00000d44 # define NV10_TCL_PRIMITIVE_3D_BEGIN_END 0x00000dfc # define NV10_TCL_PRIMITIVE_3D_INDEX_DATA 0x00000e00 /* Parameters: index1 index0 */ # define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_BEGIN_END 0x000013fc @@ -535,7 +551,7 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ # define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 -# define NV10_TCL_PRIMITIVE_3D_BLEND_ENABLE 0x00000304 +# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE 0x00000304 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 # define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c # define NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 @@ -576,7 +592,7 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c # define NV10_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 # define NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 -# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA 0x000003b4 +# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 # define NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL 0x000003b8 /* Parameters: color_control */ # define NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ # define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE( d) (0x000003c0 + d * 0x0004) @@ -594,13 +610,15 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x00000680 # define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x00000684 # define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x00000688 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_A 0x000006a0 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_B 0x000006a4 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_C 0x000006a8 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_D 0x000006ac -# define NV10_TCL_PRIMITIVE_3D_SHININESS_E 0x000006b0 -# define NV10_TCL_PRIMITIVE_3D_SHININESS_F 0x000006b4 -# define NV10_TCL_PRIMITIVE_3D_MATERIAL_AMBIENT_EMISSION 0x000006c4 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_A 0x000006a0 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_B 0x000006a4 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_C 0x000006a8 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_D 0x000006ac +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x000006b0 +# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x000006b4 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000006c4 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000006c8 +# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000006cc # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X 0x000006e8 # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Y 0x000006ec # define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Z 0x000006f0 @@ -613,14 +631,28 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x0000070c # define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000710 # define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000714 -# define NV10_TCL_PRIMITIVE_3D_LIGHT_AMBIENT(d) (0x00000800 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIFFUSE(d) (0x0000080c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPECULAR(d) (0x00000818 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR(d) (0x00000828 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION0(d) (0x00000834 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(d) (0x00000800 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(d) (0x00000804 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00000808 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(d) (0x0000080c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(d) (0x00000810 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00000814 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(d) (0x00000818 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(d) (0x0000081c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x00000820 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_X(d) (0x00000828 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Y(d) (0x0000082c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Z(d) (0x00000830 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00000834 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00000838 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000083c + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_LIGHT(d) (0x00000840 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION1(d) (0x0000085c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_NORMAL(d) (0x00000868 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000085c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00000860 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00000864 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(d) (0x00000868 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(d) (0x0000086c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(d) (0x00000870 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00000c00 # define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00000c04 # define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00000c08 @@ -685,7 +717,7 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_FOG 0x00000d38 # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_FOG 0x00000d3c /* Parameters: stride fields type */ # define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40 -# define NV10_TCL_PRIMITIVE_3D_LOGIC_OP 0x00000d44 +# define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x00000d44 # define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_PITCH 0x00000d5c /* Parameters: pitch */ # define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_OFFSET 0x00000d60 # define NV17_TCL_PRIMITIVE_3D_LMA_DEPTH_FILL_VALUE 0x00000d68 @@ -901,6 +933,7 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 # define NV20_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 # define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT 0x000003a8 +# define NV20_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 # define NV20_TCL_PRIMITIVE_3D_SEPARATE_SPECULAR_ENABLE 0x000003b8 # define NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ # define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x000003c0 + d * 0x0004) @@ -917,7 +950,12 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x000009c0 # define NV20_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x000009c4 # define NV20_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x000009c8 -# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS 0x000009e0 +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_A 0x000009e0 +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_B 0x000009e4 +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_C 0x000009e8 +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_D 0x000009ec +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x000009f0 +# define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x000009f4 # define NV20_TCL_PRIMITIVE_3D_POINT_SPRITE 0x00000a1c /* Parameters: coord_replace r_mode enable */ # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x00000a30 # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x00000a34 @@ -936,7 +974,9 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_Z 0x00000b88 # define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_W 0x00000b8c # define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_ID 0x00001ea4 -# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x00000a10 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x00000a10 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x00000a14 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x00000a18 # define NV20_TCL_PRIMITIVE_3D_TX_OFFSET(d) (0x00001b00 + d * 0x0040) # define NV20_TCL_PRIMITIVE_3D_TX_FORMAT(d) (0x00001b04 + d * 0x0040) /* Parameters: log2(height) log2(width) lod format cube_map */ # define NV20_TCL_PRIMITIVE_3D_TX_ENABLE(d) (0x00001b0c + d * 0x0040) /* Parameters: enable anisotropy */ @@ -957,16 +997,21 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000105c + d * 0x0080) # define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00001060 + d * 0x0080) # define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00001064 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_HVEC_AND_DIR(d) (0x00001028 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(d) (0x00001000 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00001004 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_C(d) (0x00001008 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(d) (0x0000100c + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00001010 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_C(d) (0x00001014 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(d) (0x00001018 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x0000101c + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_C(d) (0x00001020 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_X(d) (0x00001028 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Y(d) (0x0000102c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Z(d) (0x00001030 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00001034 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00001038 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000103c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(d) (0x00001000 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(d) (0x00001004 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00001008 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(d) (0x0000100c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(d) (0x00001010 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00001014 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(d) (0x00001018 + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(d) (0x0000101c + d * 0x0080) +# define NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x00001020 + d * 0x0080) # define NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_AMBIENT(d) (0x00000c00 + d * 0x0040) # define NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_DIFFUSE(d) (0x00000c0c + d * 0x0040) # define NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_SPECULAR(d) (0x00000c18 + d * 0x0040) @@ -980,7 +1025,12 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(d) (0x00001050 + d * 0x0080) # define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(d) (0x00001054 + d * 0x0080) # define NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(d) (0x00001058 + d * 0x0080) -# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS 0x00001e28 +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_A 0x00001e28 +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_B 0x00001e2c +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_C 0x00001e30 +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_D 0x00001e34 +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_E 0x00001e38 +# define NV20_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_F 0x00001e3c # define NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE 0x0000147c # define NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN(d) (0x00001480 + d * 0x0004) # define NV20_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00001500 @@ -1080,7 +1130,10 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR13_TX5 0x00001794 /* Parameters: stride fields type */ # define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR14_TX6 0x00001798 /* Parameters: stride fields type */ # define NV20_TCL_PRIMITIVE_3D_VERTEX_ATTR15_TX7 0x0000179c /* Parameters: stride fields type */ -# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x000017a0 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000017a0 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000017a4 +# define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000017a8 +# define NV20_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_BACK 0x000017ac # define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK 0x000017b0 # define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x000017bc # define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x000017c0 @@ -1154,6 +1207,7 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x0000037c # define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 # define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 +# define NV30_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 # define NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH 0x000003b8 # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x00000400 + d * 0x0004) # define NV30_TCL_PRIMITIVE_3D_MODELVIEW_MATRIX( d) (0x00000480 + d * 0x0004) @@ -1178,6 +1232,9 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_OFS1 0x000002c4 /* Parameters: height y_offset */ # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0 0x00000a00 /* Parameters: width x_offset */ # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_1 0x00000a04 /* Parameters: height y_offset */ +# define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x00000a10 +# define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x00000a14 +# define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x00000a18 # define NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS 0x000008c0 /* Parameters: width x_offset */ # define NV30_TCL_PRIMITIVE_3D_SCISSOR_HEIGHT_YPOS 0x000008c4 /* Parameters: height y_offset */ # define NV30_TCL_PRIMITIVE_3D_POINT_SPRITE 0x00001ee8 /* Parameters: coord_replace r_mode enable */ @@ -1216,15 +1273,21 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_B(d) (0x00000e04 + d * 0x0010) # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_C(d) (0x00000e08 + d * 0x0010) # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_D(d) (0x00000e0c + d * 0x0010) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(d) (0x00001000 + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00001004 + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_C(d) (0x00001008 + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(d) (0x0000100c + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00001010 + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_C(d) (0x00001014 + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(d) (0x00001018 + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x0000101c + d * 0x0040) -# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_C(d) (0x00001020 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(d) (0x00001000 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(d) (0x00001004 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00001008 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(d) (0x0000100c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(d) (0x00001010 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00001014 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(d) (0x00001018 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(d) (0x0000101c + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x00001020 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_X(d) (0x00001028 + d * 0x0080) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Y(d) (0x0000102c + d * 0x0080) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Z(d) (0x00001030 + d * 0x0080) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00001034 + d * 0x0080) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00001038 + d * 0x0080) +# define NV30_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000103c + d * 0x0080) # define NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(d) (0x00001228 + d * 0x0040) # define NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(d) (0x0000122c + d * 0x0040) # define NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(d) (0x00001230 + d * 0x0040) @@ -1238,6 +1301,12 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000121c + d * 0x0040) # define NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00001220 + d * 0x0040) # define NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00001224 + d * 0x0040) +# define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_A 0x00001400 +# define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_B 0x00001404 +# define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_C 0x00001408 +# define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_D 0x0000140c +# define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x00001410 +# define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x00001414 # define NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x00001420 /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ # define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE 0x00001db4 # define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN 0x00001db8 /* Parameters: factor pattern */ @@ -1249,6 +1318,12 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH 0x00001d8c # define NV30_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB 0x00001d90 /* Parameters: a r g b */ # define NV30_TCL_PRIMITIVE_3D_CLEAR_WHICH_BUFFERS 0x00001d94 +# define NV30_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_A 0x00001e20 +# define NV30_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_B 0x00001e24 +# define NV30_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_C 0x00001e28 +# define NV30_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_D 0x00001e2c +# define NV30_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_E 0x00001e30 +# define NV30_TCL_PRIMITIVE_3D_BACK_MATERIAL_SHININESS_F 0x00001e34 # define NV30_TCL_PRIMITIVE_3D_DO_VERTICES 0x00001dac # define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_FROM_ID 0x00001e9c # define NV30_TCL_PRIMITIVE_3D_VP_PROGRAM_START_ID 0x00001ea0 @@ -1321,6 +1396,10 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR13_TX5 0x00001774 /* Parameters: stride fields type */ # define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR14_TX6 0x00001778 /* Parameters: stride fields type */ # define NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR15_TX7 0x0000177c /* Parameters: stride fields type */ +# define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000017a0 +# define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000017a4 +# define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000017a8 +# define NV30_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_BACK 0x000017c0 # define NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM 0x000008e4 # define NV30_TCL_PRIMITIVE_3D_TX_ADDRESS_UNIT(d) (0x00001a00 + d * 0x0020) # define NV30_TCL_PRIMITIVE_3D_TX_FORMAT_UNIT(d) (0x00001a04 + d * 0x0020) /* Parameters: mipmap type format ncomp cubic */ -- cgit v1.2.3 From 81ae0bd249d1da31e57123583a1bcec154c471cc Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 21 Nov 2006 20:38:14 +0000 Subject: ah, correct revision now --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index b2ccf141fb..2081fd3ec7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -43,7 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************** - Created from objects.c rev. 1.335 + Created from objects.c rev. 1.345 */ #ifndef _NOUVEAU_REG_H -- cgit v1.2.3 From 677666eb70faea6ac30d69f99f2c4b776e9954bf Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 21 Nov 2006 21:11:58 +0000 Subject: nv10,nv20,nv30: color light components renamed from a,b,c to r,g,b --- src/mesa/drivers/dri/nouveau/nv10_state.c | 6 +++--- src/mesa/drivers/dri/nouveau/nv20_state.c | 6 +++--- src/mesa/drivers/dri/nouveau/nv30_state.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index d77816a117..fe2d971a9f 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -333,19 +333,19 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index 7d93368a53..bffca44547 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -344,19 +344,19 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 0fc3d16751..630b84df63 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -355,19 +355,19 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(light), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); -- cgit v1.2.3 From ac09b567a8257960677be742cc92e3c9a4bd0fc7 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 21 Nov 2006 21:15:49 +0000 Subject: nv10,nv20: nvX0ShadeModel static function --- src/mesa/drivers/dri/nouveau/nv10_state.c | 2 +- src/mesa/drivers/dri/nouveau/nv20_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index fe2d971a9f..e99824814f 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -460,7 +460,7 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ -void nv10ShadeModel(GLcontext *ctx, GLenum mode) +static void nv10ShadeModel(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index bffca44547..338cfd43b0 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -470,7 +470,7 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ -void nv20ShadeModel(GLcontext *ctx, GLenum mode) +static void nv20ShadeModel(GLcontext *ctx, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); -- cgit v1.2.3 From 3e4a5c0642c05b25e3987c762e07c04eec3f0603 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 21 Nov 2006 21:44:16 +0000 Subject: Enable nv10 tcl state --- src/mesa/drivers/dri/nouveau/nouveau_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 2f8f3248ce..2094691ce2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -158,8 +158,10 @@ void nouveauDDInitState(nouveauContextPtr nmesa) case NV_03: case NV_04: case NV_05: + /* No TCL engines for these ones */ + break; case NV_10: - //nv10InitStateFuncs(&nmesa->glCtx->Driver); + nv10InitStateFuncs(&nmesa->glCtx->Driver); break; case NV_20: nv20InitStateFuncs(&nmesa->glCtx->Driver); -- cgit v1.2.3 From 49a3ea81108cf776d8f61844d4f49b6b7993a25f Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Tue, 21 Nov 2006 23:37:21 +0000 Subject: fix segfault with ATI_fs when trying to use a not enabled texture unit (bug #9110). --- src/mesa/drivers/dri/r200/r200_fragshader.c | 37 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_fragshader.c b/src/mesa/drivers/dri/r200/r200_fragshader.c index c350b9aaf3..5dd3adaef6 100644 --- a/src/mesa/drivers/dri/r200/r200_fragshader.c +++ b/src/mesa/drivers/dri/r200/r200_fragshader.c @@ -362,7 +362,7 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { if (shader->NumPasses < 2) { for (reg = 0; reg < R200_MAX_TEXTURE_UNITS; reg++) { - struct gl_texture_object *texObj = ctx->Texture.Unit[reg]._Current; + GLbitfield targetbit = ctx->Texture.Unit[reg]._ReallyEnabled; R200_STATECHANGE( rmesa, tex[reg] ); rmesa->hw.tex[reg].cmd[TEX_PP_TXMULTI_CTL] = 0; if (shader->SetupInst[0][reg].Opcode) { @@ -385,15 +385,16 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { else { txformat_x |= R200_TEXCOORD_PROJ; } + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << reg; } - else if (texObj->Target == GL_TEXTURE_3D) { + else if (targetbit == TEXTURE_3D_BIT) { txformat_x |= R200_TEXCOORD_VOLUME; } - else if (texObj->Target == GL_TEXTURE_CUBE_MAP) { + else if (targetbit == TEXTURE_CUBE_BIT) { txformat_x |= R200_TEXCOORD_CUBIC_ENV; } else if (shader->SetupInst[0][reg].swizzle == GL_SWIZZLE_STR_ATI || - shader->SetupInst[0][reg].swizzle == GL_SWIZZLE_STQ_ATI) { + shader->SetupInst[0][reg].swizzle == GL_SWIZZLE_STQ_ATI) { txformat_x |= R200_TEXCOORD_NONPROJ; } else { @@ -401,16 +402,16 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { } rmesa->hw.tex[reg].cmd[TEX_PP_TXFORMAT] = txformat; rmesa->hw.tex[reg].cmd[TEX_PP_TXFORMAT_X] = txformat_x; - /* is this a good idea? Could potentially sample from not enabled unit. - results are probably undefined anyway (?) but I hope it doesn't lock up... */ - rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << reg; + /* enabling texturing when unit isn't correctly configured may not be safe */ + if (targetbit) + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << reg; } } } else { /* setup 1st pass */ for (reg = 0; reg < R200_MAX_TEXTURE_UNITS; reg++) { - struct gl_texture_object *texObj = ctx->Texture.Unit[reg]._Current; + GLbitfield targetbit = ctx->Texture.Unit[reg]._ReallyEnabled; R200_STATECHANGE( rmesa, tex[reg] ); GLuint txformat_multi = 0; if (shader->SetupInst[0][reg].Opcode) { @@ -425,11 +426,12 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { else { txformat_multi |= R200_PASS1_TEXCOORD_PROJ; } + rmesa->hw.cst.cmd[CST_PP_CNTL_X] |= R200_PPX_TEX_0_ENABLE << reg; } - else if (texObj->Target == GL_TEXTURE_3D) { + else if (targetbit == TEXTURE_3D_BIT) { txformat_multi |= R200_PASS1_TEXCOORD_VOLUME; } - else if (texObj->Target == GL_TEXTURE_CUBE_MAP) { + else if (targetbit == TEXTURE_CUBE_BIT) { txformat_multi |= R200_PASS1_TEXCOORD_CUBIC_ENV; } else if (shader->SetupInst[0][reg].swizzle == GL_SWIZZLE_STR_ATI || @@ -439,14 +441,15 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { else { txformat_multi |= R200_PASS1_TEXCOORD_PROJ; } - rmesa->hw.cst.cmd[CST_PP_CNTL_X] |= R200_PPX_TEX_0_ENABLE << reg; + if (targetbit) + rmesa->hw.cst.cmd[CST_PP_CNTL_X] |= R200_PPX_TEX_0_ENABLE << reg; } rmesa->hw.tex[reg].cmd[TEX_PP_TXMULTI_CTL] = txformat_multi; } /* setup 2nd pass */ for (reg=0; reg < R200_MAX_TEXTURE_UNITS; reg++) { - struct gl_texture_object *texObj = ctx->Texture.Unit[reg]._Current; + GLbitfield targetbit = ctx->Texture.Unit[reg]._ReallyEnabled; if (shader->SetupInst[1][reg].Opcode) { GLuint coord = shader->SetupInst[1][reg].src; GLuint txformat = rmesa->hw.tex[reg].cmd[TEX_PP_TXFORMAT] @@ -463,15 +466,16 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { else { txformat_x |= R200_TEXCOORD_PROJ; } + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << reg; } - else if (texObj->Target == GL_TEXTURE_3D) { + else if (targetbit == TEXTURE_3D_BIT) { txformat_x |= R200_TEXCOORD_VOLUME; } - else if (texObj->Target == GL_TEXTURE_CUBE_MAP) { + else if (targetbit == TEXTURE_CUBE_BIT) { txformat_x |= R200_TEXCOORD_CUBIC_ENV; } else if (shader->SetupInst[1][reg].swizzle == GL_SWIZZLE_STR_ATI || - shader->SetupInst[1][reg].swizzle == GL_SWIZZLE_STQ_ATI) { + shader->SetupInst[1][reg].swizzle == GL_SWIZZLE_STQ_ATI) { txformat_x |= R200_TEXCOORD_NONPROJ; } else { @@ -488,7 +492,8 @@ static void r200UpdateFSRouting( GLcontext *ctx ) { } rmesa->hw.tex[reg].cmd[TEX_PP_TXFORMAT_X] = txformat_x; rmesa->hw.tex[reg].cmd[TEX_PP_TXFORMAT] = txformat; - rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << reg; + if (targetbit) + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << reg; } } } -- cgit v1.2.3 From c8238aa0ff6c7604157537268ec80fb3285550e7 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 22 Nov 2006 09:34:55 +0000 Subject: Move setting of _NEW_LIGHT to only occur when materials are present. --- src/mesa/tnl/t_vtx_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index b766ce2d2c..77eec8b3b4 100644 --- a/src/mesa/tnl/t_vtx_api.c +++ b/src/mesa/tnl/t_vtx_api.c @@ -171,11 +171,10 @@ static void _tnl_copy_to_current( GLcontext *ctx ) if (tnl->vtx.have_materials) { tnl->Driver.NotifyMaterialChange( ctx ); + ctx->NewState |= _NEW_LIGHT; } ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT; - - ctx->NewState |= _NEW_LIGHT; } -- cgit v1.2.3 From 96228d952de153424d66ee87ceb8f06dc2b5ca46 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 22 Nov 2006 09:35:19 +0000 Subject: Set _NEW_LIGHT when materials are present in display lists also. --- src/mesa/tnl/t_save_playback.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_save_playback.c b/src/mesa/tnl/t_save_playback.c index 9504f0fe68..426e94372e 100644 --- a/src/mesa/tnl/t_save_playback.c +++ b/src/mesa/tnl/t_save_playback.c @@ -150,6 +150,7 @@ static void _playback_copy_to_current( GLcontext *ctx, if (node->have_materials) { tnl->Driver.NotifyMaterialChange( ctx ); + ctx->NewState |= _NEW_LIGHT; } /* CurrentExecPrimitive -- cgit v1.2.3 From b72fbcbe63bd53460da07ce840094924f04d38e0 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 22 Nov 2006 13:53:21 +0000 Subject: Another fix --- src/mesa/main/api_arrayelt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index b3c33f2a79..49aa427d1a 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1076,6 +1076,7 @@ static void check_vbo( AEcontext *actx, for (i = 0; i < actx->nr_vbos; i++) if (actx->vbo[i] == vbo) return; + assert(actx->nr_vbos < VERT_ATTRIB_MAX); actx->vbo[actx->nr_vbos++] = vbo; } } @@ -1094,6 +1095,8 @@ static void _ae_update_state( GLcontext *ctx ) AEattrib *at = actx->attribs; GLuint i; + actx->nr_vbos = 0; + /* conventional vertex arrays */ if (ctx->Array.ArrayObj->Index.Enabled) { aa->array = &ctx->Array.ArrayObj->Index; @@ -1296,6 +1299,11 @@ void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) { AEcontext *actx = AE_CONTEXT(ctx); + /* It is possible to raise a statechange between begin/end pairs as + * the glMaterial calls will raise _NEW_LIGHT eventually. However, + * within a DrawArrays or DrawElements call (which cannot emit + * material data), it should never be possible. + */ assert(!actx->mapped_vbos); actx->NewState |= new_state; } -- cgit v1.2.3 From 96c0a6de25de2ba8f9601c13f67c22e1aff17b29 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 22 Nov 2006 15:27:58 +0000 Subject: Prune incoming state to the atoms of interest. Hopefully this will prevent driver-initiated statechanges in the middle of DrawElements/DrawArrays from disturbing this code. --- src/mesa/main/api_arrayelt.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 49aa427d1a..1899975213 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1299,11 +1299,19 @@ void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) { AEcontext *actx = AE_CONTEXT(ctx); - /* It is possible to raise a statechange between begin/end pairs as - * the glMaterial calls will raise _NEW_LIGHT eventually. However, - * within a DrawArrays or DrawElements call (which cannot emit - * material data), it should never be possible. + + /* Only interested in this subset of mesa state. Need to prune + * this down as both tnl/ and the drivers can raise statechanges + * for arcane reasons in the middle of seemingly atomic operations + * like DrawElements, over which we'd like to keep a known set of + * arrays and vbo's mapped. + * + * Luckily, neither the drivers nor tnl muck with the state that + * concerns us here: */ - assert(!actx->mapped_vbos); - actx->NewState |= new_state; + new_state &= _NEW_ARRAY | _NEW_PROGRAM; + if (new_state) { + assert(!actx->mapped_vbos); + actx->NewState |= new_state; + } } -- cgit v1.2.3 From 9540c9c04fa0b691202f419520d9c4d8d495588d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 16:01:48 +0000 Subject: GLX protocol fixes for glMap* functions (bug 8899) --- src/mesa/glapi/glX_XML.py | 4 ++-- src/mesa/glapi/gl_API.dtd | 4 ++++ src/mesa/glapi/gl_API.xml | 20 ++++++++++---------- src/mesa/glapi/gl_XML.py | 5 +++-- 4 files changed, 19 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py index 3759e8da02..1b5c3239e0 100644 --- a/src/mesa/glapi/glX_XML.py +++ b/src/mesa/glapi/glX_XML.py @@ -262,7 +262,7 @@ class glx_function(gl_XML.gl_function): if param.name != self.img_reset: param.offset = offset - if not param.is_variable_length(): + if not param.is_variable_length() and not param.is_client_only: offset += param.size() if self.pad_after( param ): @@ -331,7 +331,7 @@ class glx_function(gl_XML.gl_function): size = 0 for param in self.parameterIterateGlxSend(0): - if param.name != self.img_reset: + if param.name != self.img_reset and not param.is_client_only: if size == 0: size = param.offset + param.size() else: diff --git a/src/mesa/glapi/gl_API.dtd b/src/mesa/glapi/gl_API.dtd index 2f0c88aae5..f89d381866 100644 --- a/src/mesa/glapi/gl_API.dtd +++ b/src/mesa/glapi/gl_API.dtd @@ -40,6 +40,7 @@ mode (get | set) "set"> ' tag. param: name - name of the parameter type - fully qualified type (e.g., with "const", etc.) + client_only - boolean flag set on parameters which are interpreted only + by the client and are not present in the protocol encoding (e.g., + the stride parameters to Map1f, etc.) count - for counted arrays (e.g., the 'lists' parameter to glCallLists), the parameter or literal that represents the count. For functions like glVertex3fv it will be a litteral, for others it will be one of diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index 4f3a8805e0..905c4a03a6 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -2364,9 +2364,9 @@ - + - + @@ -2374,9 +2374,9 @@ - + - + @@ -2384,13 +2384,13 @@ - + - + - + @@ -2398,13 +2398,13 @@ - + - + - + diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 15c3adc02b..b7a7388400 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -438,8 +438,9 @@ class gl_parameter: #if ts == "GLdouble": # print '/* stack size -> %s = %u (after) */' % (self.name, self.type_expr.get_stack_size()) - self.is_counter = is_attr_true( element, 'counter' ) - self.is_output = is_attr_true( element, 'output' ) + self.is_client_only = is_attr_true( element, 'client_only' ) + self.is_counter = is_attr_true( element, 'counter' ) + self.is_output = is_attr_true( element, 'output' ) # Pixel data has special parameters. -- cgit v1.2.3 From 7f9afedeb5d65b2bb85c13aa3896b8b49bb49f5f Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 22 Nov 2006 17:54:31 +0000 Subject: remove unneded call to _tnl_invalidate_state() in _tnl_need_projected_coords(). Connected to bug #9103, though that bug got fixed without this change too. --- src/mesa/tnl/t_context.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 55b40c0531..154780cc97 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -246,10 +246,7 @@ void _tnl_need_projected_coords( GLcontext *ctx, GLboolean mode ) { TNLcontext *tnl = TNL_CONTEXT(ctx); - if (tnl->NeedNdcCoords != mode) { - tnl->NeedNdcCoords = mode; - _tnl_InvalidateState( ctx, _NEW_PROJECTION ); - } + tnl->NeedNdcCoords = mode; } void -- cgit v1.2.3 From 7398748addd3e7a776f30f30376f4ed37f77da8d Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 22 Nov 2006 20:15:56 +0000 Subject: Some missing state init --- src/mesa/drivers/dri/nouveau/nouveau_state.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 2094691ce2..1445ee7449 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -257,6 +257,10 @@ void nouveauInitState(GLcontext *ctx) ctx->Color.BlendSrcA, ctx->Color.BlendDstA); + STATE_INIT(ClearColor)( ctx, ctx->Color.ClearColor); + STATE_INIT(ClearDepth)( ctx, ctx->Depth.Clear); + STATE_INIT(ClearStencil)( ctx, ctx->Stencil.Clear); + STATE_INIT(ColorMask)( ctx, ctx->Color.ColorMask[RCOMP], ctx->Color.ColorMask[GCOMP], @@ -266,6 +270,7 @@ void nouveauInitState(GLcontext *ctx) STATE_INIT(CullFace)( ctx, ctx->Polygon.CullFaceMode ); STATE_INIT(DepthFunc)( ctx, ctx->Depth.Func ); STATE_INIT(DepthMask)( ctx, ctx->Depth.Mask ); + STATE_INIT(DepthRange)( ctx, ctx->Viewport.Near, ctx->Viewport.Far ); STATE_INIT(Enable)( ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled ); STATE_INIT(Enable)( ctx, GL_BLEND, ctx->Color.BlendEnabled ); @@ -277,6 +282,12 @@ void nouveauInitState(GLcontext *ctx) STATE_INIT(Enable)( ctx, GL_FOG, ctx->Fog.Enabled ); STATE_INIT(Enable)( ctx, GL_LIGHTING, ctx->Light.Enabled ); STATE_INIT(Enable)( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag ); + STATE_INIT(Enable)( ctx, GL_LINE_STIPPLE, ctx->Line.StippleFlag ); + STATE_INIT(Enable)( ctx, GL_POINT_SMOOTH, ctx->Point.SmoothFlag ); + STATE_INIT(Enable)( ctx, GL_POLYGON_OFFSET_FILL, ctx->Polygon.OffsetFill); + STATE_INIT(Enable)( ctx, GL_POLYGON_OFFSET_LINE, ctx->Polygon.OffsetLine); + STATE_INIT(Enable)( ctx, GL_POLYGON_OFFSET_POINT, ctx->Polygon.OffsetPoint); + STATE_INIT(Enable)( ctx, GL_POLYGON_SMOOTH, ctx->Polygon.SmoothFlag ); STATE_INIT(Enable)( ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag ); STATE_INIT(Enable)( ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled ); STATE_INIT(Enable)( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled ); @@ -299,9 +310,15 @@ void nouveauInitState(GLcontext *ctx) STATE_INIT(LightModelfv)( ctx, GL_LIGHT_MODEL_COLOR_CONTROL, &f ); } + STATE_INIT(LineStipple)( ctx, ctx->Line.StippleFactor, ctx->Line.StipplePattern ); STATE_INIT(LineWidth)( ctx, ctx->Line.Width ); STATE_INIT(LogicOpcode)( ctx, ctx->Color.LogicOp ); STATE_INIT(PointSize)( ctx, ctx->Point.Size ); + STATE_INIT(PolygonMode)( ctx, GL_FRONT, ctx->Polygon.FrontMode ); + STATE_INIT(PolygonMode)( ctx, GL_BACK, ctx->Polygon.BackMode ); + STATE_INIT(PolygonOffset)( ctx, + ctx->Polygon.OffsetFactor, + ctx->Polygon.OffsetUnits ); STATE_INIT(PolygonStipple)( ctx, (const GLubyte *)ctx->PolygonStipple ); STATE_INIT(Scissor)( ctx, ctx->Scissor.X, ctx->Scissor.Y, ctx->Scissor.Width, ctx->Scissor.Height ); @@ -325,5 +342,9 @@ void nouveauInitState(GLcontext *ctx) ctx->Stencil.ZFailFunc[1], ctx->Stencil.ZPassFunc[1]); + STATE_INIT(Viewport)( ctx, + ctx->Viewport.X, ctx->Viewport.Y, + ctx->Viewport.Width, ctx->Viewport.Height ); + STATE_INIT(DrawBuffer)( ctx, ctx->Color.DrawBuffer[0] ); } -- cgit v1.2.3 From 982ceb6773e2153c1fdc21a016e79c2d94115d76 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 21:33:44 +0000 Subject: fix comments --- src/mesa/shader/slang/slang_assemble_typeinfo.c | 2 +- src/mesa/shader/slang/slang_assemble_typeinfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c index f4ee573df7..265e417dad 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c @@ -594,7 +594,7 @@ _slang_type_base(slang_type_specifier_type ty) /** - * Return the number of elements in a vector or matrix type + * Return the dimensionality of a vector or matrix type. */ GLuint _slang_type_dim(slang_type_specifier_type ty) diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.h b/src/mesa/shader/slang/slang_assemble_typeinfo.h index 5d951226a1..777dc21f3a 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.h +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.h @@ -68,8 +68,8 @@ typedef enum slang_type_specifier_type_ typedef struct slang_type_specifier_ { slang_type_specifier_type type; - struct slang_struct_ *_struct; /**< type: spec_struct */ - struct slang_type_specifier_ *_array; /**< type: spec_array */ + struct slang_struct_ *_struct; /**< used if type == spec_struct */ + struct slang_type_specifier_ *_array; /**< used if type == spec_array */ } slang_type_specifier; -- cgit v1.2.3 From 958a8af3b01be3d600b90acef2dd7761fb2d7141 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 21:34:30 +0000 Subject: reindent --- src/mesa/shader/slang/slang_compile_variable.c | 550 +++++++++++++------------ 1 file changed, 281 insertions(+), 269 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 679d93b951..928c752d14 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -35,89 +35,92 @@ typedef struct { - const char *name; - slang_type_specifier_type type; + const char *name; + slang_type_specifier_type type; } type_specifier_type_name; -static type_specifier_type_name type_specifier_type_names[] = { - { "void", slang_spec_void }, - { "bool", slang_spec_bool }, - { "bvec2", slang_spec_bvec2 }, - { "bvec3", slang_spec_bvec3 }, - { "bvec4", slang_spec_bvec4 }, - { "int", slang_spec_int }, - { "ivec2", slang_spec_ivec2 }, - { "ivec3", slang_spec_ivec3 }, - { "ivec4", slang_spec_ivec4 }, - { "float", slang_spec_float }, - { "vec2", slang_spec_vec2 }, - { "vec3", slang_spec_vec3 }, - { "vec4", slang_spec_vec4 }, - { "mat2", slang_spec_mat2 }, - { "mat3", slang_spec_mat3 }, - { "mat4", slang_spec_mat4 }, - { "sampler1D", slang_spec_sampler1D }, - { "sampler2D", slang_spec_sampler2D }, - { "sampler3D", slang_spec_sampler3D }, - { "samplerCube", slang_spec_samplerCube }, - { "sampler1DShadow", slang_spec_sampler1DShadow }, - { "sampler2DShadow", slang_spec_sampler2DShadow }, - { NULL, slang_spec_void } +static const type_specifier_type_name type_specifier_type_names[] = { + {"void", slang_spec_void}, + {"bool", slang_spec_bool}, + {"bvec2", slang_spec_bvec2}, + {"bvec3", slang_spec_bvec3}, + {"bvec4", slang_spec_bvec4}, + {"int", slang_spec_int}, + {"ivec2", slang_spec_ivec2}, + {"ivec3", slang_spec_ivec3}, + {"ivec4", slang_spec_ivec4}, + {"float", slang_spec_float}, + {"vec2", slang_spec_vec2}, + {"vec3", slang_spec_vec3}, + {"vec4", slang_spec_vec4}, + {"mat2", slang_spec_mat2}, + {"mat3", slang_spec_mat3}, + {"mat4", slang_spec_mat4}, + {"sampler1D", slang_spec_sampler1D}, + {"sampler2D", slang_spec_sampler2D}, + {"sampler3D", slang_spec_sampler3D}, + {"samplerCube", slang_spec_samplerCube}, + {"sampler1DShadow", slang_spec_sampler1DShadow}, + {"sampler2DShadow", slang_spec_sampler2DShadow}, + {NULL, slang_spec_void} }; -slang_type_specifier_type slang_type_specifier_type_from_string (const char *name) +slang_type_specifier_type +slang_type_specifier_type_from_string(const char *name) { - type_specifier_type_name *p = type_specifier_type_names; - while (p->name != NULL) - { - if (slang_string_compare (p->name, name) == 0) - break; - p++; - } - return p->type; + const type_specifier_type_name *p = type_specifier_type_names; + while (p->name != NULL) { + if (slang_string_compare(p->name, name) == 0) + break; + p++; + } + return p->type; } -const char *slang_type_specifier_type_to_string (slang_type_specifier_type type) +const char * +slang_type_specifier_type_to_string(slang_type_specifier_type type) { - type_specifier_type_name *p = type_specifier_type_names; - while (p->name != NULL) - { - if (p->type == type) - break; - p++; - } - return p->name; + const type_specifier_type_name *p = type_specifier_type_names; + while (p->name != NULL) { + if (p->type == type) + break; + p++; + } + return p->name; } /* slang_fully_specified_type */ -int slang_fully_specified_type_construct (slang_fully_specified_type *type) +int +slang_fully_specified_type_construct(slang_fully_specified_type * type) { - type->qualifier = slang_qual_none; - slang_type_specifier_ctr (&type->specifier); - return 1; + type->qualifier = slang_qual_none; + slang_type_specifier_ctr(&type->specifier); + return 1; } -void slang_fully_specified_type_destruct (slang_fully_specified_type *type) +void +slang_fully_specified_type_destruct(slang_fully_specified_type * type) { - slang_type_specifier_dtr (&type->specifier); + slang_type_specifier_dtr(&type->specifier); } -int slang_fully_specified_type_copy (slang_fully_specified_type *x, const slang_fully_specified_type *y) +int +slang_fully_specified_type_copy(slang_fully_specified_type * x, + const slang_fully_specified_type * y) { - slang_fully_specified_type z; - - if (!slang_fully_specified_type_construct (&z)) - return 0; - z.qualifier = y->qualifier; - if (!slang_type_specifier_copy (&z.specifier, &y->specifier)) - { - slang_fully_specified_type_destruct (&z); - return 0; - } - slang_fully_specified_type_destruct (x); - *x = z; - return 1; + slang_fully_specified_type z; + + if (!slang_fully_specified_type_construct(&z)) + return 0; + z.qualifier = y->qualifier; + if (!slang_type_specifier_copy(&z.specifier, &y->specifier)) { + slang_fully_specified_type_destruct(&z); + return 0; + } + slang_fully_specified_type_destruct(x); + *x = z; + return 1; } /* @@ -125,246 +128,255 @@ int slang_fully_specified_type_copy (slang_fully_specified_type *x, const slang_ */ GLvoid -_slang_variable_scope_ctr (slang_variable_scope *self) +_slang_variable_scope_ctr(slang_variable_scope * self) { self->variables = NULL; self->num_variables = 0; self->outer_scope = NULL; } -void slang_variable_scope_destruct (slang_variable_scope *scope) +void +slang_variable_scope_destruct(slang_variable_scope * scope) { - unsigned int i; - - for (i = 0; i < scope->num_variables; i++) - slang_variable_destruct (scope->variables + i); - slang_alloc_free (scope->variables); - /* do not free scope->outer_scope */ + unsigned int i; + + if (!scope) + return; + for (i = 0; i < scope->num_variables; i++) + slang_variable_destruct(scope->variables + i); + slang_alloc_free(scope->variables); + /* do not free scope->outer_scope */ } -int slang_variable_scope_copy (slang_variable_scope *x, const slang_variable_scope *y) +int +slang_variable_scope_copy(slang_variable_scope * x, + const slang_variable_scope * y) { - slang_variable_scope z; - unsigned int i; - - _slang_variable_scope_ctr (&z); - z.variables = (slang_variable *) slang_alloc_malloc (y->num_variables * sizeof (slang_variable)); - if (z.variables == NULL) - { - slang_variable_scope_destruct (&z); - return 0; - } - for (z.num_variables = 0; z.num_variables < y->num_variables; z.num_variables++) - if (!slang_variable_construct (&z.variables[z.num_variables])) - { - slang_variable_scope_destruct (&z); - return 0; - } - for (i = 0; i < z.num_variables; i++) - if (!slang_variable_copy (&z.variables[i], &y->variables[i])) - { - slang_variable_scope_destruct (&z); - return 0; - } - z.outer_scope = y->outer_scope; - slang_variable_scope_destruct (x); - *x = z; - return 1; + slang_variable_scope z; + unsigned int i; + + _slang_variable_scope_ctr(&z); + z.variables = (slang_variable *) + slang_alloc_malloc(y->num_variables * sizeof(slang_variable)); + if (z.variables == NULL) { + slang_variable_scope_destruct(&z); + return 0; + } + for (z.num_variables = 0; z.num_variables < y->num_variables; + z.num_variables++) { + if (!slang_variable_construct(&z.variables[z.num_variables])) { + slang_variable_scope_destruct(&z); + return 0; + } + } + for (i = 0; i < z.num_variables; i++) { + if (!slang_variable_copy(&z.variables[i], &y->variables[i])) { + slang_variable_scope_destruct(&z); + return 0; + } + } + z.outer_scope = y->outer_scope; + slang_variable_scope_destruct(x); + *x = z; + return 1; } /* slang_variable */ -int slang_variable_construct (slang_variable *var) +int +slang_variable_construct(slang_variable * var) { - if (!slang_fully_specified_type_construct (&var->type)) - return 0; - var->a_name = SLANG_ATOM_NULL; - var->array_len = 0; - var->initializer = NULL; - var->address = ~0; - var->size = 0; - var->global = GL_FALSE; - return 1; + if (!slang_fully_specified_type_construct(&var->type)) + return 0; + var->a_name = SLANG_ATOM_NULL; + var->array_len = 0; + var->initializer = NULL; + var->address = ~0; + var->address2 = 0; + var->size = 0; + var->global = GL_FALSE; + return 1; } -void slang_variable_destruct (slang_variable *var) +void +slang_variable_destruct(slang_variable * var) { - slang_fully_specified_type_destruct (&var->type); - if (var->initializer != NULL) - { - slang_operation_destruct (var->initializer); - slang_alloc_free (var->initializer); - } + slang_fully_specified_type_destruct(&var->type); + if (var->initializer != NULL) { + slang_operation_destruct(var->initializer); + slang_alloc_free(var->initializer); + } } -int slang_variable_copy (slang_variable *x, const slang_variable *y) +int +slang_variable_copy(slang_variable * x, const slang_variable * y) { - slang_variable z; - - if (!slang_variable_construct (&z)) - return 0; - if (!slang_fully_specified_type_copy (&z.type, &y->type)) - { - slang_variable_destruct (&z); - return 0; - } - z.a_name = y->a_name; - z.array_len = y->array_len; - if (y->initializer != NULL) - { - z.initializer = (slang_operation *) slang_alloc_malloc (sizeof (slang_operation)); - if (z.initializer == NULL) - { - slang_variable_destruct (&z); - return 0; - } - if (!slang_operation_construct (z.initializer)) - { - slang_alloc_free (z.initializer); - slang_variable_destruct (&z); - return 0; - } - if (!slang_operation_copy (z.initializer, y->initializer)) - { - slang_variable_destruct (&z); - return 0; - } - } - z.address = y->address; - z.size = y->size; - z.global = y->global; - slang_variable_destruct (x); - *x = z; - return 1; + slang_variable z; + + if (!slang_variable_construct(&z)) + return 0; + if (!slang_fully_specified_type_copy(&z.type, &y->type)) { + slang_variable_destruct(&z); + return 0; + } + z.a_name = y->a_name; + z.array_len = y->array_len; + if (y->initializer != NULL) { + z.initializer = + (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); + if (z.initializer == NULL) { + slang_variable_destruct(&z); + return 0; + } + if (!slang_operation_construct(z.initializer)) { + slang_alloc_free(z.initializer); + slang_variable_destruct(&z); + return 0; + } + if (!slang_operation_copy(z.initializer, y->initializer)) { + slang_variable_destruct(&z); + return 0; + } + } + z.address = y->address; + z.size = y->size; + z.global = y->global; + slang_variable_destruct(x); + *x = z; + return 1; } -slang_variable *_slang_locate_variable (slang_variable_scope *scope, slang_atom a_name, GLboolean all) +slang_variable * +_slang_locate_variable(slang_variable_scope * scope, slang_atom a_name, + GLboolean all) { - GLuint i; - - for (i = 0; i < scope->num_variables; i++) - if (a_name == scope->variables[i].a_name) - return &scope->variables[i]; - if (all && scope->outer_scope != NULL) - return _slang_locate_variable (scope->outer_scope, a_name, 1); - return NULL; + GLuint i; + + for (i = 0; i < scope->num_variables; i++) + if (a_name == scope->variables[i].a_name) + return &scope->variables[i]; + if (all && scope->outer_scope != NULL) + return _slang_locate_variable(scope->outer_scope, a_name, 1); + return NULL; } /* * _slang_build_export_data_table() */ -static GLenum gl_type_from_specifier (const slang_type_specifier *type) +static GLenum +gl_type_from_specifier(const slang_type_specifier * type) { - switch (type->type) - { - case slang_spec_bool: - return GL_BOOL_ARB; - case slang_spec_bvec2: - return GL_BOOL_VEC2_ARB; - case slang_spec_bvec3: - return GL_BOOL_VEC3_ARB; - case slang_spec_bvec4: - return GL_BOOL_VEC4_ARB; - case slang_spec_int: - return GL_INT; - case slang_spec_ivec2: - return GL_INT_VEC2_ARB; - case slang_spec_ivec3: - return GL_INT_VEC3_ARB; - case slang_spec_ivec4: - return GL_INT_VEC4_ARB; - case slang_spec_float: - return GL_FLOAT; - case slang_spec_vec2: - return GL_FLOAT_VEC2_ARB; - case slang_spec_vec3: - return GL_FLOAT_VEC3_ARB; - case slang_spec_vec4: - return GL_FLOAT_VEC4_ARB; - case slang_spec_mat2: - return GL_FLOAT_MAT2_ARB; - case slang_spec_mat3: - return GL_FLOAT_MAT3_ARB; - case slang_spec_mat4: - return GL_FLOAT_MAT4_ARB; - case slang_spec_sampler1D: - return GL_SAMPLER_1D_ARB; - case slang_spec_sampler2D: - return GL_SAMPLER_2D_ARB; - case slang_spec_sampler3D: - return GL_SAMPLER_3D_ARB; - case slang_spec_samplerCube: - return GL_SAMPLER_CUBE_ARB; - case slang_spec_sampler1DShadow: - return GL_SAMPLER_1D_SHADOW_ARB; - case slang_spec_sampler2DShadow: - return GL_SAMPLER_2D_SHADOW_ARB; - case slang_spec_array: - return gl_type_from_specifier (type->_array); - default: - return GL_FLOAT; - } + switch (type->type) { + case slang_spec_bool: + return GL_BOOL_ARB; + case slang_spec_bvec2: + return GL_BOOL_VEC2_ARB; + case slang_spec_bvec3: + return GL_BOOL_VEC3_ARB; + case slang_spec_bvec4: + return GL_BOOL_VEC4_ARB; + case slang_spec_int: + return GL_INT; + case slang_spec_ivec2: + return GL_INT_VEC2_ARB; + case slang_spec_ivec3: + return GL_INT_VEC3_ARB; + case slang_spec_ivec4: + return GL_INT_VEC4_ARB; + case slang_spec_float: + return GL_FLOAT; + case slang_spec_vec2: + return GL_FLOAT_VEC2_ARB; + case slang_spec_vec3: + return GL_FLOAT_VEC3_ARB; + case slang_spec_vec4: + return GL_FLOAT_VEC4_ARB; + case slang_spec_mat2: + return GL_FLOAT_MAT2_ARB; + case slang_spec_mat3: + return GL_FLOAT_MAT3_ARB; + case slang_spec_mat4: + return GL_FLOAT_MAT4_ARB; + case slang_spec_sampler1D: + return GL_SAMPLER_1D_ARB; + case slang_spec_sampler2D: + return GL_SAMPLER_2D_ARB; + case slang_spec_sampler3D: + return GL_SAMPLER_3D_ARB; + case slang_spec_samplerCube: + return GL_SAMPLER_CUBE_ARB; + case slang_spec_sampler1DShadow: + return GL_SAMPLER_1D_SHADOW_ARB; + case slang_spec_sampler2DShadow: + return GL_SAMPLER_2D_SHADOW_ARB; + case slang_spec_array: + return gl_type_from_specifier(type->_array); + default: + return GL_FLOAT; + } } -static GLboolean build_quant (slang_export_data_quant *q, slang_variable *var) +static GLboolean +build_quant(slang_export_data_quant * q, const slang_variable * var) { - slang_type_specifier *spec = &var->type.specifier; - - q->name = var->a_name; - q->size = var->size; - if (spec->type == slang_spec_array) - { - q->array_len = var->array_len; - q->size /= var->array_len; - spec = spec->_array; - } - if (spec->type == slang_spec_struct) - { - GLuint i; - - q->u.field_count = spec->_struct->fields->num_variables; - q->structure = (slang_export_data_quant *) slang_alloc_malloc ( - q->u.field_count * sizeof (slang_export_data_quant)); - if (q->structure == NULL) - return GL_FALSE; - - for (i = 0; i < q->u.field_count; i++) - slang_export_data_quant_ctr (&q->structure[i]); - for (i = 0; i < q->u.field_count; i++) - if (!build_quant (&q->structure[i], &spec->_struct->fields->variables[i])) - return GL_FALSE; - } - else - q->u.basic_type = gl_type_from_specifier (spec); - return GL_TRUE; + const slang_type_specifier *spec = &var->type.specifier; + + q->name = var->a_name; + q->size = var->size; + if (spec->type == slang_spec_array) { + q->array_len = var->array_len; + q->size /= var->array_len; + spec = spec->_array; + } + if (spec->type == slang_spec_struct) { + GLuint i; + + q->u.field_count = spec->_struct->fields->num_variables; + q->structure = (slang_export_data_quant *) + slang_alloc_malloc(q->u.field_count + * sizeof(slang_export_data_quant)); + if (q->structure == NULL) + return GL_FALSE; + + for (i = 0; i < q->u.field_count; i++) + slang_export_data_quant_ctr(&q->structure[i]); + for (i = 0; i < q->u.field_count; i++) { + if (!build_quant(&q->structure[i], + &spec->_struct->fields->variables[i])) + return GL_FALSE; + } + } + else + q->u.basic_type = gl_type_from_specifier(spec); + return GL_TRUE; } -GLboolean _slang_build_export_data_table (slang_export_data_table *tbl, slang_variable_scope *vars) +GLboolean +_slang_build_export_data_table(slang_export_data_table * tbl, + slang_variable_scope * vars) { - GLuint i; - - for (i = 0; i < vars->num_variables; i++) - { - slang_variable *var = &vars->variables[i]; - slang_export_data_entry *e; - - e = slang_export_data_table_add (tbl); - if (e == NULL) - return GL_FALSE; - if (!build_quant (&e->quant, var)) - return GL_FALSE; - if (var->type.qualifier == slang_qual_uniform) - e->access = slang_exp_uniform; - else if (var->type.qualifier == slang_qual_attribute) - e->access = slang_exp_attribute; - else - e->access = slang_exp_varying; - e->address = var->address; - } - - if (vars->outer_scope != NULL) - return _slang_build_export_data_table (tbl, vars->outer_scope); - return GL_TRUE; + GLuint i; + + for (i = 0; i < vars->num_variables; i++) { + const slang_variable *var = &vars->variables[i]; + slang_export_data_entry *e; + + e = slang_export_data_table_add(tbl); + if (e == NULL) + return GL_FALSE; + if (!build_quant(&e->quant, var)) + return GL_FALSE; + if (var->type.qualifier == slang_qual_uniform) + e->access = slang_exp_uniform; + else if (var->type.qualifier == slang_qual_attribute) + e->access = slang_exp_attribute; + else + e->access = slang_exp_varying; + e->address = var->address; + } + + if (vars->outer_scope != NULL) + return _slang_build_export_data_table(tbl, vars->outer_scope); + return GL_TRUE; } - -- cgit v1.2.3 From f9f4625367a7b8d462f4af67aabf61c29f11f500 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 21:34:47 +0000 Subject: clean-up, comments --- src/mesa/shader/slang/slang_compile_variable.h | 38 ++++++++++++++++---------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 3b6e1987c8..626e424e79 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_COMPILE_VARIABLE_H +#ifndef SLANG_COMPILE_VARIABLE_H #define SLANG_COMPILE_VARIABLE_H #if defined __cplusplus @@ -68,9 +68,28 @@ slang_fully_specified_type_copy(slang_fully_specified_type *, const slang_fully_specified_type *); +/** + * A shading language program variable. + */ +typedef struct slang_variable_ +{ + slang_fully_specified_type type; /**< Variable's data type */ + slang_atom a_name; /**< The variable's name (char *) */ + GLuint array_len; /**< only if type == slang_spec_array */ + struct slang_operation_ *initializer; /**< Optional initializer code */ + GLuint address; /**< Storage location */ + GLuint address2; /**< Storage location */ + GLuint size; /**< Variable's size in bytes */ + GLboolean global; /**< A global var? */ +} slang_variable; + + +/** + * Basically a list of variables, with a pointer to the parent scope. + */ typedef struct slang_variable_scope_ { - struct slang_variable_ *variables; + slang_variable *variables; /**< Array [num_variables] */ GLuint num_variables; struct slang_variable_scope_ *outer_scope; } slang_variable_scope; @@ -86,18 +105,6 @@ slang_variable_scope_copy(slang_variable_scope *, const slang_variable_scope *); -typedef struct slang_variable_ -{ - slang_fully_specified_type type; - slang_atom a_name; - GLuint array_len; /* type: spec_array */ - struct slang_operation_ *initializer; - unsigned int address; - unsigned int size; - GLboolean global; -} slang_variable; - - extern int slang_variable_construct(slang_variable *); @@ -116,8 +123,9 @@ _slang_build_export_data_table(slang_export_data_table *, slang_variable_scope *); + #ifdef __cplusplus } #endif -#endif +#endif /* SLANG_COMPILE_VARIABLE_H */ -- cgit v1.2.3 From 98ea0a3f1fe0cff912e4f6ac74c4d88a7eb905bf Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 21:49:14 +0000 Subject: new comments --- src/mesa/shader/slang/slang_compile_function.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 8835544bf3..1a7302f29a 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_COMPILE_FUNCTION_H +#ifndef SLANG_COMPILE_FUNCTION_H #define SLANG_COMPILE_FUNCTION_H #if defined __cplusplus @@ -63,12 +63,12 @@ extern GLboolean slang_fixup_save(slang_fixup_table *fixups, GLuint address); typedef struct slang_function_ { slang_function_kind kind; - slang_variable header; - slang_variable_scope *parameters; + slang_variable header; /**< The function's name and return type */ + slang_variable_scope *parameters; /**< array [param_count] */ unsigned int param_count; slang_operation *body; /**< The instruction tree */ - unsigned int address; - slang_fixup_table fixups; + unsigned int address; /**< Address of this func in memory */ + slang_fixup_table fixups; /**< Mem locations which need func's address */ } slang_function; extern int slang_function_construct(slang_function *); @@ -99,7 +99,8 @@ extern slang_function * slang_function_scope_find(slang_function_scope *, slang_function *, int); extern GLboolean -_slang_build_export_code_table(slang_export_code_table *, slang_function_scope *, +_slang_build_export_code_table(slang_export_code_table *, + slang_function_scope *, struct slang_code_unit_ *); @@ -107,5 +108,4 @@ _slang_build_export_code_table(slang_export_code_table *, slang_function_scope * } #endif -#endif - +#endif /* SLANG_COMPILE_FUNCTION_H */ -- cgit v1.2.3 From 40c7cb7e1768cd694bdfc6864cf3a55254ffce56 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 21:59:28 +0000 Subject: const correctness --- src/mesa/shader/slang/slang_compile_variable.c | 4 ++-- src/mesa/shader/slang/slang_compile_variable.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 928c752d14..92951b85bb 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -247,8 +247,8 @@ slang_variable_copy(slang_variable * x, const slang_variable * y) } slang_variable * -_slang_locate_variable(slang_variable_scope * scope, slang_atom a_name, - GLboolean all) +_slang_locate_variable(const slang_variable_scope * scope, + const slang_atom a_name, GLboolean all) { GLuint i; diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 626e424e79..2f358860f8 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -115,7 +115,7 @@ extern int slang_variable_copy(slang_variable *, const slang_variable *); extern slang_variable * -_slang_locate_variable(slang_variable_scope *, slang_atom a_name, +_slang_locate_variable(const slang_variable_scope *, const slang_atom a_name, GLboolean all); extern GLboolean -- cgit v1.2.3 From 46e454863ea9dbe8618a67fb5b4b4a8c51607995 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 22 Nov 2006 22:07:35 +0000 Subject: decrease the current vertex count by 1 if an uneven number of vertices is copied by _tnl_copy_vertices. Otherwise, since in this case it will copy an extra vertex to avoid problems with vertex order in the new buffer, one triangle will be drawn twice. This fixes bug #9062. --- src/mesa/tnl/t_vtx_exec.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_vtx_exec.c b/src/mesa/tnl/t_vtx_exec.c index 57d842f05f..900c4ab6cc 100644 --- a/src/mesa/tnl/t_vtx_exec.c +++ b/src/mesa/tnl/t_vtx_exec.c @@ -239,6 +239,11 @@ static GLuint _tnl_copy_vertices( GLcontext *ctx ) return 2; } case GL_TRIANGLE_STRIP: + /* no parity issue, but need to make sure the tri is not drawn twice */ + if (nr & 1) { + tnl->vtx.prim[tnl->vtx.prim_count-1].count--; + } + /* fallthrough */ case GL_QUAD_STRIP: switch (nr) { case 0: ovf = 0; break; -- cgit v1.2.3 From 0cb0a04eca51dc75441a9744e520070511a7a00b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 22 Nov 2006 23:58:47 +0000 Subject: indent --- src/mesa/shader/slang/slang_compile_operation.h | 152 ++++++++++++------------ 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index f5fee1e50e..65e33dc4a2 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -22,108 +22,108 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_COMPILE_OPERATION_H +#ifndef SLANG_COMPILE_OPERATION_H #define SLANG_COMPILE_OPERATION_H #if defined __cplusplus extern "C" { #endif + /** * Types of slang operations. * These are the basic intermediate code representations. * [foo] indicates a sub-tree or reference to another type of node */ -typedef enum slang_operation_type_ + typedef enum slang_operation_type_ { - slang_oper_none, - slang_oper_block_no_new_scope, /* "{" sequence "}" */ - slang_oper_block_new_scope, /* "{" sequence "}" */ - slang_oper_variable_decl, /* [type] [var] or [var] = [expr] */ - slang_oper_asm, - slang_oper_break, /* "break" statement */ - slang_oper_continue, /* "continue" statement */ - slang_oper_discard, /* "discard" (kill fragment) statement */ - slang_oper_return, /* "return" [expr] */ - slang_oper_expression, /* [expr] */ - slang_oper_if, /* "if" [0] then [1] else [2] */ - slang_oper_while, /* "while" [cond] [body] */ - slang_oper_do, /* "do" [body] "while" [cond] */ - slang_oper_for, /* "for" [init] [while] [incr] [body] */ - slang_oper_void, /* nop */ - slang_oper_literal_bool, /* "true" or "false" */ - slang_oper_literal_int, /* integer literal */ - slang_oper_literal_float, /* float literal */ - slang_oper_identifier, /* var name, func name, etc */ - slang_oper_sequence, /* [expr] "," [expr] "," etc */ - slang_oper_assign, /* [var] "=" [expr] */ - slang_oper_addassign, /* [var] "+=" [expr] */ - slang_oper_subassign, /* [var] "-=" [expr] */ - slang_oper_mulassign, /* [var] "*=" [expr] */ - slang_oper_divassign, /* [var] "/=" [expr] */ - /*slang_oper_modassign,*/ - /*slang_oper_lshassign,*/ - /*slang_oper_rshassign,*/ - /*slang_oper_orassign,*/ - /*slang_oper_xorassign,*/ - /*slang_oper_andassign,*/ - slang_oper_select, /* [expr] "?" [expr] ":" [expr] */ - slang_oper_logicalor, /* [expr] "||" [expr] */ - slang_oper_logicalxor, /* [expr] "^^" [expr] */ - slang_oper_logicaland, /* [expr] "&&" [expr] */ - /*slang_oper_bitor,*/ - /*slang_oper_bitxor,*/ - /*slang_oper_bitand,*/ - slang_oper_equal, /* [expr] "==" [expr] */ - slang_oper_notequal, /* [expr] "!=" [expr] */ - slang_oper_less, /* [expr] "<" [expr] */ - slang_oper_greater, /* [expr] ">" [expr] */ - slang_oper_lessequal, /* [expr] "<=" [expr] */ - slang_oper_greaterequal, /* [expr] ">=" [expr] */ - /*slang_oper_lshift,*/ - /*slang_oper_rshift,*/ - slang_oper_add, /* [expr] "+" [expr] */ - slang_oper_subtract, /* [expr] "-" [expr] */ - slang_oper_multiply, /* [expr] "*" [expr] */ - slang_oper_divide, /* [expr] "/" [expr] */ - /*slang_oper_modulus,*/ - slang_oper_preincrement, /* "++" [var] */ - slang_oper_predecrement, /* "--" [var] */ - slang_oper_plus, /* "-" [expr] */ - slang_oper_minus, /* "+" [expr] */ - /*slang_oper_complement,*/ - slang_oper_not, /* "!" [expr] */ - slang_oper_subscript, /* [expr] "[" [expr] "]" */ - slang_oper_call, /* [func name] [param] [param] [...] */ - slang_oper_field, /* i.e.: ".next" or ".xzy" or ".xxx" etc */ - slang_oper_postincrement, /* [var] "++" */ - slang_oper_postdecrement /* [var] "--" */ + slang_oper_none, + slang_oper_block_no_new_scope, /* "{" sequence "}" */ + slang_oper_block_new_scope, /* "{" sequence "}" */ + slang_oper_variable_decl, /* [type] [var] or [var] = [expr] */ + slang_oper_asm, + slang_oper_break, /* "break" statement */ + slang_oper_continue, /* "continue" statement */ + slang_oper_discard, /* "discard" (kill fragment) statement */ + slang_oper_return, /* "return" [expr] */ + slang_oper_expression, /* [expr] */ + slang_oper_if, /* "if" [0] then [1] else [2] */ + slang_oper_while, /* "while" [cond] [body] */ + slang_oper_do, /* "do" [body] "while" [cond] */ + slang_oper_for, /* "for" [init] [while] [incr] [body] */ + slang_oper_void, /* nop */ + slang_oper_literal_bool, /* "true" or "false" */ + slang_oper_literal_int, /* integer literal */ + slang_oper_literal_float, /* float literal */ + slang_oper_identifier, /* var name, func name, etc */ + slang_oper_sequence, /* [expr] "," [expr] "," etc */ + slang_oper_assign, /* [var] "=" [expr] */ + slang_oper_addassign, /* [var] "+=" [expr] */ + slang_oper_subassign, /* [var] "-=" [expr] */ + slang_oper_mulassign, /* [var] "*=" [expr] */ + slang_oper_divassign, /* [var] "/=" [expr] */ + /*slang_oper_modassign, */ + /*slang_oper_lshassign, */ + /*slang_oper_rshassign, */ + /*slang_oper_orassign, */ + /*slang_oper_xorassign, */ + /*slang_oper_andassign, */ + slang_oper_select, /* [expr] "?" [expr] ":" [expr] */ + slang_oper_logicalor, /* [expr] "||" [expr] */ + slang_oper_logicalxor, /* [expr] "^^" [expr] */ + slang_oper_logicaland, /* [expr] "&&" [expr] */ + /*slang_oper_bitor, */ + /*slang_oper_bitxor, */ + /*slang_oper_bitand, */ + slang_oper_equal, /* [expr] "==" [expr] */ + slang_oper_notequal, /* [expr] "!=" [expr] */ + slang_oper_less, /* [expr] "<" [expr] */ + slang_oper_greater, /* [expr] ">" [expr] */ + slang_oper_lessequal, /* [expr] "<=" [expr] */ + slang_oper_greaterequal, /* [expr] ">=" [expr] */ + /*slang_oper_lshift, */ + /*slang_oper_rshift, */ + slang_oper_add, /* [expr] "+" [expr] */ + slang_oper_subtract, /* [expr] "-" [expr] */ + slang_oper_multiply, /* [expr] "*" [expr] */ + slang_oper_divide, /* [expr] "/" [expr] */ + /*slang_oper_modulus, */ + slang_oper_preincrement, /* "++" [var] */ + slang_oper_predecrement, /* "--" [var] */ + slang_oper_plus, /* "-" [expr] */ + slang_oper_minus, /* "+" [expr] */ + /*slang_oper_complement, */ + slang_oper_not, /* "!" [expr] */ + slang_oper_subscript, /* [expr] "[" [expr] "]" */ + slang_oper_call, /* [func name] [param] [param] [...] */ + slang_oper_field, /* i.e.: ".next" or ".xzy" or ".xxx" etc */ + slang_oper_postincrement, /* [var] "++" */ + slang_oper_postdecrement /* [var] "--" */ } slang_operation_type; /** * A slang_operation is basically a compiled instruction (such as assignment, - * a while-loop, a conditiona, a function call, etc). + * a while-loop, a conditional, a multiply, a function call, etc). */ typedef struct slang_operation_ { - slang_operation_type type; - struct slang_operation_ *children; - unsigned int num_children; - float literal; /**< Used for float, int and bool values */ - slang_atom a_id; /**< type: asm, identifier, call, field */ - slang_variable_scope *locals; /**< local vars for scope */ + slang_operation_type type; + struct slang_operation_ *children; + unsigned int num_children; + float literal; /**< Used for float, int and bool values */ + slang_atom a_id; /**< type: asm, identifier, call, field */ + slang_variable_scope *locals; /**< local vars for scope */ } slang_operation; -extern int slang_operation_construct (slang_operation *); -extern void slang_operation_destruct (slang_operation *); -extern int slang_operation_copy (slang_operation *, const slang_operation *); +extern int slang_operation_construct(slang_operation *); +extern void slang_operation_destruct(slang_operation *); +extern int slang_operation_copy(slang_operation *, const slang_operation *); #ifdef __cplusplus } #endif -#endif - +#endif /* SLANG_COMPILE_OPERATION_H */ -- cgit v1.2.3 From 6ab6518735b6c98b800ed601dfe217248def43ff Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 00:09:00 +0000 Subject: clean-up, comments --- src/mesa/shader/slang/slang_compile_operation.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index 65e33dc4a2..f3c45de3c2 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -35,7 +35,7 @@ extern "C" { * These are the basic intermediate code representations. * [foo] indicates a sub-tree or reference to another type of node */ - typedef enum slang_operation_type_ +typedef enum slang_operation_type_ { slang_oper_none, slang_oper_block_no_new_scope, /* "{" sequence "}" */ @@ -105,6 +105,8 @@ extern "C" { /** * A slang_operation is basically a compiled instruction (such as assignment, * a while-loop, a conditional, a multiply, a function call, etc). + * NOTE: This structure could have been implemented as a union of simpler + * structs which would correspond to the operation types above. */ typedef struct slang_operation_ { -- cgit v1.2.3 From d98e1f3761860ad453a9acb446efeee6af97f00a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 23 Nov 2006 00:09:16 +0000 Subject: fixup draw/depth region handling in i830 along lines of i915 --- src/mesa/drivers/dri/i915tex/i830_context.h | 5 ++ src/mesa/drivers/dri/i915tex/i830_metaops.c | 32 +---------- src/mesa/drivers/dri/i915tex/i830_vtbl.c | 83 +++++++++++++++++++++++------ 3 files changed, 74 insertions(+), 46 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/i830_context.h b/src/mesa/drivers/dri/i915tex/i830_context.h index e5377b300a..3d754103c0 100644 --- a/src/mesa/drivers/dri/i915tex/i830_context.h +++ b/src/mesa/drivers/dri/i915tex/i830_context.h @@ -156,6 +156,11 @@ do { \ */ extern void i830InitVtbl(struct i830_context *i830); +extern void +i830_state_draw_region(struct intel_context *intel, + struct i830_hw_state *state, + struct intel_region *color_region, + struct intel_region *depth_region); /* i830_context.c */ extern GLboolean diff --git a/src/mesa/drivers/dri/i915tex/i830_metaops.c b/src/mesa/drivers/dri/i915tex/i830_metaops.c index c90f502222..f76646d89d 100644 --- a/src/mesa/drivers/dri/i915tex/i830_metaops.c +++ b/src/mesa/drivers/dri/i915tex/i830_metaops.c @@ -400,40 +400,12 @@ meta_import_pixel_state(struct intel_context *intel) */ static void meta_draw_region(struct intel_context *intel, - struct intel_region *draw_region, + struct intel_region *color_region, struct intel_region *depth_region) { struct i830_context *i830 = i830_context(&intel->ctx); - GLuint format; - GLuint depth_format = DEPTH_FRMT_16_FIXED; - intel_region_release(&i830->meta.draw_region); - intel_region_reference(&i830->meta.draw_region, draw_region); - - intel_region_release(&i830->meta.depth_region); - intel_region_reference(&i830->meta.depth_region, depth_region); - - /* XXX FBO: grab code from i915 meta_draw_region */ - - /* XXX: 555 support? - */ - if (draw_region->cpp == 2) - format = DV_PF_565; - else - format = DV_PF_8888; - - if (depth_region) { - if (depth_region->cpp == 2) - depth_format = DEPTH_FRMT_16_FIXED; - else - depth_format = DEPTH_FRMT_24_FIXED_8_OTHER; - } - - i830->meta.Buffer[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ - DSTORG_VERT_BIAS(0x8) | /* .5 */ - format | DEPTH_IS_Z | depth_format); - - i830->meta.emitted &= ~I830_UPLOAD_BUFFERS; + i830_state_draw_region(intel, &i830->meta, color_region, depth_region); } diff --git a/src/mesa/drivers/dri/i915tex/i830_vtbl.c b/src/mesa/drivers/dri/i915tex/i830_vtbl.c index 45502da290..18fc6d4b91 100644 --- a/src/mesa/drivers/dri/i915tex/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915tex/i830_vtbl.c @@ -518,28 +518,79 @@ i830_destroy_context(struct intel_context *intel) _tnl_free_vertices(&intel->ctx); } -static void -i830_set_draw_region(struct intel_context *intel, - struct intel_region *draw_region, - struct intel_region *depth_region) + +void +i830_state_draw_region(struct intel_context *intel, + struct i830_hw_state *state, + struct intel_region *color_region, + struct intel_region *depth_region) { struct i830_context *i830 = i830_context(&intel->ctx); + GLuint value; - intel_region_release(&i830->state.draw_region); - intel_region_release(&i830->state.depth_region); - intel_region_reference(&i830->state.draw_region, draw_region); - intel_region_reference(&i830->state.depth_region, depth_region); + ASSERT(state == &i830->state || state == &i830->meta); - /* XXX FBO: Need code from i915_set_draw_region() */ + if (state->draw_region != color_region) { + intel_region_release(&state->draw_region); + intel_region_reference(&state->draw_region, color_region); + } + if (state->depth_region != depth_region) { + intel_region_release(&state->depth_region); + intel_region_reference(&state->depth_region, depth_region); + } + + /* + * Set stride/cpp values + */ + if (color_region) { + state->Buffer[I830_DESTREG_CBUFADDR0] = _3DSTATE_BUF_INFO_CMD; + state->Buffer[I830_DESTREG_CBUFADDR1] = + (BUF_3D_ID_COLOR_BACK | + BUF_3D_PITCH(color_region->pitch * color_region->cpp) | + BUF_3D_USE_FENCE); + } + + if (depth_region) { + state->Buffer[I830_DESTREG_DBUFADDR0] = _3DSTATE_BUF_INFO_CMD; + state->Buffer[I830_DESTREG_DBUFADDR1] = + (BUF_3D_ID_DEPTH | + BUF_3D_PITCH(depth_region->pitch * depth_region->cpp) | + BUF_3D_USE_FENCE); + } + + /* + * Compute/set I830_DESTREG_DV1 value + */ + value = (DSTORG_HORT_BIAS(0x8) | /* .5 */ + DSTORG_VERT_BIAS(0x8) | DEPTH_IS_Z); /* .5 */ + + if (color_region && color_region->cpp == 4) { + value |= DV_PF_8888; + } + else { + value |= DV_PF_565; + } + if (depth_region && depth_region->cpp == 4) { + value |= DEPTH_FRMT_24_FIXED_8_OTHER; + } + else { + value |= DEPTH_FRMT_16_FIXED; + } + state->Buffer[I830_DESTREG_DV1] = value; I830_STATECHANGE(i830, I830_UPLOAD_BUFFERS); - I830_STATECHANGE(i830, I830_UPLOAD_BUFFERS); - i830->state.Buffer[I830_DESTREG_CBUFADDR1] = - (BUF_3D_ID_COLOR_BACK | BUF_3D_PITCH(draw_region->pitch) | - BUF_3D_USE_FENCE); - i830->state.Buffer[I830_DESTREG_DBUFADDR1] = - (BUF_3D_ID_DEPTH | BUF_3D_PITCH(depth_region->pitch) | - BUF_3D_USE_FENCE); + + +} + + +static void +i830_set_draw_region(struct intel_context *intel, + struct intel_region *color_region, + struct intel_region *depth_region) +{ + struct i830_context *i830 = i830_context(&intel->ctx); + i830_state_draw_region(intel, &i830->state, color_region, depth_region); } #if 0 -- cgit v1.2.3 From dfc98c0beccadf876da4e09614c7264b765ba527 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 00:38:50 +0000 Subject: indent --- src/mesa/shader/slang/slang_assemble_constructor.c | 608 +++++++++++---------- 1 file changed, 305 insertions(+), 303 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c index 9d1aa70718..f6fb6d7c69 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ b/src/mesa/shader/slang/slang_assemble_constructor.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -32,348 +32,350 @@ #include "slang_assemble.h" #include "slang_storage.h" -/* _slang_is_swizzle() */ -GLboolean _slang_is_swizzle (const char *field, GLuint rows, slang_swizzle *swz) + +GLboolean +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) { - GLuint i; - GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; - - /* the swizzle can be at most 4-component long */ - swz->num_components = slang_string_length (field); - if (swz->num_components > 4) - return GL_FALSE; - - for (i = 0; i < swz->num_components; i++) - { - /* mark which swizzle group is used */ - switch (field[i]) - { - case 'x': - case 'y': - case 'z': - case 'w': - xyzw = GL_TRUE; - break; - case 'r': - case 'g': - case 'b': - case 'a': - rgba = GL_TRUE; - break; - case 's': - case 't': - case 'p': - case 'q': - stpq = GL_TRUE; - break; - default: - return GL_FALSE; - } - - /* collect swizzle component */ - switch (field[i]) - { - case 'x': - case 'r': - case 's': - swz->swizzle[i] = 0; - break; - case 'y': - case 'g': - case 't': - swz->swizzle[i] = 1; - break; - case 'z': - case 'b': - case 'p': - swz->swizzle[i] = 2; - break; - case 'w': - case 'a': - case 'q': - swz->swizzle[i] = 3; - break; - } - - /* check if the component is valid for given vector's row count */ - if (rows <= swz->swizzle[i]) - return GL_FALSE; - } - - /* only one swizzle group can be used */ - if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) - return GL_FALSE; - - return GL_TRUE; + GLuint i; + GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; + + /* the swizzle can be at most 4-component long */ + swz->num_components = slang_string_length(field); + if (swz->num_components > 4) + return GL_FALSE; + + for (i = 0; i < swz->num_components; i++) { + /* mark which swizzle group is used */ + switch (field[i]) { + case 'x': + case 'y': + case 'z': + case 'w': + xyzw = GL_TRUE; + break; + case 'r': + case 'g': + case 'b': + case 'a': + rgba = GL_TRUE; + break; + case 's': + case 't': + case 'p': + case 'q': + stpq = GL_TRUE; + break; + default: + return GL_FALSE; + } + + /* collect swizzle component */ + switch (field[i]) { + case 'x': + case 'r': + case 's': + swz->swizzle[i] = 0; + break; + case 'y': + case 'g': + case 't': + swz->swizzle[i] = 1; + break; + case 'z': + case 'b': + case 'p': + swz->swizzle[i] = 2; + break; + case 'w': + case 'a': + case 'q': + swz->swizzle[i] = 3; + break; + } + + /* check if the component is valid for given vector's row count */ + if (rows <= swz->swizzle[i]) + return GL_FALSE; + } + + /* only one swizzle group can be used */ + if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) + return GL_FALSE; + + return GL_TRUE; } -/* _slang_is_swizzle_mask() */ -GLboolean _slang_is_swizzle_mask (const slang_swizzle *swz, GLuint rows) + +GLboolean +_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) { - GLuint i, c = 0; + GLuint i, c = 0; - /* the swizzle may not be longer than the vector dim */ - if (swz->num_components > rows) - return GL_FALSE; + /* the swizzle may not be longer than the vector dim */ + if (swz->num_components > rows) + return GL_FALSE; - /* the swizzle components cannot be duplicated */ - for (i = 0; i < swz->num_components; i++) - { - if ((c & (1 << swz->swizzle[i])) != 0) - return GL_FALSE; - c |= 1 << swz->swizzle[i]; - } + /* the swizzle components cannot be duplicated */ + for (i = 0; i < swz->num_components; i++) { + if ((c & (1 << swz->swizzle[i])) != 0) + return GL_FALSE; + c |= 1 << swz->swizzle[i]; + } - return GL_TRUE; + return GL_TRUE; } -/* _slang_multiply_swizzles() */ -GLvoid _slang_multiply_swizzles (slang_swizzle *dst, const slang_swizzle *left, - const slang_swizzle *right) + +GLvoid +_slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left, + const slang_swizzle * right) { - GLuint i; + GLuint i; - dst->num_components = right->num_components; - for (i = 0; i < right->num_components; i++) - dst->swizzle[i] = left->swizzle[right->swizzle[i]]; + dst->num_components = right->num_components; + for (i = 0; i < right->num_components; i++) + dst->swizzle[i] = left->swizzle[right->swizzle[i]]; } -/* _slang_assemble_constructor() */ + static GLboolean -sizeof_argument (slang_assemble_ctx *A, GLuint *size, slang_operation *op) +sizeof_argument(slang_assemble_ctx * A, GLuint * size, slang_operation * op) { slang_assembly_typeinfo ti; GLboolean result = GL_FALSE; slang_storage_aggregate agg; - if (!slang_assembly_typeinfo_construct (&ti)) + if (!slang_assembly_typeinfo_construct(&ti)) return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) + if (!_slang_typeof_operation(A, op, &ti)) goto end1; - if (!slang_storage_aggregate_construct (&agg)) + if (!slang_storage_aggregate_construct(&agg)) goto end1; - if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) + if (!_slang_aggregate_variable + (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) goto end; - *size = _slang_sizeof_aggregate (&agg); + *size = _slang_sizeof_aggregate(&agg); result = GL_TRUE; -end: - slang_storage_aggregate_destruct (&agg); -end1: - slang_assembly_typeinfo_destruct (&ti); + end: + slang_storage_aggregate_destruct(&agg); + end1: + slang_assembly_typeinfo_destruct(&ti); return result; } -static GLboolean constructor_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *flat, - slang_operation *op, GLuint garbage_size) +static GLboolean +constructor_aggregate(slang_assemble_ctx * A, + const slang_storage_aggregate * flat, + slang_operation * op, GLuint garbage_size) { - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg, flat_agg; - - if (!slang_assembly_typeinfo_construct (&ti)) - return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) - goto end1; - - if (!slang_storage_aggregate_construct (&agg)) - goto end1; - if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) - goto end2; - - if (!slang_storage_aggregate_construct (&flat_agg)) - goto end2; - if (!_slang_flatten_aggregate (&flat_agg, &agg)) - goto end; - - if (!_slang_assemble_operation (A, op, slang_ref_forbid)) - goto end; - - /* TODO: convert (generic) elements */ - - /* free the garbage */ - if (garbage_size != 0) - { - GLuint i; - - /* move the non-garbage part to the end of the argument */ - if (!slang_assembly_file_push_label (A->file, slang_asm_addr_push, 0)) - goto end; - for (i = flat_agg.count * 4 - garbage_size; i > 0; i -= 4) - { - if (!slang_assembly_file_push_label2 (A->file, slang_asm_float_move, - garbage_size + i, i)) - { - goto end; - } - } - if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, garbage_size + 4)) - goto end; - } - - result = GL_TRUE; -end: - slang_storage_aggregate_destruct (&flat_agg); -end2: - slang_storage_aggregate_destruct (&agg); -end1: - slang_assembly_typeinfo_destruct (&ti); - return result; + slang_assembly_typeinfo ti; + GLboolean result = GL_FALSE; + slang_storage_aggregate agg, flat_agg; + + if (!slang_assembly_typeinfo_construct(&ti)) + return GL_FALSE; + if (!_slang_typeof_operation(A, op, &ti)) + goto end1; + + if (!slang_storage_aggregate_construct(&agg)) + goto end1; + if (!_slang_aggregate_variable + (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) + goto end2; + + if (!slang_storage_aggregate_construct(&flat_agg)) + goto end2; + if (!_slang_flatten_aggregate(&flat_agg, &agg)) + goto end; + + if (!_slang_assemble_operation(A, op, slang_ref_forbid)) + goto end; + + /* TODO: convert (generic) elements */ + + /* free the garbage */ + if (garbage_size != 0) { + GLuint i; + + /* move the non-garbage part to the end of the argument */ + if (!slang_assembly_file_push_label(A->file, slang_asm_addr_push, 0)) + goto end; + for (i = flat_agg.count * 4 - garbage_size; i > 0; i -= 4) { + if (!slang_assembly_file_push_label2(A->file, slang_asm_float_move, + garbage_size + i, i)) { + goto end; + } + } + if (!slang_assembly_file_push_label + (A->file, slang_asm_local_free, garbage_size + 4)) + goto end; + } + + result = GL_TRUE; + end: + slang_storage_aggregate_destruct(&flat_agg); + end2: + slang_storage_aggregate_destruct(&agg); + end1: + slang_assembly_typeinfo_destruct(&ti); + return result; } -GLboolean _slang_assemble_constructor (slang_assemble_ctx *A, slang_operation *op) +GLboolean +_slang_assemble_constructor(slang_assemble_ctx * A, slang_operation * op) { - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg, flat; - GLuint size, i; - GLuint arg_sums[2]; - - /* get typeinfo of the constructor (the result of constructor expression) */ - if (!slang_assembly_typeinfo_construct (&ti)) - return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) - goto end1; - - /* create an aggregate of the constructor */ - if (!slang_storage_aggregate_construct (&agg)) - goto end1; - if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) - goto end2; - - /* calculate size of the constructor */ - size = _slang_sizeof_aggregate (&agg); - - /* flatten the constructor */ - if (!slang_storage_aggregate_construct (&flat)) - goto end2; - if (!_slang_flatten_aggregate (&flat, &agg)) - goto end; - - /* collect the last two constructor's argument size sums */ - arg_sums[0] = 0; /* will hold all but the last argument's size sum */ - arg_sums[1] = 0; /* will hold all argument's size sum */ - for (i = 0; i < op->num_children; i++) - { - GLuint arg_size = 0; - - if (!sizeof_argument (A, &arg_size, &op->children[i])) - goto end; - if (i > 0) - arg_sums[0] = arg_sums[1]; - arg_sums[1] += arg_size; - } - - /* check if there are too many arguments */ - if (arg_sums[0] >= size) - { - /* TODO: info log: too many arguments in constructor list */ - goto end; - } - - /* check if there are too few arguments */ - if (arg_sums[1] < size) - { - /* TODO: info log: too few arguments in constructor list */ - goto end; - } - - /* traverse the children that form the constructor expression */ - for (i = op->num_children; i > 0; i--) - { - GLuint garbage_size; - - /* the last argument may be too big - calculate the unnecessary data size */ - if (i == op->num_children) - garbage_size = arg_sums[1] - size; - else - garbage_size = 0; - - if (!constructor_aggregate (A, &flat, &op->children[i - 1], garbage_size)) - goto end; - } - - result = GL_TRUE; -end: - slang_storage_aggregate_destruct (&flat); -end2: - slang_storage_aggregate_destruct (&agg); -end1: - slang_assembly_typeinfo_destruct (&ti); - return result; + slang_assembly_typeinfo ti; + GLboolean result = GL_FALSE; + slang_storage_aggregate agg, flat; + GLuint size, i; + GLuint arg_sums[2]; + + /* get typeinfo of the constructor (the result of constructor expression) */ + if (!slang_assembly_typeinfo_construct(&ti)) + return GL_FALSE; + if (!_slang_typeof_operation(A, op, &ti)) + goto end1; + + /* create an aggregate of the constructor */ + if (!slang_storage_aggregate_construct(&agg)) + goto end1; + if (!_slang_aggregate_variable + (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) + goto end2; + + /* calculate size of the constructor */ + size = _slang_sizeof_aggregate(&agg); + + /* flatten the constructor */ + if (!slang_storage_aggregate_construct(&flat)) + goto end2; + if (!_slang_flatten_aggregate(&flat, &agg)) + goto end; + + /* collect the last two constructor's argument size sums */ + arg_sums[0] = 0; /* will hold all but the last argument's size sum */ + arg_sums[1] = 0; /* will hold all argument's size sum */ + for (i = 0; i < op->num_children; i++) { + GLuint arg_size = 0; + + if (!sizeof_argument(A, &arg_size, &op->children[i])) + goto end; + if (i > 0) + arg_sums[0] = arg_sums[1]; + arg_sums[1] += arg_size; + } + + /* check if there are too many arguments */ + if (arg_sums[0] >= size) { + /* TODO: info log: too many arguments in constructor list */ + goto end; + } + + /* check if there are too few arguments */ + if (arg_sums[1] < size) { + /* TODO: info log: too few arguments in constructor list */ + goto end; + } + + /* traverse the children that form the constructor expression */ + for (i = op->num_children; i > 0; i--) { + GLuint garbage_size; + + /* the last argument may be too big - calculate the unnecessary + * data size + */ + if (i == op->num_children) + garbage_size = arg_sums[1] - size; + else + garbage_size = 0; + + if (!constructor_aggregate + (A, &flat, &op->children[i - 1], garbage_size)) + goto end; + } + + result = GL_TRUE; + end: + slang_storage_aggregate_destruct(&flat); + end2: + slang_storage_aggregate_destruct(&agg); + end1: + slang_assembly_typeinfo_destruct(&ti); + return result; } -/* _slang_assemble_constructor_from_swizzle() */ -GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *A, const slang_swizzle *swz, - slang_type_specifier *spec, slang_type_specifier *master_spec) + +GLboolean +_slang_assemble_constructor_from_swizzle(slang_assemble_ctx * A, + const slang_swizzle * swz, + slang_type_specifier * spec, + slang_type_specifier * master_spec) { - GLuint master_rows, i; - - master_rows = _slang_type_dim (master_spec->type); - for (i = 0; i < master_rows; i++) - { - switch (_slang_type_base (master_spec->type)) - { - case slang_spec_bool: - if (!slang_assembly_file_push_label2 (A->file, slang_asm_bool_copy, - (master_rows - i) * 4, i * 4)) - return GL_FALSE; - break; - case slang_spec_int: - if (!slang_assembly_file_push_label2 (A->file, slang_asm_int_copy, - (master_rows - i) * 4, i * 4)) - return GL_FALSE; - break; - case slang_spec_float: - if (!slang_assembly_file_push_label2 (A->file, slang_asm_float_copy, - (master_rows - i) * 4, i * 4)) - return GL_FALSE; - break; - default: - break; - } - } - if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - for (i = swz->num_components; i > 0; i--) - { - GLuint n = i - 1; - - if (!slang_assembly_file_push_label2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; - if (!slang_assembly_file_push_label (A->file, slang_asm_addr_push, swz->swizzle[n] * 4)) - return GL_FALSE; - if (!slang_assembly_file_push (A->file, slang_asm_addr_add)) - return GL_FALSE; - switch (_slang_type_base (master_spec->type)) - { - case slang_spec_bool: - if (!slang_assembly_file_push (A->file, slang_asm_bool_deref)) - return GL_FALSE; - break; - case slang_spec_int: - if (!slang_assembly_file_push (A->file, slang_asm_int_deref)) - return GL_FALSE; - break; - case slang_spec_float: - if (!slang_assembly_file_push (A->file, slang_asm_float_deref)) - return GL_FALSE; - break; - default: - break; - } - } - - return GL_TRUE; + GLuint master_rows, i; + + master_rows = _slang_type_dim(master_spec->type); + for (i = 0; i < master_rows; i++) { + switch (_slang_type_base(master_spec->type)) { + case slang_spec_bool: + if (!slang_assembly_file_push_label2(A->file, slang_asm_bool_copy, + (master_rows - i) * 4, i * 4)) + return GL_FALSE; + break; + case slang_spec_int: + if (!slang_assembly_file_push_label2(A->file, slang_asm_int_copy, + (master_rows - i) * 4, i * 4)) + return GL_FALSE; + break; + case slang_spec_float: + if (!slang_assembly_file_push_label2(A->file, slang_asm_float_copy, + (master_rows - i) * 4, i * 4)) + return GL_FALSE; + break; + default: + break; + } + } + if (!slang_assembly_file_push_label(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + for (i = swz->num_components; i > 0; i--) { + GLuint n = i - 1; + + if (!slang_assembly_file_push_label2 + (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) + return GL_FALSE; + if (!slang_assembly_file_push_label + (A->file, slang_asm_addr_push, swz->swizzle[n] * 4)) + return GL_FALSE; + if (!slang_assembly_file_push(A->file, slang_asm_addr_add)) + return GL_FALSE; + switch (_slang_type_base(master_spec->type)) { + case slang_spec_bool: + if (!slang_assembly_file_push(A->file, slang_asm_bool_deref)) + return GL_FALSE; + break; + case slang_spec_int: + if (!slang_assembly_file_push(A->file, slang_asm_int_deref)) + return GL_FALSE; + break; + case slang_spec_float: + if (!slang_assembly_file_push(A->file, slang_asm_float_deref)) + return GL_FALSE; + break; + default: + break; + } + } + + return GL_TRUE; } - -- cgit v1.2.3 From d426c13e46b09239eb74c716bac27a6bef9ffbde Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 00:41:44 +0000 Subject: move comments --- src/mesa/shader/slang/slang_assemble_constructor.c | 15 ++++++++ src/mesa/shader/slang/slang_assemble_constructor.h | 44 +++++++++------------- 2 files changed, 33 insertions(+), 26 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c index f6fb6d7c69..8b5458f766 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ b/src/mesa/shader/slang/slang_assemble_constructor.c @@ -34,6 +34,12 @@ +/** + * Checks if a field selector is a general swizzle (an r-value swizzle + * with replicated components or an l-value swizzle mask) for a + * vector. Returns GL_TRUE if this is the case, is filled with + * swizzle information. Returns GL_FALSE otherwise. + */ GLboolean _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) { @@ -108,6 +114,11 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) +/** + * Checks if a general swizzle is an l-value swizzle - these swizzles + * do not have duplicated fields. Returns GL_TRUE if this is a + * swizzle mask. Returns GL_FALSE otherwise + */ GLboolean _slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) { @@ -129,6 +140,10 @@ _slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) +/** + * Combines (multiplies) two swizzles to form single swizzle. + * Example: "vec.wzyx.yx" --> "vec.zw". + */ GLvoid _slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left, const slang_swizzle * right) diff --git a/src/mesa/shader/slang/slang_assemble_constructor.h b/src/mesa/shader/slang/slang_assemble_constructor.h index 41a03943cf..c7aedf3af8 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.h +++ b/src/mesa/shader/slang/slang_assemble_constructor.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -22,43 +22,35 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_ASSEMBLE_CONSTRUCTOR_H +#ifndef SLANG_ASSEMBLE_CONSTRUCTOR_H #define SLANG_ASSEMBLE_CONSTRUCTOR_H #if defined __cplusplus extern "C" { #endif -/* - * Checks if a field selector is a general swizzle (an r-value swizzle with replicated - * components or an l-value swizzle mask) for a vector. - * Returns GL_TRUE if this is the case, is filled with swizzle information. - * Returns GL_FALSE otherwise. - */ -GLboolean _slang_is_swizzle (const char *field, GLuint rows, slang_swizzle *swz); -/* - * Checks if a general swizzle is an l-value swizzle - these swizzles do not have - * duplicated fields. - * Returns GL_TRUE if this is a swizzle mask. - * Returns GL_FALSE otherwise - */ -GLboolean _slang_is_swizzle_mask (const slang_swizzle *swz, GLuint rows); +extern GLboolean +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); -/* - * Combines (multiplies) two swizzles to form single swizzle. - * Example: "vec.wzyx.yx" --> "vec.zw". - */ -GLvoid _slang_multiply_swizzles (slang_swizzle *, const slang_swizzle *, const slang_swizzle *); +extern GLboolean +_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); + +extern GLvoid +_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, + const slang_swizzle *); -GLboolean _slang_assemble_constructor (slang_assemble_ctx *, struct slang_operation_ *); +extern GLboolean +_slang_assemble_constructor(slang_assemble_ctx *, struct slang_operation_ *); -GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *, const slang_swizzle *, - slang_type_specifier *, slang_type_specifier *); +extern GLboolean +_slang_assemble_constructor_from_swizzle(slang_assemble_ctx *, + const slang_swizzle *, + slang_type_specifier *, + slang_type_specifier *); #ifdef __cplusplus } #endif -#endif - +#endif /* SLANG_ASSEMBLE_CONSTRUCTOR_H */ -- cgit v1.2.3 From 14c427573e69e7555a7929c5569c824633415b82 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 00:42:25 +0000 Subject: s/ource/source/ --- src/mesa/shader/sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/sources b/src/mesa/shader/sources index 3db2de92e0..2787187276 100644 --- a/src/mesa/shader/sources +++ b/src/mesa/shader/sources @@ -1,4 +1,4 @@ -# List of ource files in this directory used for X.org xserver build +# List of source files in this directory used for X.org xserver build MESA_SHADER_SOURCES = \ arbprogparse.c \ arbprogram.c \ -- cgit v1.2.3 From 50b3f5654e24f0848cda5dc60f21b2c3256b9437 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 23 Nov 2006 01:12:41 +0000 Subject: realign some of the i830 code from the i915 --- src/mesa/drivers/dri/i915tex/i830_state.c | 3 ++- src/mesa/drivers/dri/i915tex/i830_texstate.c | 32 +++++++++++++++++----------- src/mesa/drivers/dri/i915tex/i830_vtbl.c | 8 ++++--- 3 files changed, 26 insertions(+), 17 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/i830_state.c b/src/mesa/drivers/dri/i915tex/i830_state.c index c0673363f3..812daa6524 100644 --- a/src/mesa/drivers/dri/i915tex/i830_state.c +++ b/src/mesa/drivers/dri/i915tex/i830_state.c @@ -1042,6 +1042,7 @@ i830_init_packets(struct i830_context *i830) i830->state.Buffer[I830_DESTREG_DV0] = _3DSTATE_DST_BUF_VARS_CMD; +#if 0 switch (screen->fbFormat) { case DV_PF_565: i830->state.Buffer[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ @@ -1058,7 +1059,7 @@ i830_init_packets(struct i830_context *i830) DEPTH_FRMT_24_FIXED_8_OTHER); break; } - +#endif i830->state.Buffer[I830_DESTREG_SENABLE] = (_3DSTATE_SCISSOR_ENABLE_CMD | DISABLE_SCISSOR_RECT); i830->state.Buffer[I830_DESTREG_SR0] = _3DSTATE_SCISSOR_RECT_0_CMD; diff --git a/src/mesa/drivers/dri/i915tex/i830_texstate.c b/src/mesa/drivers/dri/i915tex/i830_texstate.c index ba79cf9459..e3f34e3944 100644 --- a/src/mesa/drivers/dri/i915tex/i830_texstate.c +++ b/src/mesa/drivers/dri/i915tex/i830_texstate.c @@ -25,21 +25,13 @@ * **************************************************************************/ -#include "glheader.h" -#include "macros.h" #include "mtypes.h" -#include "simple_list.h" #include "enums.h" #include "texformat.h" -#include "texstore.h" +#include "dri_bufmgr.h" -#include "mm.h" - -#include "intel_screen.h" -#include "intel_ioctl.h" -#include "intel_tex.h" #include "intel_mipmap_tree.h" -#include "intel_regions.h" +#include "intel_tex.h" #include "i830_context.h" #include "i830_reg.h" @@ -129,6 +121,13 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3) memset(state, 0, sizeof(state)); + /*We need to refcount these. */ + + if (i830->state.tex_buffer[unit] != NULL) { + driBOUnReference(i830->state.tex_buffer[unit]); + i830->state.tex_buffer[unit] = NULL; + } + if (!intel_finalize_mipmap_tree(intel, unit)) return GL_FALSE; @@ -137,7 +136,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3) */ firstImage = tObj->Image[0][intelObj->firstLevel]; - i830->state.tex_buffer[unit] = intelObj->mt->region->buffer; + i830->state.tex_buffer[unit] = driBOReference(intelObj->mt->region->buffer); i830->state.tex_offset[unit] = intel_miptree_image_offset(intelObj->mt, 0, intelObj-> firstLevel); @@ -298,10 +297,17 @@ i830UpdateTextureState(struct intel_context *intel) case TEXTURE_RECT_BIT: ok = i830_update_tex_unit(intel, i, TEXCOORDS_ARE_IN_TEXELUNITS); break; - case 0: - if (i830->state.active & I830_UPLOAD_TEX(i)) + case 0:{ + struct i830_context *i830 = i830_context(&intel->ctx); + if (i830->state.active & I830_UPLOAD_TEX(i)) I830_ACTIVESTATE(i830, I830_UPLOAD_TEX(i), GL_FALSE); + + if (i830->state.tex_buffer[i] != NULL) { + driBOUnReference(i830->state.tex_buffer[i]); + i830->state.tex_buffer[i] = NULL; + } break; + } case TEXTURE_3D_BIT: default: ok = GL_FALSE; diff --git a/src/mesa/drivers/dri/i915tex/i830_vtbl.c b/src/mesa/drivers/dri/i915tex/i830_vtbl.c index 18fc6d4b91..dd0670dec3 100644 --- a/src/mesa/drivers/dri/i915tex/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915tex/i830_vtbl.c @@ -451,14 +451,16 @@ i830_emit_state(struct intel_context *intel) OUT_BATCH(state->Buffer[I830_DESTREG_CBUFADDR1]); OUT_RELOC(state->draw_region->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_WRITE, - DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, 0); + DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, + state->draw_region->draw_offset); if (state->depth_region) { OUT_BATCH(state->Buffer[I830_DESTREG_DBUFADDR0]); OUT_BATCH(state->Buffer[I830_DESTREG_DBUFADDR1]); OUT_RELOC(state->depth_region->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_WRITE, - DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, 0); + DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, + state->depth_region->draw_offset); } OUT_BATCH(state->Buffer[I830_DESTREG_DV0]); @@ -469,7 +471,7 @@ i830_emit_state(struct intel_context *intel) OUT_BATCH(state->Buffer[I830_DESTREG_SR2]); ADVANCE_BATCH(); } - + if (dirty & I830_UPLOAD_STIPPLE) { DBG("I830_UPLOAD_STIPPLE:\n"); emit(i830, state->Stipple, sizeof(state->Stipple)); -- cgit v1.2.3 From 0faf23c26aca46568c32272bc189356e2e9fd373 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Thu, 23 Nov 2006 09:21:44 +0000 Subject: That was really stupid. --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 198e3a2668..4d05a439bb 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -427,7 +427,11 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa) total_size+=attr_size[i]; } } - nmesa->vertex_size=total_size; + nmesa->vertex_size=_tnl_install_attrs( ctx, + nmesa->vertex_attrs, + nmesa->vertex_attr_count, + NULL, 0 ); + assert(nmesa->vertex_size==total_size*4); /* * Tell the hardware about the vertex format -- cgit v1.2.3 From c4649208f085fb9137c6b52dcdbdfa2810a0691b Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 23 Nov 2006 10:12:05 +0000 Subject: Haihao Xiang's pointsize initialization patch. --- src/mesa/drivers/dri/i965/intel_context.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 36edd7db7f..d13e287fa7 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -320,6 +320,11 @@ GLboolean intelInitContext( struct intel_context *intel, ctx->Const.MaxPointSizeAA = 3.0; ctx->Const.PointSizeGranularity = 1.0; + /* reinitialize the context point state. + * It depend on constants in __GLcontextRec::Const + */ + _mesa_init_point(ctx); + /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext( ctx ); _ac_CreateContext( ctx ); -- cgit v1.2.3 From 897b9c5cb2e9d4d155b07dc6cf25de648fb3bf20 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 23 Nov 2006 10:13:22 +0000 Subject: Haihao Xiang's edgeflag patch. --- src/mesa/drivers/dri/i965/brw_fallback.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c index 4d84ba8813..56e21e339e 100644 --- a/src/mesa/drivers/dri/i965/brw_fallback.c +++ b/src/mesa/drivers/dri/i965/brw_fallback.c @@ -280,6 +280,9 @@ void brw_loopback_vertex_list( GLcontext *ctx, GLuint i, nr = 0; for (i = 0 ; i <= BRW_ATTRIB_TEX7 ; i++) { + if (i == BRW_ATTRIB_INDEX || i == BRW_ATTRIB_EDGEFLAG) + continue; + if (attrsz[i]) { la[nr].target = i; la[nr].sz = attrsz[i]; -- cgit v1.2.3 From 308b85f29f191409e42935a3ccd5c502bdf70608 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 15:58:30 +0000 Subject: fix several program-related bugs (bug 9136) --- src/mesa/shader/arbprogram.c | 10 ++++++++-- src/mesa/shader/program.c | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 91fb691038..bff80d7ee3 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -195,13 +195,15 @@ _mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer) GLboolean GLAPIENTRY _mesa_IsProgramARB(GLuint id) { + struct gl_program *prog = NULL; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); if (id == 0) return GL_FALSE; - if (_mesa_lookup_program(ctx, id)) + prog = _mesa_lookup_program(ctx, id); + if (prog && (prog != &_mesa_DummyProgram)) return GL_TRUE; else return GL_FALSE; @@ -765,6 +767,7 @@ void GLAPIENTRY _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string) { const struct gl_program *prog; + char *dst = (char *) string; GET_CURRENT_CONTEXT(ctx); if (!ctx->_CurrentProgram) @@ -788,5 +791,8 @@ _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string) return; } - _mesa_memcpy(string, prog->String, _mesa_strlen((char *) prog->String)); + if (prog->String) + _mesa_memcpy(dst, prog->String, _mesa_strlen((char *) prog->String)); + else + *dst = '\0'; } diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 789d36eba0..ddfad47b89 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -207,6 +207,7 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog, prog->Target = target; prog->Resident = GL_TRUE; prog->RefCount = 1; + prog->Format = GL_PROGRAM_FORMAT_ASCII_ARB; } return prog; @@ -284,6 +285,9 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog) (void) ctx; ASSERT(prog); + if (prog == &_mesa_DummyProgram) + return; + if (prog->String) _mesa_free(prog->String); -- cgit v1.2.3 From f6ed86a1a5443d9eb22c6acb9f341713a47137f2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 16:52:18 +0000 Subject: indent --- src/mesa/shader/slang/slang_assemble_assignment.c | 184 +++++++++++----------- src/mesa/shader/slang/slang_assemble_assignment.h | 17 +- 2 files changed, 105 insertions(+), 96 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c index d894a8db18..e75beaa624 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ b/src/mesa/shader/slang/slang_assemble_assignment.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -53,8 +53,11 @@ * +------------------+ */ + + static GLboolean -assign_basic (slang_assemble_ctx *A, slang_storage_type type, GLuint *index, GLuint size) +assign_basic(slang_assemble_ctx * A, slang_storage_type type, GLuint * index, + GLuint size) { GLuint dst_offset, dst_addr_loc; slang_assembly_type ty; @@ -85,22 +88,25 @@ assign_basic (slang_assemble_ctx *A, slang_storage_type type, GLuint *index, GLu ty = slang_asm_none; } - /* Calculate the distance from top of the stack to the destination address. As the - * copy operation progresses, components of the source are being successively popped - * off the stack by the amount of *index increase step. - */ + /* Calculate the distance from top of the stack to the destination + * address. As the copy operation progresses, components of the + * source are being successively popped off the stack by the amount + * of *index increase step. + */ dst_addr_loc = size - *index; - if (!slang_assembly_file_push_label2 (A->file, ty, dst_addr_loc, dst_offset)) + if (!slang_assembly_file_push_label2 + (A->file, ty, dst_addr_loc, dst_offset)) return GL_FALSE; - *index += _slang_sizeof_type (type); + *index += _slang_sizeof_type(type); return GL_TRUE; } + static GLboolean -assign_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, GLuint *index, - GLuint size) +assign_aggregate(slang_assemble_ctx * A, const slang_storage_aggregate * agg, + GLuint * index, GLuint size) { GLuint i; @@ -110,25 +116,26 @@ assign_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, GLu for (j = 0; j < arr->length; j++) { if (arr->type == slang_stor_aggregate) { - if (!assign_aggregate (A, arr->aggregate, index, size)) + if (!assign_aggregate(A, arr->aggregate, index, size)) return GL_FALSE; } else { - /* When the destination is swizzled, we are forced to do float_copy, even if - * vec4 extension is enabled with vec4_copy operation. + /* When the destination is swizzled, we are forced to do + * float_copy, even if vec4 extension is enabled with + * vec4_copy operation. */ if (A->swz.num_components != 0 && arr->type == slang_stor_vec4) { - if (!assign_basic (A, slang_stor_float, index, size)) + if (!assign_basic(A, slang_stor_float, index, size)) return GL_FALSE; - if (!assign_basic (A, slang_stor_float, index, size)) + if (!assign_basic(A, slang_stor_float, index, size)) return GL_FALSE; - if (!assign_basic (A, slang_stor_float, index, size)) + if (!assign_basic(A, slang_stor_float, index, size)) return GL_FALSE; - if (!assign_basic (A, slang_stor_float, index, size)) + if (!assign_basic(A, slang_stor_float, index, size)) return GL_FALSE; } else { - if (!assign_basic (A, arr->type, index, size)) + if (!assign_basic(A, arr->type, index, size)) return GL_FALSE; } } @@ -138,80 +145,79 @@ assign_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg, GLu return GL_TRUE; } -GLboolean _slang_assemble_assignment (slang_assemble_ctx *A, slang_operation *op) + +GLboolean +_slang_assemble_assignment(slang_assemble_ctx * A, slang_operation * op) { - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - GLuint index, size; - - if (!slang_assembly_typeinfo_construct (&ti)) - return GL_FALSE; - if (!_slang_typeof_operation (A, op, &ti)) - goto end1; - - if (!slang_storage_aggregate_construct (&agg)) - goto end1; - if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) - goto end; - - index = 0; - size = _slang_sizeof_aggregate (&agg); - result = assign_aggregate (A, &agg, &index, size); - -end1: - slang_storage_aggregate_destruct (&agg); -end: - slang_assembly_typeinfo_destruct (&ti); - return result; + slang_assembly_typeinfo ti; + GLboolean result = GL_FALSE; + slang_storage_aggregate agg; + GLuint index, size; + + if (!slang_assembly_typeinfo_construct(&ti)) + return GL_FALSE; + if (!_slang_typeof_operation(A, op, &ti)) + goto end1; + + if (!slang_storage_aggregate_construct(&agg)) + goto end1; + if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) + goto end; + + index = 0; + size = _slang_sizeof_aggregate(&agg); + result = assign_aggregate(A, &agg, &index, size); + + end1: + slang_storage_aggregate_destruct(&agg); + end: + slang_assembly_typeinfo_destruct(&ti); + return result; } -/* - * _slang_assemble_assign() - * - * Performs unary (pre ++ and --) or binary (=, +=, -=, *=, /=) assignment on the operation's - * children. - */ -GLboolean _slang_assemble_assign (slang_assemble_ctx *A, slang_operation *op, const char *oper, - slang_ref_type ref) +/** + * Performs unary (pre ++ and --) or binary (=, +=, -=, *=, /=) + * assignment on the operation's children. + */ +GLboolean +_slang_assemble_assign(slang_assemble_ctx * A, slang_operation * op, + const char *oper, slang_ref_type ref) { - slang_swizzle swz; - - if (ref == slang_ref_forbid) - { - if (!slang_assembly_file_push_label2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - } - - if (slang_string_compare ("=", oper) == 0) - { - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_force)) - return GL_FALSE; - swz = A->swz; - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - A->swz = swz; - if (!_slang_assemble_assignment (A, op->children)) - return GL_FALSE; - } - else - { - if (!_slang_assemble_function_call_name (A, oper, op->children, op->num_children, GL_TRUE)) - return GL_FALSE; - } - - if (ref == slang_ref_forbid) - { - if (!slang_assembly_file_push (A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, 4)) - return GL_FALSE; - if (!_slang_dereference (A, op->children)) - return GL_FALSE; - } - - return GL_TRUE; -} + slang_swizzle swz; + + if (ref == slang_ref_forbid) { + if (!slang_assembly_file_push_label2 + (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) + return GL_FALSE; + } + + if (slang_string_compare("=", oper) == 0) { + if (!_slang_assemble_operation(A, &op->children[0], slang_ref_force)) + return GL_FALSE; + swz = A->swz; + if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) + return GL_FALSE; + A->swz = swz; + if (!_slang_assemble_assignment(A, op->children)) + return GL_FALSE; + } + else { + if (!_slang_assemble_function_call_name + (A, oper, op->children, op->num_children, GL_TRUE)) + return GL_FALSE; + } + + if (ref == slang_ref_forbid) { + if (!slang_assembly_file_push(A->file, slang_asm_addr_copy)) + return GL_FALSE; + if (!slang_assembly_file_push_label(A->file, slang_asm_local_free, 4)) + return GL_FALSE; + if (!_slang_dereference(A, op->children)) + return GL_FALSE; + } + return GL_TRUE; +} diff --git a/src/mesa/shader/slang/slang_assemble_assignment.h b/src/mesa/shader/slang/slang_assemble_assignment.h index 7b993b543b..9e3d51d0e8 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.h +++ b/src/mesa/shader/slang/slang_assemble_assignment.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -22,21 +22,24 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_ASSEMBLE_ASSIGNMENT_H +#ifndef SLANG_ASSEMBLE_ASSIGNMENT_H #define SLANG_ASSEMBLE_ASSIGNMENT_H #if defined __cplusplus extern "C" { #endif -GLboolean _slang_assemble_assignment (slang_assemble_ctx *, struct slang_operation_ *); -GLboolean _slang_assemble_assign (slang_assemble_ctx *, struct slang_operation_ *, const char *, - slang_ref_type); +extern GLboolean +_slang_assemble_assignment(slang_assemble_ctx *, struct slang_operation_ *); + +extern GLboolean +_slang_assemble_assign(slang_assemble_ctx *, struct slang_operation_ *, + const char *, slang_ref_type); + #ifdef __cplusplus } #endif -#endif - +#endif /* SLANG_ASSEMBLE_ASSIGNMENT_H */ -- cgit v1.2.3 From d4c4bdfa1e6bf35c84c4a2d5e18a70dbff11b101 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Nov 2006 16:56:55 +0000 Subject: const correctness, clean-ups --- src/mesa/shader/slang/slang_assemble_assignment.c | 2 +- src/mesa/shader/slang/slang_assemble_assignment.h | 2 +- src/mesa/shader/slang/slang_assemble_constructor.c | 43 ++++++++++++---------- src/mesa/shader/slang/slang_assemble_constructor.h | 7 ++-- 4 files changed, 30 insertions(+), 24 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c index e75beaa624..a1038671c4 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ b/src/mesa/shader/slang/slang_assemble_assignment.c @@ -147,7 +147,7 @@ assign_aggregate(slang_assemble_ctx * A, const slang_storage_aggregate * agg, GLboolean -_slang_assemble_assignment(slang_assemble_ctx * A, slang_operation * op) +_slang_assemble_assignment(slang_assemble_ctx * A, const slang_operation * op) { slang_assembly_typeinfo ti; GLboolean result = GL_FALSE; diff --git a/src/mesa/shader/slang/slang_assemble_assignment.h b/src/mesa/shader/slang/slang_assemble_assignment.h index 9e3d51d0e8..3c1ecdedab 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.h +++ b/src/mesa/shader/slang/slang_assemble_assignment.h @@ -31,7 +31,7 @@ extern "C" { extern GLboolean -_slang_assemble_assignment(slang_assemble_ctx *, struct slang_operation_ *); +_slang_assemble_assignment(slang_assemble_ctx *, const struct slang_operation_ *); extern GLboolean _slang_assemble_assign(slang_assemble_ctx *, struct slang_operation_ *, diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c index 8b5458f766..6cd320d446 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ b/src/mesa/shader/slang/slang_assemble_constructor.c @@ -171,9 +171,9 @@ sizeof_argument(slang_assemble_ctx * A, GLuint * size, slang_operation * op) if (!slang_storage_aggregate_construct(&agg)) goto end1; - if (!_slang_aggregate_variable - (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) goto end; *size = _slang_sizeof_aggregate(&agg); @@ -186,6 +186,7 @@ sizeof_argument(slang_assemble_ctx * A, GLuint * size, slang_operation * op) return result; } + static GLboolean constructor_aggregate(slang_assemble_ctx * A, const slang_storage_aggregate * flat, @@ -202,9 +203,9 @@ constructor_aggregate(slang_assemble_ctx * A, if (!slang_storage_aggregate_construct(&agg)) goto end1; - if (!_slang_aggregate_variable - (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) goto end2; if (!slang_storage_aggregate_construct(&flat_agg)) @@ -245,8 +246,9 @@ constructor_aggregate(slang_assemble_ctx * A, return result; } + GLboolean -_slang_assemble_constructor(slang_assemble_ctx * A, slang_operation * op) +_slang_assemble_constructor(slang_assemble_ctx * A, const slang_operation * op) { slang_assembly_typeinfo ti; GLboolean result = GL_FALSE; @@ -263,9 +265,9 @@ _slang_assemble_constructor(slang_assemble_ctx * A, slang_operation * op) /* create an aggregate of the constructor */ if (!slang_storage_aggregate_construct(&agg)) goto end1; - if (!_slang_aggregate_variable - (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) goto end2; /* calculate size of the constructor */ @@ -334,12 +336,12 @@ _slang_assemble_constructor(slang_assemble_ctx * A, slang_operation * op) GLboolean _slang_assemble_constructor_from_swizzle(slang_assemble_ctx * A, const slang_swizzle * swz, - slang_type_specifier * spec, - slang_type_specifier * master_spec) + const slang_type_specifier * spec, + const slang_type_specifier * master_spec) { - GLuint master_rows, i; + const GLuint master_rows = _slang_type_dim(master_spec->type); + GLuint i; - master_rows = _slang_type_dim(master_spec->type); for (i = 0; i < master_rows; i++) { switch (_slang_type_base(master_spec->type)) { case slang_spec_bool: @@ -361,19 +363,22 @@ _slang_assemble_constructor_from_swizzle(slang_assemble_ctx * A, break; } } + if (!slang_assembly_file_push_label(A->file, slang_asm_local_free, 4)) return GL_FALSE; + for (i = swz->num_components; i > 0; i--) { - GLuint n = i - 1; + const GLuint n = i - 1; - if (!slang_assembly_file_push_label2 - (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) + if (!slang_assembly_file_push_label2(A->file, slang_asm_local_addr, + A->local.swizzle_tmp, 16)) return GL_FALSE; - if (!slang_assembly_file_push_label - (A->file, slang_asm_addr_push, swz->swizzle[n] * 4)) + if (!slang_assembly_file_push_label(A->file, slang_asm_addr_push, + swz->swizzle[n] * 4)) return GL_FALSE; if (!slang_assembly_file_push(A->file, slang_asm_addr_add)) return GL_FALSE; + switch (_slang_type_base(master_spec->type)) { case slang_spec_bool: if (!slang_assembly_file_push(A->file, slang_asm_bool_deref)) diff --git a/src/mesa/shader/slang/slang_assemble_constructor.h b/src/mesa/shader/slang/slang_assemble_constructor.h index c7aedf3af8..c0deb91344 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.h +++ b/src/mesa/shader/slang/slang_assemble_constructor.h @@ -41,13 +41,14 @@ _slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, const slang_swizzle *); extern GLboolean -_slang_assemble_constructor(slang_assemble_ctx *, struct slang_operation_ *); +_slang_assemble_constructor(slang_assemble_ctx *, + const struct slang_operation_ *); extern GLboolean _slang_assemble_constructor_from_swizzle(slang_assemble_ctx *, const slang_swizzle *, - slang_type_specifier *, - slang_type_specifier *); + const slang_type_specifier *, + const slang_type_specifier *); #ifdef __cplusplus } -- cgit v1.2.3 From e49d06e61955208b9cd3e18469034e7447394b95 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 24 Nov 2006 19:01:14 +0000 Subject: new slang_variable_scope_grow() function --- src/mesa/shader/slang/slang_compile.c | 46 ++++++++------------------ src/mesa/shader/slang/slang_compile_variable.c | 21 ++++++++++++ src/mesa/shader/slang/slang_compile_variable.h | 3 ++ 3 files changed, 38 insertions(+), 32 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 77a293ea45..93c7fb0cdb 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -42,14 +42,16 @@ * may be accepted resulting in undefined behaviour. */ -/* slang_var_pool */ + +/** + * Allocate storage for a variable of 'size' bytes from given pool. + * Return the allocated address for the variable. + */ static GLuint slang_var_pool_alloc(slang_var_pool * pool, unsigned int size) { - GLuint addr; - - addr = pool->next_addr; + const GLuint addr = pool->next_addr; pool->next_addr += size; return addr; } @@ -432,22 +434,13 @@ parse_struct_field(slang_parse_ctx * C, slang_output_ctx * O, return 0; do { - slang_variable *var; - - st->fields->variables = - (slang_variable *) slang_alloc_realloc(st->fields->variables, - st->fields->num_variables * - sizeof(slang_variable), - (st->fields->num_variables + - 1) * sizeof(slang_variable)); - if (st->fields->variables == NULL) { + slang_variable *var = slang_variable_scope_grow(st->fields); + if (!var) { slang_info_log_memory(C->L); return 0; } - var = &st->fields->variables[st->fields->num_variables]; if (!slang_variable_construct(var)) return 0; - st->fields->num_variables++; if (!parse_struct_field_var(C, &o, var, sp)) return 0; } @@ -1222,6 +1215,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, if (!parse_child_operation(C, O, op, 0)) return 0; C->I++; + if (!C->parsing_builtin && !slang_function_scope_find_by_name(O->funs, op->a_id, 1)) { const char *id; @@ -1479,20 +1473,13 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, /* parse function parameters */ while (*C->I++ == PARAMETER_NEXT) { - slang_variable *p; - - func->parameters->variables = (slang_variable *) - slang_alloc_realloc(func->parameters->variables, - func->parameters->num_variables * sizeof(slang_variable), - (func->parameters->num_variables + 1) * sizeof(slang_variable)); - if (func->parameters->variables == NULL) { + slang_variable *p = slang_variable_scope_grow(func->parameters); + if (!p) { slang_info_log_memory(C->L); return 0; } - p = &func->parameters->variables[func->parameters->num_variables]; if (!slang_variable_construct(p)) return 0; - func->parameters->num_variables++; if (!parse_parameter_declaration(C, O, p)) return 0; } @@ -1662,18 +1649,13 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, return 1; /* make room for the new variable and initialize it */ - O->vars->variables = (slang_variable *) - slang_alloc_realloc(O->vars->variables, - O->vars->num_variables * sizeof(slang_variable), - (O->vars->num_variables + 1) * sizeof(slang_variable)); - if (O->vars->variables == NULL) { + var = slang_variable_scope_grow(O->vars); + if (!var) { slang_info_log_memory(C->L); return 0; } - var = &O->vars->variables[O->vars->num_variables]; if (!slang_variable_construct(var)) return 0; - O->vars->num_variables++; /* copy the declarator qualifier type, parse the identifier */ var->global = C->global_scope; diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 92951b85bb..a37deddff1 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -181,6 +181,27 @@ slang_variable_scope_copy(slang_variable_scope * x, return 1; } + +/** + * Grow the variable list by one. + * \return pointer to space for the new variable. + */ +slang_variable * +slang_variable_scope_grow(slang_variable_scope *scope) +{ + const int n = scope->num_variables; + scope->variables = (slang_variable *) + slang_alloc_realloc(scope->variables, + n * sizeof(slang_variable), + (n + 1) * sizeof(slang_variable)); + if (!scope->variables) + return NULL; + scope->num_variables++; + return scope->variables + n; +} + + + /* slang_variable */ int diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 2f358860f8..b0910e855e 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -81,6 +81,7 @@ typedef struct slang_variable_ GLuint address2; /**< Storage location */ GLuint size; /**< Variable's size in bytes */ GLboolean global; /**< A global var? */ + void *aux; /**< Used during code gen */ } slang_variable; @@ -104,6 +105,8 @@ extern int slang_variable_scope_copy(slang_variable_scope *, const slang_variable_scope *); +slang_variable * +slang_variable_scope_grow(slang_variable_scope *); extern int slang_variable_construct(slang_variable *); -- cgit v1.2.3 From 16e7ca9d72f7d1c24a12014ac482948e17be8d3f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 24 Nov 2006 19:21:42 +0000 Subject: call slang_variable_construct() inside slang_variable_scope_grow() --- src/mesa/shader/slang/slang_compile.c | 6 ------ src/mesa/shader/slang/slang_compile_variable.c | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 93c7fb0cdb..c49ab4a68d 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -439,8 +439,6 @@ parse_struct_field(slang_parse_ctx * C, slang_output_ctx * O, slang_info_log_memory(C->L); return 0; } - if (!slang_variable_construct(var)) - return 0; if (!parse_struct_field_var(C, &o, var, sp)) return 0; } @@ -1478,8 +1476,6 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, slang_info_log_memory(C->L); return 0; } - if (!slang_variable_construct(p)) - return 0; if (!parse_parameter_declaration(C, O, p)) return 0; } @@ -1654,8 +1650,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, slang_info_log_memory(C->L); return 0; } - if (!slang_variable_construct(var)) - return 0; /* copy the declarator qualifier type, parse the identifier */ var->global = C->global_scope; diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index a37deddff1..a8a2d6aa6a 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -184,7 +184,7 @@ slang_variable_scope_copy(slang_variable_scope * x, /** * Grow the variable list by one. - * \return pointer to space for the new variable. + * \return pointer to space for the new variable (will be initialized) */ slang_variable * slang_variable_scope_grow(slang_variable_scope *scope) @@ -196,7 +196,12 @@ slang_variable_scope_grow(slang_variable_scope *scope) (n + 1) * sizeof(slang_variable)); if (!scope->variables) return NULL; + scope->num_variables++; + + if (!slang_variable_construct(scope->variables + n)) + return NULL; + return scope->variables + n; } -- cgit v1.2.3 From 78e5f414cbe0db6600609092390d795d2039d963 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 24 Nov 2006 23:23:18 +0000 Subject: nv10: rename spot light coefs like nv20,nv30 --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 2081fd3ec7..e79436cc41 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -43,7 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************** - Created from objects.c rev. 1.345 + Created from objects.c rev. 1.346 */ #ifndef _NOUVEAU_REG_H @@ -424,7 +424,13 @@ Object NV10_TCL_PRIMITIVE_3D used on: NV10 # define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00000834 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00000838 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000083c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_LIGHT(d) (0x00000840 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(d) (0x00000840 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(d) (0x00000844 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(d) (0x00000848 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(d) (0x0000084c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(d) (0x00000850 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(d) (0x00000854 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(d) (0x00000858 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000085c + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00000860 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00000864 + d * 0x0080) @@ -646,7 +652,13 @@ Object NV15_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00000834 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00000838 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000083c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_LIGHT(d) (0x00000840 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(d) (0x00000840 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(d) (0x00000844 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(d) (0x00000848 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(d) (0x0000084c + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(d) (0x00000850 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(d) (0x00000854 + d * 0x0080) +# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(d) (0x00000858 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000085c + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00000860 + d * 0x0080) # define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00000864 + d * 0x0080) -- cgit v1.2.3 From 291155172733b08238d77440ae935f82bff70bf9 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 24 Nov 2006 23:34:03 +0000 Subject: nv10,nv20,nv30: send correct values for spot light direction X,Y,Z and cutoff parameter C --- src/mesa/drivers/dri/nouveau/nv10_state.c | 55 ++++++++++++++++++------------- src/mesa/drivers/dri/nouveau/nv20_state.c | 50 ++++++++++++++++++---------- src/mesa/drivers/dri/nouveau/nv30_state.c | 49 +++++++++++++++++---------- 3 files changed, 95 insertions(+), 59 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index e99824814f..da26ccba87 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -329,66 +329,75 @@ static void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - /* not sure where the fourth param value goes...*/ + GLint p = light - GL_LIGHT0; + struct gl_light *l = &ctx->Light.Light[p]; + switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; -#if 0 /* FIXME, should be easy to do */ case GL_SPOT_DIRECTION: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); - OUT_RING_CACHEf(params[0]); - OUT_RING_CACHEf(params[1]); - OUT_RING_CACHEf(params[2]); + { + GLfloat x,y,z; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + } break; -#endif case GL_POSITION: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; -#if 0 /* FIXME, should be easy to do */ case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(p), 1); OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); - OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); - OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); - OUT_RING_CACHEf(params[2]); + { + GLfloat c; + c = -2.0 * (0.5 + l->_CosCutoff); + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 1); + OUT_RING_CACHEf(params[0]); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(p), 1); + OUT_RING_CACHEf(params[1]); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(p), 1); + OUT_RING_CACHEf(c); + } break; -#endif case GL_CONSTANT_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; default: diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index 338cfd43b0..082dc64b83 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -340,62 +340,76 @@ static void nv20Hint(GLcontext *ctx, GLenum target, GLenum mode) static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLint p = light - GL_LIGHT0; + struct gl_light *l = &ctx->Light.Light[p]; + /* not sure where the fourth param value goes...*/ switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); - OUT_RING_CACHEf(params[0]); - OUT_RING_CACHEf(params[1]); - OUT_RING_CACHEf(params[2]); + { + GLfloat x,y,z; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + } break; case GL_POSITION: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(p), 1); OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); - OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); - OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); - OUT_RING_CACHEf(params[2]); + { + GLfloat c; + c = -2.0 * (0.5 + l->_CosCutoff); + + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 1); + OUT_RING_CACHEf(params[0]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(p), 1); + OUT_RING_CACHEf(params[1]); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(p), 1); + OUT_RING_CACHEf(c); + } break; case GL_CONSTANT_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; default: diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 630b84df63..11795a75c2 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -347,6 +347,8 @@ static void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLint p = light - GL_LIGHT0; + struct gl_light *l = &ctx->Light.Light[p]; if (NOUVEAU_CARD_USING_SHADERS) return; @@ -355,58 +357,69 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa switch(pname) { case GL_AMBIENT: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_DIFFUSE: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPECULAR: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(light), 3); - OUT_RING_CACHEf(params[0]); - OUT_RING_CACHEf(params[1]); - OUT_RING_CACHEf(params[2]); + { + GLfloat x,y,z; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + } break; case GL_POSITION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(light), 3); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(p), 1); OUT_RING_CACHEf(*params); break; case GL_SPOT_CUTOFF: /* you can't factor these */ - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(light), 1); - OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(light), 1); - OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(light), 1); - OUT_RING_CACHEf(params[2]); + { + GLfloat c; + c = -2.0 * (0.5 + l->_CosCutoff); + + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 1); + OUT_RING_CACHEf(params[0]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(p), 1); + OUT_RING_CACHEf(params[1]); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(p), 1); + OUT_RING_CACHEf(c); + } break; case GL_CONSTANT_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; case GL_LINEAR_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; case GL_QUADRATIC_ATTENUATION: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(light), 1); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(p), 1); OUT_RING_CACHEf(*params); break; default: -- cgit v1.2.3 From 902b26a0d670ca7d2f37103d1c4de242694ff337 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 25 Nov 2006 06:02:10 +0000 Subject: fix scissor --- src/mesa/drivers/dri/nouveau/nv30_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 11795a75c2..851641c0c9 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -516,7 +516,7 @@ static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2); OUT_RING_CACHE((w << 16) | x); - OUT_RING_CACHE((y << 16) | y); + OUT_RING_CACHE((h << 16) | y); } /** Select flat or smooth shading */ -- cgit v1.2.3 From 9c9e6abbf82fbf591575a9c352f86721bc72aa90 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 25 Nov 2006 09:58:35 +0000 Subject: Incomplete shader stuff, should mostly work for NV40. Other cards, not so much.. --- src/mesa/drivers/dri/nouveau/Makefile | 11 +- src/mesa/drivers/dri/nouveau/nouveau_context.c | 8 + src/mesa/drivers/dri/nouveau/nouveau_context.h | 7 + src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 28 +- src/mesa/drivers/dri/nouveau/nouveau_object.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_shader.c | 734 +++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_shader.h | 362 ++++++++++ .../drivers/dri/nouveau/nouveau_shader_0_arb.c | 694 +++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_shader_1.c | 318 +++++++++ src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 238 +++++++ src/mesa/drivers/dri/nouveau/nouveau_state.h | 1 + src/mesa/drivers/dri/nouveau/nv20_shader.h | 121 ++++ src/mesa/drivers/dri/nouveau/nv20_vertprog.c | 447 +++++++++++++ src/mesa/drivers/dri/nouveau/nv30_fragprog.c | 707 ++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv30_shader.h | 378 +++++++++++ src/mesa/drivers/dri/nouveau/nv30_state.c | 2 +- src/mesa/drivers/dri/nouveau/nv30_vertprog.c | 356 ++++++++++ src/mesa/drivers/dri/nouveau/nv40_fragprog.c | 152 +++++ src/mesa/drivers/dri/nouveau/nv40_shader.h | 467 +++++++++++++ src/mesa/drivers/dri/nouveau/nv40_vertprog.c | 647 ++++++++++++++++++ 20 files changed, 5667 insertions(+), 13 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader.h create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader_1.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_shader_2.c create mode 100644 src/mesa/drivers/dri/nouveau/nv20_shader.h create mode 100644 src/mesa/drivers/dri/nouveau/nv20_vertprog.c create mode 100644 src/mesa/drivers/dri/nouveau/nv30_fragprog.c create mode 100644 src/mesa/drivers/dri/nouveau/nv30_shader.h create mode 100644 src/mesa/drivers/dri/nouveau/nv30_vertprog.c create mode 100644 src/mesa/drivers/dri/nouveau/nv40_fragprog.c create mode 100644 src/mesa/drivers/dri/nouveau/nv40_shader.h create mode 100644 src/mesa/drivers/dri/nouveau/nv40_vertprog.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 4d1e3e6c70..384713eeeb 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -17,13 +17,22 @@ DRIVER_SOURCES = \ nouveau_screen.c \ nouveau_span.c \ nouveau_state.c \ + nouveau_shader.c \ + nouveau_shader_0_arb.c \ + nouveau_shader_1.c \ + nouveau_shader_2.c \ nouveau_tex.c \ nouveau_swtcl.c \ nv10_swtcl.c \ nv10_state.c \ nv20_state.c \ nv30_state.c \ - nouveau_state_cache.c + nouveau_state_cache.c \ + nv20_vertprog.c \ + nv30_fragprog.c \ + nv30_vertprog.c \ + nv40_fragprog.c \ + nv40_vertprog.c C_SOURCES = \ $(COMMON_SOURCES) \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index d3fbdab9f3..4ae0c68fa9 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -35,6 +35,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "tnl/tnl.h" #include "tnl/t_pipeline.h" +#include "tnl/t_vp_build.h" #include "drivers/common/driverfuncs.h" @@ -130,6 +131,13 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, nmesa->current_primitive = -1; + nouveauShaderInitFuncs(ctx); + /* Install Mesa's fixed-function shader support */ + if (nmesa->screen->card->type >= NV_40) { + ctx->_MaintainTnlProgram = GL_TRUE; + ctx->_MaintainTexEnvProgram = GL_TRUE; + } + /* Initialize the swrast */ _swrast_CreateContext( ctx ); _ac_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 8ae7be015d..e488f9d42d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -38,6 +38,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_screen.h" #include "nouveau_state_cache.h" +#include "nouveau_shader.h" #include "xmlconfig.h" @@ -119,6 +120,12 @@ typedef struct nouveau_context { GLenum current_primitive; /* the current primitive enum */ DECLARE_RENDERINPUTS(render_inputs_bitset); /* the current render inputs */ + /* Shader state */ + nvsFunc VPfunc; + nvsFunc FPfunc; + nouveauShader *current_fragprog; + nouveauShader *current_vertprog; + nouveauScreenRec *screen; drm_nouveau_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index ce465cdca5..44b9f356d1 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -33,6 +33,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_ctrlreg.h" //#define NOUVEAU_RING_DEBUG +//#define NOUVEAU_STATE_CACHE_DISABLE #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg)) @@ -63,11 +64,11 @@ int i; printf("OUT_RINGp: (size 0x%x dwords)\n",sz); for(i=0;ififo.buffer[nmesa->fifo.current++]=(n); \ #endif +#define BEGIN_RING_SIZE(subchannel,tag,size) do { \ + nouveau_state_cache_flush(nmesa); \ + if (nmesa->fifo.free <= (size)) \ + WAIT_RING(nmesa,(size)); \ + OUT_RING( ((size)<<18) | ((subchannel) << 13) | (tag)); \ + nmesa->fifo.free -= ((size) + 1); \ +}while(0) + extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); extern void nouveau_state_cache_flush(nouveauContextPtr nmesa); extern void nouveau_state_cache_init(nouveauContextPtr nmesa); +#ifdef NOUVEAU_STATE_CACHE_DISABLE +#define BEGIN_RING_CACHE(subc,tag,size) BEGIN_RING_SIZE((subc), (tag), (size)) +#define OUT_RING_CACHE(n) OUT_RING((n)) +#define OUT_RING_CACHEf(n) OUT_RINGf((n)) +#define OUT_RING_CACHEp(ptr, sz) OUT_RINGp((ptr), (sz)) +#else #define BEGIN_RING_CACHE(subchannel,tag,size) do { \ nmesa->state_cache.dirty=1; \ nmesa->state_cache.current_pos=((tag)/4); \ @@ -116,14 +131,7 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); uint32_t* p=(uint32_t*)(ptr); \ int i; for(i=0;ififo.free <= (size)) \ - WAIT_RING(nmesa,(size)); \ - OUT_RING( ((size)<<18) | ((subchannel) << 13) | (tag)); \ - nmesa->fifo.free -= ((size) + 1); \ -}while(0) +#endif #define RING_AVAILABLE() (nmesa->fifo.free-1) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index fe3b44df69..cd46feff7c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -54,7 +54,7 @@ void nouveauObjectInit(nouveauContextPtr nmesa) nouveauCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, 0, 0, 0, 0); nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); /* We need to know vram size.. */ -#if 0 +#if 0 nouveauCreateDmaObject( nmesa, NvDmaFB, 0, (256*1024*1024), 0 /*NV_DMA_TARGET_FB*/, 0 /*NV_DMA_ACCESS_RW*/); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c new file mode 100644 index 0000000000..97ea1ee547 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -0,0 +1,734 @@ +/* + * Copyright (C) 2006 Ben Skeggs. + * + * 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 (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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +/* + * Authors: + * Ben Skeggs + */ + +#include "glheader.h" +#include "macros.h" +#include "enums.h" +#include "extensions.h" + +#include "program.h" +#include "tnl/tnl.h" + +#include "nouveau_context.h" +#include "nouveau_shader.h" + +/***************************************************************************** + * Mesa entry points + */ +static void +nouveauBindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog) +{ +} + +static struct gl_program * +nouveauNewProgram(GLcontext *ctx, GLenum target, GLuint id) +{ + nouveauShader *nvs; + + nvs = CALLOC_STRUCT(_nouveauShader); + switch (target) { + case GL_VERTEX_PROGRAM_ARB: + return _mesa_init_vertex_program(ctx, &nvs->mesa.vp, target, id); + case GL_FRAGMENT_PROGRAM_ARB: + return _mesa_init_fragment_program(ctx, &nvs->mesa.fp, target, id); + default: + _mesa_problem(ctx, "Unsupported shader target"); + break; + } + + FREE(nvs); + return NULL; +} + +static void +nouveauDeleteProgram(GLcontext *ctx, struct gl_program *prog) +{ + nouveauShader *nvs = (nouveauShader *)prog; + + if (nvs->translated) + FREE(nvs->program); + _mesa_delete_program(ctx, prog); +} + +static void +nouveauProgramStringNotify(GLcontext *ctx, GLenum target, + struct gl_program *prog) +{ + nouveauShader *nvs = (nouveauShader *)prog; + + if (nvs->translated) + FREE(nvs->program); + nvs->translated = 0; + + _tnl_program_string(ctx, target, prog); +} + +static GLboolean +nouveauIsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog) +{ + nouveauShader *nvs = (nouveauShader *)prog; + + return nvs->translated; +} + +GLboolean +nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + struct gl_program_parameter_list *plist; + int i; + + /* Translate to HW format now if necessary */ + if (!nvs->translated) { + /* Mesa ASM shader -> nouveauShader */ + if (!nouveau_shader_pass0_arb(ctx, nvs)) + return GL_FALSE; + /* Basic dead code elimination + register usage info */ + if (!nouveau_shader_pass1(nvs)) + return GL_FALSE; + /* nouveauShader -> HW bytecode, HW register alloc */ + if (!nouveau_shader_pass2(nvs)) + return GL_FALSE; + assert(nvs->translated); + assert(nvs->program); + } + + /* Update state parameters */ + plist = nvs->mesa.vp.Base.Parameters; + _mesa_load_state_parameters(ctx, plist); + for (i=0; iNumParameters; i++) { + if (!nvs->on_hardware) { + /* if we've been kicked off the hardware there's no guarantee our + * consts are still there.. reupload them all + */ + nvs->func->UpdateConst(ctx, nvs, i); + } else if (plist->Parameters[i].Type == PROGRAM_STATE_VAR) { + /* update any changed state parameters */ + if (!TEST_EQ_4V(nvs->params[i].val, nvs->params[i].source_val)) + nvs->func->UpdateConst(ctx, nvs, i); + } + } + + /* Upload program to hardware, this must come after state param update + * as >=NV30 fragprogs inline consts into the bytecode. + */ + if (!nvs->on_hardware) { + nouveauShader **current; + + if (nvs->mesa.vp.Base.Target == GL_VERTEX_PROGRAM_ARB) + current = &nmesa->current_vertprog; + else + current = &nmesa->current_fragprog; + if (*current) (*current)->on_hardware = 0; + + nvs->func->UploadToHW(ctx, nvs); + nvs->on_hardware = 1; + + *current = nvs; + } + + return GL_TRUE; +} + +void +nouveauShaderInitFuncs(GLcontext * ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + switch (nmesa->screen->card->type) { + case NV_20: + NV20VPInitShaderFuncs(&nmesa->VPfunc); + break; + case NV_30: + NV30VPInitShaderFuncs(&nmesa->VPfunc); + NV30FPInitShaderFuncs(&nmesa->FPfunc); + break; + case NV_40: + case G_70: + NV40VPInitShaderFuncs(&nmesa->VPfunc); + NV40FPInitShaderFuncs(&nmesa->FPfunc); + break; + default: + return; + } + + _mesa_enable_extension(ctx, "GL_ARB_vertex_program"); + ctx->Const.VertexProgram.MaxNativeInstructions = nmesa->VPfunc.MaxInst; + ctx->Const.VertexProgram.MaxNativeAluInstructions = nmesa->VPfunc.MaxInst; + ctx->Const.VertexProgram.MaxNativeTexInstructions = nmesa->VPfunc.MaxInst; + ctx->Const.VertexProgram.MaxNativeTexIndirections = + ctx->Const.VertexProgram.MaxNativeTexInstructions; + ctx->Const.VertexProgram.MaxNativeAttribs = nmesa->VPfunc.MaxAttrib; + ctx->Const.VertexProgram.MaxNativeTemps = nmesa->VPfunc.MaxTemp; + ctx->Const.VertexProgram.MaxNativeAddressRegs = nmesa->VPfunc.MaxAddress; + ctx->Const.VertexProgram.MaxNativeParameters = nmesa->VPfunc.MaxConst; + + if (nmesa->screen->card->type >= NV_30) { + _mesa_enable_extension(ctx, "GL_ARB_fragment_program"); + + ctx->Const.FragmentProgram.MaxNativeInstructions = nmesa->FPfunc.MaxInst; + ctx->Const.FragmentProgram.MaxNativeAluInstructions = nmesa->FPfunc.MaxInst; + ctx->Const.FragmentProgram.MaxNativeTexInstructions = nmesa->FPfunc.MaxInst; + ctx->Const.FragmentProgram.MaxNativeTexIndirections = + ctx->Const.FragmentProgram.MaxNativeTexInstructions; + ctx->Const.FragmentProgram.MaxNativeAttribs = nmesa->FPfunc.MaxAttrib; + ctx->Const.FragmentProgram.MaxNativeTemps = nmesa->FPfunc.MaxTemp; + ctx->Const.FragmentProgram.MaxNativeAddressRegs = nmesa->FPfunc.MaxAddress; + ctx->Const.FragmentProgram.MaxNativeParameters = nmesa->FPfunc.MaxConst; + } + + ctx->Driver.NewProgram = nouveauNewProgram; + ctx->Driver.BindProgram = nouveauBindProgram; + ctx->Driver.DeleteProgram = nouveauDeleteProgram; + ctx->Driver.ProgramStringNotify = nouveauProgramStringNotify; + ctx->Driver.IsProgramNative = nouveauIsProgramNative; +} + + +/***************************************************************************** + * Disassembly support structs + */ +#define CHECK_RANGE(idx, arr) ((idx)= (sizeof(ops) / sizeof(struct _opcode_info))) + return NULL; + if (ops[op].name == NULL) + return NULL; + return &ops[op]; +} + +static const char *_SFR_STRING[] = { + [NVS_FR_POSITION] = "position", + [NVS_FR_WEIGHT] = "weight", + [NVS_FR_NORMAL] = "normal", + [NVS_FR_COL0] = "color", + [NVS_FR_COL1] = "color.secondary", + [NVS_FR_BFC0] = "bfc", + [NVS_FR_BFC1] = "bfc.secondary", + [NVS_FR_FOGCOORD] = "fogcoord", + [NVS_FR_POINTSZ] = "pointsize", + [NVS_FR_TEXCOORD0] = "texcoord[0]", + [NVS_FR_TEXCOORD1] = "texcoord[1]", + [NVS_FR_TEXCOORD2] = "texcoord[2]", + [NVS_FR_TEXCOORD3] = "texcoord[3]", + [NVS_FR_TEXCOORD4] = "texcoord[4]", + [NVS_FR_TEXCOORD5] = "texcoord[5]", + [NVS_FR_TEXCOORD6] = "texcoord[6]", + [NVS_FR_TEXCOORD7] = "texcoord[7]", + [NVS_FR_FRAGDATA0] = "data[0]", + [NVS_FR_FRAGDATA1] = "data[1]", + [NVS_FR_FRAGDATA2] = "data[2]", + [NVS_FR_FRAGDATA3] = "data[3]", + [NVS_FR_CLIP0] = "clip_plane[0]", + [NVS_FR_CLIP1] = "clip_plane[1]", + [NVS_FR_CLIP2] = "clip_plane[2]", + [NVS_FR_CLIP3] = "clip_plane[3]", + [NVS_FR_CLIP4] = "clip_plane[4]", + [NVS_FR_CLIP5] = "clip_plane[5]", + [NVS_FR_CLIP6] = "clip_plane[6]", + [NVS_FR_FACING] = "facing", +}; + +#define SFR_STRING(idx) CHECK_RANGE((idx), SFR_STRING) + +static const char *_SWZ_STRING[] = { + [NVS_SWZ_X] = "x", + [NVS_SWZ_Y] = "y", + [NVS_SWZ_Z] = "z", + [NVS_SWZ_W] = "w" +}; + +#define SWZ_STRING(idx) CHECK_RANGE((idx), SWZ_STRING) + +static const char *_NVS_PREC_STRING[] = { + [NVS_PREC_FLOAT32] = "R", + [NVS_PREC_FLOAT16] = "H", + [NVS_PREC_FIXED12] = "X", + [NVS_PREC_UNKNOWN] = "?" +}; + +#define NVS_PREC_STRING(idx) CHECK_RANGE((idx), NVS_PREC_STRING) + +static const char *_NVS_COND_STRING[] = { + [NVS_COND_FL] = "FL", + [NVS_COND_LT] = "LT", + [NVS_COND_EQ] = "EQ", + [NVS_COND_LE] = "LE", + [NVS_COND_GT] = "GT", + [NVS_COND_NE] = "NE", + [NVS_COND_GE] = "GE", + [NVS_COND_TR] = "TR", + [NVS_COND_UNKNOWN] = "??" +}; + +#define NVS_COND_STRING(idx) CHECK_RANGE((idx), NVS_COND_STRING) + +/***************************************************************************** + * ShaderFragment dumping + */ +static void +nvsDumpIndent(int lvl) +{ + while (lvl--) + printf(" "); +} + +static void +nvsDumpSwizzle(nvsSwzComp *swz) +{ + printf(".%s%s%s%s", + SWZ_STRING(swz[0]), + SWZ_STRING(swz[1]), SWZ_STRING(swz[2]), SWZ_STRING(swz[3]) + ); +} + +static void +nvsDumpReg(nvsInstruction * inst, nvsRegister * reg) +{ + if (reg->negate) + printf("-"); + if (reg->abs) + printf("abs("); + + switch (reg->file) { + case NVS_FILE_TEMP: + printf("R%d", reg->index); + nvsDumpSwizzle(reg->swizzle); + break; + case NVS_FILE_ATTRIB: + printf("attrib.%s", SFR_STRING(reg->index)); + nvsDumpSwizzle(reg->swizzle); + break; + case NVS_FILE_ADDRESS: + printf("A%d", reg->index); + break; + case NVS_FILE_CONST: + if (reg->indexed) + printf("const[A%d.%s + %d]", + reg->addr_reg, SWZ_STRING(reg->addr_comp), reg->index); + else + printf("const[%d]", reg->index); + nvsDumpSwizzle(reg->swizzle); + break; + default: + printf("UNKNOWN_FILE"); + break; + } + + if (reg->abs) + printf(")"); +} + +void +nvsDumpInstruction(nvsInstruction * inst, int slot, int lvl) +{ + struct _opcode_info *opr = &ops[inst->op]; + int i; + + nvsDumpIndent(lvl); + printf("%s ", opr->name); + + if (!opr->flags & NODS) { + switch (inst->dest.file) { + case NVS_FILE_RESULT: + printf("result.%s", SFR_STRING(inst->dest.index)); + break; + case NVS_FILE_TEMP: + printf("R%d", inst->dest.index); + break; + case NVS_FILE_ADDRESS: + printf("A%d", inst->dest.index); + break; + default: + printf("UNKNOWN_DST_FILE"); + break; + } + + if (inst->mask != SMASK_ALL) { + printf("."); + if (inst->mask & SMASK_X) + printf("x"); + if (inst->mask & SMASK_Y) + printf("y"); + if (inst->mask & SMASK_Z) + printf("z"); + if (inst->mask & SMASK_W) + printf("w"); + } + + if (opr->numsrc) + printf(", "); + } + + for (i = 0; i < opr->numsrc; i++) { + nvsDumpReg(inst, &inst->src[i]); + if (i != opr->numsrc - 1) + printf(", "); + } + if (opr->flags & TI_UNIT) + printf(", texture[%d]", inst->tex_unit); + + printf("\n"); +} + +void +nvsDumpFragmentList(nvsFragmentList *f, int lvl) +{ + while (f) { + switch (f->fragment->type) { + case NVS_INSTRUCTION: + nvsDumpInstruction((nvsInstruction*)f->fragment, 0, lvl); + break; + default: + fprintf(stderr, "%s: Only NVS_INSTRUCTION fragments can be in" + "nvsFragmentList!\n", __func__); + return; + } + f = f->next; + } +} + +/***************************************************************************** + * HW shader disassembly + */ +static void +nvsDisasmHWShaderOp(nvsFunc * shader, int merged) +{ + struct _opcode_info *opi; + nvsOpcode op; + nvsRegFile file; + nvsSwzComp swz[4]; + int i; + + op = shader->GetOpcode(shader, merged); + opi = _get_op_info(op); + if (!opi) { + printf("NO OPINFO!"); + return; + } + + printf("%s", opi->name); + if (shader->GetPrecision && + (!(opi->flags & BRANCH_ALL)) && (!(opi->flags * NODS)) && + (op != NVS_OP_NOP)) + printf("%s", NVS_PREC_STRING(shader->GetPrecision(shader))); + if (shader->SupportsConditional && shader->SupportsConditional(shader)) { + if (shader->GetConditionUpdate(shader)) { + printf("C%d", shader->GetCondRegID(shader)); + } + } + if (shader->GetSaturate && shader->GetSaturate(shader)) + printf("_SAT"); + + if (!(opi->flags & NODS)) { + int mask = shader->GetDestMask(shader, merged); + + switch (shader->GetDestFile(shader, merged)) { + case NVS_FILE_ADDRESS: + printf(" A%d", shader->GetDestID(shader, merged)); + break; + case NVS_FILE_TEMP: + printf(" R%d", shader->GetDestID(shader, merged)); + break; + case NVS_FILE_RESULT: + printf(" result.%s", (SFR_STRING(shader->GetDestID(shader, merged)))); + break; + default: + printf(" BAD_RESULT_FILE"); + break; + } + + if (mask != SMASK_ALL) { + printf("."); + if (mask & SMASK_X) printf("x"); + if (mask & SMASK_Y) printf("y"); + if (mask & SMASK_Z) printf("z"); + if (mask & SMASK_W) printf("w"); + } + } + + if (shader->SupportsConditional && shader->SupportsConditional(shader) && + shader->GetConditionTest(shader)) { + shader->GetCondRegSwizzle(shader, swz); + + printf(" (%s%d.%s%s%s%s)", + NVS_COND_STRING(shader->GetCondition(shader)), + shader->GetCondRegID(shader), + SWZ_STRING(swz[NVS_SWZ_X]), + SWZ_STRING(swz[NVS_SWZ_Y]), + SWZ_STRING(swz[NVS_SWZ_Z]), + SWZ_STRING(swz[NVS_SWZ_W]) + ); + } + + /* looping */ + if (opi->flags & COUNT_ALL) { + printf(" { "); + if (opi->flags & COUNT_NUM) { + printf("%d", shader->GetLoopCount(shader)); + } + if (opi->flags & COUNT_IND) { + printf(", %d", shader->GetLoopInitial(shader)); + } + if (opi->flags & COUNT_INC) { + printf(", %d", shader->GetLoopIncrement(shader)); + } + printf(" }"); + } + + /* branching */ + if (opi->flags & BRANCH_TR) + printf(" %d", shader->GetBranch(shader)); + if (opi->flags & BRANCH_EL) + printf(" ELSE %d", shader->GetBranchElse(shader)); + if (opi->flags & BRANCH_EN) + printf(" END %d", shader->GetBranchEnd(shader)); + + if (!(opi->flags & NODS) && opi->numsrc) + printf(","); + printf(" "); + + for (i = 0; i < opi->numsrc; i++) { + if (shader->GetSourceAbs(shader, merged, i)) + printf("abs("); + if (shader->GetSourceNegate(shader, merged, i)) + printf("-"); + + file = shader->GetSourceFile(shader, merged, i); + switch (file) { + case NVS_FILE_TEMP: + printf("R%d", shader->GetSourceID(shader, merged, i)); + break; + case NVS_FILE_CONST: + if (shader->GetSourceIndexed(shader, merged, i)) { + printf("c[A%d.%s + 0x%x]", + shader->GetRelAddressRegID(shader), + SWZ_STRING(shader->GetRelAddressSwizzle(shader)), + shader->GetSourceID(shader, merged, i) + ); + } else { + float val[4]; + + if (shader->GetSourceConstVal) { + shader->GetSourceConstVal(shader, merged, i, val); + printf("{ %.02f, %.02f, %.02f, %.02f }", + val[0], val[1], val[2], val[3]); + } else { + printf("c[0x%x]", shader->GetSourceID(shader, merged, i)); + } + } + break; + case NVS_FILE_ATTRIB: + if (shader->GetSourceIndexed(shader, merged, i)) { + printf("attrib[A%d.%s + %d]", + shader->GetRelAddressRegID(shader), + SWZ_STRING(shader->GetRelAddressSwizzle(shader)), + shader->GetSourceID(shader, merged, i) + ); + } + else { + printf("attrib.%s", + SFR_STRING(shader->GetSourceID(shader, merged, i)) + ); + } + break; + case NVS_FILE_ADDRESS: + printf("A%d", shader->GetRelAddressRegID(shader)); + break; + default: + printf("UNKNOWN_SRC_FILE"); + break; + } + + shader->GetSourceSwizzle(shader, merged, i, swz); + if (file != NVS_FILE_ADDRESS && + (swz[NVS_SWZ_X] != NVS_SWZ_X || swz[NVS_SWZ_Y] != NVS_SWZ_Y || + swz[NVS_SWZ_Z] != NVS_SWZ_Z || swz[NVS_SWZ_W] != NVS_SWZ_W)) { + printf(".%s%s%s%s", SWZ_STRING(swz[NVS_SWZ_X]), + SWZ_STRING(swz[NVS_SWZ_Y]), + SWZ_STRING(swz[NVS_SWZ_Z]), + SWZ_STRING(swz[NVS_SWZ_W])); + } + + if (shader->GetSourceAbs(shader, merged, i)) + printf(")"); + if (shader->GetSourceScale) { + int scale = shader->GetSourceScale(shader, merged, i); + if (scale > 1) + printf("{scaled %dx}", scale); + } + if (i < (opi->numsrc - 1)) + printf(", "); + } + + if (shader->IsLastInst(shader)) + printf(" + END"); +} + +void +nvsDisasmHWShader(nvsPtr nvs) +{ + nvsFunc *shader = nvs->func; + unsigned int iaddr = 0; + + if (!nvs->program) { + fprintf(stderr, "No HW program present"); + return; + } + + shader->inst = nvs->program; + while (1) { + if (shader->inst >= (nvs->program + nvs->program_size)) { + fprintf(stderr, "Reached end of program, but HW inst has no END"); + break; + } + + printf("\t0x%08x:\n", shader->inst[0]); + printf("\t0x%08x:\n", shader->inst[1]); + printf("\t0x%08x:\n", shader->inst[2]); + printf("\t0x%08x:", shader->inst[3]); + + printf("\n\t\tINST %d.0: ", iaddr); + nvsDisasmHWShaderOp(shader, 0); + if (shader->HasMergedInst(shader)) { + printf("\n\t\tINST %d.1: ", iaddr); + nvsDisasmHWShaderOp(shader, 1); + } + printf("\n"); + + if (shader->IsLastInst(shader)) + break; + + shader->inst += shader->GetOffsetNext(shader); + iaddr++; + } + + printf("\n"); +} diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h new file mode 100644 index 0000000000..baf59d0259 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -0,0 +1,362 @@ +#ifndef __SHADER_COMMON_H__ +#define __SHADER_COMMON_H__ + +#include "mtypes.h" + +typedef struct _nvsFunc nvsFunc; + +#define NVS_MAX_TEMPS 32 +#define NVS_MAX_ATTRIBS 16 +#define NVS_MAX_CONSTS 256 +#define NVS_MAX_ADDRESS 2 +#define NVS_MAX_INSNS 4096 + +typedef struct { + enum { + NVS_INSTRUCTION, + } type; + int position; +} nvsFragmentHeader; + +typedef struct _nvs_fragment_list { + struct _nvs_fragment_list *prev; + struct _nvs_fragment_list *next; + nvsFragmentHeader *fragment; +} nvsFragmentList; + +typedef struct _nouveauShader { + union { + struct gl_vertex_program vp; + struct gl_fragment_program fp; + } mesa; + GLcontext *ctx; + nvsFunc *func; + + /* State of the final program */ + GLboolean translated; + GLboolean on_hardware; + unsigned int *program; + unsigned int program_size; + unsigned int program_alloc_size; + unsigned int program_start_id; + unsigned int program_current; + unsigned int inputs_read; + unsigned int outputs_written; + int inst_count; + + struct { + GLfloat *source_val; /* NULL if invariant */ + float val[4]; + int hw_index; /* hw-specific value */ + } params[NVS_MAX_CONSTS]; + + struct { + int last_use; + } temps[NVS_MAX_TEMPS]; + + /* Pass-private data */ + void *pass_rec; + + nvsFragmentList *list_head; + nvsFragmentList *list_tail; +} nouveauShader, *nvsPtr; + +typedef enum { + NVS_FILE_NONE, + NVS_FILE_TEMP, + NVS_FILE_ATTRIB, + NVS_FILE_CONST, + NVS_FILE_RESULT, + NVS_FILE_ADDRESS, + NVS_FILE_UNKNOWN +} nvsRegFile; + +typedef enum { + NVS_OP_UNKNOWN = 0, + NVS_OP_NOP, + NVS_OP_ABS, NVS_OP_ADD, NVS_OP_ARA, NVS_OP_ARL, NVS_OP_ARR, + NVS_OP_BRA, NVS_OP_BRK, + NVS_OP_CAL, NVS_OP_CMP, NVS_OP_COS, + NVS_OP_DDX, NVS_OP_DDY, NVS_OP_DIV, NVS_OP_DP2, NVS_OP_DP2A, NVS_OP_DP3, + NVS_OP_DP4, NVS_OP_DPH, NVS_OP_DST, + NVS_OP_EX2, NVS_OP_EXP, + NVS_OP_FLR, NVS_OP_FRC, + NVS_OP_IF, + NVS_OP_KIL, + NVS_OP_LG2, NVS_OP_LIT, NVS_OP_LOG, NVS_OP_LOOP, NVS_OP_LRP, + NVS_OP_MAD, NVS_OP_MAX, NVS_OP_MIN, NVS_OP_MOV, NVS_OP_MUL, + NVS_OP_NRM, + NVS_OP_PK2H, NVS_OP_PK2US, NVS_OP_PK4B, NVS_OP_PK4UB, NVS_OP_POW, + NVS_OP_POPA, NVS_OP_PUSHA, + NVS_OP_RCC, NVS_OP_RCP, NVS_OP_REP, NVS_OP_RET, NVS_OP_RFL, NVS_OP_RSQ, + NVS_OP_SCS, NVS_OP_SEQ, NVS_OP_SFL, NVS_OP_SGE, NVS_OP_SGT, NVS_OP_SIN, + NVS_OP_SLE, NVS_OP_SLT, NVS_OP_SNE, NVS_OP_SSG, NVS_OP_STR, NVS_OP_SUB, + NVS_OP_SWZ, + NVS_OP_TEX, NVS_OP_TXB, NVS_OP_TXD, NVS_OP_TXL, NVS_OP_TXP, + NVS_OP_UP2H, NVS_OP_UP2US, NVS_OP_UP4B, NVS_OP_UP4UB, + NVS_OP_X2D, NVS_OP_XPD, + NVS_OP_EMUL +} nvsOpcode; + +typedef enum { + NVS_PREC_FLOAT32, + NVS_PREC_FLOAT16, + NVS_PREC_FIXED12, + NVS_PREC_UNKNOWN +} nvsPrecision; + +typedef enum { + NVS_SWZ_X = 0, + NVS_SWZ_Y = 1, + NVS_SWZ_Z = 2, + NVS_SWZ_W = 3 +} nvsSwzComp; + +typedef enum { + NVS_FR_POSITION, + NVS_FR_WEIGHT, + NVS_FR_NORMAL, + NVS_FR_COL0, + NVS_FR_COL1, + NVS_FR_BFC0, + NVS_FR_BFC1, + NVS_FR_FOGCOORD, + NVS_FR_POINTSZ, + NVS_FR_TEXCOORD0, + NVS_FR_TEXCOORD1, + NVS_FR_TEXCOORD2, + NVS_FR_TEXCOORD3, + NVS_FR_TEXCOORD4, + NVS_FR_TEXCOORD5, + NVS_FR_TEXCOORD6, + NVS_FR_TEXCOORD7, + NVS_FR_FRAGDATA0, + NVS_FR_FRAGDATA1, + NVS_FR_FRAGDATA2, + NVS_FR_FRAGDATA3, + NVS_FR_CLIP0, + NVS_FR_CLIP1, + NVS_FR_CLIP2, + NVS_FR_CLIP3, + NVS_FR_CLIP4, + NVS_FR_CLIP5, + NVS_FR_CLIP6, + NVS_FR_FACING, + NVS_FR_UNKNOWN +} nvsFixedReg; + +typedef enum { + NVS_COND_FL, NVS_COND_LT, NVS_COND_EQ, NVS_COND_LE, NVS_COND_GT, + NVS_COND_NE, NVS_COND_GE, NVS_COND_TR, NVS_COND_UN, + NVS_COND_UNKNOWN +} nvsCond; + +typedef struct { + nvsRegFile file; + unsigned int index; + + unsigned int indexed; + unsigned int addr_reg; + nvsSwzComp addr_comp; + + nvsSwzComp swizzle[4]; + int negate; + int abs; +} nvsRegister; + +static const nvsRegister nvr_unused = { + .file = NVS_FILE_ATTRIB, + .index = 0, + .indexed = 0, + .addr_reg = 0, + .addr_comp = NVS_SWZ_X, + .swizzle = {NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W}, + .negate = 0, + .abs = 0, +}; + +typedef enum { + NVS_TEX_TARGET_1D, + NVS_TEX_TARGET_2D, + NVS_TEX_TARGET_3D, + NVS_TEX_TARGET_CUBE, + NVS_TEX_TARGET_RECT, + NVS_TEX_TARGET_UNKNOWN = 0 +} nvsTexTarget; + +typedef struct { + nvsFragmentHeader header; + + nvsOpcode op; + unsigned int saturate; + + nvsRegister dest; + unsigned int mask; + + nvsRegister src[3]; + + unsigned int tex_unit; + nvsTexTarget tex_target; + + nvsCond cond; + nvsSwzComp cond_swizzle[4]; + int cond_reg; + int cond_test; + int cond_update; +} nvsInstruction; + +#define SMASK_X (1<<0) +#define SMASK_Y (1<<1) +#define SMASK_Z (1<<2) +#define SMASK_W (1<<3) +#define SMASK_ALL (SMASK_X|SMASK_Y|SMASK_Z|SMASK_W) + +#define SPOS_ADDRESS 3 +struct _op_xlat { + unsigned int NV; + nvsOpcode SOP; + int srcpos[3]; +}; +#define MOD_OPCODE(t,hw,sop,s0,s1,s2) do { \ + t[hw].NV = hw; \ + t[hw].SOP = sop; \ + t[hw].srcpos[0] = s0; \ + t[hw].srcpos[1] = s1; \ + t[hw].srcpos[2] = s2; \ +} while(0) + +extern unsigned int NVVP_TX_VOP_COUNT; +extern unsigned int NVVP_TX_NVS_OP_COUNT; +extern struct _op_xlat NVVP_TX_VOP[]; +extern struct _op_xlat NVVP_TX_SOP[]; + +extern unsigned int NVFP_TX_AOP_COUNT; +extern unsigned int NVFP_TX_BOP_COUNT; +extern struct _op_xlat NVFP_TX_AOP[]; +extern struct _op_xlat NVFP_TX_BOP[]; + +#define SCAP_SRC_ABS (1<<0) + +struct _nvsFunc { + unsigned int MaxInst; + unsigned int MaxAttrib; + unsigned int MaxTemp; + unsigned int MaxAddress; + unsigned int MaxConst; + unsigned int caps; + + unsigned int *inst; + void (*UploadToHW) (GLcontext *, nouveauShader *); + void (*UpdateConst) (GLcontext *, nouveauShader *, int); + + struct _op_xlat*(*GetOPTXRec) (nvsFunc *, int merged); + struct _op_xlat*(*GetOPTXFromSOP) (nvsOpcode, int *id); + + int (*SupportsOpcode) (nvsFunc *, nvsOpcode); + void (*SetOpcode) (nvsFunc *, unsigned int opcode, + int slot); + void (*SetCCUpdate) (nvsFunc *); + void (*SetCondition) (nvsFunc *, int on, nvsCond, int reg, + nvsSwzComp *swizzle); + void (*SetResult) (nvsFunc *, nvsRegister *, + unsigned int mask, int slot); + void (*SetSource) (nvsFunc *, nvsRegister *, int pos); + void (*SetUnusedSource) (nvsFunc *, int pos); + void (*SetTexImageUnit) (nvsFunc *, int unit); + void (*SetSaturate) (nvsFunc *); + void (*SetLastInst) (nvsFunc *); + + int (*HasMergedInst) (nvsFunc *); + int (*IsLastInst) (nvsFunc *); + int (*GetOffsetNext) (nvsFunc *); + + int (*GetOpcodeSlot) (nvsFunc *, int merged); + unsigned int (*GetOpcodeHW) (nvsFunc *, int slot); + nvsOpcode (*GetOpcode) (nvsFunc *, int merged); + + nvsPrecision (*GetPrecision) (nvsFunc *); + int (*GetSaturate) (nvsFunc *); + + nvsRegFile (*GetDestFile) (nvsFunc *, int merged); + unsigned int (*GetDestID) (nvsFunc *, int merged); + unsigned int (*GetDestMask) (nvsFunc *, int merged); + + unsigned int (*GetSourceHW) (nvsFunc *, int merged, int pos); + nvsRegFile (*GetSourceFile) (nvsFunc *, int merged, int pos); + int (*GetSourceID) (nvsFunc *, int merged, int pos); + int (*GetTexImageUnit) (nvsFunc *); + int (*GetSourceNegate) (nvsFunc *, int merged, int pos); + int (*GetSourceAbs) (nvsFunc *, int merged, int pos); + void (*GetSourceSwizzle) (nvsFunc *, int merged, int pos, + nvsSwzComp *swz); + int (*GetSourceIndexed) (nvsFunc *, int merged, int pos); + void (*GetSourceConstVal) (nvsFunc *, int merged, int pos, + float *val); + int (*GetSourceScale) (nvsFunc *, int merged, int pos); + + int (*GetRelAddressRegID) (nvsFunc *); + nvsSwzComp (*GetRelAddressSwizzle) (nvsFunc *); + + int (*SupportsConditional) (nvsFunc *); + int (*GetConditionUpdate) (nvsFunc *); + int (*GetConditionTest) (nvsFunc *); + nvsCond (*GetCondition) (nvsFunc *); + void (*GetCondRegSwizzle) (nvsFunc *, nvsSwzComp *swz); + int (*GetCondRegID) (nvsFunc *); + int (*GetBranch) (nvsFunc *); + int (*GetBranchElse) (nvsFunc *); + int (*GetBranchEnd) (nvsFunc *); + + int (*GetLoopCount) (nvsFunc *); + int (*GetLoopInitial) (nvsFunc *); + int (*GetLoopIncrement) (nvsFunc *); +}; + +static inline nvsRegister +nvsNegate(nvsRegister reg) +{ + reg.negate = !reg.negate; + return reg; +} + +static inline nvsRegister +nvsAbs(nvsRegister reg) +{ + reg.abs = 1; + return reg; +} + +static inline nvsRegister +nvsSwizzle(nvsRegister reg, nvsSwzComp x, nvsSwzComp y, + nvsSwzComp z, nvsSwzComp w) +{ + nvsSwzComp sc[4] = { x, y, z, w }; + nvsSwzComp oc[4]; + int i; + + for (i=0;i<4;i++) + oc[i] = reg.swizzle[i]; + for (i=0;i<4;i++) + reg.swizzle[i] = oc[sc[i]]; + return reg; +} + +extern GLboolean nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs); +extern void nvsDisasmHWShader(nvsPtr); + +extern void NV20VPInitShaderFuncs(nvsFunc *); +extern void NV30VPInitShaderFuncs(nvsFunc *); +extern void NV40VPInitShaderFuncs(nvsFunc *); + +extern void NV30FPInitShaderFuncs(nvsFunc *); +extern void NV40FPInitShaderFuncs(nvsFunc *); + +extern void nouveauShaderInitFuncs(GLcontext *ctx); + +extern GLboolean nouveau_shader_pass0_arb(GLcontext *ctx, nouveauShader *nvs); +extern GLboolean nouveau_shader_pass0_slang(GLcontext *ctx, nouveauShader *nvs); +extern GLboolean nouveau_shader_pass1(nvsPtr nvs); +extern GLboolean nouveau_shader_pass2(nvsPtr nvs); + +#endif + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c new file mode 100644 index 0000000000..8b5222d069 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c @@ -0,0 +1,694 @@ +/* + * Copyright (C) 2006 Ben Skeggs. + * + * 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 (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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +/* + * Authors: + * Ben Skeggs + */ + +#include "glheader.h" +#include "macros.h" +#include "enums.h" + +#include "program.h" +#include "programopt.h" +#include "program_instruction.h" + +#include "nouveau_context.h" +#include "nouveau_shader.h" + +static nvsFixedReg _tx_mesa_vp_dst_reg[VERT_RESULT_MAX] = { + NVS_FR_POSITION, NVS_FR_COL0, NVS_FR_COL1, NVS_FR_FOGCOORD, + NVS_FR_TEXCOORD0, NVS_FR_TEXCOORD1, NVS_FR_TEXCOORD2, NVS_FR_TEXCOORD3, + NVS_FR_TEXCOORD4, NVS_FR_TEXCOORD5, NVS_FR_TEXCOORD6, NVS_FR_TEXCOORD7, + NVS_FR_POINTSZ, NVS_FR_BFC0, NVS_FR_BFC1, NVS_FR_UNKNOWN /* EDGE */ +}; + +static nvsFixedReg _tx_mesa_fp_dst_reg[FRAG_RESULT_MAX] = { + NVS_FR_FRAGDATA0 /* COLR */, NVS_FR_FRAGDATA0 /* COLH */, + NVS_FR_UNKNOWN /* DEPR */ +}; + +static nvsFixedReg _tx_mesa_vp_src_reg[VERT_ATTRIB_MAX] = { + NVS_FR_POSITION, NVS_FR_WEIGHT, NVS_FR_NORMAL, NVS_FR_COL0, NVS_FR_COL1, + NVS_FR_FOGCOORD, NVS_FR_UNKNOWN /* COLOR_INDEX */, NVS_FR_UNKNOWN, + NVS_FR_TEXCOORD0, NVS_FR_TEXCOORD1, NVS_FR_TEXCOORD2, NVS_FR_TEXCOORD3, + NVS_FR_TEXCOORD4, NVS_FR_TEXCOORD5, NVS_FR_TEXCOORD6, NVS_FR_TEXCOORD7, +/* Generic attribs 0-15, aliased to the above */ + NVS_FR_POSITION, NVS_FR_WEIGHT, NVS_FR_NORMAL, NVS_FR_COL0, NVS_FR_COL1, + NVS_FR_FOGCOORD, NVS_FR_UNKNOWN /* COLOR_INDEX */, NVS_FR_UNKNOWN, + NVS_FR_TEXCOORD0, NVS_FR_TEXCOORD1, NVS_FR_TEXCOORD2, NVS_FR_TEXCOORD3, + NVS_FR_TEXCOORD4, NVS_FR_TEXCOORD5, NVS_FR_TEXCOORD6, NVS_FR_TEXCOORD7 +}; + +static nvsFixedReg _tx_mesa_fp_src_reg[FRAG_ATTRIB_MAX] = { + NVS_FR_POSITION, NVS_FR_COL0, NVS_FR_COL1, NVS_FR_FOGCOORD, + NVS_FR_TEXCOORD0, NVS_FR_TEXCOORD1, NVS_FR_TEXCOORD2, NVS_FR_TEXCOORD3, + NVS_FR_TEXCOORD4, NVS_FR_TEXCOORD5, NVS_FR_TEXCOORD6, NVS_FR_TEXCOORD7 +}; + +static nvsSwzComp _tx_mesa_swizzle[4] = { + NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W +}; + +static nvsOpcode _tx_mesa_opcode[] = { + [OPCODE_ABS] = NVS_OP_ABS, [OPCODE_ADD] = NVS_OP_ADD, + [OPCODE_ARA] = NVS_OP_ARA, [OPCODE_ARL] = NVS_OP_ARL, + [OPCODE_ARL_NV] = NVS_OP_ARL, [OPCODE_ARR] = NVS_OP_ARR, + [OPCODE_CMP] = NVS_OP_CMP, [OPCODE_COS] = NVS_OP_COS, + [OPCODE_DDX] = NVS_OP_DDX, [OPCODE_DDY] = NVS_OP_DDY, + [OPCODE_DP3] = NVS_OP_DP3, [OPCODE_DP4] = NVS_OP_DP4, + [OPCODE_DPH] = NVS_OP_DPH, [OPCODE_DST] = NVS_OP_DST, + [OPCODE_EX2] = NVS_OP_EX2, [OPCODE_EXP] = NVS_OP_EXP, + [OPCODE_FLR] = NVS_OP_FLR, [OPCODE_FRC] = NVS_OP_FRC, + [OPCODE_KIL] = NVS_OP_EMUL, [OPCODE_KIL_NV] = NVS_OP_KIL, + [OPCODE_LG2] = NVS_OP_LG2, [OPCODE_LIT] = NVS_OP_LIT, + [OPCODE_LOG] = NVS_OP_LOG, + [OPCODE_LRP] = NVS_OP_LRP, + [OPCODE_MAD] = NVS_OP_MAD, [OPCODE_MAX] = NVS_OP_MAX, + [OPCODE_MIN] = NVS_OP_MIN, [OPCODE_MOV] = NVS_OP_MOV, + [OPCODE_MUL] = NVS_OP_MUL, + [OPCODE_PK2H] = NVS_OP_PK2H, [OPCODE_PK2US] = NVS_OP_PK2US, + [OPCODE_PK4B] = NVS_OP_PK4B, [OPCODE_PK4UB] = NVS_OP_PK4UB, + [OPCODE_POW] = NVS_OP_POW, [OPCODE_POPA] = NVS_OP_POPA, + [OPCODE_PUSHA] = NVS_OP_PUSHA, + [OPCODE_RCC] = NVS_OP_RCC, [OPCODE_RCP] = NVS_OP_RCP, + [OPCODE_RFL] = NVS_OP_RFL, [OPCODE_RSQ] = NVS_OP_RSQ, + [OPCODE_SCS] = NVS_OP_SCS, [OPCODE_SEQ] = NVS_OP_SEQ, + [OPCODE_SFL] = NVS_OP_SFL, [OPCODE_SGE] = NVS_OP_SGE, + [OPCODE_SGT] = NVS_OP_SGT, [OPCODE_SIN] = NVS_OP_SIN, + [OPCODE_SLE] = NVS_OP_SLE, [OPCODE_SLT] = NVS_OP_SLT, + [OPCODE_SNE] = NVS_OP_SNE, [OPCODE_SSG] = NVS_OP_SSG, + [OPCODE_STR] = NVS_OP_STR, [OPCODE_SUB] = NVS_OP_SUB, + [OPCODE_SWZ] = NVS_OP_MOV, + [OPCODE_TEX] = NVS_OP_TEX, [OPCODE_TXB] = NVS_OP_TXB, + [OPCODE_TXD] = NVS_OP_TXD, + [OPCODE_TXL] = NVS_OP_TXL, [OPCODE_TXP] = NVS_OP_TXP, + [OPCODE_TXP_NV] = NVS_OP_TXP, + [OPCODE_UP2H] = NVS_OP_UP2H, [OPCODE_UP2US] = NVS_OP_UP2US, + [OPCODE_UP4B] = NVS_OP_UP4B, [OPCODE_UP4UB] = NVS_OP_UP4UB, + [OPCODE_X2D] = NVS_OP_X2D, + [OPCODE_XPD] = NVS_OP_XPD +}; + +static nvsCond _tx_mesa_condmask[] = { + NVS_COND_UNKNOWN, NVS_COND_GT, NVS_COND_LT, NVS_COND_UN, NVS_COND_GE, + NVS_COND_LE, NVS_COND_NE, NVS_COND_NE, NVS_COND_TR, NVS_COND_FL +}; + +struct pass0_rec { + int nvs_ipos; + int next_temp; + int swzconst_done; + int swzconst_id; +}; + +#define X NVS_SWZ_X +#define Y NVS_SWZ_Y +#define Z NVS_SWZ_Z +#define W NVS_SWZ_W + +static void +pass0_append_fragment(nouveauShader *nvs, nvsFragmentHeader *fragment) +{ + nvsFragmentList *list = calloc(1, sizeof(nvsFragmentList)); + if (!list) + return; + + list->fragment = fragment; + list->prev = nvs->list_tail; + if ( nvs->list_tail) + nvs->list_tail->next = list; + if (!nvs->list_head) + nvs->list_head = list; + nvs->list_tail = list; + + nvs->inst_count++; +} + +static void +pass0_make_reg(nouveauShader *nvs, nvsRegister *reg, + nvsRegFile file, unsigned int index) +{ + struct pass0_rec *rec = nvs->pass_rec; + + /* defaults */ + *reg = nvr_unused; + /* -1 == quick-and-dirty temp alloc */ + if (file == NVS_FILE_TEMP && index == -1) { + index = rec->next_temp++; + assert(index < NVS_MAX_TEMPS); + } + reg->file = file; + reg->index = index; +} + +static void +pass0_make_swizzle(nvsSwzComp *swz, unsigned int mesa) +{ + int i; + + for (i=0;i<4;i++) + swz[i] = _tx_mesa_swizzle[GET_SWZ(mesa, i)]; +} + +static nvsOpcode +pass0_make_opcode(enum prog_opcode op) +{ + if (op > MAX_OPCODE) + return NVS_OP_UNKNOWN; + return _tx_mesa_opcode[op]; +} + +static nvsCond +pass0_make_condmask(GLuint mesa) +{ + if (mesa > COND_FL) + return NVS_COND_UNKNOWN; + return _tx_mesa_condmask[mesa]; +} + +static unsigned int +pass0_make_mask(GLuint mesa_mask) +{ + unsigned int mask = 0; + + if (mesa_mask & WRITEMASK_X) mask |= SMASK_X; + if (mesa_mask & WRITEMASK_Y) mask |= SMASK_Y; + if (mesa_mask & WRITEMASK_Z) mask |= SMASK_Z; + if (mesa_mask & WRITEMASK_W) mask |= SMASK_W; + + return mask; +} + +static nvsTexTarget +pass0_make_tex_target(GLuint mesa) +{ + switch (mesa) { + case TEXTURE_1D_INDEX: return NVS_TEX_TARGET_1D; + case TEXTURE_2D_INDEX: return NVS_TEX_TARGET_2D; + case TEXTURE_3D_INDEX: return NVS_TEX_TARGET_3D; + case TEXTURE_CUBE_INDEX: return NVS_TEX_TARGET_CUBE; + case TEXTURE_RECT_INDEX: return NVS_TEX_TARGET_RECT; + default: + return NVS_TEX_TARGET_UNKNOWN; + } +} + +static void +pass0_make_dst_reg(nvsPtr nvs, nvsRegister *reg, + struct prog_dst_register *dst) +{ + struct gl_program *mesa = (struct gl_program*)&nvs->mesa.vp; + nvsFixedReg sfr; + + switch (dst->File) { + case PROGRAM_OUTPUT: + if (mesa->Target == GL_VERTEX_PROGRAM_ARB) { + sfr = (dst->Index < VERT_RESULT_MAX) ? + _tx_mesa_vp_dst_reg[dst->Index] : NVS_FR_UNKNOWN; + } else { + sfr = (dst->Index < FRAG_RESULT_MAX) ? + _tx_mesa_fp_dst_reg[dst->Index] : NVS_FR_UNKNOWN; + } + pass0_make_reg(nvs, reg, NVS_FILE_RESULT, sfr); + break; + case PROGRAM_TEMPORARY: + pass0_make_reg(nvs, reg, NVS_FILE_TEMP, dst->Index); + break; + case PROGRAM_ADDRESS: + pass0_make_reg(nvs, reg, NVS_FILE_ADDRESS, dst->Index); + break; + default: + fprintf(stderr, "Unknown dest file %d\n", dst->File); + assert(0); + } +} + +static void +pass0_make_src_reg(nvsPtr nvs, nvsRegister *reg, struct prog_src_register *src) +{ + struct gl_program *mesa = (struct gl_program *)&nvs->mesa.vp.Base; + struct gl_program_parameter_list *p = mesa->Parameters; + + *reg = nvr_unused; + + switch (src->File) { + case PROGRAM_INPUT: + reg->file = NVS_FILE_ATTRIB; + if (mesa->Target == GL_VERTEX_PROGRAM_ARB) { + reg->index = (src->Index < VERT_ATTRIB_MAX) ? + _tx_mesa_vp_src_reg[src->Index] : NVS_FR_UNKNOWN; + } else { + reg->index = (src->Index < FRAG_ATTRIB_MAX) ? + _tx_mesa_fp_src_reg[src->Index] : NVS_FR_UNKNOWN; + } + break; + /* All const types seem to get shoved into here, not really sure why */ + case PROGRAM_STATE_VAR: + switch (p->Parameters[src->Index].Type) { + case PROGRAM_NAMED_PARAM: + case PROGRAM_CONSTANT: + nvs->params[src->Index].source_val = NULL; + COPY_4V(nvs->params[src->Index].val, p->ParameterValues[src->Index]); + break; + case PROGRAM_STATE_VAR: + nvs->params[src->Index].source_val = p->ParameterValues[src->Index]; + break; + default: + fprintf(stderr, "Unknown parameter type %d\n", + p->Parameters[src->Index].Type); + assert(0); + break; + } + + if (src->RelAddr) { + reg->indexed = 1; + reg->addr_reg = 0; + reg->addr_comp = NVS_SWZ_X; + } else + reg->indexed = 0; + reg->file = NVS_FILE_CONST; + reg->index = src->Index; + break; + case PROGRAM_TEMPORARY: + reg->file = NVS_FILE_TEMP; + reg->index = src->Index; + break; + default: + fprintf(stderr, "Unknown source type %d\n", src->File); + assert(0); + } + + /* per-component negate handled elsewhere */ + reg->negate = src->NegateBase != 0; + reg->abs = src->Abs; + pass0_make_swizzle(reg->swizzle, src->Swizzle); +} + +static nvsInstruction * +pass0_emit(nouveauShader *nvs, nvsOpcode op, nvsRegister dst, + unsigned int mask, int saturate, + nvsRegister src0, nvsRegister src1, nvsRegister src2) +{ + struct pass0_rec *rec = nvs->pass_rec; + nvsInstruction *sif = NULL; + + /* Seems mesa doesn't explicitly 0 this.. */ + if (nvs->mesa.vp.Base.Target == GL_VERTEX_PROGRAM_ARB) + saturate = 0; + + sif = calloc(1, sizeof(nvsInstruction)); + if (sif) { + sif->header.type = NVS_INSTRUCTION; + sif->header.position = rec->nvs_ipos++; + sif->op = op; + sif->saturate = saturate; + sif->dest = dst; + sif->mask = mask; + sif->src[0] = src0; + sif->src[1] = src1; + sif->src[2] = src2; + sif->cond = COND_TR; + sif->cond_reg = 0; + sif->cond_test = 0; + sif->cond_update = 0; + pass0_make_swizzle(sif->cond_swizzle, SWIZZLE_NOOP); + pass0_append_fragment(nvs, (nvsFragmentHeader *)sif); + } + + return sif; +} + +static void +pass0_fixup_swizzle(nvsPtr nvs, + struct prog_src_register *src, + unsigned int sm1, + unsigned int sm2) +{ + static const float sc[4] = { 1.0, 0.0, -1.0, 0.0 }; + struct pass0_rec *rec = nvs->pass_rec; + int fixup_1, fixup_2; + nvsRegister sr, dr = nvr_unused; + nvsRegister sm1const, sm2const; + + if (!rec->swzconst_done) { + struct gl_program *prog = &nvs->mesa.vp.Base; + rec->swzconst_id = _mesa_add_unnamed_constant(prog->Parameters, sc, 4); + rec->swzconst_done = 1; + COPY_4V(nvs->params[rec->swzconst_id].val, sc); + } + + fixup_1 = (sm1 != MAKE_SWIZZLE4(0,0,0,0) && sm2 != MAKE_SWIZZLE4(2,2,2,2)); + fixup_2 = (sm2 != MAKE_SWIZZLE4(2,2,2,2)); + + if (src->File != PROGRAM_TEMPORARY && src->File != PROGRAM_INPUT) { + /* We can't use more than one const in an instruction, so move the const + * into a temp, and swizzle from there. + *TODO: should just emit the swizzled const, instead of swizzling it + * in the shader.. would need to reswizzle any state params when they + * change however.. + */ + pass0_make_reg(nvs, &dr, NVS_FILE_TEMP, -1); + pass0_make_src_reg(nvs, &sr, src); + pass0_emit(nvs, NVS_OP_MOV, dr, SMASK_ALL, 0, sr, nvr_unused, nvr_unused); + pass0_make_reg(nvs, &sr, NVS_FILE_TEMP, dr.index); + } else { + if (fixup_1) + src->NegateBase = 0; + pass0_make_src_reg(nvs, &sr, src); + pass0_make_reg(nvs, &dr, NVS_FILE_TEMP, -1); + } + + pass0_make_reg(nvs, &sm1const, NVS_FILE_CONST, rec->swzconst_id); + pass0_make_swizzle(sm1const.swizzle, sm1); + if (fixup_1 && fixup_2) { + /* Any combination with SWIZZLE_ONE */ + pass0_make_reg(nvs, &sm2const, NVS_FILE_CONST, rec->swzconst_id); + pass0_make_swizzle(sm2const.swizzle, sm2); + pass0_emit(nvs, NVS_OP_MAD, dr, SMASK_ALL, 0, sr, sm1const, sm2const); + } else { + /* SWIZZLE_ZERO || arbitrary negate */ + pass0_emit(nvs, NVS_OP_MUL, dr, SMASK_ALL, 0, sr, sm1const, nvr_unused); + } + + src->File = PROGRAM_TEMPORARY; + src->Index = dr.index; + src->Swizzle = SWIZZLE_NOOP; +} + +#define SET_SWZ(fs, cp, c) fs = (fs & ~(0x7<<(cp*3))) | (c<<(cp*3)) +static void +pass0_check_sources(nvsPtr nvs, struct prog_instruction *inst) +{ + unsigned int insrc = -1, constsrc = -1; + int i; + + for (i=0;i<_mesa_num_inst_src_regs(inst->Opcode);i++) { + struct prog_src_register *src = &inst->SrcReg[i]; + unsigned int sm_1 = 0, sm_2 = 0; + nvsRegister sr, dr; + int do_mov = 0, c; + + /* Build up swizzle masks as if we were going to use + * "MAD new, src, const1, const2" to support arbitrary negation + * and SWIZZLE_ZERO/SWIZZLE_ONE. + */ + for (c=0;c<4;c++) { + if (GET_SWZ(src->Swizzle, c) == SWIZZLE_ZERO) { + SET_SWZ(sm_1, c, SWIZZLE_Y); /* 0.0 */ + SET_SWZ(sm_2, c, SWIZZLE_Y); + SET_SWZ(src->Swizzle, c, SWIZZLE_X); + } else if (GET_SWZ(src->Swizzle, c) == SWIZZLE_ONE) { + SET_SWZ(sm_1, c, SWIZZLE_Y); + if (src->NegateBase & (1<Swizzle, c, SWIZZLE_X); + } else { + if (src->NegateBase & (1<File) { + case PROGRAM_INPUT: + if (insrc != -1 && insrc != src->Index) + do_mov = 1; + else insrc = src->Index; + break; + case PROGRAM_STATE_VAR: + if (constsrc != -1 && constsrc != src->Index) + do_mov = 1; + else constsrc = src->Index; + break; + default: + break; + } + + /* Emit any extra ATTRIB/CONST to a temp, and modify the Mesa instruction + * to point at the temp. + */ + if (do_mov) { + pass0_make_src_reg(nvs, &sr, src); + pass0_make_reg(nvs, &dr, NVS_FILE_TEMP, -1); + pass0_emit(nvs, NVS_OP_MOV, dr, SMASK_ALL, 0, + sr, nvr_unused, nvr_unused); + + src->File = PROGRAM_TEMPORARY; + src->Index = dr.index; + src->Swizzle= SWIZZLE_NOOP; + } + } +} + +static GLboolean +pass0_emulate_instruction(nouveauShader *nvs, struct prog_instruction *inst) +{ + nvsFunc *shader = nvs->func; + nvsRegister src[3], dest, temp; + nvsInstruction *nvsinst; + unsigned int mask = pass0_make_mask(inst->DstReg.WriteMask); + int i, sat; + + sat = (inst->SaturateMode == SATURATE_ZERO_ONE); + + /* Build all the "real" regs for the instruction */ + for (i=0; i<_mesa_num_inst_src_regs(inst->Opcode); i++) + pass0_make_src_reg(nvs, &src[i], &inst->SrcReg[i]); + if (inst->Opcode != OPCODE_KIL) + pass0_make_dst_reg(nvs, &dest, &inst->DstReg); + + switch (inst->Opcode) { + case OPCODE_ABS: + if (shader->caps & SCAP_SRC_ABS) + pass0_emit(nvs, NVS_OP_MOV, dest, mask, sat, + nvsAbs(src[0]), nvr_unused, nvr_unused); + else + pass0_emit(nvs, NVS_OP_MAX, dest, mask, sat, + src[0], nvsNegate(src[0]), nvr_unused); + break; + case OPCODE_KIL: + /* This is only in ARB shaders, so we don't have to worry + * about clobbering a CC reg as they aren't supported anyway. + */ + /* MOVC0 temp, src */ + pass0_make_reg(nvs, &temp, NVS_FILE_TEMP, -1); + nvsinst = pass0_emit(nvs, NVS_OP_MOV, temp, SMASK_ALL, 0, + src[0], nvr_unused, nvr_unused); + nvsinst->cond_update = 1; + nvsinst->cond_reg = 0; + /* KIL_NV (LT0.xyzw) temp */ + nvsinst = pass0_emit(nvs, NVS_OP_KIL, nvr_unused, 0, 0, + nvr_unused, nvr_unused, nvr_unused); + nvsinst->cond = COND_LT; + nvsinst->cond_reg = 0; + nvsinst->cond_test = 1; + pass0_make_swizzle(nvsinst->cond_swizzle, MAKE_SWIZZLE4(0,1,2,3)); + break; + case OPCODE_LIT: + break; + case OPCODE_LRP: + pass0_make_reg(nvs, &temp, NVS_FILE_TEMP, -1); + pass0_emit(nvs, NVS_OP_MAD, temp, mask, 0, + nvsNegate(src[0]), src[2], src[2]); + pass0_emit(nvs, NVS_OP_MAD, dest, mask, sat, + src[0], src[1], temp); + break; + case OPCODE_POW: + if (shader->SupportsOpcode(shader, NVS_OP_LG2) && + shader->SupportsOpcode(shader, NVS_OP_EX2)) { + pass0_make_reg(nvs, &temp, NVS_FILE_TEMP, -1); + /* LG2 temp.x, src0.c */ + pass0_emit(nvs, NVS_OP_LG2, temp, SMASK_X, 0, + nvsSwizzle(src[0], X, X, X, X), + nvr_unused, + nvr_unused); + /* MUL temp.x, temp.x, src1.c */ + pass0_emit(nvs, NVS_OP_MUL, temp, SMASK_X, 0, + nvsSwizzle(temp, X, X, X, X), + nvsSwizzle(src[1], X, X, X, X), + nvr_unused); + /* EX2 dest, temp.x */ + pass0_emit(nvs, NVS_OP_EX2, dest, mask, sat, + nvsSwizzle(temp, X, X, X, X), + nvr_unused, + nvr_unused); + } else { + /* can we use EXP/LOG instead of EX2/LG2?? */ + fprintf(stderr, "Implement POW for NV20 vtxprog!\n"); + return GL_FALSE; + } + break; + case OPCODE_RSQ: + pass0_make_reg(nvs, &temp, NVS_FILE_TEMP, -1); + pass0_emit(nvs, NVS_OP_LG2, temp, SMASK_X, 0, + nvsAbs(nvsSwizzle(src[0], X, X, X, X)), nvr_unused, nvr_unused); + pass0_emit(nvs, NVS_OP_EX2, dest, mask, sat, + nvsSwizzle(temp, X, X, X, X), nvr_unused, nvr_unused); + break; + case OPCODE_SCS: + if (mask & SMASK_X) + pass0_emit(nvs, NVS_OP_COS, dest, SMASK_X, sat, + nvsSwizzle(src[0], X, X, X, X), + nvr_unused, + nvr_unused); + if (mask & SMASK_Y) + pass0_emit(nvs, NVS_OP_SIN, dest, SMASK_Y, sat, + nvsSwizzle(src[0], X, X, X, X), + nvr_unused, + nvr_unused); + break; + case OPCODE_SUB: + pass0_emit(nvs, NVS_OP_ADD, dest, mask, sat, + src[0], nvsNegate(src[1]), nvr_unused); + break; + case OPCODE_XPD: + pass0_make_reg(nvs, &temp, NVS_FILE_TEMP, -1); + pass0_emit(nvs, NVS_OP_MUL, temp, SMASK_ALL, 0, + nvsSwizzle(src[0], Z, X, Y, Y), + nvsSwizzle(src[1], Y, Z, X, X), + nvr_unused); + pass0_emit(nvs, NVS_OP_MAD, dest, (mask & ~SMASK_W), sat, + nvsSwizzle(src[0], Y, Z, X, X), + nvsSwizzle(src[1], Z, X, Y, Y), + nvsNegate(temp)); + break; + default: + fprintf(stderr, "hw doesn't support opcode \"%s\", and no emulation found\n", + _mesa_opcode_string(inst->Opcode)); + return GL_FALSE; + } + + return GL_TRUE; +} + +static GLboolean +pass0_translate_instructions(nouveauShader *nvs) +{ + struct gl_program *prog = (struct gl_program *)&nvs->mesa.vp; + struct pass0_rec *rec = nvs->pass_rec; + nvsFunc *shader = nvs->func; + int ipos; + + for (ipos=0; iposNumInstructions; ipos++) { + struct prog_instruction *inst = &prog->Instructions[ipos]; + + if (inst->Opcode == OPCODE_END) + break; + + /* Deal with multiple ATTRIB/PARAM in a single instruction */ + pass0_check_sources(nvs, inst); + + /* Now it's safe to do the prog_instruction->nvsInstruction conversion */ + if (shader->SupportsOpcode(shader, pass0_make_opcode(inst->Opcode))) { + nvsInstruction *nvsinst; + nvsRegister src[3], dest; + int i; + + for (i=0; i<_mesa_num_inst_src_regs(inst->Opcode); i++) + pass0_make_src_reg(nvs, &src[i], &inst->SrcReg[i]); + pass0_make_dst_reg(nvs, &dest, &inst->DstReg); + + nvsinst = pass0_emit(nvs, + pass0_make_opcode(inst->Opcode), + dest, + pass0_make_mask(inst->DstReg.WriteMask), + (inst->SaturateMode != SATURATE_OFF), + src[0], src[1], src[2]); + nvsinst->tex_unit = inst->TexSrcUnit; + nvsinst->tex_target = pass0_make_tex_target(inst->TexSrcTarget); + /* TODO when NV_fp/vp is implemented */ + nvsinst->cond = COND_TR; + } else { + if (!pass0_emulate_instruction(nvs, inst)) + return GL_FALSE; + } + } + + return GL_TRUE; +} + +GLboolean +nouveau_shader_pass0_arb(GLcontext *ctx, nouveauShader *nvs) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + struct gl_program *prog = (struct gl_program*)nvs; + struct gl_vertex_program *vp = (struct gl_vertex_program *)prog; + struct gl_fragment_program *fp = (struct gl_fragment_program *)prog; + struct pass0_rec *rec; + int ret; + + switch (prog->Target) { + case GL_VERTEX_PROGRAM_ARB: + nvs->func = &nmesa->VPfunc; + if (vp->IsPositionInvariant) + _mesa_insert_mvp_code(ctx, vp); +#if 0 + if (IS_FIXEDFUNCTION_PROG && CLIP_PLANES_USED) + pass0_insert_ff_clip_planes(); +#endif + break; + case GL_FRAGMENT_PROGRAM_ARB: + nvs->func = &nmesa->FPfunc; + if (fp->FogOption != GL_NONE) + _mesa_append_fog_code(ctx, fp); + break; + default: + fprintf(stderr, "Unknown program type %d", prog->Target); + return GL_FALSE; + } + + rec = calloc(1, sizeof(struct pass0_rec)); + rec->next_temp = prog->NumTemporaries; + nvs->pass_rec = rec; + + ret = pass0_translate_instructions(nvs); + if (!ret) { + /* DESTROY list */ + } + + free(nvs->pass_rec); + return ret; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_1.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_1.c new file mode 100644 index 0000000000..5de9017f58 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_1.c @@ -0,0 +1,318 @@ +/* + * Copyright (C) 2006 Ben Skeggs. + * + * 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 (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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +/* + * Authors: + * Ben Skeggs + */ + +#include "glheader.h" +#include "macros.h" +#include "enums.h" + +#include "nouveau_shader.h" + +#define PASS1_OK 0 +#define PASS1_KILL 1 +#define PASS1_FAIL 2 + +struct pass1_rec { + unsigned int temp[NVS_MAX_TEMPS]; + unsigned int result[NVS_MAX_ATTRIBS]; + unsigned int address[NVS_MAX_ADDRESS]; + unsigned int cc[2]; +}; + +static void +pass1_remove_fragment(nvsPtr nvs, nvsFragmentList *item) +{ + if (item->prev) item->prev->next = item->next; + if (item->next) item->next->prev = item->prev; + if (nvs->list_head == item) nvs->list_head = item->next; + if (nvs->list_tail == item) nvs->list_tail = item->prev; + + nvs->inst_count--; +} + +static int +pass1_result_needed(struct pass1_rec *rec, nvsInstruction *inst) +{ + if (inst->cond_update && rec->cc[inst->cond_reg]) + return 1; + /* Only write components that are read later */ + if (inst->dest.file == NVS_FILE_TEMP) + return (inst->mask & rec->temp[inst->dest.index]); + if (inst->dest.file == NVS_FILE_ADDRESS) + return (inst->mask & rec->address[inst->dest.index]); + /* No point writing result components that are written later */ + if (inst->dest.file == NVS_FILE_RESULT) + return (inst->mask & ~rec->result[inst->dest.index]); + assert(0); +} + +static void +pass1_track_result(struct pass1_rec *rec, nvsInstruction *inst) +{ + if (inst->cond_test) + rec->cc[inst->cond_reg] = 1; + if (inst->dest.file == NVS_FILE_TEMP) { + inst->mask &= rec->temp[inst->dest.index]; + } else if (inst->dest.file == NVS_FILE_RESULT) { + inst->mask &= ~rec->result[inst->dest.index]; + rec->result[inst->dest.index] |= inst->mask; + } else if (inst->dest.file == NVS_FILE_ADDRESS) { + inst->mask &= rec->address[inst->dest.index]; + } +} + +static void +pass1_track_source(nouveauShader *nvs, nvsInstruction *inst, int pos, + unsigned int read) +{ + struct pass1_rec *rec = nvs->pass_rec; + nvsRegister *src = &inst->src[pos]; + unsigned int really_read = 0; + int i,sc; + + /* Account for swizzling */ + for (i=0; i<4; i++) + if (read & (1<swizzle[i]); + + /* Track register reads */ + if (src->file == NVS_FILE_TEMP) { + if (nvs->temps[src->index].last_use == -1) + nvs->temps[src->index].last_use = inst->header.position; + rec->temp [src->index] |= really_read; + } else if (src->indexed) { + rec->address[src->addr_reg] |= (1<addr_comp); + } + + /* Modify swizzle to only access read components */ + /* Find a component that is used.. */ + for (sc=0;sc<4;sc++) + if (really_read & (1<swizzle[i] = sc; +} + +static int +pass1_check_instruction(nouveauShader *nvs, nvsInstruction *inst) +{ + struct pass1_rec *rec = nvs->pass_rec; + unsigned int read0, read1, read2; + + if (inst->op != NVS_OP_KIL) { + if (!pass1_result_needed(rec, inst)) + return PASS1_KILL; + } + pass1_track_result(rec, inst); + + read0 = read1 = read2 = 0; + + switch (inst->op) { + case NVS_OP_FLR: + case NVS_OP_FRC: + case NVS_OP_MOV: + case NVS_OP_SSG: + case NVS_OP_ARL: + read0 = inst->mask; + break; + case NVS_OP_ADD: + case NVS_OP_MAX: + case NVS_OP_MIN: + case NVS_OP_MUL: + case NVS_OP_SEQ: + case NVS_OP_SFL: + case NVS_OP_SGE: + case NVS_OP_SGT: + case NVS_OP_SLE: + case NVS_OP_SLT: + case NVS_OP_SNE: + case NVS_OP_STR: + case NVS_OP_SUB: + read0 = inst->mask; + read1 = inst->mask; + break; + case NVS_OP_CMP: + case NVS_OP_LRP: + case NVS_OP_MAD: + read0 = inst->mask; + read1 = inst->mask; + read2 = inst->mask; + break; + case NVS_OP_XPD: + if (inst->mask & SMASK_X) read0 |= SMASK_Y|SMASK_Z; + if (inst->mask & SMASK_Y) read0 |= SMASK_X|SMASK_Z; + if (inst->mask & SMASK_Z) read0 |= SMASK_X|SMASK_Y; + read1 = read0; + break; + case NVS_OP_COS: + case NVS_OP_EX2: + case NVS_OP_EXP: + case NVS_OP_LG2: + case NVS_OP_LOG: + case NVS_OP_RCC: + case NVS_OP_RCP: + case NVS_OP_RSQ: + case NVS_OP_SCS: + case NVS_OP_SIN: + read0 = SMASK_X; + break; + case NVS_OP_POW: + read0 = SMASK_X; + read1 = SMASK_X; + break; + case NVS_OP_DIV: + read0 = inst->mask; + read1 = SMASK_X; + break; + case NVS_OP_DP2: + read0 = SMASK_X|SMASK_Y; + read1 = SMASK_X|SMASK_Y; + break; + case NVS_OP_DP3: + case NVS_OP_RFL: + read0 = SMASK_X|SMASK_Y|SMASK_Z; + read1 = SMASK_X|SMASK_Y|SMASK_Z; + break; + case NVS_OP_DP4: + read0 = SMASK_ALL; + read1 = SMASK_ALL; + break; + case NVS_OP_DPH: + read0 = SMASK_X|SMASK_Y|SMASK_Z; + read1 = SMASK_ALL; + break; + case NVS_OP_DST: + if (inst->mask & SMASK_Y) read0 = read1 = SMASK_Y; + if (inst->mask & SMASK_Z) read0 |= SMASK_Z; + if (inst->mask & SMASK_W) read1 |= SMASK_W; + break; + case NVS_OP_NRM: + read0 = SMASK_X|SMASK_Y|SMASK_Z; + break; + case NVS_OP_PK2H: + case NVS_OP_PK2US: + read0 = SMASK_X|SMASK_Y; + break; + case NVS_OP_DDX: + case NVS_OP_DDY: + case NVS_OP_UP2H: + case NVS_OP_UP2US: + case NVS_OP_PK4B: + case NVS_OP_PK4UB: + case NVS_OP_UP4B: + case NVS_OP_UP4UB: + read0 = SMASK_ALL; + break; + case NVS_OP_X2D: + read1 = SMASK_X|SMASK_Y; + if (inst->mask & (SMASK_X|SMASK_Z)) { + read0 |= SMASK_X; + read2 |= SMASK_X|SMASK_Y; + } + if (inst->mask & (SMASK_Y|SMASK_W)) { + read0 |= SMASK_Y; + read2 |= SMASK_Z|SMASK_W; + } + break; + case NVS_OP_LIT: + read0 |= SMASK_X|SMASK_Y|SMASK_W; + break; + case NVS_OP_TEX: + case NVS_OP_TXP: + case NVS_OP_TXL: + case NVS_OP_TXB: + read0 = SMASK_ALL; + break; + case NVS_OP_TXD: + read0 = SMASK_ALL; + read1 = SMASK_ALL; + read2 = SMASK_ALL; + break; + case NVS_OP_KIL: + break; + default: + fprintf(stderr, "Unknown sop=%d", inst->op); + return PASS1_FAIL; + } + + /* Any values that are written by this inst can't have been read further up */ + if (inst->dest.file == NVS_FILE_TEMP) + rec->temp[inst->dest.index] &= ~inst->mask; + + if (read0) pass1_track_source(nvs, inst, 0, read0); + if (read1) pass1_track_source(nvs, inst, 1, read1); + if (read2) pass1_track_source(nvs, inst, 2, read2); + + return PASS1_OK; +} + +/* Some basic dead code elimination + * - Remove unused instructions + * - Don't write unused register components + * - Modify swizzles to not reference unneeded components. + */ +GLboolean +nouveau_shader_pass1(nvsPtr nvs) +{ + nvsFragmentList *list = nvs->list_tail; + int i; + + for (i=0; itemps[i].last_use = -1; + + nvs->pass_rec = calloc(1, sizeof(struct pass1_rec)); + + while (list) { + assert(list->fragment->type == NVS_INSTRUCTION); + + switch(pass1_check_instruction(nvs, (nvsInstruction *)list->fragment)) { + case PASS1_OK: + break; + case PASS1_KILL: + pass1_remove_fragment(nvs, list); + break; + case PASS1_FAIL: + default: + free(nvs->pass_rec); + nvs->pass_rec = NULL; + return GL_FALSE; + } + + list = list->prev; + } + + free(nvs->pass_rec); + nvs->pass_rec = NULL; + + return GL_TRUE; +} + + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c new file mode 100644 index 0000000000..1f09b6d453 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2006 Ben Skeggs. + * + * 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 (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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +/* + * Authors: + * Ben Skeggs + */ + +#include "glheader.h" +#include "macros.h" +#include "enums.h" + +#include "nouveau_shader.h" + +struct pass2_rec { + /* Map nvsRegister temp ID onto hw temp ID */ + unsigned int temps[NVS_MAX_TEMPS]; + /* Track free hw registers */ + unsigned int hw_temps[NVS_MAX_TEMPS]; +}; + +static int +pass2_alloc_hw_temp(nvsPtr nvs) +{ + struct pass2_rec *rec = nvs->pass_rec; + int i; + + for (i=0; ifunc->MaxTemp; i++) { + /* This is a *horrible* hack.. R0 is both temp0 and result.color + * in NV30/40 fragprogs, we can use R0 as a temp before result is + * written however.. + */ + if (nvs->mesa.vp.Base.Target == GL_FRAGMENT_PROGRAM_ARB && i==0) + continue; + + if (rec->hw_temps[i] == 0) { + rec->hw_temps[i] = 1; + return i; + } + } + return -1; +} + +static void +pass2_free_hw_temp(nvsPtr nvs, int reg) +{ + struct pass2_rec *rec = nvs->pass_rec; + rec->hw_temps[reg] = 0; +} + +static nvsRegister +pass2_mangle_reg(nvsPtr nvs, nvsInstruction *inst, nvsRegister reg) +{ + struct pass2_rec *rec = nvs->pass_rec; + + if (reg.file == NVS_FILE_TEMP) { + int hwidx; + + if (rec->temps[reg.index] == -1) + rec->temps[reg.index] = pass2_alloc_hw_temp(nvs); + hwidx = rec->temps[reg.index]; + + if (nvs->temps[reg.index].last_use <= inst->header.position) + pass2_free_hw_temp(nvs, hwidx); + + reg.index = hwidx; + } + + return reg; +} + +static void +pass2_add_instruction(nvsPtr nvs, nvsInstruction *inst, + struct _op_xlat *op, int slot) +{ + nvsSwzComp default_swz[4] = { NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W }; + nvsFunc *shader = nvs->func; + nvsRegister reg; + int i, srcpos_used = ~7; + + shader->SetOpcode(shader, op->NV, slot); + if (inst->saturate ) shader->SetSaturate(shader); + if (inst->cond_update) shader->SetCCUpdate(shader); + if (inst->cond_test ) shader->SetCondition(shader, 1, inst->cond, + inst->cond_reg, + inst->cond_swizzle); + else shader->SetCondition(shader, 0, NVS_COND_TR, + 0, + default_swz); + switch (inst->op) { + case NVS_OP_TEX: + case NVS_OP_TXB: + case NVS_OP_TXL: + case NVS_OP_TXP: + case NVS_OP_TXD: + shader->SetTexImageUnit(shader, inst->tex_unit); + break; + default: + break; + } + + for (i = 0; i < 3; i++) { + if (op->srcpos[i] != -1) { + reg = pass2_mangle_reg(nvs, inst, inst->src[i]); + if (reg.file == NVS_FILE_ATTRIB) + nvs->inputs_read |= (1 << reg.index); + shader->SetSource(shader, ®, op->srcpos[i]); + srcpos_used |= (1<srcpos[i]); + if (reg.file == NVS_FILE_CONST && shader->GetSourceConstVal) + nvs->params[reg.index].hw_index = nvs->program_current + 4; + } + } + for (i = 0; i < 3; i++) { + if (!(srcpos_used & (1<SetUnusedSource(shader, i); + } + + reg = pass2_mangle_reg(nvs, inst, inst->dest); + if (reg.file == NVS_FILE_RESULT) + nvs->outputs_written |= (1 << reg.index); + shader->SetResult(shader, ®, inst->mask, slot); +} + +static int +pass2_assemble_instruction(nvsPtr nvs, nvsInstruction *inst, int last) +{ + nvsFunc *shader = nvs->func; + struct _op_xlat *op, *op2; + unsigned int hw_inst[8] = {0,0,0,0,0,0,0,0,0}; + int slot, slot2; + int instsz; + int i; + + shader->inst = hw_inst; + + /* Assemble this instruction */ + if (!(op = shader->GetOPTXFromSOP(inst->op, &slot))) + return 0; + pass2_add_instruction(nvs, inst, op, slot); + if (last) + shader->SetLastInst(shader); + + instsz = shader->GetOffsetNext(nvs->func); + if (nvs->program_size + instsz >= nvs->program_alloc_size) { + nvs->program_alloc_size *= 2; + nvs->program = realloc(nvs->program, + nvs->program_alloc_size * sizeof(uint32_t)); + } + + for (i=0; iprogram[nvs->program_current++] = hw_inst[i]; + nvs->program_size = nvs->program_current; + return 1; +} + +/* Translate program into hardware format */ +GLboolean +nouveau_shader_pass2(nvsPtr nvs) +{ + nvsFragmentList *list = nvs->list_head; + struct pass2_rec *rec; + int i; + + rec = calloc(1, sizeof(struct pass2_rec)); + for (i=0; itemps[i] = -1; + nvs->pass_rec = rec; + + /* Start off with allocating 4 uint32_t's for each inst, will be grown + * if necessary.. + */ + nvs->program_alloc_size = nvs->inst_count * 4; + nvs->program = calloc(nvs->program_alloc_size, sizeof(uint32_t)); + nvs->program_size = 0; + nvs->program_current = 0; + + while (list) { + assert(list->fragment->type == NVS_INSTRUCTION); + + if (!pass2_assemble_instruction(nvs, (nvsInstruction *)list->fragment, list->next ? 0 : 1)) { + free(nvs->program); + nvs->program = NULL; + return GL_FALSE; + } + + list = list->next; + } + + /* Shrink allocated memory to only what we need */ + nvs->program = realloc(nvs->program, nvs->program_size * sizeof(uint32_t)); + nvs->program_alloc_size = nvs->program_size; + + nvs->translated = 1; + nvs->on_hardware = 0; + +#if 1 + fflush(stdout); fflush(stderr); + fprintf(stderr, "----------------MESA PROGRAM\n"); + fflush(stdout); fflush(stderr); + _mesa_print_program(&nvs->mesa.vp.Base); + fflush(stdout); fflush(stderr); + fprintf(stderr, "^^^^^^^^^^^^^^^^MESA PROGRAM\n"); + fflush(stdout); fflush(stderr); + fprintf(stderr, "----------------NV40 PROGRAM\n"); + fflush(stdout); fflush(stderr); + nvsDisasmHWShader(nvs); + fflush(stdout); fflush(stderr); + fprintf(stderr, "^^^^^^^^^^^^^^^^NV40 PROGRAM\n"); + fflush(stdout); fflush(stderr); +#endif + + return GL_TRUE; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h index f8fd0cea50..37f04f41bd 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h @@ -37,6 +37,7 @@ extern void nv20InitStateFuncs(struct dd_function_table *func); extern void nv30InitStateFuncs(struct dd_function_table *func); extern void nouveauInitState(GLcontext *ctx); + /* extern void nouveauDDUpdateState(GLcontext *ctx); extern void nouveauDDUpdateHWState(GLcontext *ctx); diff --git a/src/mesa/drivers/dri/nouveau/nv20_shader.h b/src/mesa/drivers/dri/nouveau/nv20_shader.h new file mode 100644 index 0000000000..7d2e29db66 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv20_shader.h @@ -0,0 +1,121 @@ +/* NV20_TCL_PRIMITIVE_3D_0x0B00 */ +#define NV20_VP_INST_0B00 0x00000000 /* always 0? */ +#define NV20_VP_INST0_KNOWN 0 + +/* NV20_TCL_PRIMITIVE_3D_0x0B04 */ +#define NV20_VP_INST_SCA_OPCODE_SHIFT 25 +#define NV20_VP_INST_SCA_OPCODE_MASK (0x0F << 25) +#define NV20_VP_INST_OPCODE_RCP 0x2 +#define NV20_VP_INST_OPCODE_RCC 0x3 +#define NV20_VP_INST_OPCODE_RSQ 0x4 +#define NV20_VP_INST_OPCODE_EXP 0x5 +#define NV20_VP_INST_OPCODE_LOG 0x6 +#define NV20_VP_INST_OPCODE_LIT 0x7 +#define NV20_VP_INST_VEC_OPCODE_SHIFT 21 +#define NV20_VP_INST_VEC_OPCODE_MASK (0x0F << 21) +#define NV20_VP_INST_OPCODE_NOP 0x0 /* guess */ +#define NV20_VP_INST_OPCODE_MOV 0x1 +#define NV20_VP_INST_OPCODE_MUL 0x2 +#define NV20_VP_INST_OPCODE_ADD 0x3 +#define NV20_VP_INST_OPCODE_MAD 0x4 +#define NV20_VP_INST_OPCODE_DP3 0x5 +#define NV20_VP_INST_OPCODE_DPH 0x6 +#define NV20_VP_INST_OPCODE_DP4 0x7 +#define NV20_VP_INST_OPCODE_DST 0x8 +#define NV20_VP_INST_OPCODE_MIN 0x9 +#define NV20_VP_INST_OPCODE_MAX 0xA +#define NV20_VP_INST_OPCODE_SLT 0xB +#define NV20_VP_INST_OPCODE_SGE 0xC +#define NV20_VP_INST_OPCODE_ARL 0xD +#define NV20_VP_INST_CONST_SRC_SHIFT 13 +#define NV20_VP_INST_CONST_SRC_MASK (0xFF << 13) +#define NV20_VP_INST_INPUT_SRC_SHIFT 9 +#define NV20_VP_INST_INPUT_SRC_MASK (0xF << 9) /* guess */ +#define NV20_VP_INST_INPUT_SRC_POS 0 +#define NV20_VP_INST_INPUT_SRC_COL0 3 +#define NV20_VP_INST_INPUT_SRC_COL1 4 +#define NV20_VP_INST_INPUT_SRC_TC(n) (9+n) +#define NV20_VP_INST_SRC0H_SHIFT 0 +#define NV20_VP_INST_SRC0H_MASK (0x1FF << 0) +#define NV20_VP_INST1_KNOWN ( \ + NV20_VP_INST_OPCODE_MASK | \ + NV20_VP_INST_CONST_SRC_MASK | \ + NV20_VP_INST_INPUT_SRC_MASK | \ + NV20_VP_INST_SRC0H_MASK \ + ) + +/* NV20_TCL_PRIMITIVE_3D_0x0B08 */ +#define NV20_VP_INST_SRC0L_SHIFT 26 +#define NV20_VP_INST_SRC0L_MASK (0x3F <<26) +#define NV20_VP_INST_SRC1_SHIFT 11 +#define NV20_VP_INST_SRC1_MASK (0x7FFF<<11) +#define NV20_VP_INST_SRC2H_SHIFT 0 +#define NV20_VP_INST_SRC2H_MASK (0x7FF << 0) + +/* NV20_TCL_PRIMITIVE_3D_0x0B0C */ +#define NV20_VP_INST_SRC2L_SHIFT 28 +#define NV20_VP_INST_SRC2L_MASK (0x0F <<28) +#define NV20_VP_INST_VTEMP_WRITEMASK_SHIFT 24 +#define NV20_VP_INST_VTEMP_WRITEMASK_MASK (0x0F <<24) +# define NV20_VP_INST_TEMP_WRITEMASK_X (1<<27) +# define NV20_VP_INST_TEMP_WRITEMASK_Y (1<<26) +# define NV20_VP_INST_TEMP_WRITEMASK_Z (1<<25) +# define NV20_VP_INST_TEMP_WRITEMASK_W (1<<24) +#define NV20_VP_INST_DEST_TEMP_ID_SHIFT 20 +#define NV20_VP_INST_DEST_TEMP_ID_MASK (0x0F <<20) +#define NV20_VP_INST_STEMP_WRITEMASK_SHIFT 16 +#define NV20_VP_INST_STEMP_WRITEMASK_MASK (0x0F <<16) +# define NV20_VP_INST_STEMP_WRITEMASK_X (1<<19) +# define NV20_VP_INST_STEMP_WRITEMASK_Y (1<<18) +# define NV20_VP_INST_STEMP_WRITEMASK_Z (1<<17) +# define NV20_VP_INST_STEMP_WRITEMASK_W (1<<16) +#define NV20_VP_INST_DEST_WRITEMASK_SHIFT 12 +#define NV20_VP_INST_DEST_WRITEMASK_MASK (0x0F <<12) +# define NV20_VP_INST_DEST_WRITEMASK_X (1<<15) +# define NV20_VP_INST_DEST_WRITEMASK_Y (1<<14) +# define NV20_VP_INST_DEST_WRITEMASK_Z (1<<13) +# define NV20_VP_INST_DEST_WRITEMASK_W (1<<12) +#define NV20_VP_INST_DEST_SHIFT 3 +#define NV20_VP_INST_DEST_MASK (0xF << 3) /* guess */ +#define NV20_VP_INST_DEST_POS 0 +#define NV20_VP_INST_DEST_COL0 3 +#define NV20_VP_INST_DEST_COL1 4 +#define NV20_VP_INST_DEST_TC(n) (9+n) +#define NV20_VP_INST_INDEX_CONST (1<<1) +#define NV20_VP_INST3_KNOWN ( \ + NV20_VP_INST_SRC2L_MASK | \ + NV20_VP_INST_TEMP_WRITEMASK_MASK | \ + NV20_VP_INST_DEST_TEMP_ID_MASK | \ + NV20_VP_INST_STEMP_WRITEMASK_MASK | \ + NV20_VP_INST_DEST_WRITEMASK_MASK | \ + NV20_VP_INST_DEST_MASK | \ + NV20_VP_INST_INDEX_CONST \ + ) + +/* Useful to split the source selection regs into their pieces */ +#define NV20_VP_SRC0_HIGH_SHIFT 6 +#define NV20_VP_SRC0_HIGH_MASK 0x00007FC0 +#define NV20_VP_SRC0_LOW_MASK 0x0000003F +#define NV20_VP_SRC2_HIGH_SHIFT 4 +#define NV20_VP_SRC2_HIGH_MASK 0x00007FF0 +#define NV20_VP_SRC2_LOW_MASK 0x0000000F + +#define NV20_VP_SRC_REG_NEGATE (1<<14) +#define NV20_VP_SRC_REG_SWZ_X_SHIFT 12 +#define NV20_VP_SRC_REG_SWZ_X_MASK (0x03 <<12) +#define NV20_VP_SRC_REG_SWZ_Y_SHIFT 10 +#define NV20_VP_SRC_REG_SWZ_Y_MASK (0x03 <<10) +#define NV20_VP_SRC_REG_SWZ_Z_SHIFT 8 +#define NV20_VP_SRC_REG_SWZ_Z_MASK (0x03 << 8) +#define NV20_VP_SRC_REG_SWZ_W_SHIFT 6 +#define NV20_VP_SRC_REG_SWZ_W_MASK (0x03 << 6) +#define NV20_VP_SRC_REG_SWZ_ALL_SHIFT 6 +#define NV20_VP_SRC_REG_SWZ_ALL_MASK (0xFF << 6) +#define NV20_VP_SRC_REG_TEMP_ID_SHIFT 2 +#define NV20_VP_SRC_REG_TEMP_ID_MASK (0x0F << 0) +#define NV20_VP_SRC_REG_TYPE_SHIFT 0 +#define NV20_VP_SRC_REG_TYPE_MASK (0x03 << 0) +#define NV20_VP_SRC_REG_TYPE_TEMP 1 +#define NV20_VP_SRC_REG_TYPE_INPUT 2 +#define NV20_VP_SRC_REG_TYPE_CONST 3 /* guess */ + diff --git a/src/mesa/drivers/dri/nouveau/nv20_vertprog.c b/src/mesa/drivers/dri/nouveau/nv20_vertprog.c new file mode 100644 index 0000000000..60cfcd7056 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv20_vertprog.c @@ -0,0 +1,447 @@ +#include "nouveau_context.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" + +#include "nouveau_shader.h" +#include "nv20_shader.h" + +unsigned int NVVP_TX_VOP_COUNT = 16; +unsigned int NVVP_TX_NVS_OP_COUNT = 16; +struct _op_xlat NVVP_TX_VOP[32]; +struct _op_xlat NVVP_TX_SOP[32]; + +nvsSwzComp NV20VP_TX_SWIZZLE[4] = { NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W }; + +/***************************************************************************** + * Support routines + */ +static void +NV20VPUploadToHW(GLcontext *ctx, nouveauShader *nvs) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + int i; + + /* XXX: missing a way to say what insn we're uploading from, and possible + * the program start position (if NV20 has one) */ + for (i=0; iprogram_size; i+=4) { + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST0, 4); + OUT_RING(nvs->program[i + 0]); + OUT_RING(nvs->program[i + 1]); + OUT_RING(nvs->program[i + 2]); + OUT_RING(nvs->program[i + 3]); + } +} + +static void +NV20VPUpdateConst(GLcontext *ctx, nouveauShader *nvs, int id) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + /* Worth checking if the value *actually* changed? Mesa doesn't tell us this + * as far as I know.. + */ + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_ID, 1); + OUT_RING (id); + BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_X, 4); + OUT_RINGf(nvs->params[id].source_val[0]); + OUT_RINGf(nvs->params[id].source_val[1]); + OUT_RINGf(nvs->params[id].source_val[2]); + OUT_RINGf(nvs->params[id].source_val[3]); +} + +/***************************************************************************** + * Assembly routines + */ + +/***************************************************************************** + * Disassembly routines + */ +void +NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz) +{ + swz[NVS_SWZ_X] = NV20VP_TX_SWIZZLE[(hwswz & 0xC0) >> 6]; + swz[NVS_SWZ_Y] = NV20VP_TX_SWIZZLE[(hwswz & 0x30) >> 4]; + swz[NVS_SWZ_Z] = NV20VP_TX_SWIZZLE[(hwswz & 0x0C) >> 2]; + swz[NVS_SWZ_W] = NV20VP_TX_SWIZZLE[(hwswz & 0x03) >> 0]; +} + +static int +NV20VPHasMergedInst(nvsFunc * shader) +{ + if (shader->GetOpcodeHW(shader, 0) != NV20_VP_INST_OPCODE_NOP && + shader->GetOpcodeHW(shader, 1) != NV20_VP_INST_OPCODE_NOP) + printf + ("\n\n*****both opcode fields have values - PLEASE REPORT*****\n"); + return 0; +} + +static int +NV20VPIsLastInst(nvsFunc * shader) +{ + return ((shader->inst[3] & (1 << 0)) ? 1 : 0); +} + +static int +NV20VPGetOffsetNext(nvsFunc * shader) +{ + return 4; +} + +static struct _op_xlat * +NV20VPGetOPTXRec(nvsFunc * shader, int merged) +{ + struct _op_xlat *opr; + int op; + + if (shader->GetOpcodeSlot(shader, merged)) { + opr = NVVP_TX_SOP; + op = shader->GetOpcodeHW(shader, 1); + if (op >= NVVP_TX_NVS_OP_COUNT) + return NULL; + } + else { + opr = NVVP_TX_VOP; + op = shader->GetOpcodeHW(shader, 0); + if (op >= NVVP_TX_VOP_COUNT) + return NULL; + } + + if (opr[op].SOP == NVS_OP_UNKNOWN) + return NULL; + return &opr[op]; +} + +static struct _op_xlat * +NV20VPGetOPTXFromSOP(nvsOpcode sop, int *id) +{ + int i; + + for (i=0;iHasMergedInst(shader)) + return merged; + if (shader->GetOpcodeHW(shader, 0) == NV20_VP_INST_OPCODE_NOP) + return 1; + return 0; +} + +static nvsOpcode +NV20VPGetOpcode(nvsFunc * shader, int merged) +{ + struct _op_xlat *opr; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr) + return NVS_OP_UNKNOWN; + + return opr->SOP; +} + +static nvsOpcode +NV20VPGetOpcodeHW(nvsFunc * shader, int slot) +{ + if (slot) + return (shader->inst[1] & NV20_VP_INST_SCA_OPCODE_MASK) + >> NV20_VP_INST_SCA_OPCODE_SHIFT; + return (shader->inst[1] & NV20_VP_INST_VEC_OPCODE_MASK) + >> NV20_VP_INST_VEC_OPCODE_SHIFT; +} + +static nvsRegFile +NV20VPGetDestFile(nvsFunc * shader, int merged) +{ + switch (shader->GetOpcode(shader, merged)) { + case NVS_OP_ARL: + return NVS_FILE_ADDRESS; + default: + /*FIXME: This probably isn't correct.. */ + if ((shader->inst[3] & NV20_VP_INST_DEST_WRITEMASK_MASK) == 0) + return NVS_FILE_TEMP; + return NVS_FILE_RESULT; + } +} + +static unsigned int +NV20VPGetDestID(nvsFunc * shader, int merged) +{ + int id; + + switch (shader->GetDestFile(shader, merged)) { + case NVS_FILE_RESULT: + id = ((shader->inst[3] & NV20_VP_INST_DEST_MASK) + >> NV20_VP_INST_DEST_SHIFT); + switch (id) { + case NV20_VP_INST_DEST_POS : return NVS_FR_POSITION; + case NV20_VP_INST_DEST_COL0 : return NVS_FR_COL0; + case NV20_VP_INST_DEST_COL1 : return NVS_FR_COL1; + case NV20_VP_INST_DEST_TC(0): return NVS_FR_TEXCOORD0; + case NV20_VP_INST_DEST_TC(1): return NVS_FR_TEXCOORD1; + case NV20_VP_INST_DEST_TC(2): return NVS_FR_TEXCOORD2; + case NV20_VP_INST_DEST_TC(3): return NVS_FR_TEXCOORD3; + default: + return -1; + } + case NVS_FILE_ADDRESS: + return 0; + case NVS_FILE_TEMP: + id = ((shader->inst[3] & NV20_VP_INST_DEST_TEMP_ID_MASK) + >> NV20_VP_INST_DEST_TEMP_ID_SHIFT); + return id; + default: + return -1; + } +} + +static unsigned int +NV20VPGetDestMask(nvsFunc * shader, int merged) +{ + int hwmask, mask = 0; + + /* Special handling for ARL - hardware only supports a + * 1-component address reg + */ + if (shader->GetOpcode(shader, merged) == NVS_OP_ARL) + return SMASK_X; + + if (shader->GetDestFile(shader, merged) == NVS_FILE_RESULT) + hwmask = (shader->inst[3] & NV20_VP_INST_DEST_WRITEMASK_MASK) + >> NV20_VP_INST_DEST_WRITEMASK_SHIFT; + else if (shader->GetOpcodeSlot(shader, merged)) + hwmask = (shader->inst[3] & NV20_VP_INST_STEMP_WRITEMASK_MASK) + >> NV20_VP_INST_STEMP_WRITEMASK_SHIFT; + else + hwmask = (shader->inst[3] & NV20_VP_INST_VTEMP_WRITEMASK_MASK) + >> NV20_VP_INST_VTEMP_WRITEMASK_SHIFT; + + if (hwmask & (1 << 3)) mask |= SMASK_X; + if (hwmask & (1 << 2)) mask |= SMASK_Y; + if (hwmask & (1 << 1)) mask |= SMASK_Z; + if (hwmask & (1 << 0)) mask |= SMASK_W; + + return mask; +} + +static unsigned int +NV20VPGetSourceHW(nvsFunc * shader, int merged, int pos) +{ + struct _op_xlat *opr; + unsigned int src; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr) + return -1; + + switch (opr->srcpos[pos]) { + case 0: + src = ((shader->inst[1] & NV20_VP_INST_SRC0H_MASK) + >> NV20_VP_INST_SRC0H_SHIFT) + << NV20_VP_SRC0_HIGH_SHIFT; + src |= ((shader->inst[2] & NV20_VP_INST_SRC0L_MASK) + >> NV20_VP_INST_SRC0L_SHIFT); + break; + case 1: + src = ((shader->inst[2] & NV20_VP_INST_SRC1_MASK) + >> NV20_VP_INST_SRC1_SHIFT); + break; + case 2: + src = ((shader->inst[2] & NV20_VP_INST_SRC2H_MASK) + >> NV20_VP_INST_SRC2H_SHIFT) + << NV20_VP_SRC2_HIGH_SHIFT; + src |= ((shader->inst[3] & NV20_VP_INST_SRC2L_MASK) + >> NV20_VP_INST_SRC2L_SHIFT); + break; + default: + src = -1; + } + + return src; +} + +static nvsRegFile +NV20VPGetSourceFile(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + struct _op_xlat *opr; + int file; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr || opr->srcpos[pos] == -1) + return -1; + + switch (opr->srcpos[pos]) { + case SPOS_ADDRESS: + return NVS_FILE_ADDRESS; + default: + src = NV20VPGetSourceHW(shader, merged, pos); + file = (src & NV20_VP_SRC_REG_TYPE_MASK) >> NV20_VP_SRC_REG_TYPE_SHIFT; + + switch (file) { + case NV20_VP_SRC_REG_TYPE_TEMP : return NVS_FILE_TEMP; + case NV20_VP_SRC_REG_TYPE_INPUT: return NVS_FILE_ATTRIB; + case NV20_VP_SRC_REG_TYPE_CONST: return NVS_FILE_CONST; + default: + return NVS_FILE_UNKNOWN; + } + } +} + +static int +NV20VPGetSourceID(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_TEMP: + src = shader->GetSourceHW(shader, merged, pos); + return ((src & NV20_VP_SRC_REG_TEMP_ID_MASK) >> + NV20_VP_SRC_REG_TEMP_ID_SHIFT); + case NVS_FILE_CONST: + return ((shader->inst[1] & NV20_VP_INST_CONST_SRC_MASK) + >> NV20_VP_INST_CONST_SRC_SHIFT); + case NVS_FILE_ATTRIB: + src = ((shader->inst[1] & NV20_VP_INST_INPUT_SRC_MASK) + >> NV20_VP_INST_INPUT_SRC_SHIFT); + switch (src) { + case NV20_VP_INST_INPUT_SRC_POS : return NVS_FR_POSITION; + case NV20_VP_INST_INPUT_SRC_COL0 : return NVS_FR_COL0; + case NV20_VP_INST_INPUT_SRC_COL1 : return NVS_FR_COL1; + case NV20_VP_INST_INPUT_SRC_TC(0): return NVS_FR_TEXCOORD0; + case NV20_VP_INST_INPUT_SRC_TC(1): return NVS_FR_TEXCOORD1; + case NV20_VP_INST_INPUT_SRC_TC(2): return NVS_FR_TEXCOORD2; + case NV20_VP_INST_INPUT_SRC_TC(3): return NVS_FR_TEXCOORD3; + default: + return NVS_FR_UNKNOWN; + } + default: + return -1; + } +} + +static int +NV20VPGetSourceNegate(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + + src = shader->GetSourceHW(shader, merged, pos); + + return ((src & NV20_VP_SRC_REG_NEGATE) ? 1 : 0); +} + +static int +NV20VPGetSourceAbs(nvsFunc * shader, int merged, int pos) +{ + /* NV20 can't do ABS on sources? Appears to be emulated with + * MAX reg, reg, -reg + */ + return 0; +} + +static void +NV20VPGetSourceSwizzle(nvsFunc * shader, int merged, int pos, nvsSwzComp *swz) +{ + unsigned int src; + int swzbits; + + src = shader->GetSourceHW(shader, merged, pos); + swzbits = + (src & NV20_VP_SRC_REG_SWZ_ALL_MASK) >> NV20_VP_SRC_REG_SWZ_ALL_SHIFT; + return NV20VPTXSwizzle(swzbits, swz); +} + +static int +NV20VPGetSourceIndexed(nvsFunc * shader, int merged, int pos) +{ + /* I don't think NV20 can index into attribs, at least no GL + * extension is exposed that will allow it. + */ + if (shader->GetSourceFile(shader, merged, pos) != NVS_FILE_CONST) + return 0; + if (shader->inst[3] & NV20_VP_INST_INDEX_CONST) + return 1; + return 0; +} + +static int +NV20VPGetAddressRegID(nvsFunc * shader) +{ + /* Only 1 address reg */ + return 0; +} + +static nvsSwzComp +NV20VPGetAddressRegSwizzle(nvsFunc * shader) +{ + /* Only A0.x available */ + return NVS_SWZ_X; +} + +void +NV20VPInitShaderFuncs(nvsFunc * shader) +{ + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_NOP, NVS_OP_NOP, -1, -1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_MOV, NVS_OP_MOV, 0, -1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_MUL, NVS_OP_MUL, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_ADD, NVS_OP_ADD, 0, 2, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_MAD, NVS_OP_MAD, 0, 1, 2); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_DP3, NVS_OP_DP3, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_DPH, NVS_OP_DPH, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_DP4, NVS_OP_DP4, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_DST, NVS_OP_DST, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_MIN, NVS_OP_MIN, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_MAX, NVS_OP_MAX, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_SLT, NVS_OP_SLT, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_SGE, NVS_OP_SGE, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV20_VP_INST_OPCODE_ARL, NVS_OP_ARL, 0, -1, -1); + + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_NOP, NVS_OP_NOP, -1, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_RCP, NVS_OP_RCP, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_RCC, NVS_OP_RCC, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_RSQ, NVS_OP_RSQ, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_EXP, NVS_OP_EXP, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_LOG, NVS_OP_LOG, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV20_VP_INST_OPCODE_LIT, NVS_OP_LIT, 2, -1, -1); + + shader->UploadToHW = NV20VPUploadToHW; + shader->UpdateConst = NV20VPUpdateConst; + + shader->GetOPTXRec = NV20VPGetOPTXRec; + shader->GetOPTXFromSOP = NV20VPGetOPTXFromSOP; + + shader->HasMergedInst = NV20VPHasMergedInst; + shader->IsLastInst = NV20VPIsLastInst; + shader->GetOffsetNext = NV20VPGetOffsetNext; + shader->GetOpcodeSlot = NV20VPGetOpcodeSlot; + shader->GetOpcode = NV20VPGetOpcode; + shader->GetOpcodeHW = NV20VPGetOpcodeHW; + shader->GetDestFile = NV20VPGetDestFile; + shader->GetDestID = NV20VPGetDestID; + shader->GetDestMask = NV20VPGetDestMask; + shader->GetSourceHW = NV20VPGetSourceHW; + shader->GetSourceFile = NV20VPGetSourceFile; + shader->GetSourceID = NV20VPGetSourceID; + shader->GetSourceNegate = NV20VPGetSourceNegate; + shader->GetSourceAbs = NV20VPGetSourceAbs; + shader->GetSourceSwizzle = NV20VPGetSourceSwizzle; + shader->GetSourceIndexed = NV20VPGetSourceIndexed; + shader->GetRelAddressRegID = NV20VPGetAddressRegID; + shader->GetRelAddressSwizzle = NV20VPGetAddressRegSwizzle; +} diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c new file mode 100644 index 0000000000..2e35d08c07 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c @@ -0,0 +1,707 @@ +#include + +#include "glheader.h" +#include "macros.h" + +#include "nouveau_context.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" +#include "nouveau_drm.h" +#include "nouveau_shader.h" +#include "nouveau_object.h" +#include "nouveau_msg.h" +#include "nv30_shader.h" + +unsigned int NVFP_TX_AOP_COUNT = 64; +struct _op_xlat NVFP_TX_AOP[64]; + +/******************************************************************************* + * Support routines + */ + +/*XXX: bad bad bad bad */ +static uint64_t fragprog_ofs; +static uint32_t *fragprog_buf = NULL; + +static void +NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + drm_nouveau_mem_alloc_t mem; + + if (!fragprog_buf) { + mem.flags = NOUVEAU_MEM_FB|NOUVEAU_MEM_MAPPED; + mem.size = nvs->program_size * sizeof(uint32_t); + mem.alignment = 0; + mem.region_offset = &fragprog_ofs; + if (drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_MEM_ALLOC, &mem, + sizeof(mem))) { + fprintf(stderr, "MEM_ALLOC fail\n"); + return; + } + + if (drmMap(nmesa->driFd, fragprog_ofs, mem.size, &fragprog_buf)) { + fprintf(stderr, "MEM_MAP fail\n"); + return; + } + } + + /*XXX: should do a DMA.. and not copy over a possibly in-use program.. */ + /* not using state cache here, updated programs at the same address + * seem to not take effect unless ACTIVE_PROGRAM is called again. hw + * caches the program somewhere? so, maybe not so bad to just clobber the + * old program in vram.. + */ + memcpy(fragprog_buf, nvs->program, nvs->program_size * sizeof(uint32_t)); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM, 1); + OUT_RING(((uint32_t)fragprog_ofs-0xE0000000)|1); +} + +static void +NV30FPUpdateConst(GLcontext *ctx, nouveauShader *nvs, int id) +{ + uint32_t *current = nvs->program + nvs->params[id].hw_index; + uint32_t *new = nvs->params[id].source_val ? + nvs->params[id].source_val : nvs->params[id].val; + + COPY_4V(current, new); + nvs->on_hardware = 0; +} + +/******************************************************************************* + * Assembly helpers + */ +static struct _op_xlat * +NV30FPGetOPTXFromSOP(nvsOpcode op, int *id) +{ + int i; + + for (i=0; iGetOPTXFromSOP(op, NULL)) + return 1; + return 0; +} + +static void +NV30FPSetOpcode(nvsFunc *shader, unsigned int opcode, int slot) +{ + shader->inst[0] |= (opcode << NV30_FP_OP_OPCODE_SHIFT); +} + +static void +NV30FPSetCCUpdate(nvsFunc *shader) +{ + shader->inst[0] |= NV30_FP_OP_COND_WRITE_ENABLE; +} + +static void +NV30FPSetCondition(nvsFunc *shader, int on, nvsCond cond, int reg, + nvsSwzComp *swz) +{ + nvsSwzComp default_swz[4] = { NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W }; + unsigned int hwcond; + + /* cond masking is always enabled */ + if (!on) { + cond = NVS_COND_TR; + reg = 0; + swz = default_swz; + } + + switch (cond) { + case NVS_COND_TR: hwcond = NV30_FP_OP_COND_TR; break; + case NVS_COND_FL: hwcond = NV30_FP_OP_COND_FL; break; + case NVS_COND_LT: hwcond = NV30_FP_OP_COND_LT; break; + case NVS_COND_GT: hwcond = NV30_FP_OP_COND_GT; break; + case NVS_COND_LE: hwcond = NV30_FP_OP_COND_LE; break; + case NVS_COND_GE: hwcond = NV30_FP_OP_COND_GE; break; + case NVS_COND_EQ: hwcond = NV30_FP_OP_COND_EQ; break; + case NVS_COND_NE: hwcond = NV30_FP_OP_COND_NE; break; + default: + WARN_ONCE("unknown fp condmask=%d\n", cond); + hwcond = NV30_FP_OP_COND_TR; + break; + } + + shader->inst[1] |= (hwcond << NV30_FP_OP_COND_SHIFT); + shader->inst[1] |= (swz[NVS_SWZ_X] << NV30_FP_OP_COND_SWZ_X_SHIFT); + shader->inst[1] |= (swz[NVS_SWZ_Y] << NV30_FP_OP_COND_SWZ_Y_SHIFT); + shader->inst[1] |= (swz[NVS_SWZ_Z] << NV30_FP_OP_COND_SWZ_Z_SHIFT); + shader->inst[1] |= (swz[NVS_SWZ_W] << NV30_FP_OP_COND_SWZ_W_SHIFT); +} + +static void +NV30FPSetResult(nvsFunc *shader, nvsRegister *reg, unsigned int mask, int slot) +{ + unsigned int hwreg, hwmask = 0; + + if (mask & SMASK_X) shader->inst[0] |= NV30_FP_OP_OUT_X; + if (mask & SMASK_Y) shader->inst[0] |= NV30_FP_OP_OUT_Y; + if (mask & SMASK_Z) shader->inst[0] |= NV30_FP_OP_OUT_Z; + if (mask & SMASK_W) shader->inst[0] |= NV30_FP_OP_OUT_W; + + if (reg->file == NVS_FILE_RESULT) { + hwreg = 0; /* FIXME: this is only fragment.color */ + /* This is *not* correct, I have no idea what it is either */ + shader->inst[0] |= NV30_FP_OP_UNK0_7; + } else + hwreg = reg->index; + shader->inst[0] |= (hwreg << NV30_FP_OP_OUT_REG_SHIFT); +} + +static void +NV30FPSetSource(nvsFunc *shader, nvsRegister *reg, int pos) +{ + unsigned int hwsrc = 0; + + switch (reg->file) { + case NVS_FILE_TEMP: + hwsrc |= (NV30_FP_REG_TYPE_TEMP << NV30_FP_REG_TYPE_SHIFT); + hwsrc |= (reg->index << NV30_FP_REG_SRC_SHIFT); + break; + case NVS_FILE_ATTRIB: + { + unsigned int hwin; + + switch (reg->index) { + case NVS_FR_POSITION : hwin = NV30_FP_OP_INPUT_SRC_POSITION; break; + case NVS_FR_COL0 : hwin = NV30_FP_OP_INPUT_SRC_COL0; break; + case NVS_FR_COL1 : hwin = NV30_FP_OP_INPUT_SRC_COL1; break; + case NVS_FR_FOGCOORD : hwin = NV30_FP_OP_INPUT_SRC_FOGC; break; + case NVS_FR_TEXCOORD0: hwin = NV30_FP_OP_INPUT_SRC_TC(0); break; + case NVS_FR_TEXCOORD1: hwin = NV30_FP_OP_INPUT_SRC_TC(1); break; + case NVS_FR_TEXCOORD2: hwin = NV30_FP_OP_INPUT_SRC_TC(2); break; + case NVS_FR_TEXCOORD3: hwin = NV30_FP_OP_INPUT_SRC_TC(3); break; + case NVS_FR_TEXCOORD4: hwin = NV30_FP_OP_INPUT_SRC_TC(4); break; + case NVS_FR_TEXCOORD5: hwin = NV30_FP_OP_INPUT_SRC_TC(5); break; + case NVS_FR_TEXCOORD6: hwin = NV30_FP_OP_INPUT_SRC_TC(6); break; + case NVS_FR_TEXCOORD7: hwin = NV30_FP_OP_INPUT_SRC_TC(7); break; + default: + WARN_ONCE("unknown fp input %d\n", reg->index); + hwin = NV30_FP_OP_INPUT_SRC_COL0; + break; + } + shader->inst[0] |= (hwin << NV30_FP_OP_INPUT_SRC_SHIFT); + hwsrc |= (hwin << NV30_FP_REG_SRC_SHIFT); + } + hwsrc |= (NV30_FP_REG_TYPE_INPUT << NV30_FP_REG_TYPE_SHIFT); + break; + case NVS_FILE_CONST: + /* consts are inlined after the inst */ + hwsrc |= (NV30_FP_REG_TYPE_CONST << NV30_FP_REG_TYPE_SHIFT); + break; + default: + assert(0); + break; + } + + if (reg->negate) + hwsrc |= NV30_FP_REG_NEGATE; + if (reg->abs) + shader->inst[1] |= (1 << (29+pos)); + hwsrc |= (reg->swizzle[NVS_SWZ_X] << NV30_FP_REG_SWZ_X_SHIFT); + hwsrc |= (reg->swizzle[NVS_SWZ_Y] << NV30_FP_REG_SWZ_Y_SHIFT); + hwsrc |= (reg->swizzle[NVS_SWZ_Z] << NV30_FP_REG_SWZ_Z_SHIFT); + hwsrc |= (reg->swizzle[NVS_SWZ_W] << NV30_FP_REG_SWZ_W_SHIFT); + + shader->inst[pos+1] |= hwsrc; +} + +static void +NV30FPSetUnusedSource(nvsFunc *shader, int pos) +{ + shader->inst[pos+1] |= ( + (NV30_FP_REG_TYPE_INPUT << NV30_FP_REG_TYPE_SHIFT) | + (NVS_SWZ_X << NV30_FP_REG_SWZ_X_SHIFT) | + (NVS_SWZ_Y << NV30_FP_REG_SWZ_Y_SHIFT) | + (NVS_SWZ_Z << NV30_FP_REG_SWZ_Z_SHIFT) | + (NVS_SWZ_W << NV30_FP_REG_SWZ_W_SHIFT) + ); +} + +static void +NV30FPSetTexImageUnit(nvsFunc *shader, int unit) +{ + shader->inst[0] |= (unit << NV30_FP_OP_TEX_UNIT_SHIFT); +} + +static void +NV30FPSetSaturate(nvsFunc *shader) +{ + shader->inst[0] |= NV30_FP_OP_OUT_SAT; +} + +static void +NV30FPSetLastInst(nvsFunc *shader) +{ + shader->inst[0] |= 1; + +} + +/******************************************************************************* + * Disassembly helpers + */ +static struct _op_xlat * +NV30FPGetOPTXRec(nvsFunc * shader, int merged) +{ + int op; + + op = shader->GetOpcodeHW(shader, 0); + if (op > NVFP_TX_AOP_COUNT) + return NULL; + if (NVFP_TX_AOP[op].SOP == NVS_OP_UNKNOWN) + return NULL; + return &NVFP_TX_AOP[op]; +} + +static int +NV30FPHasMergedInst(nvsFunc * shader) +{ + return 0; +} + +static int +NV30FPIsLastInst(nvsFunc * shader) +{ + return ((shader->inst[0] & NV30_FP_OP_PROGRAM_END) ? 1 : 0); +} + +static int +NV30FPGetOffsetNext(nvsFunc * shader) +{ + int i; + + for (i = 0; i < 3; i++) + if (shader->GetSourceFile(shader, 0, i) == NVS_FILE_CONST) + return 8; + return 4; +} + +static nvsOpcode +NV30FPGetOpcode(nvsFunc * shader, int merged) +{ + struct _op_xlat *opr; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr) + return NVS_OP_UNKNOWN; + + return opr->SOP; +} + +static unsigned int +NV30FPGetOpcodeHW(nvsFunc * shader, int slot) +{ + int op; + + op = (shader->inst[0] & NV30_FP_OP_OPCODE_MASK) >> NV30_FP_OP_OPCODE_SHIFT; + + return op; +} + +static nvsRegFile +NV30FPGetDestFile(nvsFunc * shader, int merged) +{ + /* Result regs overlap temporary regs */ + return NVS_FILE_TEMP; +} + +static unsigned int +NV30FPGetDestID(nvsFunc * shader, int merged) +{ + int id; + + switch (shader->GetDestFile(shader, merged)) { + case NVS_FILE_TEMP: + id = ((shader->inst[0] & NV30_FP_OP_OUT_REG_MASK) + >> NV30_FP_OP_OUT_REG_SHIFT); + return id; + default: + return -1; + } +} + +static unsigned int +NV30FPGetDestMask(nvsFunc * shader, int merged) +{ + unsigned int mask = 0; + + if (shader->inst[0] & NV30_FP_OP_OUT_X) mask |= SMASK_X; + if (shader->inst[0] & NV30_FP_OP_OUT_Y) mask |= SMASK_Y; + if (shader->inst[0] & NV30_FP_OP_OUT_Z) mask |= SMASK_Z; + if (shader->inst[0] & NV30_FP_OP_OUT_W) mask |= SMASK_W; + + return mask; +} + +static unsigned int +NV30FPGetSourceHW(nvsFunc * shader, int merged, int pos) +{ + struct _op_xlat *opr; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr || opr->srcpos[pos] == -1) + return -1; + + return shader->inst[opr->srcpos[pos] + 1]; +} + +static nvsRegFile +NV30FPGetSourceFile(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + struct _op_xlat *opr; + int file; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr || opr->srcpos[pos] == -1) + return NVS_FILE_UNKNOWN; + + switch (opr->srcpos[pos]) { + case SPOS_ADDRESS: return NVS_FILE_ADDRESS; + default: + src = shader->GetSourceHW(shader, merged, pos); + file = (src & NV30_FP_REG_TYPE_MASK) >> NV30_FP_REG_TYPE_SHIFT; + + switch (file) { + case NV30_FP_REG_TYPE_TEMP : return NVS_FILE_TEMP; + case NV30_FP_REG_TYPE_INPUT: return NVS_FILE_ATTRIB; + case NV30_FP_REG_TYPE_CONST: return NVS_FILE_CONST; + default: + return NVS_FILE_UNKNOWN; + } + } +} + +static int +NV30FPGetSourceID(nvsFunc * shader, int merged, int pos) +{ + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_ATTRIB: + switch ((shader->inst[0] & NV30_FP_OP_INPUT_SRC_MASK) + >> NV30_FP_OP_INPUT_SRC_SHIFT) { + case NV30_FP_OP_INPUT_SRC_POSITION: return NVS_FR_POSITION; + case NV30_FP_OP_INPUT_SRC_COL0 : return NVS_FR_COL0; + case NV30_FP_OP_INPUT_SRC_COL1 : return NVS_FR_COL1; + case NV30_FP_OP_INPUT_SRC_FOGC : return NVS_FR_FOGCOORD; + case NV30_FP_OP_INPUT_SRC_TC(0) : return NVS_FR_TEXCOORD0; + case NV30_FP_OP_INPUT_SRC_TC(1) : return NVS_FR_TEXCOORD1; + case NV30_FP_OP_INPUT_SRC_TC(2) : return NVS_FR_TEXCOORD2; + case NV30_FP_OP_INPUT_SRC_TC(3) : return NVS_FR_TEXCOORD3; + case NV30_FP_OP_INPUT_SRC_TC(4) : return NVS_FR_TEXCOORD4; + case NV30_FP_OP_INPUT_SRC_TC(5) : return NVS_FR_TEXCOORD5; + case NV30_FP_OP_INPUT_SRC_TC(6) : return NVS_FR_TEXCOORD6; + case NV30_FP_OP_INPUT_SRC_TC(7) : return NVS_FR_TEXCOORD7; + default: + return -1; + } + break; + case NVS_FILE_TEMP: + { + unsigned int src; + + src = shader->GetSourceHW(shader, merged, pos); + return ((src & NV30_FP_REG_SRC_MASK) >> NV30_FP_REG_SRC_SHIFT); + } + case NVS_FILE_CONST: /* inlined into fragprog */ + default: + return -1; + } +} + +static int +NV30FPGetTexImageUnit(nvsFunc *shader) +{ + return ((shader->inst[0] & NV30_FP_OP_TEX_UNIT_MASK) + >> NV30_FP_OP_TEX_UNIT_SHIFT); +} + +static int +NV30FPGetSourceNegate(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + + src = shader->GetSourceHW(shader, merged, pos); + + if (src == -1) + return -1; + return ((src & NV30_FP_REG_NEGATE) ? 1 : 0); +} + +static int +NV30FPGetSourceAbs(nvsFunc * shader, int merged, int pos) +{ + struct _op_xlat *opr; + static unsigned int abspos[3] = { + NV30_FP_OP_OUT_ABS, + (1 << 30), /* guess */ + (1 << 31) /* guess */ + }; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr || opr->srcpos[pos] == -1) + return -1; + + return ((shader->inst[1] & abspos[opr->srcpos[pos]]) ? 1 : 0); +} + +nvsSwzComp NV30FP_TX_SWIZZLE[4] = {NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W }; + +static void +NV30FPTXSwizzle(int hwswz, nvsSwzComp *swz) +{ + swz[NVS_SWZ_W] = NV30FP_TX_SWIZZLE[(hwswz & 0xC0) >> 6]; + swz[NVS_SWZ_Z] = NV30FP_TX_SWIZZLE[(hwswz & 0x30) >> 4]; + swz[NVS_SWZ_Y] = NV30FP_TX_SWIZZLE[(hwswz & 0x0C) >> 2]; + swz[NVS_SWZ_X] = NV30FP_TX_SWIZZLE[(hwswz & 0x03) >> 0]; +} + +static void +NV30FPGetSourceSwizzle(nvsFunc * shader, int merged, int pos, nvsSwzComp *swz) +{ + unsigned int src; + int swzbits; + + src = shader->GetSourceHW(shader, merged, pos); + swzbits = (src & NV30_FP_REG_SWZ_ALL_MASK) >> NV30_FP_REG_SWZ_ALL_SHIFT; + NV30FPTXSwizzle(swzbits, swz); +} + +static int +NV30FPGetSourceIndexed(nvsFunc * shader, int merged, int pos) +{ + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_ATTRIB: + return ((shader->inst[3] & NV30_FP_OP_INDEX_INPUT) ? 1 : 0); + default: + return 0; + } +} + +static void +NV30FPGetSourceConstVal(nvsFunc * shader, int merged, int pos, float *val) +{ + val[0] = *(float *) &(shader->inst[4]); + val[1] = *(float *) &(shader->inst[5]); + val[2] = *(float *) &(shader->inst[6]); + val[3] = *(float *) &(shader->inst[7]); +} + +static int +NV30FPGetSourceScale(nvsFunc * shader, int merged, int pos) +{ +/*FIXME: is this per-source, only for a specific source, or all sources??*/ + return (1 << ((shader->inst[2] & NV30_FP_OP_SRC_SCALE_MASK) + >> NV30_FP_OP_SRC_SCALE_SHIFT)); +} + +static int +NV30FPGetAddressRegID(nvsFunc * shader) +{ + return 0; +} + +static nvsSwzComp +NV30FPGetAddressRegSwizzle(nvsFunc * shader) +{ + return NVS_SWZ_X; +} + +static int +NV30FPSupportsConditional(nvsFunc * shader) +{ + /*FIXME: Is this true of all ops? */ + return 1; +} + +static int +NV30FPGetConditionUpdate(nvsFunc * shader) +{ + return ((shader->inst[0] & NV30_FP_OP_COND_WRITE_ENABLE) ? 1 : 0); +} + +static int +NV30FPGetConditionTest(nvsFunc * shader) +{ + /*FIXME: always? */ + return 1; +} + +static nvsCond +NV30FPGetCondition(nvsFunc * shader) +{ + int cond; + + cond = ((shader->inst[1] & NV30_FP_OP_COND_MASK) + >> NV30_FP_OP_COND_SHIFT); + + switch (cond) { + case NV30_FP_OP_COND_FL: return NVS_COND_FL; + case NV30_FP_OP_COND_LT: return NVS_COND_LT; + case NV30_FP_OP_COND_EQ: return NVS_COND_EQ; + case NV30_FP_OP_COND_LE: return NVS_COND_LE; + case NV30_FP_OP_COND_GT: return NVS_COND_GT; + case NV30_FP_OP_COND_NE: return NVS_COND_NE; + case NV30_FP_OP_COND_GE: return NVS_COND_GE; + case NV30_FP_OP_COND_TR: return NVS_COND_TR; + default: + return NVS_COND_UNKNOWN; + } +} + +static void +NV30FPGetCondRegSwizzle(nvsFunc * shader, nvsSwzComp *swz) +{ + int swzbits; + + swzbits = (shader->inst[1] & NV30_FP_OP_COND_SWZ_ALL_MASK) + >> NV30_FP_OP_COND_SWZ_ALL_SHIFT; + NV30FPTXSwizzle(swzbits, swz); +} + +static int +NV30FPGetCondRegID(nvsFunc * shader) +{ + return 0; +} + +static nvsPrecision +NV30FPGetPrecision(nvsFunc * shader) +{ + int p; + + p = (shader->inst[0] & NV30_FP_OP_PRECISION_MASK) + >> NV30_FP_OP_PRECISION_SHIFT; + + switch (p) { + case NV30_FP_PRECISION_FP32: return NVS_PREC_FLOAT32; + case NV30_FP_PRECISION_FP16: return NVS_PREC_FLOAT16; + case NV30_FP_PRECISION_FX12: return NVS_PREC_FIXED12; + default: + return NVS_PREC_UNKNOWN; + } +} + +static int +NV30FPGetSaturate(nvsFunc * shader) +{ + return ((shader->inst[0] & NV30_FP_OP_OUT_SAT) ? 1 : 0); +} + +/******************************************************************************* + * Init + */ +void +NV30FPInitShaderFuncs(nvsFunc * shader) +{ + /* These are probably bogus, I made them up... */ + shader->MaxInst = 1024; + shader->MaxAttrib = 16; + shader->MaxTemp = 32; + shader->MaxAddress = 1; + shader->MaxConst = 256; + shader->caps = SCAP_SRC_ABS; + + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_MOV, NVS_OP_MOV, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_MUL, NVS_OP_MUL, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_ADD, NVS_OP_ADD, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_MAD, NVS_OP_MAD, 0, 1, 2); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_DP3, NVS_OP_DP3, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_DP4, NVS_OP_DP4, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_DST, NVS_OP_DST, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_MIN, NVS_OP_MIN, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_MAX, NVS_OP_MAX, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SLT, NVS_OP_SLT, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SGE, NVS_OP_SGE, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_FRC, NVS_OP_FRC, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_FLR, NVS_OP_FLR, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_TEX, NVS_OP_TEX, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_TXD, NVS_OP_TXD, 0, 1, 2); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_TXP, NVS_OP_TXP, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_TXB, NVS_OP_TXB, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SEQ, NVS_OP_SEQ, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SGT, NVS_OP_SGT, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SLE, NVS_OP_SLE, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SNE, NVS_OP_SNE, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_RCP, NVS_OP_RCP, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_LG2, NVS_OP_LG2, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_EX2, NVS_OP_EX2, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_COS, NVS_OP_COS, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_SIN, NVS_OP_SIN, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_NOP, NVS_OP_NOP, -1, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_DDX, NVS_OP_DDX, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_DDY, NVS_OP_DDY, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_KIL, NVS_OP_KIL, -1, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_PK4B, NVS_OP_PK4B, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_UP4B, NVS_OP_UP4B, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_PK2H, NVS_OP_PK2H, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_UP2H, NVS_OP_UP2H, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_PK4UB, NVS_OP_PK4UB, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_UP4UB, NVS_OP_UP4UB, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_PK2US, NVS_OP_PK2US, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_UP2US, NVS_OP_UP2US, 0, -1, -1); + /*FIXME: Haven't confirmed the source positions for the below opcodes */ + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_LIT, NVS_OP_LIT, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_LRP, NVS_OP_LRP, 0, 1, 2); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_POW, NVS_OP_POW, 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_RSQ, NVS_OP_RSQ, 0, -1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV30_FP_OP_OPCODE_RFL, NVS_OP_RFL, 0, 1, -1); + + shader->GetOPTXRec = NV30FPGetOPTXRec; + shader->GetOPTXFromSOP = NV30FPGetOPTXFromSOP; + + shader->UploadToHW = NV30FPUploadToHW; + shader->UpdateConst = NV30FPUpdateConst; + + shader->SupportsOpcode = NV30FPSupportsOpcode; + shader->SetOpcode = NV30FPSetOpcode; + shader->SetCCUpdate = NV30FPSetCCUpdate; + shader->SetCondition = NV30FPSetCondition; + shader->SetResult = NV30FPSetResult; + shader->SetSource = NV30FPSetSource; + shader->SetUnusedSource = NV30FPSetUnusedSource; + shader->SetTexImageUnit = NV30FPSetTexImageUnit; + shader->SetSaturate = NV30FPSetSaturate; + shader->SetLastInst = NV30FPSetLastInst; + + shader->HasMergedInst = NV30FPHasMergedInst; + shader->IsLastInst = NV30FPIsLastInst; + shader->GetOffsetNext = NV30FPGetOffsetNext; + shader->GetOpcode = NV30FPGetOpcode; + shader->GetOpcodeHW = NV30FPGetOpcodeHW; + shader->GetDestFile = NV30FPGetDestFile; + shader->GetDestID = NV30FPGetDestID; + shader->GetDestMask = NV30FPGetDestMask; + shader->GetSourceHW = NV30FPGetSourceHW; + shader->GetSourceFile = NV30FPGetSourceFile; + shader->GetSourceID = NV30FPGetSourceID; + shader->GetTexImageUnit = NV30FPGetTexImageUnit; + shader->GetSourceNegate = NV30FPGetSourceNegate; + shader->GetSourceAbs = NV30FPGetSourceAbs; + shader->GetSourceSwizzle = NV30FPGetSourceSwizzle; + shader->GetSourceIndexed = NV30FPGetSourceIndexed; + shader->GetSourceConstVal = NV30FPGetSourceConstVal; + shader->GetSourceScale = NV30FPGetSourceScale; + shader->GetRelAddressRegID = NV30FPGetAddressRegID; + shader->GetRelAddressSwizzle = NV30FPGetAddressRegSwizzle; + shader->GetPrecision = NV30FPGetPrecision; + shader->GetSaturate = NV30FPGetSaturate; + shader->SupportsConditional = NV30FPSupportsConditional; + shader->GetConditionUpdate = NV30FPGetConditionUpdate; + shader->GetConditionTest = NV30FPGetConditionTest; + shader->GetCondition = NV30FPGetCondition; + shader->GetCondRegSwizzle = NV30FPGetCondRegSwizzle; + shader->GetCondRegID = NV30FPGetCondRegID; +} diff --git a/src/mesa/drivers/dri/nouveau/nv30_shader.h b/src/mesa/drivers/dri/nouveau/nv30_shader.h new file mode 100644 index 0000000000..d0bf639930 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv30_shader.h @@ -0,0 +1,378 @@ +#ifndef __NV30_SHADER_H__ +#define __NV30_SHADER_H__ + +/* Vertex programs instruction set + * + * 128bit opcodes, split into 4 32-bit ones for ease of use. + * + * Non-native instructions + * ABS - MOV + NV40_VP_INST0_DEST_ABS + * POW - EX2 + MUL + LG2 + * SUB - ADD, second source negated + * SWZ - MOV + * XPD - + * + * Register access + * - Only one INPUT can be accessed per-instruction (move extras into TEMPs) + * - Only one CONST can be accessed per-instruction (move extras into TEMPs) + * + * Relative Addressing + * According to the value returned for MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB + * there are only two address registers available. The destination in the ARL + * instruction is set to TEMP (The temp isn't actually written). + * + * When using vanilla ARB_v_p, the proprietary driver will squish both the available + * ADDRESS regs into the first hardware reg in the X and Y components. + * + * To use an address reg as an index into consts, the CONST_SRC is set to + * (const_base + offset) and INDEX_CONST is set. + * + * To access the second address reg use ADDR_REG_SELECT_1. A particular component + * of the address regs is selected with ADDR_SWZ. + * + * Only one address register can be accessed per instruction. + * + * Conditional execution (see NV_vertex_program{2,3} for details) + * Conditional execution of an instruction is enabled by setting COND_TEST_ENABLE, and + * selecting the condition which will allow the test to pass with COND_{FL,LT,...}. + * It is possible to swizzle the values in the condition register, which allows for + * testing against an individual component. + * + * Branching + * The BRA/CAL instructions seem to follow a slightly different opcode layout. The + * destination instruction ID (IADDR) overlaps a source field. Instruction ID's seem to + * be numbered based on the UPLOAD_FROM_ID FIFO command, and is incremented automatically + * on each UPLOAD_INST FIFO command. + * + * Conditional branching is achieved by using the condition tests described above. + * There doesn't appear to be dedicated looping instructions, but this can be done + * using a temp reg + conditional branching. + * + * Subroutines may be uploaded before the main program itself, but the first executed + * instruction is determined by the PROGRAM_START_ID FIFO command. + * + */ + +/* DWORD 0 */ +#define NV30_VP_INST_ADDR_REG_SELECT_1 (1 << 24) +#define NV30_VP_INST_SRC2_ABS (1 << 23) /* guess */ +#define NV30_VP_INST_SRC1_ABS (1 << 22) /* guess */ +#define NV30_VP_INST_SRC0_ABS (1 << 21) /* guess */ +#define NV30_VP_INST_OUT_RESULT (1 << 20) +#define NV30_VP_INST_DEST_TEMP_ID_SHIFT 16 +#define NV30_VP_INST_DEST_TEMP_ID_MASK (0x0F << 16) +#define NV30_VP_INST_COND_UPDATE_ENABLE (1<<15) +#define NV30_VP_INST_COND_TEST_ENABLE (1<<14) +#define NV30_VP_INST_COND_SHIFT 11 +#define NV30_VP_INST_COND_MASK (0x07 << 11) +# define NV30_VP_INST_COND_FL 0 /* guess */ +# define NV30_VP_INST_COND_LT 1 +# define NV30_VP_INST_COND_EQ 2 +# define NV30_VP_INST_COND_LE 3 +# define NV30_VP_INST_COND_GT 4 +# define NV30_VP_INST_COND_NE 5 +# define NV30_VP_INST_COND_GE 6 +# define NV30_VP_INST_COND_TR 7 /* guess */ +#define NV30_VP_INST_COND_SWZ_X_SHIFT 9 +#define NV30_VP_INST_COND_SWZ_X_MASK (0x03 << 9) +#define NV30_VP_INST_COND_SWZ_Y_SHIFT 7 +#define NV30_VP_INST_COND_SWZ_Y_MASK (0x03 << 7) +#define NV30_VP_INST_COND_SWZ_Z_SHIFT 5 +#define NV30_VP_INST_COND_SWZ_Z_MASK (0x03 << 5) +#define NV30_VP_INST_COND_SWZ_W_SHIFT 3 +#define NV30_VP_INST_COND_SWZ_W_MASK (0x03 << 3) +#define NV30_VP_INST_COND_SWZ_ALL_SHIFT 3 +#define NV30_VP_INST_COND_SWZ_ALL_MASK (0xFF << 3) +#define NV30_VP_INST_ADDR_SWZ_SHIFT 1 +#define NV30_VP_INST_ADDR_SWZ_MASK (0x03 << 1) +#define NV30_VP_INST_SCA_OPCODEH_SHIFT 0 +#define NV30_VP_INST_SCA_OPCODEH_MASK (0x01 << 0) + +/* DWORD 1 */ +#define NV30_VP_INST_SCA_OPCODEL_SHIFT 28 +#define NV30_VP_INST_SCA_OPCODEL_MASK (0x0F << 28) +# define NV30_VP_INST_OP_NOP 0x00 +# define NV30_VP_INST_OP_RCP 0x02 +# define NV30_VP_INST_OP_RCC 0x03 +# define NV30_VP_INST_OP_RSQ 0x04 +# define NV30_VP_INST_OP_EXP 0x05 +# define NV30_VP_INST_OP_LOG 0x06 +# define NV30_VP_INST_OP_LIT 0x07 +# define NV30_VP_INST_OP_BRA 0x09 +# define NV30_VP_INST_OP_CAL 0x0B +# define NV30_VP_INST_OP_RET 0x0C +# define NV30_VP_INST_OP_LG2 0x0D +# define NV30_VP_INST_OP_EX2 0x0E +# define NV30_VP_INST_OP_SIN 0x0F +# define NV30_VP_INST_OP_COS 0x10 +#define NV30_VP_INST_VEC_OPCODE_SHIFT 23 +#define NV30_VP_INST_VEC_OPCODE_MASK (0x1F << 23) +# define NV30_VP_INST_OP_NOPV 0x00 +# define NV30_VP_INST_OP_MOV 0x01 +# define NV30_VP_INST_OP_MUL 0x02 +# define NV30_VP_INST_OP_ADD 0x03 +# define NV30_VP_INST_OP_MAD 0x04 +# define NV30_VP_INST_OP_DP3 0x05 +# define NV30_VP_INST_OP_DP4 0x07 +# define NV30_VP_INST_OP_DPH 0x06 +# define NV30_VP_INST_OP_DST 0x08 +# define NV30_VP_INST_OP_MIN 0x09 +# define NV30_VP_INST_OP_MAX 0x0A +# define NV30_VP_INST_OP_SLT 0x0B +# define NV30_VP_INST_OP_SGE 0x0C +# define NV30_VP_INST_OP_ARL 0x0D +# define NV30_VP_INST_OP_FRC 0x0E +# define NV30_VP_INST_OP_FLR 0x0F +# define NV30_VP_INST_OP_SEQ 0x10 +# define NV30_VP_INST_OP_SFL 0x11 +# define NV30_VP_INST_OP_SGT 0x12 +# define NV30_VP_INST_OP_SLE 0x13 +# define NV30_VP_INST_OP_SNE 0x14 +# define NV30_VP_INST_OP_STR 0x15 +# define NV30_VP_INST_OP_SSG 0x16 +# define NV30_VP_INST_OP_ARR 0x17 +# define NV30_VP_INST_OP_ARA 0x18 +#define NV30_VP_INST_CONST_SRC_SHIFT 14 +#define NV30_VP_INST_CONST_SRC_MASK (0xFF << 14) +#define NV30_VP_INST_INPUT_SRC_SHIFT 9 /*NV20*/ +#define NV30_VP_INST_INPUT_SRC_MASK (0x0F << 9) /*NV20*/ +# define NV30_VP_INST_IN_POS 0 /* These seem to match the bindings specified in */ +# define NV30_VP_INST_IN_WEIGHT 1 /* the ARB_v_p spec (2.14.3.1) */ +# define NV30_VP_INST_IN_NORMAL 2 +# define NV30_VP_INST_IN_COL0 3 /* Should probably confirm them all though */ +# define NV30_VP_INST_IN_COL1 4 +# define NV30_VP_INST_IN_FOGC 5 +# define NV30_VP_INST_IN_TC0 8 +# define NV30_VP_INST_IN_TC(n) (8+n) +#define NV30_VP_INST_SRC0H_SHIFT 0 /*NV20*/ +#define NV30_VP_INST_SRC0H_MASK (0x1FF << 0) /*NV20*/ + +/* DWORD 2 */ +#define NV30_VP_INST_SRC0L_SHIFT 26 /*NV20*/ +#define NV30_VP_INST_SRC0L_MASK (0x3F <<26) /*NV20*/ +#define NV30_VP_INST_SRC1_SHIFT 11 /*NV20*/ +#define NV30_VP_INST_SRC1_MASK (0x7FFF<<11) /*NV20*/ +#define NV30_VP_INST_SRC2H_SHIFT 0 /*NV20*/ +#define NV30_VP_INST_SRC2H_MASK (0x7FF << 0) /*NV20*/ +#define NV30_VP_INST_IADDR_SHIFT 2 +#define NV30_VP_INST_IADDR_MASK (0xFF << 2) /* guess */ + +/* DWORD 3 */ +#define NV30_VP_INST_SRC2L_SHIFT 28 /*NV20*/ +#define NV30_VP_INST_SRC2L_MASK (0x0F <<28) /*NV20*/ +#define NV30_VP_INST_STEMP_WRITEMASK_SHIFT 24 +#define NV30_VP_INST_STEMP_WRITEMASK_MASK (0x0F << 24) +#define NV30_VP_INST_VTEMP_WRITEMASK_SHIFT 20 +#define NV30_VP_INST_VTEMP_WRITEMASK_MASK (0x0F << 20) +#define NV30_VP_INST_SDEST_WRITEMASK_SHIFT 16 +#define NV30_VP_INST_SDEST_WRITEMASK_MASK (0x0F << 16) +#define NV30_VP_INST_VDEST_WRITEMASK_SHIFT 12 /*NV20*/ +#define NV30_VP_INST_VDEST_WRITEMASK_MASK (0x0F << 12) /*NV20*/ +#define NV30_VP_INST_DEST_ID_SHIFT 2 +#define NV30_VP_INST_DEST_ID_MASK (0x0F << 2) +# define NV30_VP_INST_DEST_POS 0 +# define NV30_VP_INST_DEST_COL0 3 +# define NV30_VP_INST_DEST_COL1 4 +# define NV30_VP_INST_DEST_TC(n) (8+n) + +/* Source-register definition - matches NV20 exactly */ +#define NV30_VP_SRC_REG_NEGATE (1<<14) +#define NV30_VP_SRC_REG_SWZ_X_SHIFT 12 +#define NV30_VP_SRC_REG_SWZ_X_MASK (0x03 <<12) +#define NV30_VP_SRC_REG_SWZ_Y_SHIFT 10 +#define NV30_VP_SRC_REG_SWZ_Y_MASK (0x03 <<10) +#define NV30_VP_SRC_REG_SWZ_Z_SHIFT 8 +#define NV30_VP_SRC_REG_SWZ_Z_MASK (0x03 << 8) +#define NV30_VP_SRC_REG_SWZ_W_SHIFT 6 +#define NV30_VP_SRC_REG_SWZ_W_MASK (0x03 << 6) +#define NV30_VP_SRC_REG_SWZ_ALL_SHIFT 6 +#define NV30_VP_SRC_REG_SWZ_ALL_MASK (0xFF << 6) +#define NV30_VP_SRC_REG_TEMP_ID_SHIFT 2 +#define NV30_VP_SRC_REG_TEMP_ID_MASK (0x0F << 0) +#define NV30_VP_SRC_REG_TYPE_SHIFT 0 +#define NV30_VP_SRC_REG_TYPE_MASK (0x03 << 0) +#define NV30_VP_SRC_REG_TYPE_TEMP 1 +#define NV30_VP_SRC_REG_TYPE_INPUT 2 +#define NV30_VP_SRC_REG_TYPE_CONST 3 /* guess */ + +/* + * Each fragment program opcode appears to be comprised of 4 32-bit values. + * + * 0 - Opcode, output reg/mask, ATTRIB source + * 1 - Source 0 + * 2 - Source 1 + * 3 - Source 2 + * + * There appears to be no special difference between result regs and temp regs. + * result.color == R0.xyzw + * result.depth == R1.z + * When the fragprog contains instructions to write depth, NV30_TCL_PRIMITIVE_3D_UNK1D78=0 + * otherwise it is set to 1. + * + * Constants are inserted directly after the instruction that uses them. + * + * It appears that it's not possible to use two input registers in one + * instruction as the input sourcing is done in the instruction dword + * and not the source selection dwords. As such instructions such as: + * + * ADD result.color, fragment.color, fragment.texcoord[0]; + * + * must be split into two MOV's and then an ADD (nvidia does this) but + * I'm not sure why it's not just one MOV and then source the second input + * in the ADD instruction.. + * + * Negation of the full source is done with NV30_FP_REG_NEGATE, arbitrary + * negation requires multiplication with a const. + * + * Arbitrary swizzling is supported with the exception of SWIZZLE_ZERO/SWIZZLE_ONE + * The temp/result regs appear to be initialised to (0.0, 0.0, 0.0, 0.0) as SWIZZLE_ZERO + * is implemented simply by not writing to the relevant components of the destination. + * + * Conditional execution + * TODO + * + * Non-native instructions: + * LIT + * LRP - MAD+MAD + * SUB - ADD, negate second source + * RSQ - LG2 + EX2 + * POW - LG2 + MUL + EX2 + * SCS - COS + SIN + * XPD + */ + +//== Opcode / Destination selection == +#define NV30_FP_OP_PROGRAM_END (1 << 0) +#define NV30_FP_OP_OUT_REG_SHIFT 1 +#define NV30_FP_OP_OUT_REG_MASK (31 << 1) /* uncertain */ +/* Needs to be set when writing outputs to get expected result.. */ +#define NV30_FP_OP_UNK0_7 (1 << 7) +#define NV30_FP_OP_COND_WRITE_ENABLE (1 << 8) +#define NV30_FP_OP_OUTMASK_SHIFT 9 +#define NV30_FP_OP_OUTMASK_MASK (0xF << 9) +# define NV30_FP_OP_OUT_X (1<<9) +# define NV30_FP_OP_OUT_Y (1<<10) +# define NV30_FP_OP_OUT_Z (1<<11) +# define NV30_FP_OP_OUT_W (1<<12) +/* Uncertain about these, especially the input_src values.. it's possible that + * they can be dynamically changed. + */ +#define NV30_FP_OP_INPUT_SRC_SHIFT 13 +#define NV30_FP_OP_INPUT_SRC_MASK (15 << 13) +# define NV30_FP_OP_INPUT_SRC_POSITION 0x0 +# define NV30_FP_OP_INPUT_SRC_COL0 0x1 +# define NV30_FP_OP_INPUT_SRC_COL1 0x2 +# define NV30_FP_OP_INPUT_SRC_FOGC 0x3 +# define NV30_FP_OP_INPUT_SRC_TC0 0x4 +# define NV30_FP_OP_INPUT_SRC_TC(n) (0x4 + n) +#define NV30_FP_OP_TEX_UNIT_SHIFT 17 +#define NV30_FP_OP_TEX_UNIT_MASK (0xF << 17) /* guess */ +#define NV30_FP_OP_PRECISION_SHIFT 22 +#define NV30_FP_OP_PRECISION_MASK (3 << 22) +# define NV30_FP_PRECISION_FP32 0 +# define NV30_FP_PRECISION_FP16 1 +# define NV30_FP_PRECISION_FX12 2 +#define NV30_FP_OP_OPCODE_SHIFT 24 +#define NV30_FP_OP_OPCODE_MASK (0x3F << 24) +# define NV30_FP_OP_OPCODE_NOP 0x00 +# define NV30_FP_OP_OPCODE_MOV 0x01 +# define NV30_FP_OP_OPCODE_MUL 0x02 +# define NV30_FP_OP_OPCODE_ADD 0x03 +# define NV30_FP_OP_OPCODE_MAD 0x04 +# define NV30_FP_OP_OPCODE_DP3 0x05 +# define NV30_FP_OP_OPCODE_DP4 0x06 +# define NV30_FP_OP_OPCODE_DST 0x07 +# define NV30_FP_OP_OPCODE_MIN 0x08 +# define NV30_FP_OP_OPCODE_MAX 0x09 +# define NV30_FP_OP_OPCODE_SLT 0x0A +# define NV30_FP_OP_OPCODE_SGE 0x0B +# define NV30_FP_OP_OPCODE_SLE 0x0C +# define NV30_FP_OP_OPCODE_SGT 0x0D +# define NV30_FP_OP_OPCODE_SNE 0x0E +# define NV30_FP_OP_OPCODE_SEQ 0x0F +# define NV30_FP_OP_OPCODE_FRC 0x10 +# define NV30_FP_OP_OPCODE_FLR 0x11 +# define NV30_FP_OP_OPCODE_KIL 0x12 +# define NV30_FP_OP_OPCODE_PK4B 0x13 +# define NV30_FP_OP_OPCODE_UP4B 0x14 +# define NV30_FP_OP_OPCODE_DDX 0x15 /* can only write XY */ +# define NV30_FP_OP_OPCODE_DDY 0x16 /* can only write XY */ +# define NV30_FP_OP_OPCODE_TEX 0x17 +# define NV30_FP_OP_OPCODE_TXP 0x18 +# define NV30_FP_OP_OPCODE_TXD 0x19 +# define NV30_FP_OP_OPCODE_RCP 0x1A +# define NV30_FP_OP_OPCODE_RSQ 0x1B +# define NV30_FP_OP_OPCODE_EX2 0x1C +# define NV30_FP_OP_OPCODE_LG2 0x1D +# define NV30_FP_OP_OPCODE_LIT 0x1E +# define NV30_FP_OP_OPCODE_LRP 0x1F +# define NV30_FP_OP_OPCODE_COS 0x22 +# define NV30_FP_OP_OPCODE_SIN 0x23 +# define NV30_FP_OP_OPCODE_PK2H 0x24 +# define NV30_FP_OP_OPCODE_UP2H 0x25 +# define NV30_FP_OP_OPCODE_POW 0x26 +# define NV30_FP_OP_OPCODE_PK4UB 0x27 +# define NV30_FP_OP_OPCODE_UP4UB 0x28 +# define NV30_FP_OP_OPCODE_PK2US 0x29 +# define NV30_FP_OP_OPCODE_UP2US 0x2A +# define NV30_FP_OP_OPCODE_DP2A 0x2E +# define NV30_FP_OP_OPCODE_TXB 0x31 +# define NV30_FP_OP_OPCODE_RFL 0x36 +#define NV30_FP_OP_OUT_SAT (1 << 31) + +/* high order bits of SRC0 */ +#define NV30_FP_OP_OUT_ABS (1 << 29) +#define NV30_FP_OP_COND_SWZ_W_SHIFT 27 +#define NV30_FP_OP_COND_SWZ_W_MASK (3 << 27) +#define NV30_FP_OP_COND_SWZ_Z_SHIFT 25 +#define NV30_FP_OP_COND_SWZ_Z_MASK (3 << 25) +#define NV30_FP_OP_COND_SWZ_Y_SHIFT 23 +#define NV30_FP_OP_COND_SWZ_Y_MASK (3 << 23) +#define NV30_FP_OP_COND_SWZ_X_SHIFT 21 +#define NV30_FP_OP_COND_SWZ_X_MASK (3 << 21) +#define NV30_FP_OP_COND_SWZ_ALL_SHIFT 21 +#define NV30_FP_OP_COND_SWZ_ALL_MASK (0xFF << 21) +#define NV30_FP_OP_COND_SHIFT 18 +#define NV30_FP_OP_COND_MASK (0x07 << 18) +# define NV30_FP_OP_COND_FL 0 +# define NV30_FP_OP_COND_LT 1 +# define NV30_FP_OP_COND_EQ 2 +# define NV30_FP_OP_COND_LE 3 +# define NV30_FP_OP_COND_GT 4 +# define NV30_FP_OP_COND_NE 5 +# define NV30_FP_OP_COND_GE 6 +# define NV30_FP_OP_COND_TR 7 + +/* high order bits of SRC1 */ +#define NV30_FP_OP_SRC_SCALE_SHIFT 28 +#define NV30_FP_OP_SRC_SCALE_MASK (3 << 28) + +/* high order bits of SRC2 */ +#define NV30_FP_OP_INDEX_INPUT (1 << 30) + +//== Register selection == +#define NV30_FP_REG_TYPE_SHIFT 0 +#define NV30_FP_REG_TYPE_MASK (3 << 0) +# define NV30_FP_REG_TYPE_TEMP 0 +# define NV30_FP_REG_TYPE_INPUT 1 +# define NV30_FP_REG_TYPE_CONST 2 +#define NV30_FP_REG_SRC_SHIFT 2 /* uncertain */ +#define NV30_FP_REG_SRC_MASK (31 << 2) +#define NV30_FP_REG_UNK_0 (1 << 8) +#define NV30_FP_REG_SWZ_ALL_SHIFT 9 +#define NV30_FP_REG_SWZ_ALL_MASK (255 << 9) +#define NV30_FP_REG_SWZ_X_SHIFT 9 +#define NV30_FP_REG_SWZ_X_MASK (3 << 9) +#define NV30_FP_REG_SWZ_Y_SHIFT 11 +#define NV30_FP_REG_SWZ_Y_MASK (3 << 11) +#define NV30_FP_REG_SWZ_Z_SHIFT 13 +#define NV30_FP_REG_SWZ_Z_MASK (3 << 13) +#define NV30_FP_REG_SWZ_W_SHIFT 15 +#define NV30_FP_REG_SWZ_W_MASK (3 << 15) +# define NV30_FP_SWIZZLE_X 0 +# define NV30_FP_SWIZZLE_Y 1 +# define NV30_FP_SWIZZLE_Z 2 +# define NV30_FP_SWIZZLE_W 3 +#define NV30_FP_REG_NEGATE (1 << 17) + +#endif diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 851641c0c9..3ffb5d3a41 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -327,7 +327,7 @@ static void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) switch(pname) { case GL_FOG_MODE: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); + //BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); //OUT_RING_CACHE (params); break; /* TODO: unsure about the rest.*/ diff --git a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c new file mode 100644 index 0000000000..e60422dad1 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c @@ -0,0 +1,356 @@ +#include "nouveau_context.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" + +#include "nouveau_shader.h" +#include "nv30_shader.h" + +extern nvsSwzComp NV20VP_TX_SWIZZLE[4]; +extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz); + +/***************************************************************************** + * Support routines + */ +static void +NV30VPUploadToHW(GLcontext *ctx, nouveauShader *nvs) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + int i; + + /* We can do better here and keep more than one VP on the hardware, and + * switch between them with PROGRAM_START_ID.. + */ + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_FROM_ID, 1); + OUT_RING(0); + for (i=0; iprogram_size; i+=4) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST0, 4); + OUT_RING(nvs->program[i + 0]); + OUT_RING(nvs->program[i + 1]); + OUT_RING(nvs->program[i + 2]); + OUT_RING(nvs->program[i + 3]); + } + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_PROGRAM_START_ID, 1); + OUT_RING(0); +} + +static void +NV30VPUpdateConst(GLcontext *ctx, nouveauShader *nvs, int id) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLfloat *val; + + val = nvs->params[id].source_val ? + nvs->params[id].source_val : nvs->params[id].val; + + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_ID, 5); + OUT_RING (id); + OUT_RINGp(val, 4); +} + +/***************************************************************************** + * Assembly routines + */ + +/***************************************************************************** + * Disassembly routines + */ +static unsigned int +NV30VPGetOpcodeHW(nvsFunc * shader, int slot) +{ + int op; + + if (slot) { + op = (shader->inst[1] & NV30_VP_INST_SCA_OPCODEL_MASK) + >> NV30_VP_INST_SCA_OPCODEL_SHIFT; + op |= ((shader->inst[0] & NV30_VP_INST_SCA_OPCODEH_MASK) + >> NV30_VP_INST_SCA_OPCODEH_SHIFT) << 4; + } + else { + op = (shader->inst[1] & NV30_VP_INST_VEC_OPCODE_MASK) + >> NV30_VP_INST_VEC_OPCODE_SHIFT; + } + + return op; +} + +static nvsRegFile +NV30VPGetDestFile(nvsFunc * shader, int merged) +{ + switch (shader->GetOpcode(shader, merged)) { + case NVS_OP_ARL: + case NVS_OP_ARR: + case NVS_OP_ARA: + return NVS_FILE_ADDRESS; + default: + /*FIXME: This probably isn't correct.. */ + if ((shader->inst[3] & NV30_VP_INST_VDEST_WRITEMASK_MASK) != 0) + return NVS_FILE_RESULT; + if ((shader->inst[3] & NV30_VP_INST_SDEST_WRITEMASK_MASK) != 0) + return NVS_FILE_RESULT; + return NVS_FILE_TEMP; + } +} + +static unsigned int +NV30VPGetDestID(nvsFunc * shader, int merged) +{ + int id; + + switch (shader->GetDestFile(shader, merged)) { + case NVS_FILE_RESULT: + id = ((shader->inst[3] & NV30_VP_INST_DEST_ID_MASK) + >> NV30_VP_INST_DEST_ID_SHIFT); + switch (id) { + case NV30_VP_INST_DEST_POS : return NVS_FR_POSITION; + case NV30_VP_INST_DEST_COL0 : return NVS_FR_COL0; + case NV30_VP_INST_DEST_COL1 : return NVS_FR_COL1; + case NV30_VP_INST_DEST_TC(0): return NVS_FR_TEXCOORD0; + case NV30_VP_INST_DEST_TC(1): return NVS_FR_TEXCOORD1; + case NV30_VP_INST_DEST_TC(2): return NVS_FR_TEXCOORD2; + case NV30_VP_INST_DEST_TC(3): return NVS_FR_TEXCOORD3; + case NV30_VP_INST_DEST_TC(4): return NVS_FR_TEXCOORD4; + case NV30_VP_INST_DEST_TC(5): return NVS_FR_TEXCOORD5; + case NV30_VP_INST_DEST_TC(6): return NVS_FR_TEXCOORD6; + case NV30_VP_INST_DEST_TC(7): return NVS_FR_TEXCOORD7; + default: + return -1; + } + case NVS_FILE_ADDRESS: + case NVS_FILE_TEMP: + return (shader->inst[0] & NV30_VP_INST_DEST_TEMP_ID_MASK) + >> NV30_VP_INST_DEST_TEMP_ID_SHIFT; + default: + return -1; + } +} + +static unsigned int +NV30VPGetDestMask(nvsFunc * shader, int merged) +{ + int hwmask, mask = 0; + + if (shader->GetDestFile(shader, merged) == NVS_FILE_RESULT) + if (shader->GetOpcodeSlot(shader, merged)) + hwmask = (shader->inst[3] & NV30_VP_INST_SDEST_WRITEMASK_MASK) + >> NV30_VP_INST_SDEST_WRITEMASK_SHIFT; + else + hwmask = (shader->inst[3] & NV30_VP_INST_VDEST_WRITEMASK_MASK) + >> NV30_VP_INST_VDEST_WRITEMASK_SHIFT; + else if (shader->GetOpcodeSlot(shader, merged)) + hwmask = (shader->inst[3] & NV30_VP_INST_STEMP_WRITEMASK_MASK) + >> NV30_VP_INST_STEMP_WRITEMASK_SHIFT; + else + hwmask = (shader->inst[3] & NV30_VP_INST_VTEMP_WRITEMASK_MASK) + >> NV30_VP_INST_VTEMP_WRITEMASK_SHIFT; + + if (hwmask & (1 << 3)) mask |= SMASK_X; + if (hwmask & (1 << 2)) mask |= SMASK_Y; + if (hwmask & (1 << 1)) mask |= SMASK_Z; + if (hwmask & (1 << 0)) mask |= SMASK_W; + + return mask; +} + +static int +NV30VPGetSourceID(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_TEMP: + src = shader->GetSourceHW(shader, merged, pos); + return ((src & NV30_VP_SRC_REG_TEMP_ID_MASK) >> + NV30_VP_SRC_REG_TEMP_ID_SHIFT); + case NVS_FILE_CONST: + return ((shader->inst[1] & NV30_VP_INST_CONST_SRC_MASK) + >> NV30_VP_INST_CONST_SRC_SHIFT); + case NVS_FILE_ATTRIB: + src = ((shader->inst[1] & NV30_VP_INST_INPUT_SRC_MASK) + >> NV30_VP_INST_INPUT_SRC_SHIFT); + switch (src) { + case NV30_VP_INST_IN_POS : return NVS_FR_POSITION; + case NV30_VP_INST_IN_COL0 : return NVS_FR_COL0; + case NV30_VP_INST_IN_COL1 : return NVS_FR_COL1; + case NV30_VP_INST_IN_TC(0): return NVS_FR_TEXCOORD0; + case NV30_VP_INST_IN_TC(1): return NVS_FR_TEXCOORD1; + case NV30_VP_INST_IN_TC(2): return NVS_FR_TEXCOORD2; + case NV30_VP_INST_IN_TC(3): return NVS_FR_TEXCOORD3; + case NV30_VP_INST_IN_TC(4): return NVS_FR_TEXCOORD4; + case NV30_VP_INST_IN_TC(5): return NVS_FR_TEXCOORD5; + case NV30_VP_INST_IN_TC(6): return NVS_FR_TEXCOORD6; + case NV30_VP_INST_IN_TC(7): return NVS_FR_TEXCOORD7; + default: + return NVS_FR_UNKNOWN; + } + default: + return -1; + } +} + +static int +NV30VPGetSourceAbs(nvsFunc * shader, int merged, int pos) +{ + struct _op_xlat *opr; + static unsigned int abspos[3] = { + NV30_VP_INST_SRC0_ABS, + NV30_VP_INST_SRC1_ABS, + NV30_VP_INST_SRC2_ABS, + }; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr || opr->srcpos[pos] == -1 || opr->srcpos[pos] > 2) + return 0; + + return ((shader->inst[0] & abspos[opr->srcpos[pos]]) ? 1 : 0); +} + +static int +NV30VPGetRelAddressRegID(nvsFunc * shader) +{ + return ((shader->inst[0] & NV30_VP_INST_ADDR_REG_SELECT_1) ? 1 : 0); +} + +static nvsSwzComp +NV30VPGetRelAddressSwizzle(nvsFunc * shader) +{ + nvsSwzComp swz; + + swz = NV20VP_TX_SWIZZLE[(shader->inst[0] & NV30_VP_INST_ADDR_SWZ_MASK) + >> NV30_VP_INST_ADDR_SWZ_SHIFT]; + return swz; +} + +static int +NV30VPSupportsConditional(nvsFunc * shader) +{ + /*FIXME: Is this true of all ops? */ + return 1; +} + +static int +NV30VPGetConditionUpdate(nvsFunc * shader) +{ + return ((shader->inst[0] & NV30_VP_INST_COND_UPDATE_ENABLE) ? 1 : 0); +} + +static int +NV30VPGetConditionTest(nvsFunc * shader) +{ + int op; + + /* The condition test is unconditionally enabled on some + * instructions. ie: the condition test bit does *NOT* have + * to be set. + * + * FIXME: check other relevant ops for this situation. + */ + op = shader->GetOpcodeHW(shader, 1); + switch (op) { + case NV30_VP_INST_OP_BRA: + return 1; + default: + return ((shader->inst[0] & NV30_VP_INST_COND_TEST_ENABLE) ? 1 : 0); + } +} + +static nvsCond +NV30VPGetCondition(nvsFunc * shader) +{ + int cond; + + cond = ((shader->inst[0] & NV30_VP_INST_COND_MASK) + >> NV30_VP_INST_COND_SHIFT); + + switch (cond) { + case NV30_VP_INST_COND_FL: return NVS_COND_FL; + case NV30_VP_INST_COND_LT: return NVS_COND_LT; + case NV30_VP_INST_COND_EQ: return NVS_COND_EQ; + case NV30_VP_INST_COND_LE: return NVS_COND_LE; + case NV30_VP_INST_COND_GT: return NVS_COND_GT; + case NV30_VP_INST_COND_NE: return NVS_COND_NE; + case NV30_VP_INST_COND_GE: return NVS_COND_GE; + case NV30_VP_INST_COND_TR: return NVS_COND_TR; + default: + return NVS_COND_UNKNOWN; + } +} + +static void +NV30VPGetCondRegSwizzle(nvsFunc * shader, nvsSwzComp *swz) +{ + int swzbits; + + swzbits = (shader->inst[0] & NV30_VP_INST_COND_SWZ_ALL_MASK) + >> NV30_VP_INST_COND_SWZ_ALL_SHIFT; + NV20VPTXSwizzle(swzbits, swz); +} + +static int +NV30VPGetCondRegID(nvsFunc * shader) +{ + return 0; +} + + +static int +NV30VPGetBranch(nvsFunc * shader) +{ + return ((shader->inst[2] & NV30_VP_INST_IADDR_MASK) + >> NV30_VP_INST_IADDR_SHIFT); +} + +void +NV30VPInitShaderFuncs(nvsFunc * shader) +{ + /* Inherit NV20 code, a lot of it is the same */ + NV20VPInitShaderFuncs(shader); + + /* Increase max valid opcode ID, and add new instructions */ + NVVP_TX_VOP_COUNT = NVVP_TX_NVS_OP_COUNT = 32; + + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_FRC, NVS_OP_FRC, 0, -1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_FLR, NVS_OP_FLR, 0, -1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_SEQ, NVS_OP_SEQ, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_SFL, NVS_OP_SFL, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_SGT, NVS_OP_SGT, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_SLE, NVS_OP_SLE, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_SNE, NVS_OP_SNE, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_STR, NVS_OP_STR, 0, 1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_SSG, NVS_OP_SSG, 0, -1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_ARR, NVS_OP_ARR, 0, -1, -1); + MOD_OPCODE(NVVP_TX_VOP, NV30_VP_INST_OP_ARA, NVS_OP_ARA, 3, -1, -1); + + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_BRA, NVS_OP_BRA, -1, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_CAL, NVS_OP_CAL, -1, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_RET, NVS_OP_RET, -1, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_LG2, NVS_OP_LG2, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_EX2, NVS_OP_EX2, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_SIN, NVS_OP_SIN, 2, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV30_VP_INST_OP_COS, NVS_OP_COS, 2, -1, -1); + + shader->UploadToHW = NV30VPUploadToHW; + shader->UpdateConst = NV30VPUpdateConst; + + shader->GetOpcodeHW = NV30VPGetOpcodeHW; + + shader->GetDestFile = NV30VPGetDestFile; + shader->GetDestID = NV30VPGetDestID; + shader->GetDestMask = NV30VPGetDestMask; + + shader->GetSourceID = NV30VPGetSourceID; + shader->GetSourceAbs = NV30VPGetSourceAbs; + + shader->GetRelAddressRegID = NV30VPGetRelAddressRegID; + shader->GetRelAddressSwizzle = NV30VPGetRelAddressSwizzle; + + shader->SupportsConditional = NV30VPSupportsConditional; + shader->GetConditionUpdate = NV30VPGetConditionUpdate; + shader->GetConditionTest = NV30VPGetConditionTest; + shader->GetCondition = NV30VPGetCondition; + shader->GetCondRegSwizzle = NV30VPGetCondRegSwizzle; + shader->GetCondRegID = NV30VPGetCondRegID; + + shader->GetBranch = NV30VPGetBranch; +} + diff --git a/src/mesa/drivers/dri/nouveau/nv40_fragprog.c b/src/mesa/drivers/dri/nouveau/nv40_fragprog.c new file mode 100644 index 0000000000..3d58d6b666 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv40_fragprog.c @@ -0,0 +1,152 @@ +#include "nouveau_shader.h" +#include "nv40_shader.h" + +/* branching ops */ +unsigned int NVFP_TX_BOP_COUNT = 5; +struct _op_xlat NVFP_TX_BOP[64]; + +static struct _op_xlat * +NV40FPGetOPTXRec(nvsFunc * shader, int merged) +{ + struct _op_xlat *opr; + int op; + + op = shader->GetOpcodeHW(shader, 0); + if (shader->inst[2] & NV40_FP_OP_OPCODE_IS_BRANCH) { + opr = NVFP_TX_BOP; + op &= ~NV40_FP_OP_OPCODE_IS_BRANCH; + if (op > NVFP_TX_BOP_COUNT) + return NULL; + } + else { + opr = NVFP_TX_AOP; + if (op > NVFP_TX_AOP_COUNT) + return NULL; + } + + if (opr[op].SOP == NVS_OP_UNKNOWN) + return NULL; + return &opr[op]; +} + +static int +NV40FPGetSourceID(nvsFunc * shader, int merged, int pos) +{ + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_ATTRIB: + switch ((shader->inst[0] & NV40_FP_OP_INPUT_SRC_MASK) + >> NV40_FP_OP_INPUT_SRC_SHIFT) { + case NV40_FP_OP_INPUT_SRC_POSITION: return NVS_FR_POSITION; + case NV40_FP_OP_INPUT_SRC_COL0 : return NVS_FR_COL0; + case NV40_FP_OP_INPUT_SRC_COL1 : return NVS_FR_COL1; + case NV40_FP_OP_INPUT_SRC_FOGC : return NVS_FR_FOGCOORD; + case NV40_FP_OP_INPUT_SRC_TC(0) : return NVS_FR_TEXCOORD0; + case NV40_FP_OP_INPUT_SRC_TC(1) : return NVS_FR_TEXCOORD1; + case NV40_FP_OP_INPUT_SRC_TC(2) : return NVS_FR_TEXCOORD2; + case NV40_FP_OP_INPUT_SRC_TC(3) : return NVS_FR_TEXCOORD3; + case NV40_FP_OP_INPUT_SRC_TC(4) : return NVS_FR_TEXCOORD4; + case NV40_FP_OP_INPUT_SRC_TC(5) : return NVS_FR_TEXCOORD5; + case NV40_FP_OP_INPUT_SRC_TC(6) : return NVS_FR_TEXCOORD6; + case NV40_FP_OP_INPUT_SRC_TC(7) : return NVS_FR_TEXCOORD7; + case NV40_FP_OP_INPUT_SRC_FACING : return NVS_FR_FACING; + default: + return -1; + } + break; + case NVS_FILE_TEMP: + { + unsigned int src; + + src = shader->GetSourceHW(shader, merged, pos); + return ((src & NV40_FP_REG_SRC_MASK) >> NV40_FP_REG_SRC_SHIFT); + } + case NVS_FILE_CONST: /* inlined into fragprog */ + default: + return -1; + } +} + +static int +NV40FPGetBranch(nvsFunc * shader) +{ + return ((shader->inst[2] & NV40_FP_OP_IADDR_MASK) + >> NV40_FP_OP_IADDR_SHIFT);; +} + +static int +NV40FPGetBranchElse(nvsFunc * shader) +{ + return ((shader->inst[2] & NV40_FP_OP_ELSE_ID_MASK) + >> NV40_FP_OP_ELSE_ID_SHIFT); +} + +static int +NV40FPGetBranchEnd(nvsFunc * shader) +{ + return ((shader->inst[3] & NV40_FP_OP_END_ID_MASK) + >> NV40_FP_OP_END_ID_SHIFT); +} + +static int +NV40FPGetLoopCount(nvsFunc * shader) +{ + return ((shader->inst[2] & NV40_FP_OP_LOOP_COUNT_MASK) + >> NV40_FP_OP_LOOP_COUNT_SHIFT); +} + +static int +NV40FPGetLoopInitial(nvsFunc * shader) +{ + return ((shader->inst[2] & NV40_FP_OP_LOOP_INDEX_MASK) + >> NV40_FP_OP_LOOP_INDEX_SHIFT); +} + +static int +NV40FPGetLoopIncrement(nvsFunc * shader) +{ + return ((shader->inst[2] & NV40_FP_OP_LOOP_INCR_MASK) + >> NV40_FP_OP_LOOP_INCR_SHIFT); +} + +void +NV40FPInitShaderFuncs(nvsFunc * shader) +{ + /* Inherit NV30 FP code, it's mostly the same */ + NV30FPInitShaderFuncs(shader); + + /* Kill off opcodes seen on NV30, but not seen on NV40 - need to find + * out if these actually work or not. + * + * update: either LIT/RSQ don't work on nv40, or I generate bad code for + * them. haven't tested the others yet + */ + MOD_OPCODE(NVFP_TX_AOP, 0x1B, NVS_OP_UNKNOWN, -1, -1, -1); /* NV30 RSQ */ + MOD_OPCODE(NVFP_TX_AOP, 0x1E, NVS_OP_UNKNOWN, -1, -1, -1); /* NV30 LIT */ + MOD_OPCODE(NVFP_TX_AOP, 0x1F, NVS_OP_UNKNOWN, -1, -1, -1); /* NV30 LRP */ + MOD_OPCODE(NVFP_TX_AOP, 0x26, NVS_OP_UNKNOWN, -1, -1, -1); /* NV30 POW */ + MOD_OPCODE(NVFP_TX_AOP, 0x36, NVS_OP_UNKNOWN, -1, -1, -1); /* NV30 RFL */ + + /* Extra opcodes supported on NV40 */ + MOD_OPCODE(NVFP_TX_AOP, NV40_FP_OP_OPCODE_DIV , NVS_OP_DIV , 0, 1, -1); + MOD_OPCODE(NVFP_TX_AOP, NV40_FP_OP_OPCODE_DP2A , NVS_OP_DP2A, 0, 1, 2); + MOD_OPCODE(NVFP_TX_AOP, NV40_FP_OP_OPCODE_TXL , NVS_OP_TXL , 0, -1, -1); + + MOD_OPCODE(NVFP_TX_BOP, NV40_FP_OP_BRA_OPCODE_BRK , NVS_OP_BRK , -1, -1, -1); + MOD_OPCODE(NVFP_TX_BOP, NV40_FP_OP_BRA_OPCODE_CAL , NVS_OP_CAL , -1, -1, -1); + MOD_OPCODE(NVFP_TX_BOP, NV40_FP_OP_BRA_OPCODE_IF , NVS_OP_IF , -1, -1, -1); + MOD_OPCODE(NVFP_TX_BOP, NV40_FP_OP_BRA_OPCODE_LOOP, NVS_OP_LOOP, -1, -1, -1); + MOD_OPCODE(NVFP_TX_BOP, NV40_FP_OP_BRA_OPCODE_REP , NVS_OP_REP , -1, -1, -1); + MOD_OPCODE(NVFP_TX_BOP, NV40_FP_OP_BRA_OPCODE_RET , NVS_OP_RET , -1, -1, -1); + + /* fragment.facing */ + shader->GetSourceID = NV40FPGetSourceID; + + /* branching */ + shader->GetOPTXRec = NV40FPGetOPTXRec; + shader->GetBranch = NV40FPGetBranch; + shader->GetBranchElse = NV40FPGetBranchElse; + shader->GetBranchEnd = NV40FPGetBranchEnd; + shader->GetLoopCount = NV40FPGetLoopCount; + shader->GetLoopInitial = NV40FPGetLoopInitial; + shader->GetLoopIncrement = NV40FPGetLoopIncrement; +} diff --git a/src/mesa/drivers/dri/nouveau/nv40_shader.h b/src/mesa/drivers/dri/nouveau/nv40_shader.h new file mode 100644 index 0000000000..2a2b5639b6 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv40_shader.h @@ -0,0 +1,467 @@ +#ifndef __NV40_SHADER_H__ +#define __NV40_SHADER_H__ + +/* Vertex programs instruction set + * + * The NV40 instruction set is very similar to NV30. Most fields are in + * a slightly different position in the instruction however. + * + * Merged instructions + * In some cases it is possible to put two instructions into one opcode + * slot. The rules for when this is OK is not entirely clear to me yet. + * + * There are separate writemasks and dest temp register fields for each + * grouping of instructions. There is however only one field with the + * ID of a result register. Writing to temp/result regs is selected by + * setting VEC_RESULT/SCA_RESULT. + * + * Temporary registers + * The source/dest temp register fields have been extended by 1 bit, to + * give a total of 32 temporary registers. + * + * Relative Addressing + * NV40 can use an address register to index into vertex attribute regs. + * This is done by putting the offset value into INPUT_SRC and setting + * the INDEX_INPUT flag. + * + * Conditional execution (see NV_vertex_program{2,3} for details) + * There is a second condition code register on NV40, it's use is enabled + * by setting the COND_REG_SELECT_1 flag. + * + * Texture lookup + * TODO + */ + +/* ---- OPCODE BITS 127:96 / data DWORD 0 --- */ +#define NV40_VP_INST_VEC_RESULT (1 << 30) +/* uncertain.. */ +#define NV40_VP_INST_COND_UPDATE_ENABLE ((1 << 14)|1<<29) +/* use address reg as index into attribs */ +#define NV40_VP_INST_INDEX_INPUT (1 << 27) +#define NV40_VP_INST_COND_REG_SELECT_1 (1 << 25) +#define NV40_VP_INST_ADDR_REG_SELECT_1 (1 << 24) +#define NV40_VP_INST_SRC2_ABS (1 << 23) +#define NV40_VP_INST_SRC1_ABS (1 << 22) +#define NV40_VP_INST_SRC0_ABS (1 << 21) +#define NV40_VP_INST_VEC_DEST_TEMP_SHIFT 15 +#define NV40_VP_INST_VEC_DEST_TEMP_MASK (0x1F << 15) +#define NV40_VP_INST_COND_TEST_ENABLE (1 << 13) +#define NV40_VP_INST_COND_SHIFT 10 +#define NV40_VP_INST_COND_MASK (0x7 << 10) +# define NV40_VP_INST_COND_FL 0 +# define NV40_VP_INST_COND_LT 1 +# define NV40_VP_INST_COND_EQ 2 +# define NV40_VP_INST_COND_LE 3 +# define NV40_VP_INST_COND_GT 4 +# define NV40_VP_INST_COND_NE 5 +# define NV40_VP_INST_COND_GE 6 +# define NV40_VP_INST_COND_TR 7 +#define NV40_VP_INST_COND_SWZ_X_SHIFT 8 +#define NV40_VP_INST_COND_SWZ_X_MASK (3 << 8) +#define NV40_VP_INST_COND_SWZ_Y_SHIFT 6 +#define NV40_VP_INST_COND_SWZ_Y_MASK (3 << 6) +#define NV40_VP_INST_COND_SWZ_Z_SHIFT 4 +#define NV40_VP_INST_COND_SWZ_Z_MASK (3 << 4) +#define NV40_VP_INST_COND_SWZ_W_SHIFT 2 +#define NV40_VP_INST_COND_SWZ_W_MASK (3 << 2) +#define NV40_VP_INST_COND_SWZ_ALL_SHIFT 2 +#define NV40_VP_INST_COND_SWZ_ALL_MASK (0xFF << 2) +#define NV40_VP_INST_ADDR_SWZ_SHIFT 0 +#define NV40_VP_INST_ADDR_SWZ_MASK (0x03 << 0) +#define NV40_VP_INST0_KNOWN ( \ + NV40_VP_INST_INDEX_INPUT | \ + NV40_VP_INST_COND_REG_SELECT_1 | \ + NV40_VP_INST_ADDR_REG_SELECT_1 | \ + NV40_VP_INST_SRC2_ABS | \ + NV40_VP_INST_SRC1_ABS | \ + NV40_VP_INST_SRC0_ABS | \ + NV40_VP_INST_VEC_DEST_TEMP_MASK | \ + NV40_VP_INST_COND_TEST_ENABLE | \ + NV40_VP_INST_COND_MASK | \ + NV40_VP_INST_COND_SWZ_ALL_MASK | \ + NV40_VP_INST_ADDR_SWZ_MASK) + +/* ---- OPCODE BITS 95:64 / data DWORD 1 --- */ +#define NV40_VP_INST_VEC_OPCODE_SHIFT 22 +#define NV40_VP_INST_VEC_OPCODE_MASK (0x1F << 22) +# define NV40_VP_INST_OP_NOP 0x00 +# define NV40_VP_INST_OP_MOV 0x01 +# define NV40_VP_INST_OP_MUL 0x02 +# define NV40_VP_INST_OP_ADD 0x03 +# define NV40_VP_INST_OP_MAD 0x04 +# define NV40_VP_INST_OP_DP3 0x05 +# define NV40_VP_INST_OP_DP4 0x07 +# define NV40_VP_INST_OP_DPH 0x06 +# define NV40_VP_INST_OP_DST 0x08 +# define NV40_VP_INST_OP_MIN 0x09 +# define NV40_VP_INST_OP_MAX 0x0A +# define NV40_VP_INST_OP_SLT 0x0B +# define NV40_VP_INST_OP_SGE 0x0C +# define NV40_VP_INST_OP_ARL 0x0D +# define NV40_VP_INST_OP_FRC 0x0E +# define NV40_VP_INST_OP_FLR 0x0F +# define NV40_VP_INST_OP_SEQ 0x10 +# define NV40_VP_INST_OP_SFL 0x11 +# define NV40_VP_INST_OP_SGT 0x12 +# define NV40_VP_INST_OP_SLE 0x13 +# define NV40_VP_INST_OP_SNE 0x14 +# define NV40_VP_INST_OP_STR 0x15 +# define NV40_VP_INST_OP_SSG 0x16 +# define NV40_VP_INST_OP_ARR 0x17 +# define NV40_VP_INST_OP_ARA 0x18 +# define NV40_VP_INST_OP_TXWHAT 0x19 +#define NV40_VP_INST_SCA_OPCODE_SHIFT 27 +#define NV40_VP_INST_SCA_OPCODE_MASK (0x1F << 27) +# define NV40_VP_INST_OP_RCP 0x02 +# define NV40_VP_INST_OP_RCC 0x03 +# define NV40_VP_INST_OP_RSQ 0x04 +# define NV40_VP_INST_OP_EXP 0x05 +# define NV40_VP_INST_OP_LOG 0x06 +# define NV40_VP_INST_OP_LIT 0x07 +# define NV40_VP_INST_OP_BRA 0x09 +# define NV40_VP_INST_OP_CAL 0x0B +# define NV40_VP_INST_OP_RET 0x0C +# define NV40_VP_INST_OP_LG2 0x0D +# define NV40_VP_INST_OP_EX2 0x0E +# define NV40_VP_INST_OP_SIN 0x0F +# define NV40_VP_INST_OP_COS 0x10 +# define NV40_VP_INST_OP_PUSHA 0x13 +# define NV40_VP_INST_OP_POPA 0x14 +#define NV40_VP_INST_CONST_SRC_SHIFT 12 +#define NV40_VP_INST_CONST_SRC_MASK (0xFF << 12) +#define NV40_VP_INST_INPUT_SRC_SHIFT 8 +#define NV40_VP_INST_INPUT_SRC_MASK (0x0F << 8) +# define NV40_VP_INST_IN_POS 0 +# define NV40_VP_INST_IN_WEIGHT 1 +# define NV40_VP_INST_IN_NORMAL 2 +# define NV40_VP_INST_IN_COL0 3 +# define NV40_VP_INST_IN_COL1 4 +# define NV40_VP_INST_IN_FOGC 5 +# define NV40_VP_INST_IN_TC0 8 +# define NV40_VP_INST_IN_TC(n) (8+n) +#define NV40_VP_INST_SRC0H_SHIFT 0 +#define NV40_VP_INST_SRC0H_MASK (0xFF << 0) +#define NV40_VP_INST1_KNOWN ( \ + NV40_VP_INST_VEC_OPCODE_MASK | \ + NV40_VP_INST_SCA_OPCODE_MASK | \ + NV40_VP_INST_CONST_SRC_MASK | \ + NV40_VP_INST_INPUT_SRC_MASK | \ + NV40_VP_INST_SRC0H_MASK \ + ) + +/* ---- OPCODE BITS 63:32 / data DWORD 2 --- */ +#define NV40_VP_INST_SRC0L_SHIFT 23 +#define NV40_VP_INST_SRC0L_MASK (0x1FF << 23) +#define NV40_VP_INST_SRC1_SHIFT 6 +#define NV40_VP_INST_SRC1_MASK (0x1FFFF << 6) +#define NV40_VP_INST_SRC2H_SHIFT 0 +#define NV40_VP_INST_SRC2H_MASK (0x3F << 0) +#define NV40_VP_INST_IADDRH_SHIFT 0 +#define NV40_VP_INST_IADDRH_MASK (0x1F << 0) + +/* ---- OPCODE BITS 31:0 / data DWORD 3 --- */ +#define NV40_VP_INST_IADDRL_SHIFT 29 +#define NV40_VP_INST_IADDRL_MASK (7 << 29) +#define NV40_VP_INST_SRC2L_SHIFT 21 +#define NV40_VP_INST_SRC2L_MASK (0x7FF << 21) +#define NV40_VP_INST_SCA_WRITEMASK_SHIFT 17 +#define NV40_VP_INST_SCA_WRITEMASK_MASK (0xF << 17) +# define NV40_VP_INST_SCA_WRITEMASK_X (1 << 20) +# define NV40_VP_INST_SCA_WRITEMASK_Y (1 << 19) +# define NV40_VP_INST_SCA_WRITEMASK_Z (1 << 18) +# define NV40_VP_INST_SCA_WRITEMASK_W (1 << 17) +#define NV40_VP_INST_VEC_WRITEMASK_SHIFT 13 +#define NV40_VP_INST_VEC_WRITEMASK_MASK (0xF << 13) +# define NV40_VP_INST_VEC_WRITEMASK_X (1 << 16) +# define NV40_VP_INST_VEC_WRITEMASK_Y (1 << 15) +# define NV40_VP_INST_VEC_WRITEMASK_Z (1 << 14) +# define NV40_VP_INST_VEC_WRITEMASK_W (1 << 13) +#define NV40_VP_INST_SCA_RESULT (1 << 12) +#define NV40_VP_INST_SCA_DEST_TEMP_SHIFT 7 +#define NV40_VP_INST_SCA_DEST_TEMP_MASK (0x1F << 7) +#define NV40_VP_INST_DEST_SHIFT 2 +#define NV40_VP_INST_DEST_MASK (31 << 2) +# define NV40_VP_INST_DEST_POS 0 +# define NV40_VP_INST_DEST_COL0 1 +# define NV40_VP_INST_DEST_COL1 2 +# define NV40_VP_INST_DEST_BFC0 3 +# define NV40_VP_INST_DEST_BFC1 4 +# define NV40_VP_INST_DEST_FOGC 5 +# define NV40_VP_INST_DEST_PSZ 6 +# define NV40_VP_INST_DEST_TC0 7 +# define NV40_VP_INST_DEST_TC(n) (7+n) +# define NV40_VP_INST_DEST_TEMP 0x1F +#define NV40_VP_INST_INDEX_CONST (1 << 1) +#define NV40_VP_INST_LAST (1 << 0) +#define NV40_VP_INST3_KNOWN ( \ + NV40_VP_INST_SRC2L_MASK |\ + NV40_VP_INST_SCA_WRITEMASK_MASK |\ + NV40_VP_INST_VEC_WRITEMASK_MASK |\ + NV40_VP_INST_SCA_DEST_TEMP_MASK |\ + NV40_VP_INST_DEST_MASK |\ + NV40_VP_INST_INDEX_CONST) + +/* Useful to split the source selection regs into their pieces */ +#define NV40_VP_SRC0_HIGH_SHIFT 9 +#define NV40_VP_SRC0_HIGH_MASK 0x0001FE00 +#define NV40_VP_SRC0_LOW_MASK 0x000001FF +#define NV40_VP_SRC2_HIGH_SHIFT 11 +#define NV40_VP_SRC2_HIGH_MASK 0x0001F800 +#define NV40_VP_SRC2_LOW_MASK 0x000007FF + +/* Source selection - these are the bits you fill NV40_VP_INST_SRCn with */ +#define NV40_VP_SRC_NEGATE (1 << 16) +#define NV40_VP_SRC_SWZ_X_SHIFT 14 +#define NV40_VP_SRC_SWZ_X_MASK (3 << 14) +#define NV40_VP_SRC_SWZ_Y_SHIFT 12 +#define NV40_VP_SRC_SWZ_Y_MASK (3 << 12) +#define NV40_VP_SRC_SWZ_Z_SHIFT 10 +#define NV40_VP_SRC_SWZ_Z_MASK (3 << 10) +#define NV40_VP_SRC_SWZ_W_SHIFT 8 +#define NV40_VP_SRC_SWZ_W_MASK (3 << 8) +#define NV40_VP_SRC_SWZ_ALL_SHIFT 8 +#define NV40_VP_SRC_SWZ_ALL_MASK (0xFF << 8) +#define NV40_VP_SRC_TEMP_SRC_SHIFT 2 +#define NV40_VP_SRC_TEMP_SRC_MASK (0x1F << 2) +#define NV40_VP_SRC_REG_TYPE_SHIFT 0 +#define NV40_VP_SRC_REG_TYPE_MASK (3 << 0) +# define NV40_VP_SRC_REG_TYPE_UNK0 0 +# define NV40_VP_SRC_REG_TYPE_TEMP 1 +# define NV40_VP_SRC_REG_TYPE_INPUT 2 +# define NV40_VP_SRC_REG_TYPE_CONST 3 + + +/* + * Each fragment program opcode appears to be comprised of 4 32-bit values. + * + * 0 - Opcode, output reg/mask, ATTRIB source + * 1 - Source 0 + * 2 - Source 1 + * 3 - Source 2 + * + * There appears to be no special difference between result regs and temp regs. + * result.color == R0.xyzw + * result.depth == R1.z + * When the fragprog contains instructions to write depth, + * NV30_TCL_PRIMITIVE_3D_UNK1D78=0 otherwise it is set to 1. + * + * Constants are inserted directly after the instruction that uses them. + * + * It appears that it's not possible to use two input registers in one + * instruction as the input sourcing is done in the instruction dword + * and not the source selection dwords. As such instructions such as: + * + * ADD result.color, fragment.color, fragment.texcoord[0]; + * + * must be split into two MOV's and then an ADD (nvidia does this) but + * I'm not sure why it's not just one MOV and then source the second input + * in the ADD instruction.. + * + * Negation of the full source is done with NV30_FP_REG_NEGATE, arbitrary + * negation requires multiplication with a const. + * + * Arbitrary swizzling is supported with the exception of SWIZZLE_ZERO and + * SWIZZLE_ONE. + * + * The temp/result regs appear to be initialised to (0.0, 0.0, 0.0, 0.0) as + * SWIZZLE_ZERO is implemented simply by not writing to the relevant components + * of the destination. + * + * Looping + * Loops appear to be fairly expensive on NV40 at least, the proprietary + * driver goes to a lot of effort to avoid using the native looping + * instructions. If the total number of *executed* instructions between + * REP/ENDREP or LOOP/ENDLOOP is <=500, the driver will unroll the loop. + * The maximum loop count is 255. + * + * Conditional execution + * TODO + * + * Non-native instructions: + * LIT + * LRP - MAD+MAD + * SUB - ADD, negate second source + * RSQ - LG2 + EX2 + * POW - LG2 + MUL + EX2 + * SCS - COS + SIN + * XPD + * DP2 - MUL + ADD + * NRM + */ + +//== Opcode / Destination selection == +#define NV40_FP_OP_PROGRAM_END (1 << 0) +#define NV40_FP_OP_OUT_REG_SHIFT 1 +#define NV40_FP_OP_OUT_REG_MASK (31 << 1) +/* Needs to be set when writing outputs to get expected result.. */ +#define NV40_FP_OP_UNK0_7 (1 << 7) +#define NV40_FP_OP_COND_WRITE_ENABLE (1 << 8) +#define NV40_FP_OP_OUTMASK_SHIFT 9 +#define NV40_FP_OP_OUTMASK_MASK (0xF << 9) +# define NV40_FP_OP_OUT_X (1 << 9) +# define NV40_FP_OP_OUT_Y (1 <<10) +# define NV40_FP_OP_OUT_Z (1 <<11) +# define NV40_FP_OP_OUT_W (1 <<12) +/* Uncertain about these, especially the input_src values.. it's possible that + * they can be dynamically changed. + */ +#define NV40_FP_OP_INPUT_SRC_SHIFT 13 +#define NV40_FP_OP_INPUT_SRC_MASK (15 << 13) +# define NV40_FP_OP_INPUT_SRC_POSITION 0x0 +# define NV40_FP_OP_INPUT_SRC_COL0 0x1 +# define NV40_FP_OP_INPUT_SRC_COL1 0x2 +# define NV40_FP_OP_INPUT_SRC_FOGC 0x3 +# define NV40_FP_OP_INPUT_SRC_TC0 0x4 +# define NV40_FP_OP_INPUT_SRC_TC(n) (0x4 + n) +# define NV40_FP_OP_INPUT_SRC_FACING 0xE +#define NV40_FP_OP_TEX_UNIT_SHIFT 17 +#define NV40_FP_OP_TEX_UNIT_MASK (0xF << 17) +#define NV40_FP_OP_PRECISION_SHIFT 22 +#define NV40_FP_OP_PRECISION_MASK (3 << 22) +# define NV40_FP_PRECISION_FP32 0 +# define NV40_FP_PRECISION_FP16 1 +# define NV40_FP_PRECISION_FX12 2 +#define NV40_FP_OP_OPCODE_SHIFT 24 +#define NV40_FP_OP_OPCODE_MASK (0x3F << 24) +# define NV40_FP_OP_OPCODE_NOP 0x00 +# define NV40_FP_OP_OPCODE_MOV 0x01 +# define NV40_FP_OP_OPCODE_MUL 0x02 +# define NV40_FP_OP_OPCODE_ADD 0x03 +# define NV40_FP_OP_OPCODE_MAD 0x04 +# define NV40_FP_OP_OPCODE_DP3 0x05 +# define NV40_FP_OP_OPCODE_DP4 0x06 +# define NV40_FP_OP_OPCODE_DST 0x07 +# define NV40_FP_OP_OPCODE_MIN 0x08 +# define NV40_FP_OP_OPCODE_MAX 0x09 +# define NV40_FP_OP_OPCODE_SLT 0x0A +# define NV40_FP_OP_OPCODE_SGE 0x0B +# define NV40_FP_OP_OPCODE_SLE 0x0C +# define NV40_FP_OP_OPCODE_SGT 0x0D +# define NV40_FP_OP_OPCODE_SNE 0x0E +# define NV40_FP_OP_OPCODE_SEQ 0x0F +# define NV40_FP_OP_OPCODE_FRC 0x10 +# define NV40_FP_OP_OPCODE_FLR 0x11 +# define NV40_FP_OP_OPCODE_KIL 0x12 +# define NV40_FP_OP_OPCODE_PK4B 0x13 +# define NV40_FP_OP_OPCODE_UP4B 0x14 +/* DDX/DDY can only write to XY */ +# define NV40_FP_OP_OPCODE_DDX 0x15 +# define NV40_FP_OP_OPCODE_DDY 0x16 +# define NV40_FP_OP_OPCODE_TEX 0x17 +# define NV40_FP_OP_OPCODE_TXP 0x18 +# define NV40_FP_OP_OPCODE_TXD 0x19 +# define NV40_FP_OP_OPCODE_RCP 0x1A +# define NV40_FP_OP_OPCODE_EX2 0x1C +# define NV40_FP_OP_OPCODE_LG2 0x1D +# define NV40_FP_OP_OPCODE_COS 0x22 +# define NV40_FP_OP_OPCODE_SIN 0x23 +# define NV40_FP_OP_OPCODE_PK2H 0x24 +# define NV40_FP_OP_OPCODE_UP2H 0x25 +# define NV40_FP_OP_OPCODE_PK4UB 0x27 +# define NV40_FP_OP_OPCODE_UP4UB 0x28 +# define NV40_FP_OP_OPCODE_PK2US 0x29 +# define NV40_FP_OP_OPCODE_UP2US 0x2A +# define NV40_FP_OP_OPCODE_DP2A 0x2E +# define NV40_FP_OP_OPCODE_TXL 0x2F +# define NV40_FP_OP_OPCODE_TXB 0x31 +# define NV40_FP_OP_OPCODE_DIV 0x3A +/* The use of these instructions appears to be indicated by bit 31 of DWORD 2.*/ +# define NV40_FP_OP_BRA_OPCODE_BRK 0x0 +# define NV40_FP_OP_BRA_OPCODE_CAL 0x1 +# define NV40_FP_OP_BRA_OPCODE_IF 0x2 +# define NV40_FP_OP_BRA_OPCODE_LOOP 0x3 +# define NV40_FP_OP_BRA_OPCODE_REP 0x4 +# define NV40_FP_OP_BRA_OPCODE_RET 0x5 +#define NV40_FP_OP_OUT_SAT (1 << 31) + +/* high order bits of SRC0 */ +#define NV40_FP_OP_OUT_ABS (1 << 29) +#define NV40_FP_OP_COND_SWZ_W_SHIFT 27 +#define NV40_FP_OP_COND_SWZ_W_MASK (3 << 27) +#define NV40_FP_OP_COND_SWZ_Z_SHIFT 25 +#define NV40_FP_OP_COND_SWZ_Z_MASK (3 << 25) +#define NV40_FP_OP_COND_SWZ_Y_SHIFT 23 +#define NV40_FP_OP_COND_SWZ_Y_MASK (3 << 23) +#define NV40_FP_OP_COND_SWZ_X_SHIFT 21 +#define NV40_FP_OP_COND_SWZ_X_MASK (3 << 21) +#define NV40_FP_OP_COND_SWZ_ALL_SHIFT 21 +#define NV40_FP_OP_COND_SWZ_ALL_MASK (0xFF << 21) +#define NV40_FP_OP_COND_SHIFT 18 +#define NV40_FP_OP_COND_MASK (0x07 << 18) +# define NV40_FP_OP_COND_FL 0 +# define NV40_FP_OP_COND_LT 1 +# define NV40_FP_OP_COND_EQ 2 +# define NV40_FP_OP_COND_LE 3 +# define NV40_FP_OP_COND_GT 4 +# define NV40_FP_OP_COND_NE 5 +# define NV40_FP_OP_COND_GE 6 +# define NV40_FP_OP_COND_TR 7 + +/* high order bits of SRC1 */ +#define NV40_FP_OP_OPCODE_IS_BRANCH (1<<31) +#define NV40_FP_OP_SRC_SCALE_SHIFT 28 +#define NV40_FP_OP_SRC_SCALE_MASK (3 << 28) + +/* SRC1 LOOP */ +#define NV40_FP_OP_LOOP_INCR_SHIFT 19 +#define NV40_FP_OP_LOOP_INCR_MASK (0xFF << 19) +#define NV40_FP_OP_LOOP_INDEX_SHIFT 10 +#define NV40_FP_OP_LOOP_INDEX_MASK (0xFF << 10) +#define NV40_FP_OP_LOOP_COUNT_SHIFT 2 +#define NV40_FP_OP_LOOP_COUNT_MASK (0xFF << 2) + +/* SRC1 IF */ +#define NV40_FP_OP_ELSE_ID_SHIFT 2 +#define NV40_FP_OP_ELSE_ID_MASK (0xFF << 2) + +/* SRC1 CAL */ +#define NV40_FP_OP_IADDR_SHIFT 2 +#define NV40_FP_OP_IADDR_MASK (0xFF << 2) + +/* SRC1 REP + * I have no idea why there are 3 count values here.. but they + * have always been filled with the same value in my tests so + * far.. + */ +#define NV40_FP_OP_REP_COUNT1_SHIFT 2 +#define NV40_FP_OP_REP_COUNT1_MASK (0xFF << 2) +#define NV40_FP_OP_REP_COUNT2_SHIFT 10 +#define NV40_FP_OP_REP_COUNT2_MASK (0xFF << 10) +#define NV40_FP_OP_REP_COUNT3_SHIFT 19 +#define NV40_FP_OP_REP_COUNT3_MASK (0xFF << 19) + +/* SRC2 REP/IF */ +#define NV40_FP_OP_END_ID_SHIFT 2 +#define NV40_FP_OP_END_ID_MASK (0xFF << 2) + +// SRC2 high-order +#define NV40_FP_OP_INDEX_INPUT (1 << 30) +#define NV40_FP_OP_ADDR_INDEX_SHIFT 19 +#define NV40_FP_OP_ADDR_INDEX_MASK (0xF << 19) + +//== Register selection == +#define NV40_FP_REG_TYPE_SHIFT 0 +#define NV40_FP_REG_TYPE_MASK (3 << 0) +# define NV40_FP_REG_TYPE_TEMP 0 +# define NV40_FP_REG_TYPE_INPUT 1 +# define NV40_FP_REG_TYPE_CONST 2 +#define NV40_FP_REG_SRC_SHIFT 2 +#define NV40_FP_REG_SRC_MASK (31 << 2) +#define NV40_FP_REG_UNK_0 (1 << 8) +#define NV40_FP_REG_SWZ_ALL_SHIFT 9 +#define NV40_FP_REG_SWZ_ALL_MASK (255 << 9) +#define NV40_FP_REG_SWZ_X_SHIFT 9 +#define NV40_FP_REG_SWZ_X_MASK (3 << 9) +#define NV40_FP_REG_SWZ_Y_SHIFT 11 +#define NV40_FP_REG_SWZ_Y_MASK (3 << 11) +#define NV40_FP_REG_SWZ_Z_SHIFT 13 +#define NV40_FP_REG_SWZ_Z_MASK (3 << 13) +#define NV40_FP_REG_SWZ_W_SHIFT 15 +#define NV40_FP_REG_SWZ_W_MASK (3 << 15) +# define NV40_FP_SWIZZLE_X 0 +# define NV40_FP_SWIZZLE_Y 1 +# define NV40_FP_SWIZZLE_Z 2 +# define NV40_FP_SWIZZLE_W 3 +#define NV40_FP_REG_NEGATE (1 << 17) + +#endif diff --git a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c new file mode 100644 index 0000000000..111c6de71b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c @@ -0,0 +1,647 @@ +#include "nouveau_shader.h" +#include "nouveau_msg.h" +#include "nv40_shader.h" + +extern nvsSwzComp NV20VP_TX_SWIZZLE[4]; +extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz); + +/***************************************************************************** + * Assembly routines + */ +static int +NV40VPSupportsOpcode(nvsFunc * shader, nvsOpcode op) +{ + if (shader->GetOPTXFromSOP(op, NULL)) + return 1; + return 0; +} + +static void +NV40VPSetOpcode(nvsFunc *shader, unsigned int opcode, int slot) +{ + if (slot) shader->inst[1] |= (opcode << NV40_VP_INST_SCA_OPCODE_SHIFT); + else shader->inst[1] |= (opcode << NV40_VP_INST_VEC_OPCODE_SHIFT); +} + +static void +NV40VPSetCCUpdate(nvsFunc *shader) +{ + shader->inst[0] |= NV40_VP_INST_COND_UPDATE_ENABLE; +} + +static void +NV40VPSetCondition(nvsFunc *shader, int on, nvsCond cond, int reg, + nvsSwzComp *swizzle) +{ + unsigned int hwcond; + + if (on ) shader->inst[0] |= NV40_VP_INST_COND_TEST_ENABLE; + if (reg) shader->inst[0] |= NV40_VP_INST_COND_REG_SELECT_1; + + switch (cond) { + case NVS_COND_TR: hwcond = NV40_VP_INST_COND_TR; break; + case NVS_COND_FL: hwcond = NV40_VP_INST_COND_FL; break; + case NVS_COND_LT: hwcond = NV40_VP_INST_COND_LT; break; + case NVS_COND_GT: hwcond = NV40_VP_INST_COND_GT; break; + case NVS_COND_NE: hwcond = NV40_VP_INST_COND_NE; break; + case NVS_COND_EQ: hwcond = NV40_VP_INST_COND_EQ; break; + case NVS_COND_GE: hwcond = NV40_VP_INST_COND_GE; break; + case NVS_COND_LE: hwcond = NV40_VP_INST_COND_LE; break; + default: + WARN_ONCE("unknown vp cond %d\n", cond); + hwcond = NV40_VP_INST_COND_TR; + break; + } + shader->inst[0] |= (hwcond << NV40_VP_INST_COND_SHIFT); + + shader->inst[0] |= (swizzle[NVS_SWZ_X] << NV40_VP_INST_COND_SWZ_X_SHIFT); + shader->inst[0] |= (swizzle[NVS_SWZ_Y] << NV40_VP_INST_COND_SWZ_Y_SHIFT); + shader->inst[0] |= (swizzle[NVS_SWZ_Z] << NV40_VP_INST_COND_SWZ_Z_SHIFT); + shader->inst[0] |= (swizzle[NVS_SWZ_W] << NV40_VP_INST_COND_SWZ_W_SHIFT); +} + +static void +NV40VPSetResult(nvsFunc *shader, nvsRegister * dest, unsigned int mask, + int slot) +{ + unsigned int hwmask = 0; + + if (mask & SMASK_X) hwmask |= (1 << 3); + if (mask & SMASK_Y) hwmask |= (1 << 2); + if (mask & SMASK_Z) hwmask |= (1 << 1); + if (mask & SMASK_W) hwmask |= (1 << 0); + + if (dest->file == NVS_FILE_RESULT) { + int hwidx; + + switch (dest->index) { + case NVS_FR_POSITION : hwidx = NV40_VP_INST_DEST_POS; break; + case NVS_FR_COL0 : hwidx = NV40_VP_INST_DEST_COL0; break; + case NVS_FR_COL1 : hwidx = NV40_VP_INST_DEST_COL1; break; + case NVS_FR_BFC0 : hwidx = NV40_VP_INST_DEST_BFC0; break; + case NVS_FR_BFC1 : hwidx = NV40_VP_INST_DEST_BFC1; break; + case NVS_FR_FOGCOORD : hwidx = NV40_VP_INST_DEST_FOGC; break; + case NVS_FR_POINTSZ : hwidx = NV40_VP_INST_DEST_PSZ; break; + case NVS_FR_TEXCOORD0: hwidx = NV40_VP_INST_DEST_TC(0); break; + case NVS_FR_TEXCOORD1: hwidx = NV40_VP_INST_DEST_TC(1); break; + case NVS_FR_TEXCOORD2: hwidx = NV40_VP_INST_DEST_TC(2); break; + case NVS_FR_TEXCOORD3: hwidx = NV40_VP_INST_DEST_TC(3); break; + case NVS_FR_TEXCOORD4: hwidx = NV40_VP_INST_DEST_TC(4); break; + case NVS_FR_TEXCOORD5: hwidx = NV40_VP_INST_DEST_TC(5); break; + case NVS_FR_TEXCOORD6: hwidx = NV40_VP_INST_DEST_TC(6); break; + case NVS_FR_TEXCOORD7: hwidx = NV40_VP_INST_DEST_TC(7); break; + default: + WARN_ONCE("unknown vtxprog output %d\n", dest->index); + hwidx = 0; + break; + } + shader->inst[3] |= (hwidx << NV40_VP_INST_DEST_SHIFT); + + if (slot) { + shader->inst[3] |= NV40_VP_INST_SCA_RESULT; + shader->inst[3] |= NV40_VP_INST_SCA_DEST_TEMP_MASK; + } else { + shader->inst[0] |= NV40_VP_INST_VEC_RESULT; + shader->inst[0] |= NV40_VP_INST_VEC_DEST_TEMP_MASK | (1<<20); + } + } else { + /* NVS_FILE_TEMP || NVS_FILE_ADDRESS */ + if (slot) + shader->inst[3] |= (dest->index << NV40_VP_INST_SCA_DEST_TEMP_SHIFT); + else + shader->inst[0] |= (dest->index << NV40_VP_INST_VEC_DEST_TEMP_SHIFT); + } + + if (slot) shader->inst[3] |= (hwmask << NV40_VP_INST_SCA_WRITEMASK_SHIFT); + else shader->inst[3] |= (hwmask << NV40_VP_INST_VEC_WRITEMASK_SHIFT); +} + +static void +NV40VPInsertSource(nvsFunc *shader, unsigned int hw, int pos) +{ + switch (pos) { + case 0: + shader->inst[1] |= ((hw & NV40_VP_SRC0_HIGH_MASK) >> + NV40_VP_SRC0_HIGH_SHIFT) + << NV40_VP_INST_SRC0H_SHIFT; + shader->inst[2] |= (hw & NV40_VP_SRC0_LOW_MASK) + << NV40_VP_INST_SRC0L_SHIFT; + break; + case 1: + shader->inst[2] |= hw + << NV40_VP_INST_SRC1_SHIFT; + break; + case 2: + shader->inst[2] |= ((hw & NV40_VP_SRC2_HIGH_MASK) >> + NV40_VP_SRC2_HIGH_SHIFT) + << NV40_VP_INST_SRC2H_SHIFT; + shader->inst[3] |= (hw & NV40_VP_SRC2_LOW_MASK) + << NV40_VP_INST_SRC2L_SHIFT; + break; + default: + assert(0); + break; + } +} + +static void +NV40VPSetSource(nvsFunc *shader, nvsRegister * src, int pos) +{ + unsigned int hw = 0; + + switch (src->file) { + case NVS_FILE_ADDRESS: + break; + case NVS_FILE_ATTRIB: + hw |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); + + shader->inst[1] |= (src->index << NV40_VP_INST_INPUT_SRC_SHIFT); + if (src->indexed) { + shader->inst[0] |= NV40_VP_INST_INDEX_INPUT; + if (src->addr_reg) + shader->inst[0] |= NV40_VP_INST_ADDR_REG_SELECT_1; + shader->inst[0] |= (src->addr_comp << NV40_VP_INST_ADDR_SWZ_SHIFT); + } + break; + case NVS_FILE_CONST: + hw |= (NV40_VP_SRC_REG_TYPE_CONST << NV40_VP_SRC_REG_TYPE_SHIFT); + + shader->inst[1] |= (src->index << NV40_VP_INST_CONST_SRC_SHIFT); + if (src->indexed) { + shader->inst[3] |= NV40_VP_INST_INDEX_CONST; + if (src->addr_reg) + shader->inst[0] |= NV40_VP_INST_ADDR_REG_SELECT_1; + shader->inst[0] |= (src->addr_comp << NV40_VP_INST_ADDR_SWZ_SHIFT); + } + break; + case NVS_FILE_TEMP: + hw |= (NV40_VP_SRC_REG_TYPE_TEMP << NV40_VP_SRC_REG_TYPE_SHIFT); + hw |= (src->index << NV40_VP_SRC_TEMP_SRC_SHIFT); + break; + default: + fprintf(stderr, "unknown source file %d\n", src->file); + assert(0); + break; + } + + if (src->file != NVS_FILE_ADDRESS) { + if (src->negate) + hw |= NV40_VP_SRC_NEGATE; + if (src->abs) + shader->inst[0] |= (1 << (21 + pos)); + hw |= (src->swizzle[0] << NV40_VP_SRC_SWZ_X_SHIFT); + hw |= (src->swizzle[1] << NV40_VP_SRC_SWZ_Y_SHIFT); + hw |= (src->swizzle[2] << NV40_VP_SRC_SWZ_Z_SHIFT); + hw |= (src->swizzle[3] << NV40_VP_SRC_SWZ_W_SHIFT); + + NV40VPInsertSource(shader, hw, pos); + } +} + +static void +NV40VPSetUnusedSource(nvsFunc *shader, int pos) +{ + unsigned int hw; + + hw = ((NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT) | + (NVS_SWZ_X << NV40_VP_SRC_SWZ_X_SHIFT) | + (NVS_SWZ_Y << NV40_VP_SRC_SWZ_Y_SHIFT) | + (NVS_SWZ_Z << NV40_VP_SRC_SWZ_Z_SHIFT) | + (NVS_SWZ_W << NV40_VP_SRC_SWZ_W_SHIFT)); + + NV40VPInsertSource(shader, hw, pos); +} + +static void +NV40VPSetLastInst(nvsFunc *shader, int pos) +{ + shader->inst[3] |= 1; +} + +/***************************************************************************** + * Disassembly routines + */ +static int +NV40VPHasMergedInst(nvsFunc * shader) +{ + if (shader->GetOpcodeHW(shader, 0) != NV40_VP_INST_OP_NOP && + shader->GetOpcodeHW(shader, 1) != NV40_VP_INST_OP_NOP) + return 1; + return 0; +} + +static unsigned int +NV40VPGetOpcodeHW(nvsFunc * shader, int slot) +{ + int op; + + if (slot) + op = (shader->inst[1] & NV40_VP_INST_SCA_OPCODE_MASK) + >> NV40_VP_INST_SCA_OPCODE_SHIFT; + else + op = (shader->inst[1] & NV40_VP_INST_VEC_OPCODE_MASK) + >> NV40_VP_INST_VEC_OPCODE_SHIFT; + + return op; +} + +static nvsRegFile +NV40VPGetDestFile(nvsFunc * shader, int merged) +{ + nvsOpcode op; + + op = shader->GetOpcode(shader, merged); + switch (op) { + case NVS_OP_ARL: + case NVS_OP_ARR: + case NVS_OP_ARA: + case NVS_OP_POPA: + return NVS_FILE_ADDRESS; + default: + if (shader->GetOpcodeSlot(shader, merged)) { + if (shader->inst[3] & NV40_VP_INST_SCA_RESULT) + return NVS_FILE_RESULT; + } + else { + if (shader->inst[0] & NV40_VP_INST_VEC_RESULT) + return NVS_FILE_RESULT; + } + return NVS_FILE_TEMP; + } + +} + +static unsigned int +NV40VPGetDestID(nvsFunc * shader, int merged) +{ + int id; + + switch (shader->GetDestFile(shader, merged)) { + case NVS_FILE_RESULT: + id = ((shader->inst[3] & NV40_VP_INST_DEST_MASK) + >> NV40_VP_INST_DEST_SHIFT); + switch (id) { + case NV40_VP_INST_DEST_POS : return NVS_FR_POSITION; + case NV40_VP_INST_DEST_COL0: return NVS_FR_COL0; + case NV40_VP_INST_DEST_COL1: return NVS_FR_COL1; + case NV40_VP_INST_DEST_BFC0: return NVS_FR_BFC0; + case NV40_VP_INST_DEST_BFC1: return NVS_FR_BFC1; + case NV40_VP_INST_DEST_FOGC: { + int mask = shader->GetDestMask(shader, merged); + switch (mask) { + case SMASK_X: return NVS_FR_FOGCOORD; + case SMASK_Y: return NVS_FR_CLIP0; + case SMASK_Z: return NVS_FR_CLIP1; + case SMASK_W: return NVS_FR_CLIP2; + default: + printf("more than 1 mask component set in FOGC writemask!\n"); + return NVS_FR_UNKNOWN; + } + } + case NV40_VP_INST_DEST_PSZ: + { + int mask = shader->GetDestMask(shader, merged); + switch (mask) { + case SMASK_X: return NVS_FR_POINTSZ; + case SMASK_Y: return NVS_FR_CLIP3; + case SMASK_Z: return NVS_FR_CLIP4; + case SMASK_W: return NVS_FR_CLIP5; + default: + printf("more than 1 mask component set in PSZ writemask!\n"); + return NVS_FR_UNKNOWN; + } + } + case NV40_VP_INST_DEST_TC(0): return NVS_FR_TEXCOORD0; + case NV40_VP_INST_DEST_TC(1): return NVS_FR_TEXCOORD1; + case NV40_VP_INST_DEST_TC(2): return NVS_FR_TEXCOORD2; + case NV40_VP_INST_DEST_TC(3): return NVS_FR_TEXCOORD3; + case NV40_VP_INST_DEST_TC(4): return NVS_FR_TEXCOORD4; + case NV40_VP_INST_DEST_TC(5): return NVS_FR_TEXCOORD5; + case NV40_VP_INST_DEST_TC(6): return NVS_FR_TEXCOORD6; + case NV40_VP_INST_DEST_TC(7): return NVS_FR_TEXCOORD7; + default: + return -1; + } + case NVS_FILE_ADDRESS: + /* Instructions that write address regs are encoded as if + * they would write temps. + */ + case NVS_FILE_TEMP: + if (shader->GetOpcodeSlot(shader, merged)) + id = ((shader->inst[3] & NV40_VP_INST_SCA_DEST_TEMP_MASK) + >> NV40_VP_INST_SCA_DEST_TEMP_SHIFT); + else + id = ((shader->inst[0] & NV40_VP_INST_VEC_DEST_TEMP_MASK) + >> NV40_VP_INST_VEC_DEST_TEMP_SHIFT); + return id; + default: + return -1; + } +} + +static unsigned int +NV40VPGetDestMask(nvsFunc * shader, int merged) +{ + unsigned int mask = 0; + + if (shader->GetOpcodeSlot(shader, merged)) { + if (shader->inst[3] & NV40_VP_INST_SCA_WRITEMASK_X) mask |= SMASK_X; + if (shader->inst[3] & NV40_VP_INST_SCA_WRITEMASK_Y) mask |= SMASK_Y; + if (shader->inst[3] & NV40_VP_INST_SCA_WRITEMASK_Z) mask |= SMASK_Z; + if (shader->inst[3] & NV40_VP_INST_SCA_WRITEMASK_W) mask |= SMASK_W; + } else { + if (shader->inst[3] & NV40_VP_INST_VEC_WRITEMASK_X) mask |= SMASK_X; + if (shader->inst[3] & NV40_VP_INST_VEC_WRITEMASK_Y) mask |= SMASK_Y; + if (shader->inst[3] & NV40_VP_INST_VEC_WRITEMASK_Z) mask |= SMASK_Z; + if (shader->inst[3] & NV40_VP_INST_VEC_WRITEMASK_W) mask |= SMASK_W; + } + + return mask; +} + +static unsigned int +NV40VPGetSourceHW(nvsFunc * shader, int merged, int pos) +{ + struct _op_xlat *opr; + unsigned int src; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr) + return -1; + + switch (opr->srcpos[pos]) { + case 0: + src = ((shader->inst[1] & NV40_VP_INST_SRC0H_MASK) + >> NV40_VP_INST_SRC0H_SHIFT) + << NV40_VP_SRC0_HIGH_SHIFT; + src |= ((shader->inst[2] & NV40_VP_INST_SRC0L_MASK) + >> NV40_VP_INST_SRC0L_SHIFT); + break; + case 1: + src = ((shader->inst[2] & NV40_VP_INST_SRC1_MASK) + >> NV40_VP_INST_SRC1_SHIFT); + break; + case 2: + src = ((shader->inst[2] & NV40_VP_INST_SRC2H_MASK) + >> NV40_VP_INST_SRC2H_SHIFT) + << NV40_VP_SRC2_HIGH_SHIFT; + src |= ((shader->inst[3] & NV40_VP_INST_SRC2L_MASK) + >> NV40_VP_INST_SRC2L_SHIFT); + break; + default: + src = -1; + } + + return src; +} + +static nvsRegFile +NV40VPGetSourceFile(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + struct _op_xlat *opr; + int file; + + opr = shader->GetOPTXRec(shader, merged); + if (!opr || opr->srcpos[pos] == -1) + return -1; + + switch (opr->srcpos[pos]) { + case SPOS_ADDRESS: return NVS_FILE_ADDRESS; + default: + src = shader->GetSourceHW(shader, merged, pos); + file = (src & NV40_VP_SRC_REG_TYPE_MASK) >> NV40_VP_SRC_REG_TYPE_SHIFT; + + switch (file) { + case NV40_VP_SRC_REG_TYPE_TEMP : return NVS_FILE_TEMP; + case NV40_VP_SRC_REG_TYPE_INPUT: return NVS_FILE_ATTRIB; + case NV40_VP_SRC_REG_TYPE_CONST: return NVS_FILE_CONST; + default: + return NVS_FILE_UNKNOWN; + } + } +} + +static int +NV40VPGetSourceID(nvsFunc * shader, int merged, int pos) +{ + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_ATTRIB: + switch ((shader->inst[1] & NV40_VP_INST_INPUT_SRC_MASK) + >> NV40_VP_INST_INPUT_SRC_SHIFT) { + case NV40_VP_INST_IN_POS: return NVS_FR_POSITION; + case NV40_VP_INST_IN_WEIGHT: return NVS_FR_WEIGHT; + case NV40_VP_INST_IN_NORMAL: return NVS_FR_NORMAL; + case NV40_VP_INST_IN_COL0: return NVS_FR_COL0; + case NV40_VP_INST_IN_COL1: return NVS_FR_COL1; + case NV40_VP_INST_IN_FOGC: return NVS_FR_FOGCOORD; + case NV40_VP_INST_IN_TC(0): return NVS_FR_TEXCOORD0; + case NV40_VP_INST_IN_TC(1): return NVS_FR_TEXCOORD1; + case NV40_VP_INST_IN_TC(2): return NVS_FR_TEXCOORD2; + case NV40_VP_INST_IN_TC(3): return NVS_FR_TEXCOORD3; + case NV40_VP_INST_IN_TC(4): return NVS_FR_TEXCOORD4; + case NV40_VP_INST_IN_TC(5): return NVS_FR_TEXCOORD5; + case NV40_VP_INST_IN_TC(6): return NVS_FR_TEXCOORD6; + case NV40_VP_INST_IN_TC(7): return NVS_FR_TEXCOORD7; + default: + return -1; + } + break; + case NVS_FILE_CONST: + return ((shader->inst[1] & NV40_VP_INST_CONST_SRC_MASK) + >> NV40_VP_INST_CONST_SRC_SHIFT); + case NVS_FILE_TEMP: + { + unsigned int src; + + src = shader->GetSourceHW(shader, merged, pos); + return ((src & NV40_VP_SRC_TEMP_SRC_MASK) >> + NV40_VP_SRC_TEMP_SRC_SHIFT); + } + default: + return -1; + } +} + +static int +NV40VPGetSourceNegate(nvsFunc * shader, int merged, int pos) +{ + unsigned int src; + + src = shader->GetSourceHW(shader, merged, pos); + + if (src == -1) + return -1; + return ((src & NV40_VP_SRC_NEGATE) ? 1 : 0); +} + +static void +NV40VPGetSourceSwizzle(nvsFunc * shader, int merged, int pos, nvsSwzComp *swz) +{ + unsigned int src; + int swzbits; + + src = shader->GetSourceHW(shader, merged, pos); + swzbits = (src & NV40_VP_SRC_SWZ_ALL_MASK) >> NV40_VP_SRC_SWZ_ALL_SHIFT; + NV20VPTXSwizzle(swzbits, swz); +} + +static int +NV40VPGetSourceIndexed(nvsFunc * shader, int merged, int pos) +{ + switch (shader->GetSourceFile(shader, merged, pos)) { + case NVS_FILE_ATTRIB: + return ((shader->inst[0] & NV40_VP_INST_INDEX_INPUT) ? 1 : 0); + case NVS_FILE_CONST: + return ((shader->inst[3] & NV40_VP_INST_INDEX_CONST) ? 1 : 0); + default: + return 0; + } +} + +static nvsSwzComp +NV40VPGetAddressRegSwizzle(nvsFunc * shader) +{ + nvsSwzComp swz; + + swz = NV20VP_TX_SWIZZLE[(shader->inst[0] & NV40_VP_INST_ADDR_SWZ_MASK) + >> NV40_VP_INST_ADDR_SWZ_SHIFT]; + return swz; +} + +static int +NV40VPSupportsConditional(nvsFunc * shader) +{ + /*FIXME: Is this true of all ops? */ + return 1; +} + +static int +NV40VPGetConditionUpdate(nvsFunc * shader) +{ + return ((shader->inst[0] & NV40_VP_INST_COND_UPDATE_ENABLE) ? 1 : 0); +} + +static int +NV40VPGetConditionTest(nvsFunc * shader) +{ + int op; + + /* The condition test is unconditionally enabled on some + * instructions. ie: the condition test bit does *NOT* have + * to be set. + * + * FIXME: check other relevant ops for this situation. + */ + op = shader->GetOpcodeHW(shader, 1); + switch (op) { + case NV40_VP_INST_OP_BRA: + return 1; + default: + return ((shader->inst[0] & NV40_VP_INST_COND_TEST_ENABLE) ? 1 : 0); + } +} + +static nvsCond +NV40VPGetCondition(nvsFunc * shader) +{ + int cond; + + cond = ((shader->inst[0] & NV40_VP_INST_COND_MASK) + >> NV40_VP_INST_COND_SHIFT); + + switch (cond) { + case NV40_VP_INST_COND_FL: return NVS_COND_FL; + case NV40_VP_INST_COND_LT: return NVS_COND_LT; + case NV40_VP_INST_COND_EQ: return NVS_COND_EQ; + case NV40_VP_INST_COND_LE: return NVS_COND_LE; + case NV40_VP_INST_COND_GT: return NVS_COND_GT; + case NV40_VP_INST_COND_NE: return NVS_COND_NE; + case NV40_VP_INST_COND_GE: return NVS_COND_GE; + case NV40_VP_INST_COND_TR: return NVS_COND_TR; + default: + return NVS_COND_UNKNOWN; + } +} + +static void +NV40VPGetCondRegSwizzle(nvsFunc * shader, nvsSwzComp *swz) +{ + int swzbits; + + swzbits = (shader->inst[0] & NV40_VP_INST_COND_SWZ_ALL_MASK) + >> NV40_VP_INST_COND_SWZ_ALL_SHIFT; + NV20VPTXSwizzle(swzbits, swz); +} + +static int +NV40VPGetCondRegID(nvsFunc * shader) +{ + return ((shader->inst[0] & NV40_VP_INST_COND_REG_SELECT_1) ? 1 : 0); +} + +static int +NV40VPGetBranch(nvsFunc * shader) +{ + int addr; + + addr = ((shader->inst[2] & NV40_VP_INST_IADDRH_MASK) + >> NV40_VP_INST_IADDRH_SHIFT) << 3; + addr |= ((shader->inst[3] & NV40_VP_INST_IADDRL_MASK) + >> NV40_VP_INST_IADDRL_SHIFT); + return addr; +} + +void +NV40VPInitShaderFuncs(nvsFunc * shader) +{ + /* Inherit NV30 VP code, we share some of it */ + NV30VPInitShaderFuncs(shader); + + /* Limits */ + shader->MaxInst = 4096; + shader->MaxAttrib = 16; + shader->MaxTemp = 32; + shader->MaxAddress = 2; + shader->MaxConst = 256; + shader->caps = SCAP_SRC_ABS; + + /* Add extra opcodes for NV40+ */ +// MOD_OPCODE(NVVP_TX_VOP, NV40_VP_INST_OP_TXWHAT, NVS_OP_TEX , 0, 4, -1); + MOD_OPCODE(NVVP_TX_SOP, NV40_VP_INST_OP_PUSHA, NVS_OP_PUSHA, 3, -1, -1); + MOD_OPCODE(NVVP_TX_SOP, NV40_VP_INST_OP_POPA , NVS_OP_POPA , -1, -1, -1); + + shader->SupportsOpcode = NV40VPSupportsOpcode; + shader->SetOpcode = NV40VPSetOpcode; + shader->SetCCUpdate = NV40VPSetCCUpdate; + shader->SetCondition = NV40VPSetCondition; + shader->SetResult = NV40VPSetResult; + shader->SetSource = NV40VPSetSource; + shader->SetUnusedSource = NV40VPSetUnusedSource; + shader->SetLastInst = NV40VPSetLastInst; + + shader->HasMergedInst = NV40VPHasMergedInst; + shader->GetOpcodeHW = NV40VPGetOpcodeHW; + + shader->GetDestFile = NV40VPGetDestFile; + shader->GetDestID = NV40VPGetDestID; + shader->GetDestMask = NV40VPGetDestMask; + + shader->GetSourceHW = NV40VPGetSourceHW; + shader->GetSourceFile = NV40VPGetSourceFile; + shader->GetSourceID = NV40VPGetSourceID; + shader->GetSourceNegate = NV40VPGetSourceNegate; + shader->GetSourceSwizzle = NV40VPGetSourceSwizzle; + shader->GetSourceIndexed = NV40VPGetSourceIndexed; + + shader->GetRelAddressSwizzle = NV40VPGetAddressRegSwizzle; + + shader->SupportsConditional = NV40VPSupportsConditional; + shader->GetConditionUpdate = NV40VPGetConditionUpdate; + shader->GetConditionTest = NV40VPGetConditionTest; + shader->GetCondition = NV40VPGetCondition; + shader->GetCondRegSwizzle = NV40VPGetCondRegSwizzle; + shader->GetCondRegID = NV40VPGetCondRegID; + + shader->GetBranch = NV40VPGetBranch; +} -- cgit v1.2.3 From 85365e6aa4608ea684ff770def7f0f7b354173df Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 26 Nov 2006 09:39:21 +0000 Subject: Bug #6044: actually delete the texture object in mgaDeleteTexture --- src/mesa/drivers/dri/mga/mgatex.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/mga/mgatex.c b/src/mesa/drivers/dri/mga/mgatex.c index 8caa1f8580..a7d74317a5 100644 --- a/src/mesa/drivers/dri/mga/mgatex.c +++ b/src/mesa/drivers/dri/mga/mgatex.c @@ -502,6 +502,9 @@ mgaDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) driDestroyTextureObject( t ); } + + /* Free mipmap images and the texture object itself */ + _mesa_delete_texture_object(ctx, tObj); } -- cgit v1.2.3 From 6ff3d2577ec1099a90cce9292118814c00ab0e6a Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 26 Nov 2006 10:19:44 +0000 Subject: Fix progs/fp/tri-xpd Fragprog consts are inlined, so make sure we update *all* occurances of a param :) --- src/mesa/drivers/dri/nouveau/nouveau_shader.h | 6 +++++- src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 8 ++++++-- src/mesa/drivers/dri/nouveau/nv30_fragprog.c | 8 ++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index baf59d0259..fac8851a57 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -47,7 +47,11 @@ typedef struct _nouveauShader { struct { GLfloat *source_val; /* NULL if invariant */ float val[4]; - int hw_index; /* hw-specific value */ + /* Hardware-specific tracking, currently only nv30_fragprog + * makes use of it. + */ + int *hw_index; + int hw_index_cnt; } params[NVS_MAX_CONSTS]; struct { diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c index 1f09b6d453..1cb0ca490e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c @@ -130,8 +130,12 @@ pass2_add_instruction(nvsPtr nvs, nvsInstruction *inst, nvs->inputs_read |= (1 << reg.index); shader->SetSource(shader, ®, op->srcpos[i]); srcpos_used |= (1<srcpos[i]); - if (reg.file == NVS_FILE_CONST && shader->GetSourceConstVal) - nvs->params[reg.index].hw_index = nvs->program_current + 4; + if (reg.file == NVS_FILE_CONST && shader->GetSourceConstVal) { + int idx_slot = nvs->params[reg.index].hw_index_cnt++; + nvs->params[reg.index].hw_index = realloc( + nvs->params[reg.index].hw_index, sizeof(int) * idx_slot+1); + nvs->params[reg.index].hw_index[idx_slot] = nvs->program_current + 4; + } } } for (i = 0; i < 3; i++) { diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c index 2e35d08c07..46391eb911 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c +++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c @@ -60,11 +60,15 @@ NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs) static void NV30FPUpdateConst(GLcontext *ctx, nouveauShader *nvs, int id) { - uint32_t *current = nvs->program + nvs->params[id].hw_index; uint32_t *new = nvs->params[id].source_val ? nvs->params[id].source_val : nvs->params[id].val; + uint32_t *current; + int i; - COPY_4V(current, new); + for (i=0; iparams[id].hw_index_cnt; i++) { + current = nvs->program + nvs->params[id].hw_index[i]; + COPY_4V(current, new); + } nvs->on_hardware = 0; } -- cgit v1.2.3 From 2f411b0a8bf9af96d7ef582564d8e462abd0f28d Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 26 Nov 2006 13:18:41 +0000 Subject: Fix RSQ emulation --- .../drivers/dri/nouveau/nouveau_shader_0_arb.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c index 8b5222d069..afb889d421 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_0_arb.c @@ -125,6 +125,7 @@ struct pass0_rec { int next_temp; int swzconst_done; int swzconst_id; + nvsRegister const_half; }; #define X NVS_SWZ_X @@ -488,6 +489,7 @@ pass0_emulate_instruction(nouveauShader *nvs, struct prog_instruction *inst) nvsFunc *shader = nvs->func; nvsRegister src[3], dest, temp; nvsInstruction *nvsinst; + struct pass0_rec *rec = nvs->pass_rec; unsigned int mask = pass0_make_mask(inst->DstReg.WriteMask); int i, sat; @@ -561,11 +563,26 @@ pass0_emulate_instruction(nouveauShader *nvs, struct prog_instruction *inst) } break; case OPCODE_RSQ: + if (rec->const_half.file != NVS_FILE_CONST) { + GLfloat const_half[4] = { 0.5, 0.0, 0.0, 0.0 }; + pass0_make_reg(nvs, &rec->const_half, NVS_FILE_CONST, + _mesa_add_unnamed_constant(nvs->mesa.vp.Base.Parameters, + const_half, 4)); + COPY_4V(nvs->params[rec->const_half.index].val, const_half); + } pass0_make_reg(nvs, &temp, NVS_FILE_TEMP, -1); pass0_emit(nvs, NVS_OP_LG2, temp, SMASK_X, 0, - nvsAbs(nvsSwizzle(src[0], X, X, X, X)), nvr_unused, nvr_unused); + nvsAbs(nvsSwizzle(src[0], X, X, X, X)), + nvr_unused, + nvr_unused); + pass0_emit(nvs, NVS_OP_MUL, temp, SMASK_X, 0, + nvsSwizzle(temp, X, X, X, X), + nvsNegate(rec->const_half), + nvr_unused); pass0_emit(nvs, NVS_OP_EX2, dest, mask, sat, - nvsSwizzle(temp, X, X, X, X), nvr_unused, nvr_unused); + nvsSwizzle(temp, X, X, X, X), + nvr_unused, + nvr_unused); break; case OPCODE_SCS: if (mask & SMASK_X) @@ -607,7 +624,6 @@ static GLboolean pass0_translate_instructions(nouveauShader *nvs) { struct gl_program *prog = (struct gl_program *)&nvs->mesa.vp; - struct pass0_rec *rec = nvs->pass_rec; nvsFunc *shader = nvs->func; int ipos; -- cgit v1.2.3 From 98818f159baeaeba45d656d612b64b2f22c63753 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 27 Nov 2006 01:57:37 +0000 Subject: - Add InitInstruction to hw shader backend, and remove SetUnusedSource. - NV30FP/NV40VP: Clear any fields before we OR new values into them - NV40VP: It seems that it might be possible to write a result reg at the same time a temp is written. In InitInstruction, initialise OUT_DEST to OUT_DEST_TEMP so result regs don't get clobbered by default. --- src/mesa/drivers/dri/nouveau/nouveau_shader.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 16 ++--- src/mesa/drivers/dri/nouveau/nv30_fragprog.c | 50 ++++++++----- src/mesa/drivers/dri/nouveau/nv30_shader.h | 1 + src/mesa/drivers/dri/nouveau/nv40_vertprog.c | 95 ++++++++++++++++++------- 5 files changed, 109 insertions(+), 55 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index fac8851a57..a1e7794487 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -256,6 +256,7 @@ struct _nvsFunc { struct _op_xlat*(*GetOPTXRec) (nvsFunc *, int merged); struct _op_xlat*(*GetOPTXFromSOP) (nvsOpcode, int *id); + void (*InitInstruction) (nvsFunc *); int (*SupportsOpcode) (nvsFunc *, nvsOpcode); void (*SetOpcode) (nvsFunc *, unsigned int opcode, int slot); @@ -265,7 +266,6 @@ struct _nvsFunc { void (*SetResult) (nvsFunc *, nvsRegister *, unsigned int mask, int slot); void (*SetSource) (nvsFunc *, nvsRegister *, int pos); - void (*SetUnusedSource) (nvsFunc *, int pos); void (*SetTexImageUnit) (nvsFunc *, int unit); void (*SetSaturate) (nvsFunc *); void (*SetLastInst) (nvsFunc *); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c index 1cb0ca490e..b39f4668b9 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c @@ -34,6 +34,8 @@ #include "macros.h" #include "enums.h" +#include "program.h" + #include "nouveau_shader.h" struct pass2_rec { @@ -100,7 +102,7 @@ pass2_add_instruction(nvsPtr nvs, nvsInstruction *inst, nvsSwzComp default_swz[4] = { NVS_SWZ_X, NVS_SWZ_Y, NVS_SWZ_Z, NVS_SWZ_W }; nvsFunc *shader = nvs->func; nvsRegister reg; - int i, srcpos_used = ~7; + int i; shader->SetOpcode(shader, op->NV, slot); if (inst->saturate ) shader->SetSaturate(shader); @@ -129,7 +131,6 @@ pass2_add_instruction(nvsPtr nvs, nvsInstruction *inst, if (reg.file == NVS_FILE_ATTRIB) nvs->inputs_read |= (1 << reg.index); shader->SetSource(shader, ®, op->srcpos[i]); - srcpos_used |= (1<srcpos[i]); if (reg.file == NVS_FILE_CONST && shader->GetSourceConstVal) { int idx_slot = nvs->params[reg.index].hw_index_cnt++; nvs->params[reg.index].hw_index = realloc( @@ -138,10 +139,6 @@ pass2_add_instruction(nvsPtr nvs, nvsInstruction *inst, } } } - for (i = 0; i < 3; i++) { - if (!(srcpos_used & (1<SetUnusedSource(shader, i); - } reg = pass2_mangle_reg(nvs, inst, inst->dest); if (reg.file == NVS_FILE_RESULT) @@ -153,9 +150,9 @@ static int pass2_assemble_instruction(nvsPtr nvs, nvsInstruction *inst, int last) { nvsFunc *shader = nvs->func; - struct _op_xlat *op, *op2; - unsigned int hw_inst[8] = {0,0,0,0,0,0,0,0,0}; - int slot, slot2; + struct _op_xlat *op; + unsigned int hw_inst[8]; + int slot; int instsz; int i; @@ -164,6 +161,7 @@ pass2_assemble_instruction(nvsPtr nvs, nvsInstruction *inst, int last) /* Assemble this instruction */ if (!(op = shader->GetOPTXFromSOP(inst->op, &slot))) return 0; + shader->InitInstruction(shader); pass2_add_instruction(nvs, inst, op, slot); if (last) shader->SetLastInst(shader); diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c index 46391eb911..1c2664ec70 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c +++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c @@ -61,7 +61,7 @@ static void NV30FPUpdateConst(GLcontext *ctx, nouveauShader *nvs, int id) { uint32_t *new = nvs->params[id].source_val ? - nvs->params[id].source_val : nvs->params[id].val; + (uint32_t*)nvs->params[id].source_val : (uint32_t*)nvs->params[id].val; uint32_t *current; int i; @@ -101,6 +101,7 @@ NV30FPSupportsOpcode(nvsFunc *shader, nvsOpcode op) static void NV30FPSetOpcode(nvsFunc *shader, unsigned int opcode, int slot) { + shader->inst[0] &= ~NV30_FP_OP_OPCODE_MASK; shader->inst[0] |= (opcode << NV30_FP_OP_OPCODE_SHIFT); } @@ -139,7 +140,10 @@ NV30FPSetCondition(nvsFunc *shader, int on, nvsCond cond, int reg, break; } + shader->inst[1] &= ~NV30_FP_OP_COND_MASK; shader->inst[1] |= (hwcond << NV30_FP_OP_COND_SHIFT); + + shader->inst[1] &= ~NV30_FP_OP_COND_SWZ_ALL_MASK; shader->inst[1] |= (swz[NVS_SWZ_X] << NV30_FP_OP_COND_SWZ_X_SHIFT); shader->inst[1] |= (swz[NVS_SWZ_Y] << NV30_FP_OP_COND_SWZ_Y_SHIFT); shader->inst[1] |= (swz[NVS_SWZ_Z] << NV30_FP_OP_COND_SWZ_Z_SHIFT); @@ -149,7 +153,7 @@ NV30FPSetCondition(nvsFunc *shader, int on, nvsCond cond, int reg, static void NV30FPSetResult(nvsFunc *shader, nvsRegister *reg, unsigned int mask, int slot) { - unsigned int hwreg, hwmask = 0; + unsigned int hwreg; if (mask & SMASK_X) shader->inst[0] |= NV30_FP_OP_OUT_X; if (mask & SMASK_Y) shader->inst[0] |= NV30_FP_OP_OUT_Y; @@ -160,8 +164,11 @@ NV30FPSetResult(nvsFunc *shader, nvsRegister *reg, unsigned int mask, int slot) hwreg = 0; /* FIXME: this is only fragment.color */ /* This is *not* correct, I have no idea what it is either */ shader->inst[0] |= NV30_FP_OP_UNK0_7; - } else + } else { + shader->inst[0] &= ~NV30_FP_OP_UNK0_7; hwreg = reg->index; + } + shader->inst[0] &= ~NV30_FP_OP_OUT_REG_SHIFT; shader->inst[0] |= (hwreg << NV30_FP_OP_OUT_REG_SHIFT); } @@ -197,6 +204,7 @@ NV30FPSetSource(nvsFunc *shader, nvsRegister *reg, int pos) hwin = NV30_FP_OP_INPUT_SRC_COL0; break; } + shader->inst[0] &= ~NV30_FP_OP_INPUT_SRC_MASK; shader->inst[0] |= (hwin << NV30_FP_OP_INPUT_SRC_SHIFT); hwsrc |= (hwin << NV30_FP_REG_SRC_SHIFT); } @@ -220,24 +228,14 @@ NV30FPSetSource(nvsFunc *shader, nvsRegister *reg, int pos) hwsrc |= (reg->swizzle[NVS_SWZ_Z] << NV30_FP_REG_SWZ_Z_SHIFT); hwsrc |= (reg->swizzle[NVS_SWZ_W] << NV30_FP_REG_SWZ_W_SHIFT); + shader->inst[pos+1] &= ~NV30_FP_REG_ALL_MASK; shader->inst[pos+1] |= hwsrc; } -static void -NV30FPSetUnusedSource(nvsFunc *shader, int pos) -{ - shader->inst[pos+1] |= ( - (NV30_FP_REG_TYPE_INPUT << NV30_FP_REG_TYPE_SHIFT) | - (NVS_SWZ_X << NV30_FP_REG_SWZ_X_SHIFT) | - (NVS_SWZ_Y << NV30_FP_REG_SWZ_Y_SHIFT) | - (NVS_SWZ_Z << NV30_FP_REG_SWZ_Z_SHIFT) | - (NVS_SWZ_W << NV30_FP_REG_SWZ_W_SHIFT) - ); -} - static void NV30FPSetTexImageUnit(nvsFunc *shader, int unit) { + shader->inst[0] &= ~NV30_FP_OP_TEX_UNIT_SHIFT; shader->inst[0] |= (unit << NV30_FP_OP_TEX_UNIT_SHIFT); } @@ -247,11 +245,27 @@ NV30FPSetSaturate(nvsFunc *shader) shader->inst[0] |= NV30_FP_OP_OUT_SAT; } +static void +NV30FPInitInstruction(nvsFunc *shader) +{ + unsigned int hwsrc; + + shader->inst[0] = 0; + + hwsrc = (NV30_FP_REG_TYPE_INPUT << NV30_FP_REG_TYPE_SHIFT) | + (NVS_SWZ_X << NV30_FP_REG_SWZ_X_SHIFT) | + (NVS_SWZ_Y << NV30_FP_REG_SWZ_Y_SHIFT) | + (NVS_SWZ_Z << NV30_FP_REG_SWZ_Z_SHIFT) | + (NVS_SWZ_W << NV30_FP_REG_SWZ_W_SHIFT); + shader->inst[1] = hwsrc; + shader->inst[2] = hwsrc; + shader->inst[3] = hwsrc; +} + static void NV30FPSetLastInst(nvsFunc *shader) { - shader->inst[0] |= 1; - + shader->inst[0] |= 1; } /******************************************************************************* @@ -669,13 +683,13 @@ NV30FPInitShaderFuncs(nvsFunc * shader) shader->UploadToHW = NV30FPUploadToHW; shader->UpdateConst = NV30FPUpdateConst; + shader->InitInstruction = NV30FPInitInstruction; shader->SupportsOpcode = NV30FPSupportsOpcode; shader->SetOpcode = NV30FPSetOpcode; shader->SetCCUpdate = NV30FPSetCCUpdate; shader->SetCondition = NV30FPSetCondition; shader->SetResult = NV30FPSetResult; shader->SetSource = NV30FPSetSource; - shader->SetUnusedSource = NV30FPSetUnusedSource; shader->SetTexImageUnit = NV30FPSetTexImageUnit; shader->SetSaturate = NV30FPSetSaturate; shader->SetLastInst = NV30FPSetLastInst; diff --git a/src/mesa/drivers/dri/nouveau/nv30_shader.h b/src/mesa/drivers/dri/nouveau/nv30_shader.h index d0bf639930..7a027dd427 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_shader.h +++ b/src/mesa/drivers/dri/nouveau/nv30_shader.h @@ -351,6 +351,7 @@ #define NV30_FP_OP_INDEX_INPUT (1 << 30) //== Register selection == +#define NV30_FP_REG_ALL_MASK (0x1FFFF<<0) #define NV30_FP_REG_TYPE_SHIFT 0 #define NV30_FP_REG_TYPE_MASK (3 << 0) # define NV30_FP_REG_TYPE_TEMP 0 diff --git a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c index 111c6de71b..f2cb3fb166 100644 --- a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c +++ b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c @@ -19,8 +19,13 @@ NV40VPSupportsOpcode(nvsFunc * shader, nvsOpcode op) static void NV40VPSetOpcode(nvsFunc *shader, unsigned int opcode, int slot) { - if (slot) shader->inst[1] |= (opcode << NV40_VP_INST_SCA_OPCODE_SHIFT); - else shader->inst[1] |= (opcode << NV40_VP_INST_VEC_OPCODE_SHIFT); + if (slot) { + shader->inst[1] &= ~NV40_VP_INST_SCA_OPCODE_MASK; + shader->inst[1] |= (opcode << NV40_VP_INST_SCA_OPCODE_SHIFT); + } else { + shader->inst[1] &= ~NV40_VP_INST_VEC_OPCODE_MASK; + shader->inst[1] |= (opcode << NV40_VP_INST_VEC_OPCODE_SHIFT); + } } static void @@ -36,7 +41,9 @@ NV40VPSetCondition(nvsFunc *shader, int on, nvsCond cond, int reg, unsigned int hwcond; if (on ) shader->inst[0] |= NV40_VP_INST_COND_TEST_ENABLE; + else shader->inst[0] &= ~NV40_VP_INST_COND_TEST_ENABLE; if (reg) shader->inst[0] |= NV40_VP_INST_COND_REG_SELECT_1; + else shader->inst[0] &= ~NV40_VP_INST_COND_REG_SELECT_1; switch (cond) { case NVS_COND_TR: hwcond = NV40_VP_INST_COND_TR; break; @@ -52,8 +59,10 @@ NV40VPSetCondition(nvsFunc *shader, int on, nvsCond cond, int reg, hwcond = NV40_VP_INST_COND_TR; break; } + shader->inst[0] &= ~NV40_VP_INST_COND_MASK; shader->inst[0] |= (hwcond << NV40_VP_INST_COND_SHIFT); + shader->inst[0] &= ~NV40_VP_INST_COND_SWZ_ALL_MASK; shader->inst[0] |= (swizzle[NVS_SWZ_X] << NV40_VP_INST_COND_SWZ_X_SHIFT); shader->inst[0] |= (swizzle[NVS_SWZ_Y] << NV40_VP_INST_COND_SWZ_Y_SHIFT); shader->inst[0] |= (swizzle[NVS_SWZ_Z] << NV40_VP_INST_COND_SWZ_Z_SHIFT); @@ -95,25 +104,31 @@ NV40VPSetResult(nvsFunc *shader, nvsRegister * dest, unsigned int mask, hwidx = 0; break; } + shader->inst[3] &= ~NV40_VP_INST_DEST_MASK; shader->inst[3] |= (hwidx << NV40_VP_INST_DEST_SHIFT); - if (slot) { - shader->inst[3] |= NV40_VP_INST_SCA_RESULT; - shader->inst[3] |= NV40_VP_INST_SCA_DEST_TEMP_MASK; - } else { - shader->inst[0] |= NV40_VP_INST_VEC_RESULT; - shader->inst[0] |= NV40_VP_INST_VEC_DEST_TEMP_MASK | (1<<20); - } + if (slot) shader->inst[3] |= NV40_VP_INST_SCA_RESULT; + else shader->inst[0] |= NV40_VP_INST_VEC_RESULT; } else { /* NVS_FILE_TEMP || NVS_FILE_ADDRESS */ - if (slot) + if (slot) { + shader->inst[3] &= ~NV40_VP_INST_SCA_RESULT; + shader->inst[3] &= ~NV40_VP_INST_SCA_DEST_TEMP_MASK; shader->inst[3] |= (dest->index << NV40_VP_INST_SCA_DEST_TEMP_SHIFT); - else + } else { + shader->inst[0] &= ~NV40_VP_INST_VEC_RESULT; + shader->inst[0] &= ~(NV40_VP_INST_VEC_DEST_TEMP_MASK | (1<<20)); shader->inst[0] |= (dest->index << NV40_VP_INST_VEC_DEST_TEMP_SHIFT); + } } - if (slot) shader->inst[3] |= (hwmask << NV40_VP_INST_SCA_WRITEMASK_SHIFT); - else shader->inst[3] |= (hwmask << NV40_VP_INST_VEC_WRITEMASK_SHIFT); + if (slot) { + shader->inst[3] &= ~NV40_VP_INST_SCA_WRITEMASK_MASK; + shader->inst[3] |= (hwmask << NV40_VP_INST_SCA_WRITEMASK_SHIFT); + } else { + shader->inst[3] &= ~NV40_VP_INST_VEC_WRITEMASK_MASK; + shader->inst[3] |= (hwmask << NV40_VP_INST_VEC_WRITEMASK_SHIFT); + } } static void @@ -121,6 +136,8 @@ NV40VPInsertSource(nvsFunc *shader, unsigned int hw, int pos) { switch (pos) { case 0: + shader->inst[1] &= ~NV40_VP_INST_SRC0H_MASK; + shader->inst[2] &= ~NV40_VP_INST_SRC0L_MASK; shader->inst[1] |= ((hw & NV40_VP_SRC0_HIGH_MASK) >> NV40_VP_SRC0_HIGH_SHIFT) << NV40_VP_INST_SRC0H_SHIFT; @@ -128,10 +145,13 @@ NV40VPInsertSource(nvsFunc *shader, unsigned int hw, int pos) << NV40_VP_INST_SRC0L_SHIFT; break; case 1: + shader->inst[2] &= ~NV40_VP_INST_SRC1_MASK; shader->inst[2] |= hw << NV40_VP_INST_SRC1_SHIFT; break; case 2: + shader->inst[2] &= ~NV40_VP_INST_SRC2H_MASK; + shader->inst[3] &= ~NV40_VP_INST_SRC2L_MASK; shader->inst[2] |= ((hw & NV40_VP_SRC2_HIGH_MASK) >> NV40_VP_SRC2_HIGH_SHIFT) << NV40_VP_INST_SRC2H_SHIFT; @@ -155,24 +175,34 @@ NV40VPSetSource(nvsFunc *shader, nvsRegister * src, int pos) case NVS_FILE_ATTRIB: hw |= (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT); + shader->inst[1] &= ~NV40_VP_INST_INPUT_SRC_MASK; shader->inst[1] |= (src->index << NV40_VP_INST_INPUT_SRC_SHIFT); if (src->indexed) { shader->inst[0] |= NV40_VP_INST_INDEX_INPUT; if (src->addr_reg) shader->inst[0] |= NV40_VP_INST_ADDR_REG_SELECT_1; + else + shader->inst[0] &= ~NV40_VP_INST_ADDR_REG_SELECT_1; + shader->inst[0] &= ~NV40_VP_INST_ADDR_SWZ_SHIFT; shader->inst[0] |= (src->addr_comp << NV40_VP_INST_ADDR_SWZ_SHIFT); - } + } else + shader->inst[0] &= ~NV40_VP_INST_INDEX_INPUT; break; case NVS_FILE_CONST: hw |= (NV40_VP_SRC_REG_TYPE_CONST << NV40_VP_SRC_REG_TYPE_SHIFT); + shader->inst[1] &= ~NV40_VP_INST_CONST_SRC_MASK; shader->inst[1] |= (src->index << NV40_VP_INST_CONST_SRC_SHIFT); if (src->indexed) { shader->inst[3] |= NV40_VP_INST_INDEX_CONST; if (src->addr_reg) shader->inst[0] |= NV40_VP_INST_ADDR_REG_SELECT_1; + else + shader->inst[0] &= ~NV40_VP_INST_ADDR_REG_SELECT_1; + shader->inst[0] &= ~NV40_VP_INST_ADDR_SWZ_MASK; shader->inst[0] |= (src->addr_comp << NV40_VP_INST_ADDR_SWZ_SHIFT); - } + } else + shader->inst[3] &= ~NV40_VP_INST_INDEX_CONST; break; case NVS_FILE_TEMP: hw |= (NV40_VP_SRC_REG_TYPE_TEMP << NV40_VP_SRC_REG_TYPE_SHIFT); @@ -189,6 +219,8 @@ NV40VPSetSource(nvsFunc *shader, nvsRegister * src, int pos) hw |= NV40_VP_SRC_NEGATE; if (src->abs) shader->inst[0] |= (1 << (21 + pos)); + else + shader->inst[0] &= ~(1 << (21 + pos)); hw |= (src->swizzle[0] << NV40_VP_SRC_SWZ_X_SHIFT); hw |= (src->swizzle[1] << NV40_VP_SRC_SWZ_Y_SHIFT); hw |= (src->swizzle[2] << NV40_VP_SRC_SWZ_Z_SHIFT); @@ -199,21 +231,30 @@ NV40VPSetSource(nvsFunc *shader, nvsRegister * src, int pos) } static void -NV40VPSetUnusedSource(nvsFunc *shader, int pos) +NV40VPInitInstruction(nvsFunc *shader) { - unsigned int hw; - - hw = ((NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT) | - (NVS_SWZ_X << NV40_VP_SRC_SWZ_X_SHIFT) | - (NVS_SWZ_Y << NV40_VP_SRC_SWZ_Y_SHIFT) | - (NVS_SWZ_Z << NV40_VP_SRC_SWZ_Z_SHIFT) | - (NVS_SWZ_W << NV40_VP_SRC_SWZ_W_SHIFT)); - - NV40VPInsertSource(shader, hw, pos); + unsigned int hwsrc = 0; + + shader->inst[0] = /*NV40_VP_INST_VEC_RESULT | */ + NV40_VP_INST_VEC_DEST_TEMP_MASK | (1<<20); + shader->inst[1] = 0; + shader->inst[2] = 0; + shader->inst[3] = NV40_VP_INST_SCA_RESULT | + NV40_VP_INST_SCA_DEST_TEMP_MASK | + NV40_VP_INST_DEST_MASK; + + hwsrc = (NV40_VP_SRC_REG_TYPE_INPUT << NV40_VP_SRC_REG_TYPE_SHIFT) | + (NVS_SWZ_X << NV40_VP_SRC_SWZ_X_SHIFT) | + (NVS_SWZ_Y << NV40_VP_SRC_SWZ_Y_SHIFT) | + (NVS_SWZ_Z << NV40_VP_SRC_SWZ_Z_SHIFT) | + (NVS_SWZ_W << NV40_VP_SRC_SWZ_W_SHIFT); + NV40VPInsertSource(shader, hwsrc, 0); + NV40VPInsertSource(shader, hwsrc, 1); + NV40VPInsertSource(shader, hwsrc, 2); } static void -NV40VPSetLastInst(nvsFunc *shader, int pos) +NV40VPSetLastInst(nvsFunc *shader) { shader->inst[3] |= 1; } @@ -611,13 +652,13 @@ NV40VPInitShaderFuncs(nvsFunc * shader) MOD_OPCODE(NVVP_TX_SOP, NV40_VP_INST_OP_PUSHA, NVS_OP_PUSHA, 3, -1, -1); MOD_OPCODE(NVVP_TX_SOP, NV40_VP_INST_OP_POPA , NVS_OP_POPA , -1, -1, -1); + shader->InitInstruction = NV40VPInitInstruction; shader->SupportsOpcode = NV40VPSupportsOpcode; shader->SetOpcode = NV40VPSetOpcode; shader->SetCCUpdate = NV40VPSetCCUpdate; shader->SetCondition = NV40VPSetCondition; shader->SetResult = NV40VPSetResult; shader->SetSource = NV40VPSetSource; - shader->SetUnusedSource = NV40VPSetUnusedSource; shader->SetLastInst = NV40VPSetLastInst; shader->HasMergedInst = NV40VPHasMergedInst; -- cgit v1.2.3 From 3e6ef125f06cf036831063e46ee08bd17c4c4417 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 27 Nov 2006 16:33:43 +0000 Subject: replace check for XFree86LOADER and IN_MODULE with XFree86Server (bug 9144) --- src/mesa/main/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 44ee046569..7ff45cffe8 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1086,7 +1086,7 @@ _mesa_init_constants( GLcontext *ctx ) /* If we're running in the X server, do bounds checking to prevent * segfaults and server crashes! */ -#if defined(XFree86LOADER) && defined(IN_MODULE) +#if defined(XFree86Server) ctx->Const.CheckArrayBounds = GL_TRUE; #else ctx->Const.CheckArrayBounds = GL_FALSE; -- cgit v1.2.3 From c0815bc01fc27185d2f6bedefe49a286dedcbed9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 27 Nov 2006 17:40:07 +0000 Subject: remove assertions to match i915tex code (bug 8726) --- src/mesa/drivers/dri/i915/i830_metaops.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i830_metaops.c b/src/mesa/drivers/dri/i915/i830_metaops.c index dbf5f04349..c1d7fe349c 100644 --- a/src/mesa/drivers/dri/i915/i830_metaops.c +++ b/src/mesa/drivers/dri/i915/i830_metaops.c @@ -50,7 +50,6 @@ #define SET_STATE( i830, STATE ) \ do { \ - assert(!i830->intel.prim.flush); \ i830->current->emitted = 0; \ i830->current = &i830->STATE; \ i830->current->emitted = 0; \ @@ -907,7 +906,6 @@ i830RotateWindow(intelContextPtr intel, __DRIdrawablePrivate *dPriv, } /* cliprect loop */ - assert(!intel->prim.flush); intelFlushBatchLocked( intel, GL_FALSE, GL_FALSE, GL_FALSE ); done: -- cgit v1.2.3 From d9a8cc430d2856c42ab74b672d9ca01a7001e015 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 27 Nov 2006 17:48:59 +0000 Subject: comments --- src/mesa/shader/slang/slang_compile_function.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 1a7302f29a..c05c6f4d85 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -64,8 +64,8 @@ typedef struct slang_function_ { slang_function_kind kind; slang_variable header; /**< The function's name and return type */ - slang_variable_scope *parameters; /**< array [param_count] */ - unsigned int param_count; + slang_variable_scope *parameters; /**< formal parameters AND local vars */ + unsigned int param_count; /**< number of formal params (no locals) */ slang_operation *body; /**< The instruction tree */ unsigned int address; /**< Address of this func in memory */ slang_fixup_table fixups; /**< Mem locations which need func's address */ -- cgit v1.2.3 From 4a6f47c23bf6fcd03220289fb3bdf75238c4b940 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 28 Nov 2006 04:50:07 +0000 Subject: Update miniglx support for new memory manager --- src/mesa/drivers/dri/i915tex/server/i830_common.h | 8 +++ src/mesa/drivers/dri/i915tex/server/i830_dri.h | 42 +++++------- src/mesa/drivers/dri/i915tex/server/intel.h | 5 +- src/mesa/drivers/dri/i915tex/server/intel_dri.c | 81 ++++++++++++++++++----- 4 files changed, 94 insertions(+), 42 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/server/i830_common.h b/src/mesa/drivers/dri/i915tex/server/i830_common.h index fb6ceaa52d..06f28ed19a 100644 --- a/src/mesa/drivers/dri/i915tex/server/i830_common.h +++ b/src/mesa/drivers/dri/i915tex/server/i830_common.h @@ -52,6 +52,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define DRM_I830_INIT_HEAP 0x0a #define DRM_I830_CMDBUFFER 0x0b #define DRM_I830_DESTROY_HEAP 0x0c +#define DRM_I830_SET_VBLANK_PIPE 0x0d +#define DRM_I830_GET_VBLANK_PIPE 0x0e typedef struct { enum { @@ -208,5 +210,11 @@ typedef struct { int region; } drmI830MemDestroyHeap; +#define DRM_I830_VBLANK_PIPE_A 1 +#define DRM_I830_VBLANK_PIPE_B 2 + +typedef struct { + int pipe; +} drmI830VBlankPipe; #endif /* _I830_DRM_H_ */ diff --git a/src/mesa/drivers/dri/i915tex/server/i830_dri.h b/src/mesa/drivers/dri/i915tex/server/i830_dri.h index 6c9a709021..c2a3af8cbf 100644 --- a/src/mesa/drivers/dri/i915tex/server/i830_dri.h +++ b/src/mesa/drivers/dri/i915tex/server/i830_dri.h @@ -9,8 +9,8 @@ #define I830_MAX_DRAWABLES 256 #define I830_MAJOR_VERSION 1 -#define I830_MINOR_VERSION 3 -#define I830_PATCHLEVEL 0 +#define I830_MINOR_VERSION 7 +#define I830_PATCHLEVEL 2 #define I830_REG_SIZE 0x80000 @@ -18,20 +18,20 @@ typedef struct _I830DRIRec { drm_handle_t regs; drmSize regsSize; - drmSize backbufferSize; - drm_handle_t backbuffer; + drmSize unused1; /* backbufferSize */ + drm_handle_t unused2; /* backbuffer */ - drmSize depthbufferSize; - drm_handle_t depthbuffer; + drmSize unused3; /* depthbufferSize */ + drm_handle_t unused4; /* depthbuffer */ - drmSize rotatedSize; - drm_handle_t rotatedbuffer; + drmSize unused5; /* rotatedSize */ + drm_handle_t unused6; /* rotatedbuffer */ - drm_handle_t textures; - int textureSize; + drm_handle_t unused7; /* textures */ + int unused8; /* textureSize */ - drm_handle_t agp_buffers; - drmSize agp_buf_size; + drm_handle_t unused9; /* agp_buffers */ + drmSize unused10; /* agp_buf_size */ int deviceID; int width; @@ -40,20 +40,10 @@ typedef struct _I830DRIRec { int cpp; int bitsPerPixel; - int fbOffset; - int fbStride; - - int backOffset; - int backPitch; - - int depthOffset; - int depthPitch; - - int rotatedOffset; - int rotatedPitch; - - int logTextureGranularity; - int textureOffset; + int unused11[8]; /* was front/back/depth/rotated offset/pitch */ + + int unused12; /* logTextureGranularity */ + int unused13; /* textureOffset */ int irq; int sarea_priv_offset; diff --git a/src/mesa/drivers/dri/i915tex/server/intel.h b/src/mesa/drivers/dri/i915tex/server/intel.h index d7858a20c8..6ea72499c1 100644 --- a/src/mesa/drivers/dri/i915tex/server/intel.h +++ b/src/mesa/drivers/dri/i915tex/server/intel.h @@ -75,6 +75,9 @@ #define I830_GMCH_CTRL 0x52 +#define I830_GMCH_MEM_MASK 0x1 +#define I830_GMCH_MEM_64M 0x1 +#define I830_GMCH_MEM_128M 0 #define I830_GMCH_GMS_MASK 0x70 #define I830_GMCH_GMS_DISABLED 0x00 @@ -141,7 +144,7 @@ typedef struct _I830Rec { unsigned char *MMIOBase; unsigned char *FbBase; int cpp; - + uint32_t aper_size; unsigned int bios_version; /* These are set in PreInit and never changed. */ diff --git a/src/mesa/drivers/dri/i915tex/server/intel_dri.c b/src/mesa/drivers/dri/i915tex/server/intel_dri.c index 169fdbece3..4d1ac09f64 100644 --- a/src/mesa/drivers/dri/i915tex/server/intel_dri.c +++ b/src/mesa/drivers/dri/i915tex/server/intel_dri.c @@ -292,15 +292,43 @@ static void I830SetupMemoryTiling(const DRIDriverContext *ctx, I830Rec *pI830) static int I830DetectMemory(const DRIDriverContext *ctx, I830Rec *pI830) { - struct pci_device host_bridge; + struct pci_device host_bridge, ig_dev; uint32_t gmch_ctrl; int memsize = 0; int range; - + uint32_t aper_size; + uint32_t membase2 = 0; + memset(&host_bridge, 0, sizeof(host_bridge)); + memset(&ig_dev, 0, sizeof(ig_dev)); + + ig_dev.dev = 2; pci_device_cfg_read_u32(&host_bridge, &gmch_ctrl, I830_GMCH_CTRL); - + + if (IS_I830(pI830) || IS_845G(pI830)) { + if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { + aper_size = 0x80000000; + } else { + aper_size = 0x40000000; + } + } else { + if (IS_I9XX(pI830)) { + int ret; + ret = pci_device_cfg_read_u32(&ig_dev, &membase2, 0x18); + if (membase2 & 0x08000000) + aper_size = 0x8000000; + else + aper_size = 0x10000000; + + fprintf(stderr,"aper size is %08X %08x %d\n", aper_size, membase2, ret); + } else + aper_size = 0x8000000; + } + + pI830->aper_size = aper_size; + + /* We need to reduce the stolen size, by the GTT and the popup. * The GTT varying according the the FbMapSize and the popup is 4KB */ range = (ctx->shared.fbSize / (1024*1024)) + 4; @@ -576,7 +604,8 @@ I830AllocateMemory(const DRIDriverContext *ctx, I830Rec *pI830) fprintf(stderr,"unable to allocate context buffer %ld\n", ret); return FALSE; } - + +#if 0 memset(&(pI830->TexMem), 0, sizeof(pI830->TexMem)); pI830->TexMem.Key = -1; @@ -587,6 +616,7 @@ I830AllocateMemory(const DRIDriverContext *ctx, I830Rec *pI830) fprintf(stderr,"unable to allocate texture memory %ld\n", ret); return FALSE; } +#endif return TRUE; } @@ -604,12 +634,29 @@ I830BindMemory(const DRIDriverContext *ctx, I830Rec *pI830) return FALSE; if (!BindAgpRange(ctx, &pI830->ContextMem)) return FALSE; +#if 0 if (!BindAgpRange(ctx, &pI830->TexMem)) return FALSE; - +#endif return TRUE; } +static void SetupDRIMM(const DRIDriverContext *ctx, I830Rec *pI830) +{ + unsigned long aperEnd = ROUND_DOWN_TO(pI830->aper_size, GTT_PAGE_SIZE) / GTT_PAGE_SIZE; + unsigned long aperStart = ROUND_TO(pI830->aper_size - KB(32768), GTT_PAGE_SIZE) / GTT_PAGE_SIZE; + + fprintf(stderr, "aper size is %08X\n", ctx->shared.fbSize); + if (drmMMInit(ctx->drmFD, aperStart, aperEnd - aperStart, DRM_BO_MEM_TT)) { + fprintf(stderr, + "DRM MM Initialization Failed\n"); + } else { + fprintf(stderr, + "DRM MM Initialized at offset 0x%lx length %d page\n", aperStart, aperEnd-aperStart); + } + +} + static Bool I830CleanupDma(const DRIDriverContext *ctx) { @@ -809,6 +856,7 @@ I830DRIMapScreenRegions(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sar fprintf(stderr, "[drm] Depth Buffer = 0x%08x\n", sarea->depth_handle); +#if 0 if (drmAddMap(ctx->drmFD, (drm_handle_t)sarea->tex_offset, sarea->tex_size, DRM_AGP, 0, @@ -819,7 +867,7 @@ I830DRIMapScreenRegions(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sar } fprintf(stderr, "[drm] textures = 0x%08x\n", sarea->tex_handle); - +#endif return TRUE; } @@ -847,6 +895,7 @@ I830DRIUnmapScreenRegions(const DRIDriverContext *ctx, I830Rec *pI830, drmI830Sa } } +#if 0 static void I830InitTextureHeap(const DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea) { @@ -869,6 +918,7 @@ I830InitTextureHeap(const DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *s sarea->log_tex_granularity); } } +#endif static Bool I830DRIDoMappings(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea) @@ -891,8 +941,11 @@ I830DRIDoMappings(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea) /* init to zero to be safe */ I830DRIMapScreenRegions(ctx, pI830, sarea); - I830InitTextureHeap(ctx, pI830, sarea); + SetupDRIMM(ctx, pI830); +#if 0 + I830InitTextureHeap(ctx, pI830, sarea); +#endif if (ctx->pciDevice != PCI_CHIP_845_G && ctx->pciDevice != PCI_CHIP_I830_M) { I830SetParam(ctx, I830_SETPARAM_USE_MI_BATCHBUFFER_START, 1 ); @@ -1083,6 +1136,10 @@ I830ScreenInit(DRIDriverContext *ctx, I830Rec *pI830) return FALSE; } + pSAREAPriv->rotated_offset = -1; + pSAREAPriv->rotated_size = 0; + pSAREAPriv->rotated_pitch = ctx->shared.virtualWidth; + pSAREAPriv->front_offset = pI830->FrontBuffer.Start; pSAREAPriv->front_size = pI830->FrontBuffer.Size; pSAREAPriv->width = ctx->shared.virtualWidth; @@ -1094,8 +1151,10 @@ I830ScreenInit(DRIDriverContext *ctx, I830Rec *pI830) pSAREAPriv->back_size = pI830->BackBuffer.Size; pSAREAPriv->depth_offset = pI830->DepthBuffer.Start; pSAREAPriv->depth_size = pI830->DepthBuffer.Size; +#if 0 pSAREAPriv->tex_offset = pI830->TexMem.Start; pSAREAPriv->tex_size = pI830->TexMem.Size; +#endif pSAREAPriv->log_tex_granularity = pI830->TexGranularity; ctx->driverClientMsg = malloc(sizeof(I830DRIRec)); @@ -1107,14 +1166,6 @@ I830ScreenInit(DRIDriverContext *ctx, I830Rec *pI830) pI830DRI->height = ctx->shared.virtualHeight; pI830DRI->mem = ctx->shared.fbSize; pI830DRI->cpp = ctx->cpp; - pI830DRI->backOffset = pI830->BackBuffer.Start; - pI830DRI->backPitch = pI830->BackBuffer.Pitch; - - pI830DRI->depthOffset = pI830->DepthBuffer.Start; - pI830DRI->depthPitch = pI830->DepthBuffer.Pitch; - - pI830DRI->fbOffset = pI830->FrontBuffer.Start; - pI830DRI->fbStride = pI830->FrontBuffer.Pitch; pI830DRI->bitsPerPixel = ctx->bpp; pI830DRI->sarea_priv_offset = sizeof(drm_sarea_t); -- cgit v1.2.3 From 716091a6a0a9a4cc03f0aa61a3a6518b0648f167 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 28 Nov 2006 15:46:50 +0000 Subject: indent, comments, etc --- src/mesa/shader/slang/slang_compile_operation.c | 125 ++++++++++++++---------- src/mesa/shader/slang/slang_compile_operation.h | 23 +++-- 2 files changed, 87 insertions(+), 61 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 7e92013559..73f57bfb12 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -31,68 +31,85 @@ #include "imports.h" #include "slang_compile.h" -/* slang_operation */ -int slang_operation_construct (slang_operation *oper) +/** + * Init a slang_operation object + */ +GLboolean +slang_operation_construct(slang_operation * oper) { - oper->type = slang_oper_none; - oper->children = NULL; - oper->num_children = 0; - oper->literal = (float) 0; - oper->a_id = SLANG_ATOM_NULL; - oper->locals = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope)); - if (oper->locals == NULL) - return 0; - _slang_variable_scope_ctr (oper->locals); - return 1; + oper->type = slang_oper_none; + oper->children = NULL; + oper->num_children = 0; + oper->literal = (float) 0; + oper->a_id = SLANG_ATOM_NULL; + oper->locals = + (slang_variable_scope *) + slang_alloc_malloc(sizeof(slang_variable_scope)); + if (oper->locals == NULL) + return GL_FALSE; + _slang_variable_scope_ctr(oper->locals); + return GL_TRUE; } -void slang_operation_destruct (slang_operation *oper) +void +slang_operation_destruct(slang_operation * oper) { - unsigned int i; + GLuint i; - for (i = 0; i < oper->num_children; i++) - slang_operation_destruct (oper->children + i); - slang_alloc_free (oper->children); - slang_variable_scope_destruct (oper->locals); - slang_alloc_free (oper->locals); + for (i = 0; i < oper->num_children; i++) + slang_operation_destruct(oper->children + i); + slang_alloc_free(oper->children); + slang_variable_scope_destruct(oper->locals); + slang_alloc_free(oper->locals); } -int slang_operation_copy (slang_operation *x, const slang_operation *y) +/** + * Recursively copy a slang_operation node. + * \return GL_TRUE for success, GL_FALSE if failure + */ +GLboolean +slang_operation_copy(slang_operation * x, const slang_operation * y) { - slang_operation z; - unsigned int i; + slang_operation z; + GLuint i; - if (!slang_operation_construct (&z)) - return 0; - z.type = y->type; - z.children = (slang_operation *) slang_alloc_malloc (y->num_children * sizeof (slang_operation)); - if (z.children == NULL) - { - slang_operation_destruct (&z); - return 0; - } - for (z.num_children = 0; z.num_children < y->num_children; z.num_children++) - if (!slang_operation_construct (&z.children[z.num_children])) - { - slang_operation_destruct (&z); - return 0; - } - for (i = 0; i < z.num_children; i++) - if (!slang_operation_copy (&z.children[i], &y->children[i])) - { - slang_operation_destruct (&z); - return 0; - } - z.literal = y->literal; - z.a_id = y->a_id; - if (!slang_variable_scope_copy (z.locals, y->locals)) - { - slang_operation_destruct (&z); - return 0; - } - slang_operation_destruct (x); - *x = z; - return 1; + if (!slang_operation_construct(&z)) + return GL_FALSE; + z.type = y->type; + z.children = (slang_operation *) + slang_alloc_malloc(y->num_children * sizeof(slang_operation)); + if (z.children == NULL) { + slang_operation_destruct(&z); + return GL_FALSE; + } + for (z.num_children = 0; z.num_children < y->num_children; + z.num_children++) { + if (!slang_operation_construct(&z.children[z.num_children])) { + slang_operation_destruct(&z); + return GL_FALSE; + } + } + for (i = 0; i < z.num_children; i++) { + if (!slang_operation_copy(&z.children[i], &y->children[i])) { + slang_operation_destruct(&z); + return GL_FALSE; + } + } + z.literal = y->literal; + z.a_id = y->a_id; + if (!slang_variable_scope_copy(z.locals, y->locals)) { + slang_operation_destruct(&z); + return GL_FALSE; + } + slang_operation_destruct(x); + *x = z; + return GL_TRUE; } + +slang_operation * +slang_operation_new(GLuint count) +{ + return (slang_operation *) _mesa_calloc(count * sizeof(slang_operation)); +} diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index f3c45de3c2..a9376ec945 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -32,7 +32,7 @@ extern "C" { /** * Types of slang operations. - * These are the basic intermediate code representations. + * These are the types of the AST (abstract syntax tree) nodes. * [foo] indicates a sub-tree or reference to another type of node */ typedef enum slang_operation_type_ @@ -105,6 +105,7 @@ typedef enum slang_operation_type_ /** * A slang_operation is basically a compiled instruction (such as assignment, * a while-loop, a conditional, a multiply, a function call, etc). + * The AST (abstract syntax tree) is built from these nodes. * NOTE: This structure could have been implemented as a union of simpler * structs which would correspond to the operation types above. */ @@ -112,16 +113,24 @@ typedef struct slang_operation_ { slang_operation_type type; struct slang_operation_ *children; - unsigned int num_children; - float literal; /**< Used for float, int and bool values */ - slang_atom a_id; /**< type: asm, identifier, call, field */ + GLuint num_children; + GLfloat literal; /**< Used for float, int and bool values */ + slang_atom a_id; /**< type: asm, identifier, call, field */ slang_variable_scope *locals; /**< local vars for scope */ } slang_operation; -extern int slang_operation_construct(slang_operation *); -extern void slang_operation_destruct(slang_operation *); -extern int slang_operation_copy(slang_operation *, const slang_operation *); +extern GLboolean +slang_operation_construct(slang_operation *); + +extern void +slang_operation_destruct(slang_operation *); + +extern GLboolean +slang_operation_copy(slang_operation *, const slang_operation *); + +extern slang_operation * +slang_operation_new(GLuint count); #ifdef __cplusplus -- cgit v1.2.3 From 3cd06cf8c5ef6a27e36c584e12ba79ed8dacbf28 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Nov 2006 01:16:12 +0000 Subject: Add accelerated CopyPixels for non-overlapping, 1:1 blits. Submitted by Gary Wong --- src/mesa/drivers/dri/i965/brw_context.c | 2 + src/mesa/drivers/dri/i965/brw_context.h | 6 +- src/mesa/drivers/dri/i965/brw_metaops.c | 98 +++++++++++++++++++++--- src/mesa/drivers/dri/i965/brw_tex.c | 32 ++++++++ src/mesa/drivers/dri/i965/brw_vtbl.c | 1 + src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 6 ++ src/mesa/drivers/dri/i965/intel_buffers.c | 2 +- src/mesa/drivers/dri/i965/intel_context.h | 11 ++- src/mesa/drivers/dri/i965/intel_pixel_copy.c | 67 +++++++++++++++- src/mesa/drivers/dri/i965/intel_tex_validate.c | 3 + 10 files changed, 213 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index c1f6617f3f..bc422c1a50 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -156,6 +156,8 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis, brw_ProgramCacheInit( ctx ); + brw_FrameBufferTexInit( brw ); + /* Hook our functions into exec and compile dispatch tables. Only * fallback on out-of-memory situations. */ diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 1137bfd2c7..a57c794834 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -485,7 +485,7 @@ struct brw_context */ struct brw_state_pointers attribs; struct gl_vertex_program *vp; - struct gl_fragment_program *fp; + struct gl_fragment_program *fp, *fp_tex; struct gl_buffer_object *vbo; @@ -493,6 +493,8 @@ struct brw_context struct intel_region *saved_depth_region; GLuint restore_draw_mask; + struct gl_fragment_program *restore_fp; + GLboolean active; } metaops; @@ -672,6 +674,8 @@ void brw_destroy_state( struct brw_context *brw ); */ void brwUpdateTextureState( struct intel_context *intel ); void brwInitTextureFuncs( struct dd_function_table *functions ); +void brw_FrameBufferTexInit( struct brw_context *brw ); +void brw_FrameBufferTexDestroy( struct brw_context *brw ); /*====================================================================== * brw_metaops.c diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c index 18ca7b1341..ca8e1d3080 100644 --- a/src/mesa/drivers/dri/i965/brw_metaops.c +++ b/src/mesa/drivers/dri/i965/brw_metaops.c @@ -27,6 +27,7 @@ /* * Authors: * Keith Whitwell + * frame buffer texture by Gary Wong */ @@ -94,22 +95,26 @@ static void init_attribs( struct brw_context *brw ) DUP(brw, gl_fragment_program_state, FragmentProgram); } -static void install_attribs( struct brw_context *brw ) +static void install_vertex_attribs( struct brw_context *brw ) { - INSTALL(brw, Color, _NEW_COLOR); - INSTALL(brw, Depth, _NEW_DEPTH); - INSTALL(brw, Fog, _NEW_FOG); INSTALL(brw, Hint, _NEW_HINT); INSTALL(brw, Light, _NEW_LIGHT); INSTALL(brw, Line, _NEW_LINE); INSTALL(brw, Point, _NEW_POINT); INSTALL(brw, Polygon, _NEW_POLYGON); - INSTALL(brw, Scissor, _NEW_SCISSOR); - INSTALL(brw, Stencil, _NEW_STENCIL); - INSTALL(brw, Texture, _NEW_TEXTURE); INSTALL(brw, Transform, _NEW_TRANSFORM); INSTALL(brw, Viewport, _NEW_VIEWPORT); INSTALL(brw, VertexProgram, _NEW_PROGRAM); +} + +static void install_fragment_attribs( struct brw_context *brw ) +{ + INSTALL(brw, Color, _NEW_COLOR); + INSTALL(brw, Depth, _NEW_DEPTH); + INSTALL(brw, Fog, _NEW_FOG); + INSTALL(brw, Scissor, _NEW_SCISSOR); + INSTALL(brw, Stencil, _NEW_STENCIL); + INSTALL(brw, Texture, _NEW_TEXTURE); INSTALL(brw, FragmentProgram, _NEW_PROGRAM); } @@ -144,6 +149,15 @@ static const char *fp_prog = "MOV result.color, fragment.color;\n" "END\n"; +static const char *fp_tex_prog = + "!!ARBfp1.0\n" + "TEMP a;\n" + "ADD a, fragment.position, program.local[0];\n" + "MUL a, a, program.local[1];\n" + "TEX result.color, a, texture[0], 2D;\n" + "MOV result.depth.z, fragment.position;\n" + "END\n"; + /* Derived values of importance: * * FragmentProgram->_Current @@ -170,6 +184,9 @@ static void init_metaops_state( struct brw_context *brw ) brw->metaops.fp = (struct gl_fragment_program *) ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 1 ); + brw->metaops.fp_tex = (struct gl_fragment_program *) + ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 1 ); + brw->metaops.vp = (struct gl_vertex_program *) ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 1 ); @@ -177,6 +194,10 @@ static void init_metaops_state( struct brw_context *brw ) fp_prog, strlen(fp_prog), brw->metaops.fp); + _mesa_parse_arb_fragment_program(ctx, GL_FRAGMENT_PROGRAM_ARB, + fp_tex_prog, strlen(fp_tex_prog), + brw->metaops.fp_tex); + _mesa_parse_arb_vertex_program(ctx, GL_VERTEX_PROGRAM_ARB, vp_prog, strlen(vp_prog), brw->metaops.vp); @@ -267,7 +288,56 @@ static void meta_color_mask( struct intel_context *intel, GLboolean state ) static void meta_no_texture( struct intel_context *intel ) { - /* Nothing to do */ + struct brw_context *brw = brw_context(&intel->ctx); + + brw->metaops.attribs.FragmentProgram->_Current = brw->metaops.fp; + + brw->metaops.attribs.Texture->CurrentUnit = 0; + brw->metaops.attribs.Texture->_EnabledUnits = 0; + brw->metaops.attribs.Texture->_EnabledCoordUnits = 0; + brw->metaops.attribs.Texture->Unit[ 0 ].Enabled = 0; + brw->metaops.attribs.Texture->Unit[ 0 ]._ReallyEnabled = 0; + + brw->state.dirty.mesa |= _NEW_TEXTURE | _NEW_PROGRAM; +} + +static void meta_frame_buffer_texture( struct intel_context *intel, + GLint xoff, GLint yoff ) +{ + struct brw_context *brw = brw_context(&intel->ctx); + struct intel_region *region = intel_drawbuf_region( intel ); + + INSTALL(brw, FragmentProgram, _NEW_PROGRAM); + + brw->metaops.attribs.FragmentProgram->_Current = brw->metaops.fp_tex; + /* This is unfortunate, but seems to be necessary, since later on we + will end up calling _mesa_load_state_parameters to lookup the + local params (below), and that will want to look in ctx.FragmentProgram + instead of brw->attribs.FragmentProgram. */ + intel->ctx.FragmentProgram.Current = brw->metaops.fp_tex; + + brw->metaops.fp_tex->Base.LocalParams[ 0 ][ 0 ] = xoff; + brw->metaops.fp_tex->Base.LocalParams[ 0 ][ 1 ] = yoff; + brw->metaops.fp_tex->Base.LocalParams[ 0 ][ 2 ] = 0.0; + brw->metaops.fp_tex->Base.LocalParams[ 0 ][ 3 ] = 0.0; + brw->metaops.fp_tex->Base.LocalParams[ 1 ][ 0 ] = + 1.0 / region->pitch; + brw->metaops.fp_tex->Base.LocalParams[ 1 ][ 1 ] = + -1.0 / region->height; + brw->metaops.fp_tex->Base.LocalParams[ 1 ][ 2 ] = 0.0; + brw->metaops.fp_tex->Base.LocalParams[ 1 ][ 3 ] = 1.0; + + brw->metaops.attribs.Texture->CurrentUnit = 0; + brw->metaops.attribs.Texture->_EnabledUnits = 1; + brw->metaops.attribs.Texture->_EnabledCoordUnits = 1; + brw->metaops.attribs.Texture->Unit[ 0 ].Enabled = TEXTURE_2D_BIT; + brw->metaops.attribs.Texture->Unit[ 0 ]._ReallyEnabled = TEXTURE_2D_BIT; + brw->metaops.attribs.Texture->Unit[ 0 ].Current2D = + intel->frame_buffer_texobj; + brw->metaops.attribs.Texture->Unit[ 0 ]._Current = + intel->frame_buffer_texobj; + + brw->state.dirty.mesa |= _NEW_TEXTURE | _NEW_PROGRAM; } @@ -406,7 +476,8 @@ static void meta_draw_quad(struct intel_context *intel, } -static void install_meta_state( struct intel_context *intel ) +static void install_meta_state( struct intel_context *intel, + GLenum state ) { GLcontext *ctx = &intel->ctx; struct brw_context *brw = brw_context(ctx); @@ -415,10 +486,14 @@ static void install_meta_state( struct intel_context *intel ) init_metaops_state(brw); } - install_attribs(brw); + install_vertex_attribs(brw); + if( state == META_FULL ) + install_fragment_attribs(brw); + meta_no_texture(&brw->intel); meta_flat_shade(&brw->intel); brw->metaops.restore_draw_mask = ctx->DrawBuffer->_ColorDrawBufferMask[0]; + brw->metaops.restore_fp = ctx->FragmentProgram.Current; /* This works without adjusting refcounts. Fix later? */ @@ -437,6 +512,7 @@ static void leave_meta_state( struct intel_context *intel ) restore_attribs(brw); ctx->DrawBuffer->_ColorDrawBufferMask[0] = brw->metaops.restore_draw_mask; + ctx->FragmentProgram.Current = brw->metaops.restore_fp; brw->state.draw_region = brw->metaops.saved_draw_region; brw->state.depth_region = brw->metaops.saved_depth_region; @@ -463,6 +539,7 @@ void brw_init_metaops( struct brw_context *brw ) brw->intel.vtbl.meta_depth_replace = meta_depth_replace; brw->intel.vtbl.meta_color_mask = meta_color_mask; brw->intel.vtbl.meta_no_texture = meta_no_texture; + brw->intel.vtbl.meta_frame_buffer_texture = meta_frame_buffer_texture; brw->intel.vtbl.meta_draw_region = meta_draw_region; brw->intel.vtbl.meta_draw_quad = meta_draw_quad; @@ -479,5 +556,6 @@ void brw_destroy_metaops( struct brw_context *brw ) ctx->Driver.DeleteBuffer( ctx, brw->metaops.vbo ); /* ctx->Driver.DeleteProgram( ctx, brw->metaops.fp ); */ +/* ctx->Driver.DeleteProgram( ctx, brw->metaops.fp_tex ); */ /* ctx->Driver.DeleteProgram( ctx, brw->metaops.vp ); */ } diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c index 8332d869e1..c3ffa9e657 100644 --- a/src/mesa/drivers/dri/i965/brw_tex.c +++ b/src/mesa/drivers/dri/i965/brw_tex.c @@ -36,11 +36,14 @@ #include "simple_list.h" #include "enums.h" #include "image.h" +#include "teximage.h" #include "texstore.h" #include "texformat.h" #include "texmem.h" +#include "intel_context.h" #include "intel_ioctl.h" +#include "intel_regions.h" #include "brw_context.h" #include "brw_defines.h" @@ -179,3 +182,32 @@ void brwInitTextureFuncs( struct dd_function_table *functions ) { functions->ChooseTextureFormat = brwChooseTextureFormat; } + +void brw_FrameBufferTexInit( struct brw_context *brw ) +{ + struct intel_context *intel = &brw->intel; + GLcontext *ctx = &intel->ctx; + struct intel_region *region = intel->front_region; + struct gl_texture_object *obj; + struct gl_texture_image *img; + + intel->frame_buffer_texobj = obj = + ctx->Driver.NewTextureObject( ctx, (GLuint) -1, GL_TEXTURE_2D ); + + obj->MinFilter = GL_NEAREST; + obj->MagFilter = GL_NEAREST; + + img = ctx->Driver.NewTextureImage( ctx ); + + _mesa_init_teximage_fields( ctx, GL_TEXTURE_2D, img, + region->pitch, region->height, 1, 0, + region->cpp == 4 ? GL_RGBA : GL_RGB ); + + _mesa_set_tex_image( obj, GL_TEXTURE_2D, 0, img ); +} + +void brw_FrameBufferTexDestroy( struct brw_context *brw ) +{ + brw->intel.ctx.Driver.DeleteTexture( &brw->intel.ctx, + brw->intel.frame_buffer_texobj ); +} diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 4896882034..ac09754e3a 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -72,6 +72,7 @@ static void brw_destroy_context( struct intel_context *intel ) brw_save_destroy( ctx ); brw_ProgramCacheDestroy( ctx ); + brw_FrameBufferTexDestroy( brw ); } /* called from intelDrawBuffer() diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 5c7dc500ca..d24c618a66 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -239,6 +239,12 @@ static void upload_wm_surfaces(struct brw_context *brw ) brw->wm.bind.surf_ss_offset[i+1] = brw_cache_data( &brw->cache[BRW_SS_SURFACE], &surf ); brw->wm.nr_surfaces = i+2; } + else if( texUnit->_ReallyEnabled && + texUnit->_Current == intel->frame_buffer_texobj ) + { + brw->wm.bind.surf_ss_offset[i+1] = brw->wm.bind.surf_ss_offset[0]; + brw->wm.nr_surfaces = i+2; + } else { brw->wm.bind.surf_ss_offset[i+1] = 0; } diff --git a/src/mesa/drivers/dri/i965/intel_buffers.c b/src/mesa/drivers/dri/i965/intel_buffers.c index d155c039d7..645ac8e4f9 100644 --- a/src/mesa/drivers/dri/i965/intel_buffers.c +++ b/src/mesa/drivers/dri/i965/intel_buffers.c @@ -235,7 +235,7 @@ static void intelClearWithTris(struct intel_context *intel, { - intel->vtbl.install_meta_state(intel); + intel->vtbl.install_meta_state(intel, META_FULL); /* Get clear bounds after locking */ cx = ctx->DrawBuffer->_Xmin; diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 2df8faef28..a8f7a61ba3 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -86,6 +86,11 @@ struct intel_texture_object +/* Identifiers for use with install_meta_state below */ +enum +{ + META_FULL, META_VERTEX_ONLY +}; struct intel_context { @@ -132,7 +137,8 @@ struct intel_context /* Metaops: */ - void (*install_meta_state)( struct intel_context *intel ); + void (*install_meta_state)( struct intel_context *intel, + GLenum state ); void (*leave_meta_state)( struct intel_context *intel ); void (*meta_draw_region)( struct intel_context *intel, @@ -151,6 +157,8 @@ struct intel_context void (*meta_no_stencil_write)( struct intel_context *intel ); void (*meta_no_depth_write)( struct intel_context *intel ); void (*meta_no_texture)( struct intel_context *intel ); + void (*meta_frame_buffer_texture)( struct intel_context *intel, + GLint xoff, GLint yoff ); void (*meta_draw_quad)(struct intel_context *intel, GLfloat x0, GLfloat x1, @@ -218,6 +226,7 @@ struct intel_context int drawY; GLuint numClipRects; /* cliprects for that buffer */ drm_clip_rect_t *pClipRects; + struct gl_texture_object *frame_buffer_texobj; GLboolean scissor; drm_clip_rect_t draw_rect; diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c index 55b58a8f67..0279311976 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c @@ -80,8 +80,6 @@ intel_check_blit_fragment_ops(GLcontext * ctx) if (ctx->NewState) _mesa_update_state(ctx); - /* Could do logicop with the blitter: - */ return !(ctx->_ImageTransferState || ctx->RenderMode != GL_RENDER || ctx->Color.AlphaEnabled || @@ -223,6 +221,65 @@ do_blit_copypixels(GLcontext * ctx, return GL_TRUE; } +/** + * CopyPixels with metaops. We can support (most) fragment options that way. + */ +static GLboolean +do_meta_copypixels(GLcontext * ctx, + GLint srcx, GLint srcy, + GLsizei width, GLsizei height, + GLint dstx, GLint dsty, GLenum type) +{ + struct intel_context *intel = intel_context(ctx); + + /* We're going to cheat and use texturing to get the source region + * duplicated. Trying to cope with the case where texturing is + * already applied to fragments would be messy (and it's an unusual + * thing to want anyway), so we leave that to swrast. + * + * We don't want to worry about any case other than GL_COLOR, either + * (though we could, with a bit more work). + * + * PixelMap, PixelTransfer, PixelZoom etc. could also be handled with + * a bit more intelligence in metaops. + */ + if( ctx->_ImageTransferState || + ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F || + ctx->RenderMode != GL_RENDER || + ctx->Texture._EnabledUnits || + ctx->FragmentProgram._Enabled || + type != GL_COLOR ) + return GL_FALSE; + + /* We don't yet handle copying between two different buffers (which + * would really only require filling out a new surface state for + * the source instead of aliasing the draw one). Nor do we handle + * overlapping source/dest rectangles (since I assume there is no + * way to force the hardware to guarantee the drawing order that + * the GL specifies -- if so, the fastest approach might be to use + * the blitter to copy the source to a temporary surface and then + * map that back onto the destination). Of course, overlapping + * areas in different buffers would be fine. + */ + if( ctx->Color.DrawBuffer[0] != ctx->ReadBuffer->ColorReadBuffer || + ( abs( srcx - dstx ) < width && abs( srcy - dsty ) < height ) ) + return GL_FALSE; + + intel->vtbl.install_meta_state( intel, META_VERTEX_ONLY ); + + intel->vtbl.meta_frame_buffer_texture( intel, srcx - dstx, srcy - dsty ); + + intel->vtbl.meta_draw_quad( intel, + dstx, dstx + width, + dsty, dsty + height, + ctx->Current.RasterPos[ 2 ], + 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0 ); + + intel->vtbl.leave_meta_state( intel ); + + return GL_TRUE; +} + void intelCopyPixels(GLcontext * ctx, GLint srcx, GLint srcy, @@ -235,6 +292,12 @@ intelCopyPixels(GLcontext * ctx, if (do_blit_copypixels(ctx, srcx, srcy, width, height, destx, desty, type)) return; + if (INTEL_DEBUG & DEBUG_PIXEL) + _mesa_printf("fallback to do_meta_copypixels\n"); + + if (do_meta_copypixels(ctx, srcx, srcy, width, height, destx, desty, type)) + return; + if (INTEL_DEBUG & DEBUG_PIXEL) _mesa_printf("fallback to _swrast_CopyPixels\n"); diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c index 91ae0970a0..cb23b9dd87 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c @@ -133,6 +133,9 @@ GLuint intel_finalize_mipmap_tree( struct intel_context *intel, GLuint nr_faces = 0; struct gl_texture_image *firstImage; + if( tObj == intel->frame_buffer_texobj ) + return GL_FALSE; + /* We know/require this is true by now: */ assert(intelObj->base.Complete); -- cgit v1.2.3 From 5785e328e0467a6ca78920e8f553851072087e8a Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 29 Nov 2006 16:41:28 +0000 Subject: call Driver.ProgramStringNotify if a ati_fragment_shader changes and pick up the change in the r200 driver accordingly. --- src/mesa/drivers/dri/r200/r200_vertprog.c | 3 +++ src/mesa/shader/atifragshader.c | 2 ++ 2 files changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index b5afe51d82..ce14c617c8 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -1205,6 +1205,9 @@ r200ProgramStringNotify(GLcontext *ctx, GLenum target, struct gl_program *prog) r200_translate_vertex_program(ctx, vp); rmesa->curr_vp_hw = NULL; break; + case GL_FRAGMENT_SHADER_ATI: + rmesa->afs_loaded = NULL; + break; } /* need this for tcl fallbacks */ _tnl_program_string(ctx, target, prog); diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index d349a496dc..4727c1a436 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -400,6 +400,8 @@ _mesa_EndFragmentShaderATI(void) } } #endif + if (ctx->Driver.ProgramStringNotify) + ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_SHADER_ATI, NULL ); } void GLAPIENTRY -- cgit v1.2.3 From ac8620f37531a2096841678723d993f3f085cbdc Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 29 Nov 2006 19:18:50 +0000 Subject: fix a bug in the sanity code when outputting vertex progs --- src/mesa/drivers/dri/r200/r200_sanity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_sanity.c b/src/mesa/drivers/dri/r200/r200_sanity.c index ca5b926a94..3f2a866530 100644 --- a/src/mesa/drivers/dri/r200/r200_sanity.c +++ b/src/mesa/drivers/dri/r200/r200_sanity.c @@ -978,7 +978,7 @@ static int radeon_emit_veclinear( } } else if ((start >= 0x180) && (start < 0x1c0)) { - for (i = start ; (i < start + sz) ; i += 4) { + for (i = 0 ; i < sz ; i += 4) { fprintf(stderr, "R200_VS_PROG %d OPDST %08x\n", (i >> 2) + start - 0x180 + 0x40, data[i]); fprintf(stderr, "R200_VS_PROG %d SRC1 %08x\n", (i >> 2) + start - 0x180 + 0x40, data[i+1]); fprintf(stderr, "R200_VS_PROG %d SRC2 %08x\n", (i >> 2) + start - 0x180 + 0x40, data[i+2]); -- cgit v1.2.3 From e731d8aafa98bbf9d30f83e65f28b7718be55834 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 29 Nov 2006 22:16:16 +0000 Subject: check for target instead of program->Target in _tnl_program_string, avoids segfault if program is NULL --- src/mesa/tnl/t_vb_arbprogram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 71fb45dd95..bf4c1d5223 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -1529,7 +1529,7 @@ const struct tnl_pipeline_stage _tnl_arb_vertex_program_stage = void _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program) { - if (program->Target == GL_VERTEX_PROGRAM_ARB) { + if (target == GL_VERTEX_PROGRAM_ARB) { /* free any existing tnl data hanging off the program */ struct gl_vertex_program *vprog = (struct gl_vertex_program *) program; if (vprog->TnlData) { -- cgit v1.2.3 From 21cf414489af84b8bb374f76c36db8f0f1919733 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 30 Nov 2006 00:52:54 +0000 Subject: fix mixed conventional / generic vertex arrays which caused a wrong array order leading to very bogus rendering (for instance WoW intro screen mentioned in #8250). --- src/mesa/drivers/dri/r200/r200_context.h | 2 + src/mesa/drivers/dri/r200/r200_maos_arrays.c | 111 ++++++++++++++++++++++++++- src/mesa/drivers/dri/r200/r200_vertprog.c | 4 + 3 files changed, 116 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index 9f109e07ff..fa38a78e26 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -107,6 +107,8 @@ struct r200_vertex_program { VERTEX_SHADER_INSTRUCTION instr[R200_VSF_MAX_INST + 6]; int pos_end; int inputs[VERT_ATTRIB_MAX]; + int rev_inputs[16]; + int gen_inputs_mapped; int native; int fogpidx; int fogmode; diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c index f6ab2f0074..39c1f68911 100644 --- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c +++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c @@ -385,6 +385,14 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) GLuint vfmt0 = 0, vfmt1 = 0; GLuint count = VB->Count; GLuint i; + GLuint generic_in_mapped = 0; + struct r200_vertex_program *vp = NULL; + + /* this looks way more complicated than necessary... */ + if (ctx->VertexProgram._Enabled) { + vp = rmesa->curr_vp_hw; + generic_in_mapped = vp->gen_inputs_mapped; + } if (inputs & VERT_BIT_POS) { if (!rmesa->tcl.obj.buf) @@ -404,6 +412,19 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) } component[nr++] = &rmesa->tcl.obj; } + else if (generic_in_mapped & (1 << 0)) { + int geninput = vp->rev_inputs[0] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt0 |= R200_VTX_W0 | R200_VTX_Z0; + } if (inputs & VERT_BIT_NORMAL) { if (!rmesa->tcl.norm.buf) @@ -463,6 +484,23 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) component[nr++] = &rmesa->tcl.rgba; } +/* vfmt0 |= R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT; + emit_ubyte_rgba( ctx, &rmesa->tcl.rgba, + (char *)VB->ColorPtr[0]->data, 4, + VB->ColorPtr[0]->stride, count);*/ + else if (generic_in_mapped & (1 << 2)) { + int geninput = vp->rev_inputs[2] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt0 |= R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT; + } if (inputs & VERT_BIT_COLOR1) { @@ -480,8 +518,49 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) vfmt0 |= R200_VTX_FP_RGB << R200_VTX_COLOR_1_SHIFT; component[nr++] = &rmesa->tcl.spec; } + else if (generic_in_mapped & (1 << 3)) { + int geninput = vp->rev_inputs[3] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt0 |= R200_VTX_FP_RGBA << R200_VTX_COLOR_1_SHIFT; + } - for ( i = 0 ; i < ctx->Const.MaxTextureUnits ; i++ ) { + if (generic_in_mapped & (1 << 4)) { + int geninput = vp->rev_inputs[4] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt0 |= R200_VTX_FP_RGBA << R200_VTX_COLOR_2_SHIFT; + } + + if (generic_in_mapped & (1 << 5)) { + int geninput = vp->rev_inputs[5] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt0 |= R200_VTX_FP_RGBA << R200_VTX_COLOR_3_SHIFT; + } + + for ( i = 0 ; i < 6 ; i++ ) { if (inputs & (VERT_BIT_TEX0 << i)) { if (!rmesa->tcl.tex[i].buf) emit_vector( ctx, @@ -494,8 +573,37 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) vfmt1 |= VB->TexCoordPtr[i]->size << (i * 3); component[nr++] = &rmesa->tcl.tex[i]; } + else if (generic_in_mapped & (1 << (i + 6))) { + int geninput = vp->rev_inputs[i + 6] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt1 |= 4 << (R200_VTX_TEX0_COMP_CNT_SHIFT + (i * 3)); + } } + if (generic_in_mapped & (1 << 13)) { + int geninput = vp->rev_inputs[13] - VERT_ATTRIB_GENERIC0; + if (!rmesa->tcl.generic[geninput].buf) { + emit_vector( ctx, + &(rmesa->tcl.generic[geninput]), + (char *)VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->data, + 4, + VB->AttribPtr[geninput + VERT_ATTRIB_GENERIC0]->stride, + count ); + } + component[nr++] = &rmesa->tcl.generic[geninput]; + vfmt0 |= R200_VTX_XY1 | R200_VTX_Z1 | R200_VTX_W1; + } + +/* doesn't work. Wrong order with mixed generic & conventional! */ +/* if (ctx->VertexProgram._Enabled) { int *vp_inputs = rmesa->curr_vp_hw->inputs; for ( i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++ ) { @@ -539,6 +647,7 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) } } } +*/ if (vfmt0 != rmesa->hw.vtx.cmd[VTX_VTXFMT_0] || vfmt1 != rmesa->hw.vtx.cmd[VTX_VTXFMT_1]) { diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index ce14c617c8..899e84caa0 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -405,6 +405,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte int dofogfix = 0; int fog_temp_i = 0; int free_inputs; + int free_inputs_conv; int array_count = 0; vp->native = GL_FALSE; @@ -530,6 +531,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte array_count++; } } + free_inputs_conv = free_inputs; /* using VERT_ATTRIB_TEX6/7 would be illegal */ /* completely ignore aliasing? */ for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) { @@ -548,11 +550,13 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte if (free_inputs & (1 << j)) { free_inputs &= ~(1 << j); vp->inputs[i] = j; + vp->rev_inputs[j] = i; break; } } } } + vp->gen_inputs_mapped = free_inputs ^ free_inputs_conv; if (!(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) { if (R200_DEBUG & DEBUG_FALLBACKS) { -- cgit v1.2.3 From 10cbd089aeb1087a277baf3a7ef0b4d9223970dc Mon Sep 17 00:00:00 2001 From: Sean D'Epagnier Date: Thu, 30 Nov 2006 03:25:28 +0000 Subject: the following improvements to linux-fbdev: 1. updated makefiles to build libOSMesa as well as libGL these are improvements to fbdev-glut 1. mouse cursor will timeout and be invisible if not being used 2. do not restore colormaps to truecolor targets, this causes problems at exit on my g450 3. fixed a crash when cleaning up from failure by munmaping what had not yet been mmaped 4. Resize event handling is improved, the resize function is not invoked from a signal handler now. 5. The main loop can detect if it is running very fast (greater than 2khz) 6. keyboard up and special up events are generated from stdin input mode and if it is also not redrawing, it sleeps 7. corrections in escape sequences for function keys for stdin input --- configs/linux-fbdev | 10 +- src/glut/fbdev/callback.c | 3 - src/glut/fbdev/colormap.c | 6 + src/glut/fbdev/cursor.c | 22 ++-- src/glut/fbdev/fbdev.c | 91 ++++++++------- src/glut/fbdev/input.c | 282 ++++++++++++++++++++++++++++------------------ src/glut/fbdev/internal.h | 5 +- src/glut/fbdev/menu.c | 2 +- src/glut/fbdev/overlay.c | 1 + src/mesa/Makefile | 4 +- 10 files changed, 253 insertions(+), 173 deletions(-) (limited to 'src/mesa') diff --git a/configs/linux-fbdev b/configs/linux-fbdev index 7a5d1b600f..e36d20a702 100644 --- a/configs/linux-fbdev +++ b/configs/linux-fbdev @@ -4,17 +4,13 @@ include $(TOP)/configs/linux CONFIG_NAME = linux-fbdev -DRIVER_DIRS = fbdev +CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER SRC_DIRS = mesa glu glut/fbdev - -CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER - - -SRC_DIRS = mesa glu glut/fbdev -DRIVER_DIRS = fbdev +DRIVER_DIRS = fbdev osmesa PROGRAM_DIRS = fbdev demos redbook samples GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread +OSMESA_LIB_DEPS = -lm -lpthread GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lgpm -lm diff --git a/src/glut/fbdev/callback.c b/src/glut/fbdev/callback.c index 946c8d8c13..8c039f530b 100644 --- a/src/glut/fbdev/callback.c +++ b/src/glut/fbdev/callback.c @@ -74,19 +74,16 @@ void glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y)) void glutMouseFunc(void (*func)(int button, int state, int x, int y)) { - MouseEnabled = 1; MouseFunc = func; } void glutMotionFunc(void (*func)(int x, int y)) { - MouseEnabled = 1; MotionFunc = func; } void glutPassiveMotionFunc(void (*func)(int x, int y)) { - MouseEnabled = 1; PassiveMotionFunc = func; } diff --git a/src/glut/fbdev/colormap.c b/src/glut/fbdev/colormap.c index 3a81f93657..3e72a7b051 100644 --- a/src/glut/fbdev/colormap.c +++ b/src/glut/fbdev/colormap.c @@ -92,12 +92,18 @@ static void FillReverseColorMap(void) void RestoreColorMap(void) { + if(FixedInfo.visual == FB_VISUAL_TRUECOLOR) + return; + if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &ColorMap) < 0) sprintf(exiterror, "ioctl(FBIOPUTCMAP) failed!\n"); } void LoadColorMap(void) { + if(FixedInfo.visual == FB_VISUAL_TRUECOLOR) + return; + ColorMap.start = 0; ColorMap.red = RedColorMap; ColorMap.green = GreenColorMap; diff --git a/src/glut/fbdev/cursor.c b/src/glut/fbdev/cursor.c index 6cd087e93c..4bb2b7fba0 100644 --- a/src/glut/fbdev/cursor.c +++ b/src/glut/fbdev/cursor.c @@ -66,6 +66,9 @@ void EraseCursor(void) unsigned char *src = MouseBuffer; + if(!MouseVisible || CurrentCursor < 0 || CurrentCursor >= NUM_CURSORS) + return; + for(i = 0; i= NUM_CURSORS) + if(!MouseVisible || CurrentCursor < 0 || CurrentCursor >= NUM_CURSORS) return; px = MouseX - CursorsXOffset[CurrentCursor]; @@ -212,10 +215,12 @@ void SwapCursor(void) int miny = MIN(py, LastMouseY); int sizey = abs(py - LastMouseY); - DrawCursor(); - /* now update the portion of the screen that has changed */ + if(MouseVisible) + DrawCursor(); - if(DisplayMode & GLUT_DOUBLE && (sizex || sizey)) { + /* now update the portion of the screen that has changed, this is also + used to hide the mouse if MouseVisible is 0 */ + if(DisplayMode & GLUT_DOUBLE && ((sizex || sizey) || !MouseVisible)) { int off, stride, i; if(minx < 0) minx = 0; @@ -230,7 +235,7 @@ void SwapCursor(void) + minx * VarInfo.bits_per_pixel / 8; stride = (sizex + CURSOR_WIDTH) * VarInfo.bits_per_pixel / 8; - for(i = 0; i< sizey + CURSOR_HEIGHT; i++) { + for(i = 0; i < sizey + CURSOR_HEIGHT; i++) { memcpy(FrameBuffer+off, BackBuffer+off, stride); off += FixedInfo.line_length; } @@ -260,11 +265,8 @@ void glutSetCursor(int cursor) if(cursor == GLUT_CURSOR_FULL_CROSSHAIR) cursor = GLUT_CURSOR_CROSSHAIR; - if(CurrentCursor >= 0 && CurrentCursor < NUM_CURSORS) - EraseCursor(); - + EraseCursor(); + MouseVisible = 1; CurrentCursor = cursor; - - MouseEnabled = 1; SwapCursor(); } diff --git a/src/glut/fbdev/fbdev.c b/src/glut/fbdev/fbdev.c index 7b46d54592..3b63cd70ea 100644 --- a/src/glut/fbdev/fbdev.c +++ b/src/glut/fbdev/fbdev.c @@ -74,6 +74,7 @@ int Redisplay; int Visible; int VisibleSwitch; int Active; +static int Resized; /* we have to poll to see if we are visible on a framebuffer that is not active */ int VisiblePoll; @@ -127,8 +128,10 @@ static void Cleanup(void) fprintf(stderr, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", strerror(errno)); - munmap(FrameBuffer, FixedInfo.smem_len); + if(FrameBuffer) + munmap(FrameBuffer, FixedInfo.smem_len); close(FrameBufferFD); + } /* free allocated back buffer */ @@ -424,6 +427,8 @@ static void ProcessTimers(void) void glutMainLoop(void) { + int idleiters; + if(ReshapeFunc) ReshapeFunc(VarInfo.xres, VarInfo.yres); @@ -440,8 +445,6 @@ void glutMainLoop(void) else if(VisiblePoll) TestVisible(); - else - usleep(1); if(IdleFunc) IdleFunc(); @@ -452,17 +455,48 @@ void glutMainLoop(void) VisibilityFunc(Visible ? GLUT_VISIBLE : GLUT_NOT_VISIBLE); } + if(Resized) { + SetVideoMode(); + CreateBuffer(); + + if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) { + sprintf(exiterror, "Failure to Make Current\n"); + exit(0); + } + + InitializeMenus(); + + if(ReshapeFunc) + ReshapeFunc(VarInfo.xres, VarInfo.yres); + + Redisplay = 1; + Resized = 0; + } + if(Visible && Redisplay) { Redisplay = 0; - if(MouseEnabled) - EraseCursor(); + EraseCursor(); DisplayFunc(); if(!(DisplayMode & GLUT_DOUBLE)) { if(ActiveMenu) DrawMenus(); - if(MouseEnabled) - DrawCursor(); + DrawCursor(); } + idleiters = 0; + } else { + /* we sleep if not receiving redisplays, and + the main loop is running faster than 2khz */ + + static int lasttime; + int time = glutGet(GLUT_ELAPSED_TIME); + if(time > lasttime) { + if(idleiters >= 2) + usleep(100); + + idleiters = 0; + lasttime = time; + } + idleiters++; } } } @@ -536,17 +570,16 @@ int ParseFBModes(int minw, int maxw, int minh, int maxh, int minf, int maxf) return 0; } -/* ---------- Window Management ----------*/ void SetVideoMode(void) { /* set new variable screen info */ if (ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo)) { - sprintf(exiterror, "ioctl(FBIOPUT_VSCREENINFO failed): %s\n", - strerror(errno)); + sprintf(exiterror, "FBIOPUT_VSCREENINFO failed: %s\n", strerror(errno)); + strcat(exiterror, "Perhaps the device does not support the selected mode\n"); exit(0); } - /* reload the screen info to update offsets */ + /* reload the screen info to update rgb bits */ if (ioctl(FrameBufferFD, FBIOGET_VSCREENINFO, &VarInfo)) { sprintf(exiterror, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n", strerror(errno)); @@ -571,11 +604,10 @@ void SetVideoMode(void) } /* initialize colormap */ - if(FixedInfo.visual != FB_VISUAL_TRUECOLOR) - LoadColorMap(); + LoadColorMap(); } -void CreateBuffer() +void CreateBuffer(void) { int size = VarInfo.xres_virtual * VarInfo.yres_virtual * VarInfo.bits_per_pixel / 8; @@ -674,20 +706,6 @@ void CreateVisual(void) } } -static void ResizeVisual(void) -{ - if(!glFBDevMakeCurrent( Context, Buffer, Buffer )) { - sprintf(exiterror, "Failure to Make Current\n"); - exit(0); - } - - InitializeMenus(); - - if(ReshapeFunc) - ReshapeFunc(VarInfo.xres, VarInfo.yres); - Redisplay = 1; -} - static void SignalWinch(int arg) { /* we can't change bitdepth without destroying the visual */ @@ -709,10 +727,7 @@ static void SignalWinch(int arg) VarInfo.blue = blue; VarInfo.transp = transp; - SetVideoMode(); - CreateBuffer(); - - ResizeVisual(); + Resized = 1; } int glutCreateWindow (const char *title) @@ -805,12 +820,14 @@ void glutSwapBuffers(void) { glFlush(); + if(!(DisplayMode & GLUT_DOUBLE)) + return; + if(ActiveMenu) DrawMenus(); - if(MouseEnabled) - DrawCursor(); + DrawCursor(); - if(DisplayMode & GLUT_DOUBLE && Visible) { + if(Visible) { Swapping = 1; glFBDevSwapBuffers(Buffer); Swapping = 0; @@ -839,10 +856,8 @@ void glutReshapeWindow(int width, int height) signal(SIGWINCH, SIG_IGN); SetVideoMode(); - CreateBuffer(); - - ResizeVisual(); signal(SIGWINCH, SignalWinch); + Resized = 1; } void glutFullScreen(void) diff --git a/src/glut/fbdev/input.c b/src/glut/fbdev/input.c index d09de22ed7..044aa50fd8 100644 --- a/src/glut/fbdev/input.c +++ b/src/glut/fbdev/input.c @@ -65,8 +65,8 @@ double MouseSpeed = 0; int KeyRepeatMode = GLUT_KEY_REPEAT_DEFAULT; -/* only display the mouse if there is a registered callback for it */ -int MouseEnabled = 0; +int MouseVisible = 0; +int LastMouseTime = 0; static int OldKDMode = -1; static int OldMode = KD_TEXT; @@ -79,6 +79,8 @@ static int MouseFD; static int kbdpipe[2]; +static int LastStdinKeyTime, LastStdinSpecialKey = -1, LastStdinCode = -1; + #define MODIFIER(mod) \ KeyboardModifiers = release ? KeyboardModifiers & ~mod \ : KeyboardModifiers | mod; @@ -93,7 +95,6 @@ static void KeyboardHandler(int sig) unsigned char code; while(read(ConsoleFD, &code, 1) == 1) { - int release, labelval; struct kbentry entry; static int lalt; /* only left alt does vt switch */ @@ -163,10 +164,47 @@ static void LedModifier(int led, int release) KeyboardLedState ^= led; releaseflag &= ~led; } + ioctl(ConsoleFD, KDSKBLED, KeyboardLedState); ioctl(ConsoleFD, KDSETLED, 0x80); } +static void HandleKeyPress(unsigned char key, int up) +{ + if(up) { + if(KeyboardUpFunc) + KeyboardUpFunc(key, MouseX, MouseY); + } else + if(KeyboardFunc) + KeyboardFunc(key, MouseX, MouseY); + + /* there was no keyboard handler to provide a way to exit the program */ + if(key == 27) + exit(0); +} + +static void HandleSpecialPress(int key, int up) +{ + if(up) { + if(SpecialUpFunc) + SpecialUpFunc(key, MouseX, MouseY); + } else + if(SpecialFunc) + SpecialFunc(key, MouseX, MouseY); +} + +static void ReleaseStdinKey(void) +{ + if(LastStdinSpecialKey != -1) { + HandleSpecialPress(LastStdinSpecialKey, 1); + LastStdinSpecialKey = -1; + } + if(LastStdinCode != -1) { + HandleKeyPress(LastStdinCode, 1); + LastStdinCode = -1; + } +} + #define READKEY read(kbdpipe[0], &code, 1) static int ReadKey(void) { @@ -175,8 +213,14 @@ static int ReadKey(void) int specialkey = 0; struct kbentry entry; - if(READKEY != 1) + if(READKEY != 1) { + /* if we are reading from stdin, we detect key releases when the key + does not repeat after a given timeout */ + if(ConsoleFD == 0 && LastStdinKeyTime + 100 < glutGet(GLUT_ELAPSED_TIME)) + ReleaseStdinKey(); return 0; + } + if(code == 0) return 0; @@ -185,65 +229,82 @@ static int ReadKey(void) KeyboardModifiers = 0; altset: if(code == 27 && READKEY == 1) { - switch(code) { - case 79: /* function key */ - READKEY; - if(code == 50) { - READKEY; - shiftfunc: - KeyboardModifiers |= GLUT_ACTIVE_SHIFT; - specialkey = GLUT_KEY_F1 + code - 53; - READKEY; - } else { - READKEY; - specialkey = GLUT_KEY_F1 + code - 80; - } - break; - case 91: - READKEY; - switch(code) { - case 68: - specialkey = GLUT_KEY_LEFT; break; - case 65: - specialkey = GLUT_KEY_UP; break; - case 67: - specialkey = GLUT_KEY_RIGHT; break; - case 66: - specialkey = GLUT_KEY_DOWN; break; - case 53: - specialkey = GLUT_KEY_PAGE_UP; READKEY; break; - case 54: - specialkey = GLUT_KEY_PAGE_DOWN; READKEY; break; - case 49: - specialkey = GLUT_KEY_HOME; READKEY; break; - case 52: - specialkey = GLUT_KEY_END; READKEY; break; - case 50: - READKEY; - if(code != 126) - goto shiftfunc; - specialkey = GLUT_KEY_INSERT; - break; - case 51: - code = '\b'; - goto stdkey; - case 91: - READKEY; - specialkey = GLUT_KEY_F1 + code - 65; - break; - default: - return 0; - } - break; - default: + if(code != 91) { KeyboardModifiers |= GLUT_ACTIVE_ALT; goto altset; } + READKEY; + switch(code) { + case 68: + specialkey = GLUT_KEY_LEFT; break; + case 65: + specialkey = GLUT_KEY_UP; break; + case 67: + specialkey = GLUT_KEY_RIGHT; break; + case 66: + specialkey = GLUT_KEY_DOWN; break; + case 52: + specialkey = GLUT_KEY_END; READKEY; break; + case 53: + specialkey = GLUT_KEY_PAGE_UP; READKEY; break; + case 54: + specialkey = GLUT_KEY_PAGE_DOWN; READKEY; break; + case 49: + READKEY; + if(code == 126) + specialkey = GLUT_KEY_HOME; + else { + specialkey = GLUT_KEY_F1 + code - 50; + READKEY; + } + break; + case 50: + READKEY; + if(code == 126) + specialkey = GLUT_KEY_INSERT; + else { + if(code > '1') + code--; + if(code > '6') + code--; + if(code > '3') { + KeyboardModifiers |= GLUT_ACTIVE_SHIFT; + code -= 12; + } + specialkey = GLUT_KEY_F1 + code - 40; + READKEY; + } + break; + case 51: + READKEY; + if(code == 126) { + code = '\b'; + goto stdkey; + } + KeyboardModifiers |= GLUT_ACTIVE_SHIFT; + specialkey = GLUT_KEY_F1 + code - 45; + READKEY; + break; + case 91: + READKEY; + specialkey = GLUT_KEY_F1 + code - 65; + break; + default: + return 0; + } } if(specialkey) { - if(SpecialFunc) - SpecialFunc(specialkey, MouseX, MouseY); + LastStdinKeyTime = glutGet(GLUT_ELAPSED_TIME); + + if(LastStdinSpecialKey != specialkey) { + ReleaseStdinKey(); + HandleSpecialPress(specialkey, 0); + LastStdinSpecialKey = specialkey; + LastStdinKeyTime += 200; /* initial repeat */ + } else + if(KeyRepeatMode != GLUT_KEY_REPEAT_OFF) + HandleSpecialPress(specialkey, 0); } else { if(code >= 1 && code <= 26 && code != '\r') { KeyboardModifiers |= GLUT_ACTIVE_CTRL; @@ -255,8 +316,15 @@ static int ReadKey(void) KeyboardModifiers |= GLUT_ACTIVE_SHIFT; stdkey: - if(KeyboardFunc) - KeyboardFunc(code, MouseX, MouseY); + LastStdinKeyTime = glutGet(GLUT_ELAPSED_TIME); + if(LastStdinCode != code) { + ReleaseStdinKey(); + HandleKeyPress(code, 0); + LastStdinCode = code; + LastStdinKeyTime += 200; /* initial repeat */ + } else + if(KeyRepeatMode != GLUT_KEY_REPEAT_OFF) + HandleSpecialPress(code, 0); } return 1; } @@ -348,12 +416,7 @@ static int ReadKey(void) /* dispatch callback */ if(specialkey) { - if(release) { - if(SpecialUpFunc) - SpecialUpFunc(specialkey, MouseX, MouseY); - } else - if(SpecialFunc) - SpecialFunc(specialkey, MouseX, MouseY); + HandleSpecialPress(specialkey, release); } else { char c = labelval; @@ -364,12 +427,7 @@ static int ReadKey(void) if(c >= 'a' && c <= 'z') c += 'A' - 'a'; } - if(release) { - if(KeyboardUpFunc) - KeyboardUpFunc(c, MouseX, MouseY); - } else - if(KeyboardFunc) - KeyboardFunc(c, MouseX, MouseY); + HandleKeyPress(c, release); } return 1; } @@ -432,28 +490,22 @@ static int ReadMouse(void) dy = event.dy; } else #endif - { - char data[4]; - - if(MouseFD == -1) - return 0; + { + char data[4]; - if(fcntl(MouseFD, F_SETFL, O_NONBLOCK) == -1) { - close(MouseFD); - MouseFD = -1; - return 0; - } + if(MouseFD == -1) + return 0; - if(read(MouseFD, data, 4) != 4) - return 0; + if(read(MouseFD, data, 4) != 4) + return 0; - l = ((data[0] & 0x20) >> 3); - m = ((data[3] & 0x10) >> 3); - r = ((data[0] & 0x10) >> 4); + l = ((data[0] & 0x20) >> 3); + m = ((data[3] & 0x10) >> 3); + r = ((data[0] & 0x10) >> 4); - dx = (((data[0] & 0x03) << 6) | (data[1] & 0x3F)); - dy = (((data[0] & 0x0C) << 4) | (data[2] & 0x3F)); - } + dx = (((data[0] & 0x03) << 6) | (data[1] & 0x3F)); + dy = (((data[0] & 0x0C) << 4) | (data[2] & 0x3F)); + } MouseX += dx * MouseSpeed; if(MouseX < 0) @@ -478,7 +530,7 @@ static int ReadMouse(void) ll = l, lm = m, lr = r; - if(dx || dy) { + if(dx || dy || !MouseVisible) { if(l || m || r) { if(MotionFunc) MotionFunc(MouseX, MouseY); @@ -488,12 +540,16 @@ static int ReadMouse(void) EraseCursor(); + MouseVisible = 1; + if(ActiveMenu) Redisplay = 1; else SwapCursor(); } + LastMouseTime = glutGet(GLUT_ELAPSED_TIME); + return 1; } @@ -502,8 +558,14 @@ void ReceiveInput(void) if(ConsoleFD != -1) while(ReadKey()); - if(MouseEnabled) - while(ReadMouse()); + while(ReadMouse()); + + /* implement a 2 second timeout on the mouse */ + if(MouseVisible && glutGet(GLUT_ELAPSED_TIME) - LastMouseTime > 2000) { + EraseCursor(); + MouseVisible = 0; + SwapCursor(); + } } static void VTSwitchHandler(int sig) @@ -526,11 +588,7 @@ static void VTSwitchHandler(int sig) if(st.v_active) ioctl(ConsoleFD, VT_RELDISP, VT_ACKACQ); - /* this is a hack to turn the cursor off */ - ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo); - - if(FixedInfo.visual != FB_VISUAL_TRUECOLOR) - RestoreColorMap(); + RestoreColorMap(); Active = 1; Visible = 1; @@ -570,11 +628,6 @@ void InitializeVT(int usestdin) exit(0); } - if(fcntl(0, F_SETFL, O_NONBLOCK | O_ASYNC) < 0) { - sprintf(exiterror, "Failed to set keyboard to non-blocking\n"); - exit(0); - } - Active = 1; if(usestdin) { @@ -582,6 +635,12 @@ void InitializeVT(int usestdin) return; } + /* enable sigio for input */ + if(fcntl(0, F_SETFL, O_ASYNC) < 0) { + sprintf(exiterror, "Failed to set O_ASYNC mode on fd 0\n"); + exit(0); + } + /* detect the current vt if it was not specified */ if(CurrentVT == 0) { int fd = open("/dev/tty", O_RDWR | O_NDELAY, 0); @@ -590,15 +649,16 @@ void InitializeVT(int usestdin) sprintf(exiterror, "Failed to open /dev/tty\n"); exit(0); } + if(ioctl(fd, VT_GETSTATE, &st) == -1) { fprintf(stderr, "Could not detect current vt, specify with -vt\n"); fprintf(stderr, "Defaulting to stdin input\n"); ConsoleFD = 0; close(fd); return; - } else - CurrentVT = st.v_active; + } + CurrentVT = st.v_active; close(fd); } @@ -686,10 +746,10 @@ void RestoreVT(void) if (tcsetattr(0, TCSANOW, &OldTermios) < 0) fprintf(stderr, "tcsetattr failed\n"); - /* setting the mode to text from graphics restores the colormap*/ + /* setting the mode to text from graphics restores the colormap */ if( #ifdef HAVE_GPM - GpmMouse || + !GpmMouse || #endif ConsoleFD == 0) if(ioctl(ConsoleFD, KDSETMODE, KD_GRAPHICS) < 0) @@ -725,11 +785,11 @@ void InitializeMouse(void) const char *mousedev = getenv("MOUSE"); if(!mousedev) mousedev = MOUSEDEV; - if((MouseFD = open(mousedev, O_RDONLY)) >= 0) { - if(!MouseSpeed) - MouseSpeed = 1; - NumMouseButtons = 3; - return; + if((MouseFD = open(mousedev, O_RDONLY | O_NONBLOCK)) >= 0) { + if(!MouseSpeed) + MouseSpeed = 1; + NumMouseButtons = 3; + return; } } #ifdef HAVE_GPM diff --git a/src/glut/fbdev/internal.h b/src/glut/fbdev/internal.h index 8801cc9f6c..0a159d96b0 100644 --- a/src/glut/fbdev/internal.h +++ b/src/glut/fbdev/internal.h @@ -51,6 +51,8 @@ extern int Swapping, VTSwitch; void TestVisible(void); int ParseFBModes(int, int, int, int, int, int); +void SetVideoMode(void); +void CreateBuffer(void); void CreateVisual(void); extern int FrameBufferFD; @@ -84,7 +86,8 @@ void RestoreColorMap(void); /* --- mouse --- */ extern int MouseX, MouseY; extern int CurrentCursor; -extern int MouseEnabled; +extern int MouseVisible; +extern int LastMouseTime; extern int NumMouseButtons; void InitializeCursor(void); diff --git a/src/glut/fbdev/menu.c b/src/glut/fbdev/menu.c index 18cd58d6a2..4ab4eb30d4 100644 --- a/src/glut/fbdev/menu.c +++ b/src/glut/fbdev/menu.c @@ -71,6 +71,7 @@ void FreeMenus(void) free(Menus[i].Items[j].name); free(Menus[i].Items); } + free(Menus); } @@ -206,7 +207,6 @@ void CloseMenu(void) int glutCreateMenu(void (*func)(int value)) { - MouseEnabled = 1; CurrentMenu = NumMenus; NumMenus++; Menus = realloc(Menus, sizeof(*Menus) * NumMenus); diff --git a/src/glut/fbdev/overlay.c b/src/glut/fbdev/overlay.c index 8bd207155c..374cf30e7d 100644 --- a/src/glut/fbdev/overlay.c +++ b/src/glut/fbdev/overlay.c @@ -24,6 +24,7 @@ * Written by Sean D'Epagnier (c) 2006 */ +#include #include void glutEstablishOverlay(void) diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 3f65ecf5cc..1cd9e5b2bb 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -33,8 +33,8 @@ default: $(MAKE) beos ; \ elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \ $(MAKE) directfb ; \ - elif [ "$(DRIVER_DIRS)" = "fbdev" ]; then \ - $(MAKE) fbdev ; \ + elif [ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \ + $(MAKE) fbdev ; $(MAKE) osmesa-only ; \ else \ $(MAKE) stand-alone ; \ fi -- cgit v1.2.3 From 40dc5902d39c875d014520a244d842189021d11a Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 1 Dec 2006 11:42:58 +0000 Subject: Fixed compilation errors/warnings. Duplicate destination surface to avoid saving/restoring the rendering state during each Clear. --- src/mesa/drivers/directfb/idirectfbgl_mesa.c | 65 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 33 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/directfb/idirectfbgl_mesa.c b/src/mesa/drivers/directfb/idirectfbgl_mesa.c index 323cdd6791..eefc964889 100644 --- a/src/mesa/drivers/directfb/idirectfbgl_mesa.c +++ b/src/mesa/drivers/directfb/idirectfbgl_mesa.c @@ -185,7 +185,7 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) IDirectFBSurface *surface; int width = 0; int height = 0; - DFBResult err; + DFBResult ret; DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); @@ -198,11 +198,11 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) surface = data->surface; surface->GetSize( surface, &width, &height ); - err = surface->Lock( surface, DSLF_READ | DSLF_WRITE, + ret = surface->Lock( surface, DSLF_READ | DSLF_WRITE, (void*)&data->video.start, &data->video.pitch ); - if (err != DFB_OK) { + if (ret) { D_ERROR( "DirectFBGL/Mesa: couldn't lock surface.\n" ); - return err; + return ret; } data->video.end = data->video.start + (height-1) * data->video.pitch; @@ -270,7 +270,7 @@ IDirectFBGL_Mesa_GetAttributes( IDirectFBGL *thiz, attributes->accum_green_size = visual->accumGreenBits; attributes->accum_blue_size = visual->accumBlueBits; attributes->accum_alpha_size = visual->accumAlphaBits; - attributes->double_buffer = (caps & DSCAPS_FLIPPING) ? 1 : 0; + attributes->double_buffer = ((caps & DSCAPS_FLIPPING) != 0); attributes->stereo = (visual->stereoMode != 0); return DFB_OK; @@ -288,6 +288,8 @@ Probe( void *data ) static DFBResult Construct( IDirectFBGL *thiz, IDirectFBSurface *surface ) { + DFBResult ret; + /* Initialize global resources. */ if (directfbgl_init()) return DFB_INIT; @@ -296,12 +298,17 @@ Construct( IDirectFBGL *thiz, IDirectFBSurface *surface ) DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBGL ); /* Initialize interface data. */ - data->ref = 1; - data->surface = surface; + data->ref = 1; + + /* Duplicate destination surface. */ + ret = surface->GetSubSurface( surface, NULL, &data->surface ); + if (ret) { + IDirectFBGL_Mesa_Destruct( thiz ); + return ret; + } - surface->AddRef( surface ); - surface->GetPixelFormat( surface, &data->format ); - surface->GetSize( surface, &data->width, &data->height ); + data->surface->GetPixelFormat( data->surface, &data->format ); + data->surface->GetSize( data->surface, &data->width, &data->height ); /* Configure visual. */ if (!directfbgl_init_visual( &data->visual, data->format )) { @@ -375,11 +382,6 @@ static void dfbClear( GLcontext *ctx, GLbitfield mask ) { IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; - int x = ctx->DrawBuffer->_Xmin; - int y = ctx->DrawBuffer->_Ymin; - int width = ctx->DrawBuffer->_Xmax - x; - int height = ctx->DrawBuffer->_Ymax - y; - GLboolean all = (width == ctx->DrawBuffer->Width && height == ctx->DrawBuffer->height) if (mask & BUFFER_BIT_FRONT_LEFT && ctx->Color.ColorMask[0] && @@ -388,7 +390,7 @@ dfbClear( GLcontext *ctx, GLbitfield mask ) ctx->Color.ColorMask[3]) { DFBRegion clip; - __u8 a, r, g, b; + GLubyte a, r, g, b; UNCLAMPED_FLOAT_TO_UBYTE( a, ctx->Color.ClearColor[ACOMP] ); UNCLAMPED_FLOAT_TO_UBYTE( r, ctx->Color.ClearColor[RCOMP] ); @@ -397,25 +399,13 @@ dfbClear( GLcontext *ctx, GLbitfield mask ) data->surface->Unlock( data->surface ); -#if DIRECTFB_VERSION_CODE >= VERSION_CODE(0,9,25) - data->surface->GetClip( data->surface, &clip ); -#else - (void)clip; -#endif - - if (all) { - data->surface->SetClip( data->surface, NULL ); - } - else { - DFBRegion reg = { x1:x, y1:y, x2:x+width-1, y2:y+height-1 }; - data->surface->SetClip( data->surface, ® ); - } + clip.x1 = ctx->DrawBuffer->_Xmin; + clip.y1 = ctx->DrawBuffer->_Ymin; + clip.x2 = ctx->DrawBuffer->_Xmax - 1; + clip.y2 = ctx->DrawBuffer->_Ymax - 1; + data->surface->SetClip( data->surface, &clip ); data->surface->Clear( data->surface, r, g, b, a ); - -#if DIRECTFB_VERSION_CODE >= VERSION_CODE(0,9,25) - data->surface->SetClip( data->surface, &clip ); -#endif data->surface->Lock( data->surface, DSLF_READ | DSLF_WRITE, (void*)&data->video.start, &data->video.pitch ); @@ -790,6 +780,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_RGB332; data->render.GetValues = get_values_RGB332; data->render.PutRow = put_row_RGB332; + data->render.PutRowRGB = put_row_rgb_RGB332; data->render.PutMonoRow = put_mono_row_RGB332; data->render.PutValues = put_values_RGB332; data->render.PutMonoValues = put_mono_values_RGB332; @@ -798,6 +789,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_ARGB4444; data->render.GetValues = get_values_ARGB4444; data->render.PutRow = put_row_ARGB4444; + data->render.PutRowRGB = put_row_rgb_ARGB4444; data->render.PutMonoRow = put_mono_row_ARGB4444; data->render.PutValues = put_values_ARGB4444; data->render.PutMonoValues = put_mono_values_ARGB4444; @@ -806,6 +798,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_ARGB2554; data->render.GetValues = get_values_ARGB2554; data->render.PutRow = put_row_ARGB2554; + data->render.PutRowRGB = put_row_rgb_ARGB2554; data->render.PutMonoRow = put_mono_row_ARGB2554; data->render.PutValues = put_values_ARGB2554; data->render.PutMonoValues = put_mono_values_ARGB2554; @@ -814,6 +807,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_ARGB1555; data->render.GetValues = get_values_ARGB1555; data->render.PutRow = put_row_ARGB1555; + data->render.PutRowRGB = put_row_rgb_ARGB1555; data->render.PutMonoRow = put_mono_row_ARGB1555; data->render.PutValues = put_values_ARGB1555; data->render.PutMonoValues = put_mono_values_ARGB1555; @@ -822,6 +816,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_RGB16; data->render.GetValues = get_values_RGB16; data->render.PutRow = put_row_RGB16; + data->render.PutRowRGB = put_row_rgb_RGB16; data->render.PutMonoRow = put_mono_row_RGB16; data->render.PutValues = put_values_RGB16; data->render.PutMonoValues = put_mono_values_RGB16; @@ -830,6 +825,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_RGB24; data->render.GetValues = get_values_RGB24; data->render.PutRow = put_row_RGB24; + data->render.PutRowRGB = put_row_rgb_RGB24; data->render.PutMonoRow = put_mono_row_RGB24; data->render.PutValues = put_values_RGB24; data->render.PutMonoValues = put_mono_values_RGB24; @@ -838,6 +834,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_RGB32; data->render.GetValues = get_values_RGB32; data->render.PutRow = put_row_RGB32; + data->render.PutRowRGB = put_row_rgb_RGB32; data->render.PutMonoRow = put_mono_row_RGB32; data->render.PutValues = put_values_RGB32; data->render.PutMonoValues = put_mono_values_RGB32; @@ -846,6 +843,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_ARGB; data->render.GetValues = get_values_ARGB; data->render.PutRow = put_row_ARGB; + data->render.PutRowRGB = put_row_rgb_ARGB; data->render.PutMonoRow = put_mono_row_ARGB; data->render.PutValues = put_values_ARGB; data->render.PutMonoValues = put_mono_values_ARGB; @@ -854,6 +852,7 @@ directfbgl_create_context( GLcontext *context, data->render.GetRow = get_row_AiRGB; data->render.GetValues = get_values_AiRGB; data->render.PutRow = put_row_AiRGB; + data->render.PutRowRGB = put_row_rgb_AiRGB; data->render.PutMonoRow = put_mono_row_AiRGB; data->render.PutValues = put_values_AiRGB; data->render.PutMonoValues = put_mono_values_AiRGB; -- cgit v1.2.3 From 682393944c72ecfabe8df674af0b48975e90b98c Mon Sep 17 00:00:00 2001 From: Thomas Hellström Date: Fri, 1 Dec 2006 12:41:43 +0000 Subject: Fix an infinite loop error that may occur when many contexts are bound to the same drawable in a multithreading environment. This one slipped out of the texman merge. --- src/mesa/drivers/dri/common/dri_util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index e7f07569f4..ba251a8143 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -411,13 +411,18 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) if (!pcp || ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) { - /* ERROR!!! */ - return; + /* ERROR!!! + * ...but we must ignore it. There can be many contexts bound to a + * drawable. + */ } psp = pdp->driScreenPriv; if (!psp) { /* ERROR!!! */ + _mesa_problem("Warning! Possible infinite loop due to bug " + "in file %s, line %d\n", + __FILE__, __LINE__); return; } -- cgit v1.2.3 From 73fdecca9fdd9e63aa5e57bcd67911fbb761d318 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 1 Dec 2006 14:12:05 +0000 Subject: Remove DirectFBGL header from Mesa bacause since 1.0.0 DirectFB installs its own header. Updated to the current DirectFBGL interface (i.e. added GetProcAddress()). --- docs/README.directfb | 2 +- progs/directfb/df_gears.c | 2 +- progs/directfb/df_morph3d.c | 2 +- progs/directfb/df_reflect.c | 2 +- src/glut/directfb/ext.c | 7 +++ src/glut/directfb/internal.h | 3 +- src/mesa/drivers/directfb/idirectfbgl_mesa.c | 80 ++++++++++++++++++---------- 7 files changed, 65 insertions(+), 33 deletions(-) (limited to 'src/mesa') diff --git a/docs/README.directfb b/docs/README.directfb index 169ebe486e..e3bada4888 100644 --- a/docs/README.directfb +++ b/docs/README.directfb @@ -6,7 +6,7 @@ Requirements ============ To build Mesa with DirectFB (DirectFBGL) support you need: - - DirectFB at least 0.9.21 (http://directfb.org) + - DirectFB at least 1.0.0 (http://directfb.org) - pkg-config at least 0.9 (http://pkgconfig.sf.net) diff --git a/progs/directfb/df_gears.c b/progs/directfb/df_gears.c index 27df900115..c480767bd3 100644 --- a/progs/directfb/df_gears.c +++ b/progs/directfb/df_gears.c @@ -27,9 +27,9 @@ #include #include +#include #include -#include /* the super interface */ diff --git a/progs/directfb/df_morph3d.c b/progs/directfb/df_morph3d.c index f7f143447f..2730fa6156 100644 --- a/progs/directfb/df_morph3d.c +++ b/progs/directfb/df_morph3d.c @@ -159,9 +159,9 @@ So the angle is: #include #include +#include #include -#include /* the super interface */ diff --git a/progs/directfb/df_reflect.c b/progs/directfb/df_reflect.c index ce4d12f749..a0e789c387 100644 --- a/progs/directfb/df_reflect.c +++ b/progs/directfb/df_reflect.c @@ -27,9 +27,9 @@ #include #include +#include #include -#include #include "util/showbuffer.c" #include "util/readtex.c" diff --git a/src/glut/directfb/ext.c b/src/glut/directfb/ext.c index d7338ce5f7..e37ecf5afa 100644 --- a/src/glut/directfb/ext.c +++ b/src/glut/directfb/ext.c @@ -156,6 +156,13 @@ glutGetProcAddress( const char *name ) return glut_functions[i].address; } +#if DIRECTFBGL_INTERFACE_VERSION >= 1 + if (g_current) { + void *address = NULL; + g_current->gl->GetProcAddress( g_current->gl, name, &address ); + return address; + } +#endif return NULL; } diff --git a/src/glut/directfb/internal.h b/src/glut/directfb/internal.h index 2e986c9f28..bc3e20e93e 100644 --- a/src/glut/directfb/internal.h +++ b/src/glut/directfb/internal.h @@ -26,8 +26,9 @@ #include #include +#include + #include "GL/glut.h" -#include "GL/directfbgl.h" #define VERSION_CODE( M, m, r ) (((M) << 16) | ((m) << 8) | ((r))) diff --git a/src/mesa/drivers/directfb/idirectfbgl_mesa.c b/src/mesa/drivers/directfb/idirectfbgl_mesa.c index eefc964889..f5bbd127c2 100644 --- a/src/mesa/drivers/directfb/idirectfbgl_mesa.c +++ b/src/mesa/drivers/directfb/idirectfbgl_mesa.c @@ -25,24 +25,16 @@ #include -#include -#include -#include - #include #include -#define VERSION_CODE( M, m, r ) (((M) * 1000) + ((m) * 100) + ((r))) -#define DIRECTFB_VERSION_CODE VERSION_CODE( DIRECTFB_MAJOR_VERSION, \ - DIRECTFB_MINOR_VERSION, \ - DIRECTFB_MICRO_VERSION ) - +#include -#ifdef CLAMP -# undef CLAMP -#endif +#include +#include +#include -#include "GL/directfbgl.h" +#undef CLAMP #include "glheader.h" #include "buffers.h" #include "context.h" @@ -62,6 +54,12 @@ #include "drivers/common/driverfuncs.h" +#define VERSION_CODE( M, m, r ) (((M) * 1000) + ((m) * 100) + ((r))) +#define DIRECTFB_VERSION_CODE VERSION_CODE( DIRECTFB_MAJOR_VERSION, \ + DIRECTFB_MINOR_VERSION, \ + DIRECTFB_MICRO_VERSION ) + + static DFBResult Probe( void *data ); @@ -79,7 +77,7 @@ DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBGL, Mesa ) typedef struct { int ref; /* reference counter */ - DFBBoolean locked; + int locked; IDirectFBSurface *surface; DFBSurfacePixelFormat format; @@ -189,8 +187,10 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); - if (data->locked) - return DFB_LOCKED; + if (data->locked) { + data->locked++; + return DFB_OK; + } if (directfbgl_lock()) return DFB_LOCKED; @@ -202,6 +202,7 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) (void*)&data->video.start, &data->video.pitch ); if (ret) { D_ERROR( "DirectFBGL/Mesa: couldn't lock surface.\n" ); + directfbgl_unlock(); return ret; } data->video.end = data->video.start + (height-1) * data->video.pitch; @@ -218,7 +219,7 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) &data->framebuffer, width, height); } - data->locked = DFB_TRUE; + data->locked++; return DFB_OK; } @@ -230,14 +231,14 @@ IDirectFBGL_Mesa_Unlock( IDirectFBGL *thiz ) if (!data->locked) return DFB_OK; - - _mesa_make_current( NULL, NULL, NULL ); + + if (--data->locked == 0) { + _mesa_make_current( NULL, NULL, NULL ); - data->surface->Unlock( data->surface ); - - directfbgl_unlock(); + data->surface->Unlock( data->surface ); - data->locked = DFB_FALSE; + directfbgl_unlock(); + } return DFB_OK; } @@ -276,6 +277,26 @@ IDirectFBGL_Mesa_GetAttributes( IDirectFBGL *thiz, return DFB_OK; } +#if DIRECTFBGL_INTERFACE_VERSION >= 1 +static DFBResult +IDirectFBGL_Mesa_GetProcAddress( IDirectFBGL *thiz, + const char *name, + void **ret_address ) +{ + DIRECT_INTERFACE_GET_DATA( IDirectFBGL ); + + if (!name) + return DFB_INVARG; + + if (!ret_address) + return DFB_INVARG; + + *ret_address = _glapi_get_proc_address( name ); + + return (*ret_address) ? DFB_OK : DFB_UNSUPPORTED; +} +#endif + /* exported symbols */ @@ -326,11 +347,14 @@ Construct( IDirectFBGL *thiz, IDirectFBSurface *surface ) } /* Assign interface pointers. */ - thiz->AddRef = IDirectFBGL_Mesa_AddRef; - thiz->Release = IDirectFBGL_Mesa_Release; - thiz->Lock = IDirectFBGL_Mesa_Lock; - thiz->Unlock = IDirectFBGL_Mesa_Unlock; - thiz->GetAttributes = IDirectFBGL_Mesa_GetAttributes; + thiz->AddRef = IDirectFBGL_Mesa_AddRef; + thiz->Release = IDirectFBGL_Mesa_Release; + thiz->Lock = IDirectFBGL_Mesa_Lock; + thiz->Unlock = IDirectFBGL_Mesa_Unlock; + thiz->GetAttributes = IDirectFBGL_Mesa_GetAttributes; +#if DIRECTFBGL_INTERFACE_VERSION >= 1 + thiz->GetProcAddress = IDirectFBGL_Mesa_GetProcAddress; +#endif return DFB_OK; } -- cgit v1.2.3 From e99d6746edeb80d73e356230dfe0d8ae8c643b65 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 1 Dec 2006 20:58:26 +0000 Subject: Be aware that the surface storage can change between locks. --- src/mesa/drivers/directfb/idirectfbgl_mesa.c | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/directfb/idirectfbgl_mesa.c b/src/mesa/drivers/directfb/idirectfbgl_mesa.c index f5bbd127c2..3c8c6c256e 100644 --- a/src/mesa/drivers/directfb/idirectfbgl_mesa.c +++ b/src/mesa/drivers/directfb/idirectfbgl_mesa.c @@ -85,8 +85,8 @@ typedef struct { int height; struct { - __u8 *start; - __u8 *end; + GLubyte *start; + GLubyte *end; int pitch; } video; @@ -213,10 +213,10 @@ IDirectFBGL_Mesa_Lock( IDirectFBGL *thiz ) &data->framebuffer, &data->framebuffer ); if (data->width != width || data->height != height) { + _mesa_resize_framebuffer( &data->context, + &data->framebuffer, width, height ); data->width = width; - data->height = height; - _mesa_resize_framebuffer(&data->context, - &data->framebuffer, width, height); + data->height = height; } data->locked++; @@ -394,23 +394,21 @@ dfbGetBufferSize( GLframebuffer *buffer, GLuint *width, GLuint *height ) static void dfbSetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ) { - GLuint newWidth, newHeight; - GLframebuffer *buffer = ctx->WinSysDrawBuffer; - dfbGetBufferSize( buffer, &newWidth, &newHeight ); - if (buffer->Width != newWidth || buffer->Height != newHeight) { - _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight ); - } + /* Nothing to do (the surface can't be resized while it's locked). */ + return; } static void dfbClear( GLcontext *ctx, GLbitfield mask ) { IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx; - - if (mask & BUFFER_BIT_FRONT_LEFT && - ctx->Color.ColorMask[0] && - ctx->Color.ColorMask[1] && - ctx->Color.ColorMask[2] && + +#define BUFFER_BIT_MASK (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT | \ + BUFFER_BIT_BACK_LEFT | BUFFER_BIT_BACK_RIGHT ) + if (mask & BUFFER_BIT_MASK && + ctx->Color.ColorMask[0] && + ctx->Color.ColorMask[1] && + ctx->Color.ColorMask[2] && ctx->Color.ColorMask[3]) { DFBRegion clip; @@ -421,27 +419,29 @@ dfbClear( GLcontext *ctx, GLbitfield mask ) UNCLAMPED_FLOAT_TO_UBYTE( g, ctx->Color.ClearColor[GCOMP] ); UNCLAMPED_FLOAT_TO_UBYTE( b, ctx->Color.ClearColor[BCOMP] ); - data->surface->Unlock( data->surface ); - clip.x1 = ctx->DrawBuffer->_Xmin; clip.y1 = ctx->DrawBuffer->_Ymin; clip.x2 = ctx->DrawBuffer->_Xmax - 1; clip.y2 = ctx->DrawBuffer->_Ymax - 1; data->surface->SetClip( data->surface, &clip ); + data->surface->Unlock( data->surface ); + data->surface->Clear( data->surface, r, g, b, a ); data->surface->Lock( data->surface, DSLF_READ | DSLF_WRITE, (void*)&data->video.start, &data->video.pitch ); + data->video.end = data->video.start + (data->height-1) * data->video.pitch; + data->render.Data = data->video.start; - mask &= ~BUFFER_BIT_FRONT_LEFT; + mask &= ~BUFFER_BIT_MASK; } +#undef BUFFER_BIT_MASK if (mask) _swrast_Clear( ctx, mask ); -} - - +} + /************************ RenderBuffer functions *****************************/ -- cgit v1.2.3 From 7a43a6b4ff8377f260f5525062bc2f66c05570e1 Mon Sep 17 00:00:00 2001 From: Gary Wong Date: Sat, 2 Dec 2006 01:13:06 +0000 Subject: Structure CopyPixels similarly to i915 do_texture_copypixels, to ease future unification. --- src/mesa/drivers/dri/i965/brw_metaops.c | 68 ++++++----- src/mesa/drivers/dri/i965/intel_buffers.c | 2 +- src/mesa/drivers/dri/i965/intel_context.h | 12 +- src/mesa/drivers/dri/i965/intel_pixel_copy.c | 164 +++++++++++++++++---------- 4 files changed, 147 insertions(+), 99 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c index ca8e1d3080..2deec5eae3 100644 --- a/src/mesa/drivers/dri/i965/brw_metaops.c +++ b/src/mesa/drivers/dri/i965/brw_metaops.c @@ -95,26 +95,22 @@ static void init_attribs( struct brw_context *brw ) DUP(brw, gl_fragment_program_state, FragmentProgram); } -static void install_vertex_attribs( struct brw_context *brw ) +static void install_attribs( struct brw_context *brw ) { + INSTALL(brw, Color, _NEW_COLOR); + INSTALL(brw, Depth, _NEW_DEPTH); + INSTALL(brw, Fog, _NEW_FOG); INSTALL(brw, Hint, _NEW_HINT); INSTALL(brw, Light, _NEW_LIGHT); INSTALL(brw, Line, _NEW_LINE); INSTALL(brw, Point, _NEW_POINT); INSTALL(brw, Polygon, _NEW_POLYGON); - INSTALL(brw, Transform, _NEW_TRANSFORM); - INSTALL(brw, Viewport, _NEW_VIEWPORT); - INSTALL(brw, VertexProgram, _NEW_PROGRAM); -} - -static void install_fragment_attribs( struct brw_context *brw ) -{ - INSTALL(brw, Color, _NEW_COLOR); - INSTALL(brw, Depth, _NEW_DEPTH); - INSTALL(brw, Fog, _NEW_FOG); INSTALL(brw, Scissor, _NEW_SCISSOR); INSTALL(brw, Stencil, _NEW_STENCIL); INSTALL(brw, Texture, _NEW_TEXTURE); + INSTALL(brw, Transform, _NEW_TRANSFORM); + INSTALL(brw, Viewport, _NEW_VIEWPORT); + INSTALL(brw, VertexProgram, _NEW_PROGRAM); INSTALL(brw, FragmentProgram, _NEW_PROGRAM); } @@ -301,6 +297,36 @@ static void meta_no_texture( struct intel_context *intel ) brw->state.dirty.mesa |= _NEW_TEXTURE | _NEW_PROGRAM; } +static void meta_texture_blend_replace(struct intel_context *intel) +{ + struct brw_context *brw = brw_context(&intel->ctx); + + brw->metaops.attribs.Texture->CurrentUnit = 0; + brw->metaops.attribs.Texture->_EnabledUnits = 1; + brw->metaops.attribs.Texture->_EnabledCoordUnits = 1; + brw->metaops.attribs.Texture->Unit[ 0 ].Enabled = TEXTURE_2D_BIT; + brw->metaops.attribs.Texture->Unit[ 0 ]._ReallyEnabled = TEXTURE_2D_BIT; + brw->metaops.attribs.Texture->Unit[ 0 ].Current2D = + intel->frame_buffer_texobj; + brw->metaops.attribs.Texture->Unit[ 0 ]._Current = + intel->frame_buffer_texobj; + + brw->state.dirty.mesa |= _NEW_TEXTURE | _NEW_PROGRAM; +} + +static void meta_import_pixel_state(struct intel_context *intel) +{ + struct brw_context *brw = brw_context(&intel->ctx); + + RESTORE(brw, Color, _NEW_COLOR); + RESTORE(brw, Depth, _NEW_DEPTH); + RESTORE(brw, Fog, _NEW_FOG); + RESTORE(brw, Scissor, _NEW_SCISSOR); + RESTORE(brw, Stencil, _NEW_STENCIL); + RESTORE(brw, Texture, _NEW_TEXTURE); + RESTORE(brw, FragmentProgram, _NEW_PROGRAM); +} + static void meta_frame_buffer_texture( struct intel_context *intel, GLint xoff, GLint yoff ) { @@ -327,17 +353,7 @@ static void meta_frame_buffer_texture( struct intel_context *intel, brw->metaops.fp_tex->Base.LocalParams[ 1 ][ 2 ] = 0.0; brw->metaops.fp_tex->Base.LocalParams[ 1 ][ 3 ] = 1.0; - brw->metaops.attribs.Texture->CurrentUnit = 0; - brw->metaops.attribs.Texture->_EnabledUnits = 1; - brw->metaops.attribs.Texture->_EnabledCoordUnits = 1; - brw->metaops.attribs.Texture->Unit[ 0 ].Enabled = TEXTURE_2D_BIT; - brw->metaops.attribs.Texture->Unit[ 0 ]._ReallyEnabled = TEXTURE_2D_BIT; - brw->metaops.attribs.Texture->Unit[ 0 ].Current2D = - intel->frame_buffer_texobj; - brw->metaops.attribs.Texture->Unit[ 0 ]._Current = - intel->frame_buffer_texobj; - - brw->state.dirty.mesa |= _NEW_TEXTURE | _NEW_PROGRAM; + brw->state.dirty.mesa |= _NEW_PROGRAM; } @@ -486,9 +502,7 @@ static void install_meta_state( struct intel_context *intel, init_metaops_state(brw); } - install_vertex_attribs(brw); - if( state == META_FULL ) - install_fragment_attribs(brw); + install_attribs(brw); meta_no_texture(&brw->intel); meta_flat_shade(&brw->intel); @@ -539,11 +553,11 @@ void brw_init_metaops( struct brw_context *brw ) brw->intel.vtbl.meta_depth_replace = meta_depth_replace; brw->intel.vtbl.meta_color_mask = meta_color_mask; brw->intel.vtbl.meta_no_texture = meta_no_texture; + brw->intel.vtbl.meta_import_pixel_state = meta_import_pixel_state; brw->intel.vtbl.meta_frame_buffer_texture = meta_frame_buffer_texture; brw->intel.vtbl.meta_draw_region = meta_draw_region; brw->intel.vtbl.meta_draw_quad = meta_draw_quad; - -/* brw->intel.vtbl.meta_texture_blend_replace = meta_texture_blend_replace; */ + brw->intel.vtbl.meta_texture_blend_replace = meta_texture_blend_replace; /* brw->intel.vtbl.meta_tex_rect_source = meta_tex_rect_source; */ /* brw->intel.vtbl.meta_draw_format = set_draw_format; */ } diff --git a/src/mesa/drivers/dri/i965/intel_buffers.c b/src/mesa/drivers/dri/i965/intel_buffers.c index 645ac8e4f9..d155c039d7 100644 --- a/src/mesa/drivers/dri/i965/intel_buffers.c +++ b/src/mesa/drivers/dri/i965/intel_buffers.c @@ -235,7 +235,7 @@ static void intelClearWithTris(struct intel_context *intel, { - intel->vtbl.install_meta_state(intel, META_FULL); + intel->vtbl.install_meta_state(intel); /* Get clear bounds after locking */ cx = ctx->DrawBuffer->_Xmin; diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index a8f7a61ba3..8367a95710 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -86,12 +86,6 @@ struct intel_texture_object -/* Identifiers for use with install_meta_state below */ -enum -{ - META_FULL, META_VERTEX_ONLY -}; - struct intel_context { GLcontext ctx; /* the parent class */ @@ -137,8 +131,7 @@ struct intel_context /* Metaops: */ - void (*install_meta_state)( struct intel_context *intel, - GLenum state ); + void (*install_meta_state)( struct intel_context *intel ); void (*leave_meta_state)( struct intel_context *intel ); void (*meta_draw_region)( struct intel_context *intel, @@ -154,9 +147,12 @@ struct intel_context void (*meta_depth_replace)( struct intel_context *intel ); + void (*meta_texture_blend_replace) (struct intel_context * intel); + void (*meta_no_stencil_write)( struct intel_context *intel ); void (*meta_no_depth_write)( struct intel_context *intel ); void (*meta_no_texture)( struct intel_context *intel ); + void (*meta_import_pixel_state) (struct intel_context * intel); void (*meta_frame_buffer_texture)( struct intel_context *intel, GLint xoff, GLint yoff ); diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c index 0279311976..58dc49505f 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c @@ -95,7 +95,107 @@ intel_check_blit_fragment_ops(GLcontext * ctx) ctx->Color.BlendEnabled); } +/* Doesn't work for overlapping regions. Could do a double copy or + * just fallback. + */ +static GLboolean +do_texture_copypixels(GLcontext * ctx, + GLint srcx, GLint srcy, + GLsizei width, GLsizei height, + GLint dstx, GLint dsty, GLenum type) +{ + struct intel_context *intel = intel_context(ctx); + struct intel_region *dst = intel_drawbuf_region(intel); + struct intel_region *src = copypix_src_region(intel, type); + GLenum src_format; + GLenum src_type; + + DBG("%s %d,%d %dx%d --> %d,%d\n", __FUNCTION__, + srcx, srcy, width, height, dstx, dsty); + if (!src || !dst || type != GL_COLOR || + ctx->_ImageTransferState || + ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F || + ctx->RenderMode != GL_RENDER || + ctx->Texture._EnabledUnits || + ctx->FragmentProgram._Enabled || + src != dst ) + return GL_FALSE; + + /* Can't handle overlapping regions. Don't have sufficient control + * over rasterization to pull it off in-place. Punt on these for + * now. + * + * XXX: do a copy to a temporary. + */ + if (src->buffer == dst->buffer) { + drm_clip_rect_t srcbox; + drm_clip_rect_t dstbox; + drm_clip_rect_t tmp; + + srcbox.x1 = srcx; + srcbox.y1 = srcy; + srcbox.x2 = srcx + width - 1; + srcbox.y2 = srcy + height - 1; + + dstbox.x1 = dstx; + dstbox.y1 = dsty; + dstbox.x2 = dstx + width - 1; + dstbox.y2 = dsty + height - 1; + + DBG("src %d,%d %d,%d\n", srcbox.x1, srcbox.y1, srcbox.x2, srcbox.y2); + DBG("dst %d,%d %d,%d (%dx%d) (%f,%f)\n", dstbox.x1, dstbox.y1, dstbox.x2, dstbox.y2, + width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY); + + if (intel_intersect_cliprects(&tmp, &srcbox, &dstbox)) { + DBG("%s: regions overlap\n", __FUNCTION__); + return GL_FALSE; + } + } + + intelFlush(&intel->ctx); + + intel->vtbl.install_meta_state(intel); + + /* Is this true? Also will need to turn depth testing on according + * to state: + */ + intel->vtbl.meta_no_stencil_write(intel); + intel->vtbl.meta_no_depth_write(intel); + + /* Set the 3d engine to draw into the destination region: + */ + intel->vtbl.meta_draw_region(intel, dst, intel->depth_region); + + intel->vtbl.meta_import_pixel_state(intel); + + if (src->cpp == 2) { + src_format = GL_RGB; + src_type = GL_UNSIGNED_SHORT_5_6_5; + } + else { + src_format = GL_BGRA; + src_type = GL_UNSIGNED_BYTE; + } + + /* Set the frontbuffer up as a large rectangular texture. + */ + intel->vtbl.meta_frame_buffer_texture( intel, srcx - dstx, srcy - dsty ); + + intel->vtbl.meta_texture_blend_replace(intel); + + if (intel->driDrawable->numClipRects) + intel->vtbl.meta_draw_quad( intel, + dstx, dstx + width, + dsty, dsty + height, + ctx->Current.RasterPos[ 2 ], + 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0 ); + + intel->vtbl.leave_meta_state( intel ); + + DBG("%s: success\n", __FUNCTION__); + return GL_TRUE; +} /** * CopyPixels with the blitter. Don't support zooming, pixel transfer, etc. @@ -221,65 +321,6 @@ do_blit_copypixels(GLcontext * ctx, return GL_TRUE; } -/** - * CopyPixels with metaops. We can support (most) fragment options that way. - */ -static GLboolean -do_meta_copypixels(GLcontext * ctx, - GLint srcx, GLint srcy, - GLsizei width, GLsizei height, - GLint dstx, GLint dsty, GLenum type) -{ - struct intel_context *intel = intel_context(ctx); - - /* We're going to cheat and use texturing to get the source region - * duplicated. Trying to cope with the case where texturing is - * already applied to fragments would be messy (and it's an unusual - * thing to want anyway), so we leave that to swrast. - * - * We don't want to worry about any case other than GL_COLOR, either - * (though we could, with a bit more work). - * - * PixelMap, PixelTransfer, PixelZoom etc. could also be handled with - * a bit more intelligence in metaops. - */ - if( ctx->_ImageTransferState || - ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F || - ctx->RenderMode != GL_RENDER || - ctx->Texture._EnabledUnits || - ctx->FragmentProgram._Enabled || - type != GL_COLOR ) - return GL_FALSE; - - /* We don't yet handle copying between two different buffers (which - * would really only require filling out a new surface state for - * the source instead of aliasing the draw one). Nor do we handle - * overlapping source/dest rectangles (since I assume there is no - * way to force the hardware to guarantee the drawing order that - * the GL specifies -- if so, the fastest approach might be to use - * the blitter to copy the source to a temporary surface and then - * map that back onto the destination). Of course, overlapping - * areas in different buffers would be fine. - */ - if( ctx->Color.DrawBuffer[0] != ctx->ReadBuffer->ColorReadBuffer || - ( abs( srcx - dstx ) < width && abs( srcy - dsty ) < height ) ) - return GL_FALSE; - - intel->vtbl.install_meta_state( intel, META_VERTEX_ONLY ); - - intel->vtbl.meta_frame_buffer_texture( intel, srcx - dstx, srcy - dsty ); - - intel->vtbl.meta_draw_quad( intel, - dstx, dstx + width, - dsty, dsty + height, - ctx->Current.RasterPos[ 2 ], - 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0 ); - - intel->vtbl.leave_meta_state( intel ); - - return GL_TRUE; -} - void intelCopyPixels(GLcontext * ctx, GLint srcx, GLint srcy, @@ -292,10 +333,7 @@ intelCopyPixels(GLcontext * ctx, if (do_blit_copypixels(ctx, srcx, srcy, width, height, destx, desty, type)) return; - if (INTEL_DEBUG & DEBUG_PIXEL) - _mesa_printf("fallback to do_meta_copypixels\n"); - - if (do_meta_copypixels(ctx, srcx, srcy, width, height, destx, desty, type)) + if (do_texture_copypixels(ctx, srcx, srcy, width, height, destx, desty, type)) return; if (INTEL_DEBUG & DEBUG_PIXEL) -- cgit v1.2.3 From b4dcb99cbc21ad1dafa12e31086f9e0d5fc05e81 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 3 Dec 2006 02:01:49 +0000 Subject: Fix a copy+paste'o that caused some *very* strange bugs.. --- src/mesa/drivers/dri/nouveau/nouveau_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index cd46feff7c..032cdee2f7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -33,7 +33,7 @@ static GLboolean nouveauCreateDmaObject(nouveauContextPtr nmesa, dma.target = target; dma.access = access; dma.offset = offset; - dma.handle = handle; + dma.size = size; ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_DMA_OBJECT_INIT, &dma, sizeof(dma)); return ret == 0; -- cgit v1.2.3 From d88d895e5a642cffaaf6b654b27686f2eac901d2 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 3 Dec 2006 09:08:26 +0000 Subject: Merge the pciid work. Use lock step versioning with the drm. --- src/mesa/drivers/dri/nouveau/nouveau_card.c | 42 +---- src/mesa/drivers/dri/nouveau/nouveau_card_list.h | 229 +++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_context.c | 3 +- src/mesa/drivers/dri/nouveau/nouveau_context.h | 12 -- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 3 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 10 +- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 6 +- src/mesa/drivers/dri/nouveau/nouveau_shader.c | 3 +- src/mesa/drivers/dri/nouveau/nouveau_state.c | 2 +- 10 files changed, 253 insertions(+), 59 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_card_list.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card.c b/src/mesa/drivers/dri/nouveau/nouveau_card.c index 4a5d5eb9d7..a0628389bf 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_card.c @@ -1,48 +1,18 @@ #include "nouveau_card.h" #include "nouveau_reg.h" - -static nouveau_card nouveau_card_list[]={ -//{0x0010, "Riva 128", ????, NV_03, 0}, -{0x0020, "TNT/TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, -{0x00A0, "TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, -{0x0100, "GeForce", NV10_TCL_PRIMITIVE_3D, NV_10, 0}, -{0x0110, "GeForce 2 MX", NV15_TCL_PRIMITIVE_3D|0x1100, NV_10, 0}, -{0x01A0, "NForce", NV15_TCL_PRIMITIVE_3D|0x1100, NV_10, 0}, -{0x0150, "GeForce 2", NV15_TCL_PRIMITIVE_3D, NV_10, 0}, -{0x0170, "GeForce 4 MX", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, -{0x0180, "GeForce 4 MX", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, -{0x01F0, "NForce 2", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, -{0x0200, "GeForce 3", NV20_TCL_PRIMITIVE_3D|0x2000, NV_20, NV_HAS_LMA}, -{0x0250, "GeForce 4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_20, NV_HAS_LMA}, -{0x0280, "GeForce 4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_20, NV_HAS_LMA}, -{0x0320, "GeForce FX 5200/5500", NV30_TCL_PRIMITIVE_3D|0x3400, NV_30, NV_HAS_LMA}, -{0x0310, "GeForce FX 5600", NV30_TCL_PRIMITIVE_3D|0x3000, NV_30, NV_HAS_LMA}, -{0x0340, "GeForce FX 5700", NV30_TCL_PRIMITIVE_3D|0x3500, NV_30, NV_HAS_LMA}, -{0x0300, "GeForce FX 5800", NV30_TCL_PRIMITIVE_3D|0x3000, NV_30, NV_HAS_LMA}, -{0x0330, "GeForce FX 5900", NV30_TCL_PRIMITIVE_3D|0x3500, NV_30, NV_HAS_LMA}, -{0x0240, "GeForce 6100", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0160, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0220, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0140, "GeForce 6200/6600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0040, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x00C0, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0210, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x01D0, "GeForce 7200/7300/7400", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0390, "GeForce 7300/7600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x02E0, "GeForce 7300/7600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0090, "GeForce 7800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0290, "GeForce 7900", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -/* catchall */ -{0x0000, "Unknown card", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -}; +#include "nouveau_drm.h" +// FIXME hack for now +#define NV15_TCL_PRIMITIVE_3D 0x0096 +#define NV17_TCL_PRIMITIVE_3D 0x0099 +#include "nouveau_card_list.h" nouveau_card* nouveau_card_lookup(uint32_t device_id) { int i; for(i=0;iDriverCtx)) -/* Flags for what context state needs to be updated: */ -#define NOUVEAU_NEW_ALPHA 0x0001 -#define NOUVEAU_NEW_DEPTH 0x0002 -#define NOUVEAU_NEW_FOG 0x0004 -#define NOUVEAU_NEW_CLIP 0x0008 -#define NOUVEAU_NEW_CULL 0x0010 -#define NOUVEAU_NEW_MASKS 0x0020 -#define NOUVEAU_NEW_RENDER_NOT 0x0040 -#define NOUVEAU_NEW_WINDOW 0x0080 -#define NOUVEAU_NEW_CONTEXT 0x0100 -#define NOUVEAU_NEW_ALL 0x01ff - /* Flags for software fallback cases: */ #define NOUVEAU_FALLBACK_TEXTURE 0x0001 #define NOUVEAU_FALLBACK_DRAW_BUFFER 0x0002 diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 9fac6a48df..0b745e1e74 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -90,7 +90,8 @@ void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) case NV_20: case NV_30: case NV_40: - case G_70: + case NV_44: + case NV_50: default: status=NV_READ(NV04_STATUS); break; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 44b9f356d1..51993cf556 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -60,7 +60,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define OUT_RINGp(ptr,sz) do { \ uint32_t* p=(uint32_t*)(ptr); \ -int i; printf("OUT_RINGp: (size 0x%x dwords)\n",sz); for(i=0;ipatch) + return NULL; + psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL, ddx_version, dri_version, drm_version, frame_buffer, pSAREA, fd, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index 97ea1ee547..63da8420b2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -173,10 +173,11 @@ nouveauShaderInitFuncs(GLcontext * ctx) NV30FPInitShaderFuncs(&nmesa->FPfunc); break; case NV_40: - case G_70: + case NV_44: NV40VPInitShaderFuncs(&nmesa->VPfunc); NV40FPInitShaderFuncs(&nmesa->FPfunc); break; + case NV_50: default: return; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 1445ee7449..88a8c9ed59 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -168,7 +168,7 @@ void nouveauDDInitState(nouveauContextPtr nmesa) break; case NV_30: case NV_40: - case G_70: + case NV_50: nv30InitStateFuncs(&nmesa->glCtx->Driver); break; default: -- cgit v1.2.3 From f95fe81fffa42be756b0fa53b5f3b240006158d2 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 3 Dec 2006 10:08:04 +0000 Subject: Remove duplicate nv10 tcl defines --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 225 +---------------------------- 1 file changed, 5 insertions(+), 220 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 077f06e02b..200e770903 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -290,226 +290,11 @@ Object NV_IMAGE_BLIT used on: NV04 NV10 NV15 NV20 NV40 Object NV10_TCL_PRIMITIVE_3D used on: NV10 */ #define NV10_TCL_PRIMITIVE_3D 0x00000056 -# define NV10_TCL_PRIMITIVE_3D_NOP 0x00000100 -# define NV10_TCL_PRIMITIVE_3D_NOTIFY 0x00000104 -# define NV10_TCL_PRIMITIVE_3D_SET_DMA_NOTIFY 0x00000180 -# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY0 0x00000184 -# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY1 0x00000188 -# define NV10_TCL_PRIMITIVE_3D_SET_DISPLAY_LIST 0x0000018c -# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY2 0x00000194 -# define NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY3 0x00000198 -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ 0x00000200 /* Parameters: width x */ -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_VERT 0x00000204 /* Parameters: height y */ -# define NV10_TCL_PRIMITIVE_3D_BUFFER_FORMAT 0x00000208 /* Parameters: type color */ -# define NV10_TCL_PRIMITIVE_3D_BUFFER_PITCH 0x0000020c /* Parameters: depth/stencil buffer pitch color buffer pitch */ -# define NV10_TCL_PRIMITIVE_3D_COLOR_OFFSET 0x00000210 -# define NV10_TCL_PRIMITIVE_3D_DEPTH_OFFSET 0x00000214 -# define NV10_TCL_PRIMITIVE_3D_TX_OFFSET(d) (0x00000218 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_TX_FORMAT(d) (0x00000220 + d * 0x0004) /* Parameters: wrap_t wrap_s log2(height) log2(width) lod npot format cube_map */ -# define NV10_TCL_PRIMITIVE_3D_TX_ENABLE(d) (0x00000228 + d * 0x0004) /* Parameters: enable anisotropy */ -# define NV10_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(d) (0x00000230 + d * 0x0004) /* Parameters: pitch */ -# define NV10_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(d) (0x00000240 + d * 0x0004) /* Parameters: width height */ -# define NV10_TCL_PRIMITIVE_3D_TX_FILTER(d) (0x00000248 + d * 0x0004) /* Parameters: mag_filter min_filter */ -# define NV10_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000260 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ -# define NV10_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000268 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ -# define NV10_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000278 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ -# define NV10_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00000280 + d * 0x0004) /* Parameters: rc1_tx_units_enabled rc1_rc_enabled scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ -# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x000003e0 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x00000540 + y * 0x0010 + x * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_RC_COLOR0 0x00000270 /* Parameters: a r g b */ -# define NV10_TCL_PRIMITIVE_3D_RC_COLOR1 0x00000274 /* Parameters: a r g b */ -# define NV10_TCL_PRIMITIVE_3D_RC_FINAL0 0x00000288 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ -# define NV10_TCL_PRIMITIVE_3D_RC_FINAL1 0x0000028c /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ -# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL 0x00000294 /* Parameters: local_viewer color_control */ -# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL 0x00000298 /* Parameters: specular diffuse ambient emission */ -# define NV10_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c -# define NV10_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 -# define NV10_TCL_PRIMITIVE_3D_FOG_ENABLE 0x000002a4 -# define NV10_TCL_PRIMITIVE_3D_FOG_COLOR 0x000002a8 /* Parameters: a b g r */ -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ -# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 -# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE 0x00000304 -# define NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 -# define NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x0000030c -# define NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE 0x00000310 -# define NV10_TCL_PRIMITIVE_3D_LIGHTING_ENABLE 0x00000314 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE 0x00000318 -# define NV10_TCL_PRIMITIVE_3D_POINT_SMOOTH_ENABLE 0x0000031c -# define NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00000320 -# define NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000324 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_WEIGHT_ENABLE 0x00000328 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_ENABLE 0x0000032c -# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 -# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 -# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 -# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC 0x0000033c -# define NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00000340 -# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC 0x00000344 -# define NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST 0x00000348 -# define NV10_TCL_PRIMITIVE_3D_BLEND_COLOR 0x0000034c /* Parameters: a r g b */ -# define NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 -# define NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 -# define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: r g b */ -# define NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x0000035c -# define NV10_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_REF 0x00000368 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_MASK 0x0000036c -# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL 0x00000370 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_ZFAIL 0x00000374 -# define NV10_TCL_PRIMITIVE_3D_STENCIL_OP_ZPASS 0x00000378 -# define NV10_TCL_PRIMITIVE_3D_SHADE_MODEL 0x0000037c -# define NV10_TCL_PRIMITIVE_3D_LINE_WIDTH 0x00000380 -# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR 0x00000384 -# define NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_UNITS 0x00000388 -# define NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x0000038c -# define NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK 0x00000390 -# define NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 -# define NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 -# define NV10_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c -# define NV10_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 -# define NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 -# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 -# define NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL 0x000003b8 /* Parameters: color_control */ -# define NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ -# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE( d) (0x000003c0 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_VIEW_MATRIX_ENABLE 0x000003e8 /* Parameters: projection modelview0 modelview1 */ -# define NV10_TCL_PRIMITIVE_3D_POINT_SIZE 0x000003ec -# define NV10_TCL_PRIMITIVE_3D_MODELVIEW0_MATRIX( d) (0x00000400 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_MODELVIEW1_MATRIX( d) (0x00000440 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW0_MATRIX( d) (0x00000480 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW1_MATRIX( d) (0x000004c0 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX( d) (0x00000500 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_A(d) (0x00000600 + d * 0x0010) -# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_B(d) (0x00000604 + d * 0x0010) -# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_C(d) (0x00000608 + d * 0x0010) -# define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_D(d) (0x0000060c + d * 0x0010) -# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x00000680 -# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x00000684 -# define NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x00000688 -# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_A 0x000006a0 -# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_B 0x000006a4 -# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_C 0x000006a8 -# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_D 0x000006ac -# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x000006b0 -# define NV10_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x000006b4 -# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000006c4 -# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000006c8 -# define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000006cc -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X 0x000006e8 -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Y 0x000006ec -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_Z 0x000006f0 -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_W 0x000006f4 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x000006f8 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x000006fc -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00000700 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_D 0x00000704 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_E 0x00000708 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x0000070c -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000710 -# define NV10_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000714 -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(d) (0x00000800 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(d) (0x00000804 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(d) (0x00000808 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(d) (0x0000080c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(d) (0x00000810 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(d) (0x00000814 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(d) (0x00000818 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(d) (0x0000081c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(d) (0x00000820 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_X(d) (0x00000828 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Y(d) (0x0000082c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_HALF_VECTOR_Z(d) (0x00000830 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_X(d) (0x00000834 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Y(d) (0x00000838 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_DIRECTION_Z(d) (0x0000083c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(d) (0x00000840 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(d) (0x00000844 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(d) (0x00000848 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(d) (0x0000084c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(d) (0x00000850 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(d) (0x00000854 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(d) (0x00000858 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000085c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(d) (0x00000860 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(d) (0x00000864 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(d) (0x00000868 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(d) (0x0000086c + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(d) (0x00000870 + d * 0x0080) -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00000c00 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00000c04 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00000c08 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_X 0x00000c18 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Y 0x00000c1c -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Z 0x00000c20 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_POS_4F_W 0x00000c24 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_X 0x00000c30 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Y 0x00000c34 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Z 0x00000c38 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00000c40 /* Parameters: y x */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00000c44 /* Parameters: z */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_R 0x00000c50 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_G 0x00000c54 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_B 0x00000c58 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_A 0x00000c5c -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_R 0x00000c60 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_G 0x00000c64 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_3F_B 0x00000c68 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4I 0x00000c6c /* Parameters: a b g r */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_R 0x00000c80 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_G 0x00000c84 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_B 0x00000c88 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3I 0x00000c8c /* Parameters: a b g r */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x00000c90 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_T 0x00000c94 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2I 0x00000c98 /* Parameters: t s */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_S 0x00000ca0 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_T 0x00000ca4 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_R 0x00000ca8 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_Q 0x00000cac -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_ST 0x00000cb0 /* Parameters: t s */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_RQ 0x00000cb4 /* Parameters: q r */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S 0x00000cb8 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_T 0x00000cbc -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2I 0x00000cc0 /* Parameters: t s */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_S 0x00000cc8 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_T 0x00000ccc -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_R 0x00000cd0 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_Q 0x00000cd4 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_ST 0x00000cd8 /* Parameters: t s */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_RQ 0x00000cdc /* Parameters: q r */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00000ce0 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_WGH_1F 0x00000ce4 -# define NV10_TCL_PRIMITIVE_3D_EDGEFLAG_ENABLE 0x00000cec -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_VALIDATE 0x00000cf0 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_POS 0x00000d00 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_POS 0x00000d04 /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_COL 0x00000d08 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_COL 0x00000d0c /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_COL2 0x00000d10 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_COL2 0x00000d14 /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_TX0 0x00000d18 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_TX0 0x00000d1c /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_TX1 0x00000d20 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_TX1 0x00000d24 /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_NOR 0x00000d28 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_NOR 0x00000d2c /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_WGH 0x00000d30 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_WGH 0x00000d34 /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_FOG 0x00000d38 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_FOG 0x00000d3c /* Parameters: stride fields type */ -# define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40 -# define NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x00000d44 -# define NV10_TCL_PRIMITIVE_3D_BEGIN_END 0x00000dfc -# define NV10_TCL_PRIMITIVE_3D_INDEX_DATA 0x00000e00 /* Parameters: index1 index0 */ -# define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_BEGIN_END 0x000013fc -# define NV10_TCL_PRIMITIVE_3D_VERTEX_BUFFER_DRAW_ARRAYS 0x00001400 /* Parameters: count-1 first */ -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X 0x00001638 -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Y 0x0000163c -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Z 0x00001640 -# define NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_W 0x00001644 -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_DATA 0x00001800 + +/****************************************** +Object NV17_TCL_PRIMITIVE_3D used on: NV15 +*/ +#define NV17_TCL_PRIMITIVE_3D 0x00000099 /****************************************** Object NV11_TCL_PRIMITIVE_3D used on: NV15 -- cgit v1.2.3 From 3867bc97800ef3072a70565559c11badba3ed55a Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 3 Dec 2006 11:46:18 +0000 Subject: Fix the swtcl module. --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 4d05a439bb..07b3e666df 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -61,7 +61,6 @@ static void nv10ResetLineStipple( GLcontext *ctx ); static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t primitive,uint32_t size) { - // FIXME the primitive type can probably go trough the caching system as well if (nmesa->screen->card->type==NV_10) BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); else if (nmesa->screen->card->type==NV_20) @@ -80,7 +79,6 @@ static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t pri inline void nv10FinishPrimitive(struct nouveau_context *nmesa) { - // FIXME this is probably not needed if (nmesa->screen->card->type==NV_10) BEGIN_RING_SIZE(NvSub3D,NV10_TCL_PRIMITIVE_3D_BEGIN_END,1); else if (nmesa->screen->card->type==NV_20) @@ -156,11 +154,11 @@ static inline void nv10_render_generic_primitive_verts(GLcontext *ctx,GLuint sta struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); GLubyte *vertptr = (GLubyte *)nmesa->verts; GLuint vertsize = nmesa->vertex_size; - GLuint size_dword = vertsize*(count-start); + GLuint size_dword = vertsize*(count-start)/4; nv10ExtendPrimitive(nmesa, size_dword); nv10StartPrimitive(nmesa,prim+1,size_dword); - OUT_RINGp((nouveauVertex*)(vertptr+(start*vertsize*4)),size_dword); + OUT_RINGp((nouveauVertex*)(vertptr+(start*vertsize)),size_dword); nv10FinishPrimitive(nmesa); } @@ -242,14 +240,14 @@ static inline void nv10_render_generic_primitive_elts(GLcontext *ctx,GLuint star struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); GLubyte *vertptr = (GLubyte *)nmesa->verts; GLuint vertsize = nmesa->vertex_size; - GLuint size_dword = vertsize*(count-start); + GLuint size_dword = vertsize*(count-start)/4; const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; GLuint j; nv10ExtendPrimitive(nmesa, size_dword); nv10StartPrimitive(nmesa,prim+1,size_dword); for (j=start; j Date: Wed, 6 Dec 2006 13:21:02 +0100 Subject: Swedish translation of driconf options. --- src/mesa/drivers/dri/common/xmlpool/sv.po | 226 ++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 src/mesa/drivers/dri/common/xmlpool/sv.po (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/xmlpool/sv.po b/src/mesa/drivers/dri/common/xmlpool/sv.po new file mode 100644 index 0000000000..ba32b2ff15 --- /dev/null +++ b/src/mesa/drivers/dri/common/xmlpool/sv.po @@ -0,0 +1,226 @@ +# Swedish translation of DRI driver options. +# Copyright (C) Free Software Foundation, Inc. +# This file is distributed under the same license as the Mesa package. +# Daniel Nylander , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: Mesa DRI\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-04-11 23:19+0200\n" +"PO-Revision-Date: 2006-09-18 10:56+0100\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: t_options.h:53 +msgid "Debugging" +msgstr "Felsökning" + +#: t_options.h:57 +msgid "Disable 3D acceleration" +msgstr "Inaktivera 3D-accelerering" + +#: t_options.h:62 +msgid "Show performance boxes" +msgstr "Visa prestandarutor" + +#: t_options.h:69 +msgid "Image Quality" +msgstr "Bildkvalitet" + +#: t_options.h:77 +msgid "Texture color depth" +msgstr "Färgdjup för texturer" + +#: t_options.h:78 +msgid "Prefer frame buffer color depth" +msgstr "Föredra färgdjupet för framebuffer" + +#: t_options.h:79 +msgid "Prefer 32 bits per texel" +msgstr "Föredra 32 bitar per texel" + +#: t_options.h:80 +msgid "Prefer 16 bits per texel" +msgstr "Föredra 16 bitar per texel" + +#: t_options.h:81 +msgid "Force 16 bits per texel" +msgstr "Tvinga 16 bitar per texel" + +#: t_options.h:87 +msgid "Initial maximum value for anisotropic texture filtering" +msgstr "Initialt maximalt värde för anisotropisk texturfiltrering" + +#: t_options.h:92 +msgid "Forbid negative texture LOD bias" +msgstr "Förbjud negativ LOD-kompensation för texturer" + +#: t_options.h:97 +msgid "Enable S3TC texture compression even if software support is not available" +msgstr "Aktivera S3TC-texturkomprimering även om programvarustöd saknas" + +#: t_options.h:104 +msgid "Initial color reduction method" +msgstr "Initial färgminskningsmetod" + +#: t_options.h:105 +msgid "Round colors" +msgstr "Avrunda färger" + +#: t_options.h:106 +msgid "Dither colors" +msgstr "Utjämna färger" + +#: t_options.h:114 +msgid "Color rounding method" +msgstr "Färgavrundningsmetod" + +#: t_options.h:115 +msgid "Round color components downward" +msgstr "Avrunda färdkomponenter nedåt" + +#: t_options.h:116 +msgid "Round to nearest color" +msgstr "Avrunda till närmsta färg" + +#: t_options.h:125 +msgid "Color dithering method" +msgstr "Färgutjämningsmetod" + +#: t_options.h:126 +msgid "Horizontal error diffusion" +msgstr "Horisontell felspridning" + +#: t_options.h:127 +msgid "Horizontal error diffusion, reset error at line start" +msgstr "Horisontell felspridning, återställ fel vid radbörjan" + +#: t_options.h:128 +msgid "Ordered 2D color dithering" +msgstr "Ordnad 2D-färgutjämning" + +#: t_options.h:134 +msgid "Floating point depth buffer" +msgstr "Buffert för flytande punktdjup" + +#: t_options.h:140 +msgid "Performance" +msgstr "Prestanda" + +#: t_options.h:148 +msgid "TCL mode (Transformation, Clipping, Lighting)" +msgstr "TCL-läge (Transformation, Clipping, Lighting)" + +#: t_options.h:149 +msgid "Use software TCL pipeline" +msgstr "Använd programvaru-TCL-rörledning" + +#: t_options.h:150 +msgid "Use hardware TCL as first TCL pipeline stage" +msgstr "Använd maskinvaru-TCL som första TCL-rörledningssteg" + +#: t_options.h:151 +msgid "Bypass the TCL pipeline" +msgstr "Kringgå TCL-rörledningen" + +#: t_options.h:152 +msgid "Bypass the TCL pipeline with state-based machine code generated on-the-fly" +msgstr "Kringgå TCL-rörledningen med tillståndsbaserad maskinkod som direktgenereras" + +#: t_options.h:161 +msgid "Method to limit rendering latency" +msgstr "Metod för att begränsa renderingslatens" + +#: t_options.h:162 +msgid "Busy waiting for the graphics hardware" +msgstr "Upptagen med att vänta på grafikhårdvaran" + +#: t_options.h:163 +msgid "Sleep for brief intervals while waiting for the graphics hardware" +msgstr "Sov i korta intervall under väntan på grafikhårdvaran" + +#: t_options.h:164 +msgid "Let the graphics hardware emit a software interrupt and sleep" +msgstr "Låt grafikhårdvaran sända ut ett programvaruavbrott och sov" + +#: t_options.h:174 +msgid "Synchronization with vertical refresh (swap intervals)" +msgstr "Synkronisering med vertikal uppdatering (växlingsintervall)" + +#: t_options.h:175 +msgid "Never synchronize with vertical refresh, ignore application's choice" +msgstr "Synkronisera aldrig med vertikal uppdatering, ignorera programmets val" + +#: t_options.h:176 +msgid "Initial swap interval 0, obey application's choice" +msgstr "Initialt växlingsintervall 0, följ programmets val" + +#: t_options.h:177 +msgid "Initial swap interval 1, obey application's choice" +msgstr "Initialt växlingsintervall 1, följ programmets val" + +#: t_options.h:178 +msgid "Always synchronize with vertical refresh, application chooses the minimum swap interval" +msgstr "Synkronisera alltid med vertikal uppdatering, programmet väljer den minsta växlingsintervallen" + +#: t_options.h:186 +msgid "Use HyperZ to boost performance" +msgstr "Använd HyperZ för att maximera prestandan" + +#: t_options.h:191 +msgid "Number of texture units used" +msgstr "Antal använda texturenheter" + +#: t_options.h:196 +msgid "Support larger textures not guaranteed to fit into graphics memory" +msgstr "Stöd för större texturer är inte garanterat att passa i grafikminnet" + +#: t_options.h:197 +msgid "No" +msgstr "Nej" + +#: t_options.h:198 +msgid "At least 1 texture must fit under worst-case assumptions" +msgstr "Åtminstone en textur måste passa för antaget sämsta förhållande" + +#: t_options.h:199 +msgid "Announce hardware limits" +msgstr "Annonsera hårdvarubegränsningar" + +#: t_options.h:205 +msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" +msgstr "Texturfiltreringskvalitet mot hastighet, även kallad \"brilinear\"-texturfiltrering" + +#: t_options.h:213 +msgid "Used types of texture memory" +msgstr "Använda typer av texturminne" + +#: t_options.h:214 +msgid "All available memory" +msgstr "Allt tillgängligt minne" + +#: t_options.h:215 +msgid "Only card memory (if available)" +msgstr "Endast kortminne (om tillgängligt)" + +#: t_options.h:216 +msgid "Only GART (AGP/PCIE) memory (if available)" +msgstr "Endast GART-minne (AGP/PCIE) (om tillgängligt)" + +#: t_options.h:224 +msgid "Features that are not hardware-accelerated" +msgstr "Funktioner som inte är hårdvaruaccelererade" + +#: t_options.h:228 +msgid "Enable extension GL_ARB_vertex_program" +msgstr "Aktivera tillägget GL_ARB_vertex_program" + +#: t_options.h:233 +msgid "Enable extension GL_NV_vertex_program" +msgstr "Aktivera tillägget GL_NV_vertex_program" + -- cgit v1.2.3 From 7daf30104617b95d83b014a13259e84e28e6aaf6 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 6 Dec 2006 14:06:52 +0100 Subject: Re-generate options.h with Swedish translations. --- src/mesa/drivers/dri/common/xmlpool/Makefile | 2 +- src/mesa/drivers/dri/common/xmlpool/options.h | 69 +++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile b/src/mesa/drivers/dri/common/xmlpool/Makefile index ef94541c37..b077809cd1 100644 --- a/src/mesa/drivers/dri/common/xmlpool/Makefile +++ b/src/mesa/drivers/dri/common/xmlpool/Makefile @@ -41,7 +41,7 @@ # - info gettext # The set of supported languages. Add languages as needed. -POS=de.po es.po nl.po fr.po +POS=de.po es.po nl.po fr.po sv.po # # Don't change anything below, unless you know what you're doing. diff --git a/src/mesa/drivers/dri/common/xmlpool/options.h b/src/mesa/drivers/dri/common/xmlpool/options.h index 5cef72867b..d5f4fc3491 100644 --- a/src/mesa/drivers/dri/common/xmlpool/options.h +++ b/src/mesa/drivers/dri/common/xmlpool/options.h @@ -58,7 +58,8 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC(de,"Fehlersuche") \ DRI_CONF_DESC(es,"Depurando") \ DRI_CONF_DESC(nl,"Debuggen") \ - DRI_CONF_DESC(fr,"Debogage") + DRI_CONF_DESC(fr,"Debogage") \ + DRI_CONF_DESC(sv,"Felsökning") #define DRI_CONF_NO_RAST(def) \ DRI_CONF_OPT_BEGIN(no_rast,bool,def) \ @@ -67,6 +68,7 @@ DRI_CONF_OPT_BEGIN(no_rast,bool,def) \ DRI_CONF_DESC(es,"Desactivar aceleración 3D") \ DRI_CONF_DESC(nl,"3D versnelling uitschakelen") \ DRI_CONF_DESC(fr,"Désactiver l'accélération 3D") \ + DRI_CONF_DESC(sv,"Inaktivera 3D-accelerering") \ DRI_CONF_OPT_END #define DRI_CONF_PERFORMANCE_BOXES(def) \ @@ -76,6 +78,7 @@ DRI_CONF_OPT_BEGIN(performance_boxes,bool,def) \ DRI_CONF_DESC(es,"Mostrar cajas de rendimiento") \ DRI_CONF_DESC(nl,"Laat prestatie boxjes zien") \ DRI_CONF_DESC(fr,"Afficher les boîtes de performance") \ + DRI_CONF_DESC(sv,"Visa prestandarutor") \ DRI_CONF_OPT_END @@ -86,7 +89,8 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC(de,"Bildqualität") \ DRI_CONF_DESC(es,"Calidad de imagen") \ DRI_CONF_DESC(nl,"Beeldkwaliteit") \ - DRI_CONF_DESC(fr,"Qualité d'image") + DRI_CONF_DESC(fr,"Qualité d'image") \ + DRI_CONF_DESC(sv,"Bildkvalitet") #define DRI_CONF_EXCESS_MIPMAP(def) \ DRI_CONF_OPT_BEGIN(excess_mipmap,bool,def) \ @@ -129,6 +133,12 @@ DRI_CONF_OPT_BEGIN_V(texture_depth,enum,def,"0:3") \ DRI_CONF_ENUM(2,"Prérérer 16 bits par texel") \ DRI_CONF_ENUM(3,"Forcer 16 bits par texel") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Färgdjup för texturer") \ + DRI_CONF_ENUM(0,"Föredra färgdjupet för framebuffer") \ + DRI_CONF_ENUM(1,"Föredra 32 bitar per texel") \ + DRI_CONF_ENUM(2,"Föredra 16 bitar per texel") \ + DRI_CONF_ENUM(3,"Tvinga 16 bitar per texel") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_DEF_MAX_ANISOTROPY(def,range) \ @@ -138,6 +148,7 @@ DRI_CONF_OPT_BEGIN_V(def_max_anisotropy,float,def,range) \ DRI_CONF_DESC(es,"Valor máximo inicial para filtrado anisotrópico de textura") \ DRI_CONF_DESC(nl,"Initïele maximum waarde voor anisotrophische textuur filtering") \ DRI_CONF_DESC(fr,"Valeur maximale initiale pour le filtrage anisotropique de texture") \ + DRI_CONF_DESC(sv,"Initialt maximalt värde för anisotropisk texturfiltrering") \ DRI_CONF_OPT_END #define DRI_CONF_NO_NEG_LOD_BIAS(def) \ @@ -147,6 +158,7 @@ DRI_CONF_OPT_BEGIN(no_neg_lod_bias,bool,def) \ DRI_CONF_DESC(es,"Prohibir valores negativos de Nivel De Detalle (LOD) de texturas") \ DRI_CONF_DESC(nl,"Verbied negatief niveau detailonderscheid (LOD) van texturen") \ DRI_CONF_DESC(fr,"Interdire le LOD bias negatif") \ + DRI_CONF_DESC(sv,"Förbjud negativ LOD-kompensation för texturer") \ DRI_CONF_OPT_END #define DRI_CONF_FORCE_S3TC_ENABLE(def) \ @@ -156,6 +168,7 @@ DRI_CONF_OPT_BEGIN(force_s3tc_enable,bool,def) \ DRI_CONF_DESC(es,"Activar la compresión de texturas S3TC incluso si el soporte por software no está disponible") \ DRI_CONF_DESC(nl,"Schakel S3TC textuurcompressie in, zelfs als softwareondersteuning niet aanwezig is") \ DRI_CONF_DESC(fr,"Activer la compression de texture S3TC même si le support logiciel est absent") \ + DRI_CONF_DESC(sv,"Aktivera S3TC-texturkomprimering även om programvarustöd saknas") \ DRI_CONF_OPT_END #define DRI_CONF_COLOR_REDUCTION_ROUND 0 @@ -182,6 +195,10 @@ DRI_CONF_OPT_BEGIN_V(color_reduction,enum,def,"0:1") \ DRI_CONF_ENUM(0,"Arrondir les valeurs de couleur") \ DRI_CONF_ENUM(1,"Tramer les couleurs") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Initial färgminskningsmetod") \ + DRI_CONF_ENUM(0,"Avrunda färger") \ + DRI_CONF_ENUM(1,"Utjämna färger") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_ROUND_TRUNC 0 @@ -208,6 +225,10 @@ DRI_CONF_OPT_BEGIN_V(round_mode,enum,def,"0:1") \ DRI_CONF_ENUM(0,"Arrondi à l'inférieur") \ DRI_CONF_ENUM(1,"Arrondi au plus proche") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Färgavrundningsmetod") \ + DRI_CONF_ENUM(0,"Avrunda färdkomponenter nedåt") \ + DRI_CONF_ENUM(1,"Avrunda till närmsta färg") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_DITHER_XERRORDIFF 0 @@ -240,6 +261,11 @@ DRI_CONF_OPT_BEGIN_V(dither_mode,enum,def,"0:2") \ DRI_CONF_ENUM(1,"Diffusion d'erreur horizontale, réinitialisé pour chaque ligne") \ DRI_CONF_ENUM(2,"Tramage ordonné des couleurs") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Färgutjämningsmetod") \ + DRI_CONF_ENUM(0,"Horisontell felspridning") \ + DRI_CONF_ENUM(1,"Horisontell felspridning, återställ fel vid radbörjan") \ + DRI_CONF_ENUM(2,"Ordnad 2D-färgutjämning") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_FLOAT_DEPTH(def) \ @@ -249,6 +275,7 @@ DRI_CONF_OPT_BEGIN(float_depth,bool,def) \ DRI_CONF_DESC(es,"Búfer de profundidad en coma flotante") \ DRI_CONF_DESC(nl,"Dieptebuffer als commagetal") \ DRI_CONF_DESC(fr,"Z-buffer en virgule flottante") \ + DRI_CONF_DESC(sv,"Buffert för flytande punktdjup") \ DRI_CONF_OPT_END /** \brief Performance-related options */ @@ -258,7 +285,8 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC(de,"Leistung") \ DRI_CONF_DESC(es,"Rendimiento") \ DRI_CONF_DESC(nl,"Prestatie") \ - DRI_CONF_DESC(fr,"Performance") + DRI_CONF_DESC(fr,"Performance") \ + DRI_CONF_DESC(sv,"Prestanda") #define DRI_CONF_TCL_SW 0 #define DRI_CONF_TCL_PIPELINED 1 @@ -296,6 +324,12 @@ DRI_CONF_OPT_BEGIN_V(tcl_mode,enum,def,"0:3") \ DRI_CONF_ENUM(2,"Court-circuiter le pipeline TCL") \ DRI_CONF_ENUM(3,"Court-circuiter le pipeline TCL par une machine à états qui génère le codede TCL à la volée") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"TCL-läge (Transformation, Clipping, Lighting)") \ + DRI_CONF_ENUM(0,"Använd programvaru-TCL-rörledning") \ + DRI_CONF_ENUM(1,"Använd maskinvaru-TCL som första TCL-rörledningssteg") \ + DRI_CONF_ENUM(2,"Kringgå TCL-rörledningen") \ + DRI_CONF_ENUM(3,"Kringgå TCL-rörledningen med tillståndsbaserad maskinkod som direktgenereras") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_FTHROTTLE_BUSY 0 @@ -328,6 +362,11 @@ DRI_CONF_OPT_BEGIN_V(fthrottle_mode,enum,def,"0:2") \ DRI_CONF_ENUM(1,"Attente utilisant usleep()") \ DRI_CONF_ENUM(2,"Utiliser les interruptions") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Metod för att begränsa renderingslatens") \ + DRI_CONF_ENUM(0,"Upptagen med att vänta på grafikhårdvaran") \ + DRI_CONF_ENUM(1,"Sov i korta intervall under väntan på grafikhårdvaran") \ + DRI_CONF_ENUM(2,"Låt grafikhårdvaran sända ut ett programvaruavbrott och sov") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_VBLANK_NEVER 0 @@ -366,6 +405,12 @@ DRI_CONF_OPT_BEGIN_V(vblank_mode,enum,def,"0:3") \ DRI_CONF_ENUM(2,"Synchroniser avec le balayage vertical par défaut, mais obéir au choix de l'application") \ DRI_CONF_ENUM(3,"Toujours synchroniser avec le balayage vertical, l'application choisit l'intervalle minimal") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Synkronisering med vertikal uppdatering (växlingsintervall)") \ + DRI_CONF_ENUM(0,"Synkronisera aldrig med vertikal uppdatering, ignorera programmets val") \ + DRI_CONF_ENUM(1,"Initialt växlingsintervall 0, följ programmets val") \ + DRI_CONF_ENUM(2,"Initialt växlingsintervall 1, följ programmets val") \ + DRI_CONF_ENUM(3,"Synkronisera alltid med vertikal uppdatering, programmet väljer den minsta växlingsintervallen") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_HYPERZ_DISABLED 0 @@ -377,6 +422,7 @@ DRI_CONF_OPT_BEGIN(hyperz,bool,def) \ DRI_CONF_DESC(es,"Usar HyperZ para potenciar rendimiento") \ DRI_CONF_DESC(nl,"Gebruik HyperZ om de prestaties te verbeteren") \ DRI_CONF_DESC(fr,"Utiliser le HyperZ pour améliorer les performances") \ + DRI_CONF_DESC(sv,"Använd HyperZ för att maximera prestandan") \ DRI_CONF_OPT_END #define DRI_CONF_MAX_TEXTURE_UNITS(def,min,max) \ @@ -386,6 +432,7 @@ DRI_CONF_OPT_BEGIN_V(texture_units,int,def, # min ":" # max ) \ DRI_CONF_DESC(es,"Número de unidades de textura usadas") \ DRI_CONF_DESC(nl,"Aantal textuureenheden in gebruik") \ DRI_CONF_DESC(fr,"Nombre d'unités de texture") \ + DRI_CONF_DESC(sv,"Antal använda texturenheter") \ DRI_CONF_OPT_END #define DRI_CONF_ALLOW_LARGE_TEXTURES(def) \ @@ -415,6 +462,11 @@ DRI_CONF_OPT_BEGIN_V(allow_large_textures,enum,def,"0:2") \ DRI_CONF_ENUM(1,"At least 1 texture must fit under worst-case assumptions") \ DRI_CONF_ENUM(2,"Announce hardware limits") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Stöd för större texturer är inte garanterat att passa i grafikminnet") \ + DRI_CONF_ENUM(0,"Nej") \ + DRI_CONF_ENUM(1,"Åtminstone en textur måste passa för antaget sämsta förhållande") \ + DRI_CONF_ENUM(2,"Annonsera hårdvarubegränsningar") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END #define DRI_CONF_TEXTURE_BLEND_QUALITY(def,range) \ @@ -424,6 +476,7 @@ DRI_CONF_OPT_BEGIN_V(texture_blend_quality,float,def,range) \ DRI_CONF_DESC(es,"Calidad de filtrado de textura vs. velocidad, alias filtrado ”brilinear“ de textura") \ DRI_CONF_DESC(nl,"Textuurfilterkwaliteit versus -snelheid, ookwel bekend als “brilineaire” textuurfiltering") \ DRI_CONF_DESC(fr,"Qualité/performance du filtrage trilinéaire de texture (filtrage brilinéaire)") \ + DRI_CONF_DESC(sv,"Texturfiltreringskvalitet mot hastighet, även kallad ”brilinear”-texturfiltrering") \ DRI_CONF_OPT_END #define DRI_CONF_TEXTURE_HEAPS_ALL 0 @@ -456,6 +509,11 @@ DRI_CONF_OPT_BEGIN_V(texture_heaps,enum,def,"0:2") \ DRI_CONF_ENUM(1,"Utiliser uniquement la mémoire graphique (si disponible)") \ DRI_CONF_ENUM(2,"Utiliser uniquement la mémoire GART (AGP/PCIE) (si disponible)") \ DRI_CONF_DESC_END \ + DRI_CONF_DESC_BEGIN(sv,"Använda typer av texturminne") \ + DRI_CONF_ENUM(0,"Allt tillgängligt minne") \ + DRI_CONF_ENUM(1,"Endast kortminne (om tillgängligt)") \ + DRI_CONF_ENUM(2,"Endast GART-minne (AGP/PCIE) (om tillgängligt)") \ + DRI_CONF_DESC_END \ DRI_CONF_OPT_END /* Options for features that are not done in hardware by the driver (like GL_ARB_vertex_program @@ -466,7 +524,8 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_DESC(de,"Funktionalität, die nicht hardwarebeschleunigt ist") \ DRI_CONF_DESC(es,"Características no aceleradas por hardware") \ DRI_CONF_DESC(nl,"Eigenschappen die niet hardwareversneld zijn") \ - DRI_CONF_DESC(fr,"Fonctionnalités ne bénéficiant pas d'une accélération matérielle") + DRI_CONF_DESC(fr,"Fonctionnalités ne bénéficiant pas d'une accélération matérielle") \ + DRI_CONF_DESC(sv,"Funktioner som inte är hårdvaruaccelererade") #define DRI_CONF_ARB_VERTEX_PROGRAM(def) \ DRI_CONF_OPT_BEGIN(arb_vertex_program,bool,def) \ @@ -475,6 +534,7 @@ DRI_CONF_OPT_BEGIN(arb_vertex_program,bool,def) \ DRI_CONF_DESC(es,"Activar la extensión GL_ARB_vertex_program") \ DRI_CONF_DESC(nl,"Zet uitbreiding GL_ARB_vertex_program aan") \ DRI_CONF_DESC(fr,"Activer l'extension GL_ARB_vertex_program") \ + DRI_CONF_DESC(sv,"Aktivera tillägget GL_ARB_vertex_program") \ DRI_CONF_OPT_END #define DRI_CONF_NV_VERTEX_PROGRAM(def) \ @@ -484,4 +544,5 @@ DRI_CONF_OPT_BEGIN(nv_vertex_program,bool,def) \ DRI_CONF_DESC(es,"Activar extensión GL_NV_vertex_program") \ DRI_CONF_DESC(nl,"Zet uitbreiding GL_NV_vertex_program aan") \ DRI_CONF_DESC(fr,"Activer l'extension GL_NV_vertex_program") \ + DRI_CONF_DESC(sv,"Aktivera tillägget GL_NV_vertex_program") \ DRI_CONF_OPT_END -- cgit v1.2.3 From 14f92636b00e6961c419e5457151f44853bd297f Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 6 Dec 2006 14:17:56 +0100 Subject: Make git ignore files only generated at build time. --- .gitignore | 7 +++ configs/.gitignore | 1 + doxygen/.cvsignore | 15 ------ doxygen/.gitignore | 15 ++++++ progs/demos/.cvsignore | 48 ------------------- progs/demos/.gitignore | 48 +++++++++++++++++++ progs/redbook/.cvsignore | 64 -------------------------- progs/redbook/.gitignore | 64 ++++++++++++++++++++++++++ progs/samples/.cvsignore | 45 ------------------ progs/samples/.gitignore | 45 ++++++++++++++++++ progs/tests/.cvsignore | 54 ---------------------- progs/tests/.gitignore | 54 ++++++++++++++++++++++ progs/xdemos/.cvsignore | 16 ------- progs/xdemos/.gitignore | 16 +++++++ src/glx/x11/.gitignore | 1 + src/mesa/.gitignore | 2 + src/mesa/drivers/dri/common/xmlpool/.gitignore | 5 ++ src/mesa/drivers/dri/r300/.gitignore | 3 ++ src/mesa/drivers/ggi/default/.cvsignore | 1 - src/mesa/drivers/ggi/default/.gitignore | 1 + src/mesa/drivers/ggi/display/.cvsignore | 1 - src/mesa/drivers/ggi/display/.gitignore | 1 + src/mesa/glapi/.cvsignore | 11 ----- src/mesa/glapi/.gitignore | 11 +++++ 24 files changed, 274 insertions(+), 255 deletions(-) create mode 100644 .gitignore create mode 100644 configs/.gitignore delete mode 100644 doxygen/.cvsignore create mode 100644 doxygen/.gitignore delete mode 100644 progs/demos/.cvsignore create mode 100644 progs/demos/.gitignore delete mode 100644 progs/redbook/.cvsignore create mode 100644 progs/redbook/.gitignore delete mode 100644 progs/samples/.cvsignore create mode 100644 progs/samples/.gitignore delete mode 100644 progs/tests/.cvsignore create mode 100644 progs/tests/.gitignore delete mode 100644 progs/xdemos/.cvsignore create mode 100644 progs/xdemos/.gitignore create mode 100644 src/glx/x11/.gitignore create mode 100644 src/mesa/.gitignore create mode 100644 src/mesa/drivers/dri/common/xmlpool/.gitignore create mode 100644 src/mesa/drivers/dri/r300/.gitignore delete mode 100644 src/mesa/drivers/ggi/default/.cvsignore create mode 100644 src/mesa/drivers/ggi/default/.gitignore delete mode 100644 src/mesa/drivers/ggi/display/.cvsignore create mode 100644 src/mesa/drivers/ggi/display/.gitignore delete mode 100644 src/mesa/glapi/.cvsignore create mode 100644 src/mesa/glapi/.gitignore (limited to 'src/mesa') diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..7778fb400e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.a +*.o +*.so +depend +depend.bak +lib +lib64 diff --git a/configs/.gitignore b/configs/.gitignore new file mode 100644 index 0000000000..5b9023a315 --- /dev/null +++ b/configs/.gitignore @@ -0,0 +1 @@ +current diff --git a/doxygen/.cvsignore b/doxygen/.cvsignore deleted file mode 100644 index 1b0edf90a6..0000000000 --- a/doxygen/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -*.tag -agpgart -array_cache -core -core_subset -math -math_subset -miniglx -radeon_subset -radeondrm -radeonfb -swrast -swrast_setup -tnl -tnl_dd diff --git a/doxygen/.gitignore b/doxygen/.gitignore new file mode 100644 index 0000000000..1b0edf90a6 --- /dev/null +++ b/doxygen/.gitignore @@ -0,0 +1,15 @@ +*.tag +agpgart +array_cache +core +core_subset +math +math_subset +miniglx +radeon_subset +radeondrm +radeonfb +swrast +swrast_setup +tnl +tnl_dd diff --git a/progs/demos/.cvsignore b/progs/demos/.cvsignore deleted file mode 100644 index f764b3d117..0000000000 --- a/progs/demos/.cvsignore +++ /dev/null @@ -1,48 +0,0 @@ -.cvsignore -arbfplight -arbocclude -bounce -clearspd -cubemap -drawpix -fire -fplight -gamma -gears -geartrain -glinfo -gloss -gltestperf -glutfx -ipers -isosurf -lodbias -morph3d -multiarb -occlude -osdemo -paltex -pixeltex -pointblast -ray -readpix -readtex.c -readtex.h -reflect -renormal -shadowtex -showbuffer.c -showbuffer.h -spectex -stex3d -teapot -terrain -tessdemo -texcyl -texdown -texenv -texobj -trispd -tunnel -tunnel2 -winpos diff --git a/progs/demos/.gitignore b/progs/demos/.gitignore new file mode 100644 index 0000000000..f764b3d117 --- /dev/null +++ b/progs/demos/.gitignore @@ -0,0 +1,48 @@ +.cvsignore +arbfplight +arbocclude +bounce +clearspd +cubemap +drawpix +fire +fplight +gamma +gears +geartrain +glinfo +gloss +gltestperf +glutfx +ipers +isosurf +lodbias +morph3d +multiarb +occlude +osdemo +paltex +pixeltex +pointblast +ray +readpix +readtex.c +readtex.h +reflect +renormal +shadowtex +showbuffer.c +showbuffer.h +spectex +stex3d +teapot +terrain +tessdemo +texcyl +texdown +texenv +texobj +trispd +tunnel +tunnel2 +winpos diff --git a/progs/redbook/.cvsignore b/progs/redbook/.cvsignore deleted file mode 100644 index 8ed3efe3e2..0000000000 --- a/progs/redbook/.cvsignore +++ /dev/null @@ -1,64 +0,0 @@ -.cvsignore -aaindex -aapoly -aargb -accanti -accpersp -alpha -alpha3D -anti -bezcurve -bezmesh -checker -clip -colormat -cube -depthcue -dof -double -drawf -feedback -fog -fogindex -font -hello -image -light -lines -list -material -mipmap -model -movelight -nurbs -pickdepth -picksquare -plane -planet -polyoff -polys -quadric -robot -sccolorlight -scene -scenebamb -sceneflat -select -smooth -stencil -stroke -surface -teaambient -teapots -tess -tesswind -texbind -texgen -texprox -texsub -texturesurf -torus -trim -unproject -varray -wrap diff --git a/progs/redbook/.gitignore b/progs/redbook/.gitignore new file mode 100644 index 0000000000..8ed3efe3e2 --- /dev/null +++ b/progs/redbook/.gitignore @@ -0,0 +1,64 @@ +.cvsignore +aaindex +aapoly +aargb +accanti +accpersp +alpha +alpha3D +anti +bezcurve +bezmesh +checker +clip +colormat +cube +depthcue +dof +double +drawf +feedback +fog +fogindex +font +hello +image +light +lines +list +material +mipmap +model +movelight +nurbs +pickdepth +picksquare +plane +planet +polyoff +polys +quadric +robot +sccolorlight +scene +scenebamb +sceneflat +select +smooth +stencil +stroke +surface +teaambient +teapots +tess +tesswind +texbind +texgen +texprox +texsub +texturesurf +torus +trim +unproject +varray +wrap diff --git a/progs/samples/.cvsignore b/progs/samples/.cvsignore deleted file mode 100644 index 12b0650567..0000000000 --- a/progs/samples/.cvsignore +++ /dev/null @@ -1,45 +0,0 @@ -.cvsignore -accum -bitmap1 -bitmap2 -blendeq -blendxor -copy -cursor -depth -eval -fog -font -line -logo -nurb -oglinfo -olympic -overlay -point -prim -quad -select -shape -sphere -star -stencil -stretch -texture -tri -wave -bugger -pend -lthreads -lxdemo -lxgears -lxheads -lxinfo -lxpixmap -anywin -ffset -bdemo -binfo -incopy -demo -font diff --git a/progs/samples/.gitignore b/progs/samples/.gitignore new file mode 100644 index 0000000000..12b0650567 --- /dev/null +++ b/progs/samples/.gitignore @@ -0,0 +1,45 @@ +.cvsignore +accum +bitmap1 +bitmap2 +blendeq +blendxor +copy +cursor +depth +eval +fog +font +line +logo +nurb +oglinfo +olympic +overlay +point +prim +quad +select +shape +sphere +star +stencil +stretch +texture +tri +wave +bugger +pend +lthreads +lxdemo +lxgears +lxheads +lxinfo +lxpixmap +anywin +ffset +bdemo +binfo +incopy +demo +font diff --git a/progs/tests/.cvsignore b/progs/tests/.cvsignore deleted file mode 100644 index 2c0e16c35e..0000000000 --- a/progs/tests/.cvsignore +++ /dev/null @@ -1,54 +0,0 @@ -.cvsignore -getproclist.h -antialias -arbfpspec -arbfptest1 -arbfptexture -arbfptrig -arbvptest1 -arbvptest3 -arbvptorus -arbvpwarpmesh -blendminmax -blendsquare -bufferobj -bug_3101 -bug_3195 -crossbar -cva -dinoshade -fbotest1 -fbotexture -floattex -fog -fogcoord -fptest1 -fptexture -getprocaddress -invert -manytex -multipal -no_s3tc -packedpixels -pbo -projtex -seccolor -sharedtex -stencil_wrap -stencilwrap -tex1d -texcmp -texgenmix -texline -texobjshare -texrect -texwrap -vparray -vptest1 -vptest2 -vptest3 -vptorus -vpwarpmesh -yuvrect -yuvsquare -zreaddraw diff --git a/progs/tests/.gitignore b/progs/tests/.gitignore new file mode 100644 index 0000000000..2c0e16c35e --- /dev/null +++ b/progs/tests/.gitignore @@ -0,0 +1,54 @@ +.cvsignore +getproclist.h +antialias +arbfpspec +arbfptest1 +arbfptexture +arbfptrig +arbvptest1 +arbvptest3 +arbvptorus +arbvpwarpmesh +blendminmax +blendsquare +bufferobj +bug_3101 +bug_3195 +crossbar +cva +dinoshade +fbotest1 +fbotexture +floattex +fog +fogcoord +fptest1 +fptexture +getprocaddress +invert +manytex +multipal +no_s3tc +packedpixels +pbo +projtex +seccolor +sharedtex +stencil_wrap +stencilwrap +tex1d +texcmp +texgenmix +texline +texobjshare +texrect +texwrap +vparray +vptest1 +vptest2 +vptest3 +vptorus +vpwarpmesh +yuvrect +yuvsquare +zreaddraw diff --git a/progs/xdemos/.cvsignore b/progs/xdemos/.cvsignore deleted file mode 100644 index 4adffda2d1..0000000000 --- a/progs/xdemos/.cvsignore +++ /dev/null @@ -1,16 +0,0 @@ -glthreads -glxdemo -glxgears -glxheads -glxinfo -glxpixmap -glxpbdemo -glxswapcontrol -manywin -offset -pbinfo -pbdemo -wincopy -xdemo -xfont -xrotfontdemo diff --git a/progs/xdemos/.gitignore b/progs/xdemos/.gitignore new file mode 100644 index 0000000000..4adffda2d1 --- /dev/null +++ b/progs/xdemos/.gitignore @@ -0,0 +1,16 @@ +glthreads +glxdemo +glxgears +glxheads +glxinfo +glxpixmap +glxpbdemo +glxswapcontrol +manywin +offset +pbinfo +pbdemo +wincopy +xdemo +xfont +xrotfontdemo diff --git a/src/glx/x11/.gitignore b/src/glx/x11/.gitignore new file mode 100644 index 0000000000..ffc14ab766 --- /dev/null +++ b/src/glx/x11/.gitignore @@ -0,0 +1 @@ +glcontextmodes.c diff --git a/src/mesa/.gitignore b/src/mesa/.gitignore new file mode 100644 index 0000000000..b83498b1d9 --- /dev/null +++ b/src/mesa/.gitignore @@ -0,0 +1,2 @@ +*/gen_matypes +*/matypes.h diff --git a/src/mesa/drivers/dri/common/xmlpool/.gitignore b/src/mesa/drivers/dri/common/xmlpool/.gitignore new file mode 100644 index 0000000000..a5a437849b --- /dev/null +++ b/src/mesa/drivers/dri/common/xmlpool/.gitignore @@ -0,0 +1,5 @@ +de +es +fr +nl +sv diff --git a/src/mesa/drivers/dri/r300/.gitignore b/src/mesa/drivers/dri/r300/.gitignore new file mode 100644 index 0000000000..3773d8ea73 --- /dev/null +++ b/src/mesa/drivers/dri/r300/.gitignore @@ -0,0 +1,3 @@ +radeon_chipset.h +radeon_screen.* +server diff --git a/src/mesa/drivers/ggi/default/.cvsignore b/src/mesa/drivers/ggi/default/.cvsignore deleted file mode 100644 index c8a526b14d..0000000000 --- a/src/mesa/drivers/ggi/default/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -genkgi.conf diff --git a/src/mesa/drivers/ggi/default/.gitignore b/src/mesa/drivers/ggi/default/.gitignore new file mode 100644 index 0000000000..c8a526b14d --- /dev/null +++ b/src/mesa/drivers/ggi/default/.gitignore @@ -0,0 +1 @@ +genkgi.conf diff --git a/src/mesa/drivers/ggi/display/.cvsignore b/src/mesa/drivers/ggi/display/.cvsignore deleted file mode 100644 index 98858db2c0..0000000000 --- a/src/mesa/drivers/ggi/display/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -fbdev.conf diff --git a/src/mesa/drivers/ggi/display/.gitignore b/src/mesa/drivers/ggi/display/.gitignore new file mode 100644 index 0000000000..98858db2c0 --- /dev/null +++ b/src/mesa/drivers/ggi/display/.gitignore @@ -0,0 +1 @@ +fbdev.conf diff --git a/src/mesa/glapi/.cvsignore b/src/mesa/glapi/.cvsignore deleted file mode 100644 index e706bc23ca..0000000000 --- a/src/mesa/glapi/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -.cvsignore -glX_proto_common.pyo -glX_proto_common.pyc -typeexpr.pyo -typeexpr.pyc -license.pyo -license.pyc -gl_XML.pyo -gl_XML.pyc -glX_XML.pyo -glX_XML.pyc diff --git a/src/mesa/glapi/.gitignore b/src/mesa/glapi/.gitignore new file mode 100644 index 0000000000..e706bc23ca --- /dev/null +++ b/src/mesa/glapi/.gitignore @@ -0,0 +1,11 @@ +.cvsignore +glX_proto_common.pyo +glX_proto_common.pyc +typeexpr.pyo +typeexpr.pyc +license.pyo +license.pyc +gl_XML.pyo +gl_XML.pyc +glX_XML.pyo +glX_XML.pyc -- cgit v1.2.3 From 75e4cfd997859806a0bc43ac314f2c65a6085853 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 6 Dec 2006 15:14:43 +0100 Subject: Make git ignore some more generated files. --- src/mesa/drivers/dri/r200/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/mesa/drivers/dri/r200/.gitignore (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/.gitignore b/src/mesa/drivers/dri/r200/.gitignore new file mode 100644 index 0000000000..3773d8ea73 --- /dev/null +++ b/src/mesa/drivers/dri/r200/.gitignore @@ -0,0 +1,3 @@ +radeon_chipset.h +radeon_screen.* +server -- cgit v1.2.3 From 7a10d66590a4cebd2b453218e75fe82b02a3edcc Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 7 Dec 2006 11:03:48 +0100 Subject: i915tex: Recalculate viewport related hardware state in intelWindowMoved(). This fixes vertically displaced rendering with some apps like Google Earth. Simplify other parts of the function somewhat. --- src/mesa/drivers/dri/i915tex/intel_buffers.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c index a6b3298623..1ded0b5417 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffers.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c @@ -36,6 +36,7 @@ #include "intel_batchbuffer.h" #include "context.h" #include "utils.h" +#include "drirenderbuffer.h" #include "framebuffer.h" #include "swrast/swrast.h" #include "vblank.h" @@ -183,6 +184,8 @@ void intelWindowMoved(struct intel_context *intel) { GLcontext *ctx = &intel->ctx; + __DRIdrawablePrivate *dPriv = intel->driDrawable; + GLframebuffer *drawFb = (GLframebuffer *) dPriv->driverPrivate; if (!intel->ctx.DrawBuffer) { /* when would this happen? -BP */ @@ -194,7 +197,7 @@ intelWindowMoved(struct intel_context *intel) } else { /* drawing to a window */ - switch (intel->ctx.DrawBuffer->_ColorDrawBufferMask[0]) { + switch (drawFb->_ColorDrawBufferMask[0]) { case BUFFER_BIT_FRONT_LEFT: intelSetFrontClipRects(intel); break; @@ -207,14 +210,11 @@ intelWindowMoved(struct intel_context *intel) } } - /* this update Mesa's notion of window size */ - if (ctx->WinSysDrawBuffer) { - _mesa_resize_framebuffer(ctx, ctx->WinSysDrawBuffer, - intel->driDrawable->w, intel->driDrawable->h); - } + /* Update Mesa's notion of window size */ + driUpdateFramebufferSize(ctx, dPriv); + drawFb->Initialized = GL_TRUE; /* XXX remove someday */ - if (intel->intelScreen->driScrnPriv->ddxMinor >= 7 && intel->driDrawable) { - __DRIdrawablePrivate *dPriv = intel->driDrawable; + if (intel->intelScreen->driScrnPriv->ddxMinor >= 7) { drmI830Sarea *sarea = intel->sarea; drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w, .y1 = dPriv->y, .y2 = dPriv->y + dPriv->h }; @@ -245,6 +245,9 @@ intelWindowMoved(struct intel_context *intel) /* Update hardware scissor */ ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, ctx->Scissor.Width, ctx->Scissor.Height); + + /* Re-calculate viewport related state */ + ctx->Driver.DepthRange( ctx, ctx->Viewport.Near, ctx->Viewport.Far ); } -- cgit v1.2.3 From 4cfb762c3eb2ea9a764c7ba0811c338ef5fba8fe Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 03:01:33 +0000 Subject: Some work on buffer handling, most likely not entirely correct and incomplete. But, it works well enough that windows can be moved/resized. --- src/mesa/drivers/dri/nouveau/Makefile | 1 + src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 331 +++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_buffers.h | 41 +++ src/mesa/drivers/dri/nouveau/nouveau_context.c | 79 +++++- src/mesa/drivers/dri/nouveau/nouveau_context.h | 20 ++ src/mesa/drivers/dri/nouveau/nouveau_driver.c | 29 +++ src/mesa/drivers/dri/nouveau/nouveau_driver.h | 5 +- src/mesa/drivers/dri/nouveau/nouveau_lock.c | 18 ++ src/mesa/drivers/dri/nouveau/nouveau_object.c | 23 +- src/mesa/drivers/dri/nouveau/nouveau_object.h | 9 +- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 128 +++++----- src/mesa/drivers/dri/nouveau/nouveau_shader.c | 2 + src/mesa/drivers/dri/nouveau/nouveau_shader.h | 2 + src/mesa/drivers/dri/nouveau/nouveau_span.c | 14 +- src/mesa/drivers/dri/nouveau/nouveau_span.h | 3 +- src/mesa/drivers/dri/nouveau/nouveau_state.c | 42 ++-- src/mesa/drivers/dri/nouveau/nouveau_state.h | 6 +- src/mesa/drivers/dri/nouveau/nv30_fragprog.c | 29 +-- src/mesa/drivers/dri/nouveau/nv30_state.c | 152 +++++++++++- 19 files changed, 784 insertions(+), 150 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_buffers.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_buffers.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 384713eeeb..1a76169156 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -8,6 +8,7 @@ LIBNAME = nouveau_dri.so MINIGLX_SOURCES = DRIVER_SOURCES = \ + nouveau_buffers.c \ nouveau_card.c \ nouveau_context.c \ nouveau_driver.c \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c new file mode 100644 index 0000000000..a356fd1212 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -0,0 +1,331 @@ +#include "utils.h" +#include "framebuffer.h" +#include "renderbuffer.h" +#include "fbobject.h" + +#include "nouveau_context.h" +#include "nouveau_buffers.h" + +void +nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + drm_nouveau_mem_free_t memf; + + if (mem->map) + drmUnmap(mem->map, mem->size); + memf.flags = mem->type; + memf.region_offset = mem->offset; + drmCommandWrite(nmesa->driFd, DRM_NOUVEAU_MEM_FREE, &memf, sizeof(memf)); + FREE(mem); +} + +nouveau_mem * +nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + drm_nouveau_mem_alloc_t mema; + nouveau_mem *mem; + int ret; + + mem = CALLOC(sizeof(nouveau_mem)); + if (!mem) + return NULL; + + mema.flags = mem->type = type; + mema.size = mem->size = size; + mema.alignment = align; + mem->map = NULL; + ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_MEM_ALLOC, + &mema, sizeof(mema)); + if (ret) { + FREE(mem); + return NULL; + } + mem->offset = mema.region_offset; + + if (type & NOUVEAU_MEM_MAPPED) + ret = drmMap(nmesa->driFd, mem->offset, mem->size, &mem->map); + if (ret) { + mem->map = NULL; + nouveau_mem_free(ctx, mem); + mem = NULL; + } + + return mem; +} + +uint32_t +nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (mem->type & NOUVEAU_MEM_FB) + return (uint32_t)mem->offset - nmesa->vram_phys; + else if (mem->type & NOUVEAU_MEM_AGP) + return (uint32_t)mem->offset - nmesa->agp_phys; + else + return 0xDEADF00D; +} + +static GLboolean +nouveau_renderbuffer_pixelformat(nouveau_renderbuffer *nrb, + GLenum internalFormat) +{ + nrb->mesa.InternalFormat = internalFormat; + + /*TODO: We probably want to extend this a bit, and maybe make + * card-specific? + */ + switch (internalFormat) { + case GL_RGBA: + case GL_RGBA8: + nrb->mesa._BaseFormat = GL_RGBA; + nrb->mesa._ActualFormat= GL_RGBA8; + nrb->mesa.DataType = GL_UNSIGNED_BYTE; + nrb->mesa.RedBits = 8; + nrb->mesa.GreenBits = 8; + nrb->mesa.BlueBits = 8; + nrb->mesa.AlphaBits = 8; + nrb->cpp = 4; + break; + case GL_RGB5: + nrb->mesa._BaseFormat = GL_RGB; + nrb->mesa._ActualFormat= GL_RGB5; + nrb->mesa.DataType = GL_UNSIGNED_BYTE; + nrb->mesa.RedBits = 5; + nrb->mesa.GreenBits = 6; + nrb->mesa.BlueBits = 5; + nrb->mesa.AlphaBits = 0; + nrb->cpp = 2; + break; + case GL_DEPTH_COMPONENT16: + nrb->mesa._BaseFormat = GL_DEPTH_COMPONENT; + nrb->mesa._ActualFormat= GL_DEPTH_COMPONENT16; + nrb->mesa.DataType = GL_UNSIGNED_SHORT; + nrb->mesa.DepthBits = 16; + nrb->cpp = 2; + break; + case GL_DEPTH_COMPONENT24: + nrb->mesa._BaseFormat = GL_DEPTH_COMPONENT; + nrb->mesa._ActualFormat= GL_DEPTH24_STENCIL8_EXT; + nrb->mesa.DataType = GL_UNSIGNED_INT_24_8_EXT; + nrb->mesa.DepthBits = 24; + nrb->cpp = 4; + break; + case GL_STENCIL_INDEX8_EXT: + nrb->mesa._BaseFormat = GL_STENCIL_INDEX; + nrb->mesa._ActualFormat= GL_DEPTH24_STENCIL8_EXT; + nrb->mesa.DataType = GL_UNSIGNED_INT_24_8_EXT; + nrb->mesa.StencilBits = 8; + nrb->cpp = 4; + break; + case GL_DEPTH24_STENCIL8_EXT: + nrb->mesa._BaseFormat = GL_DEPTH_STENCIL_EXT; + nrb->mesa._ActualFormat= GL_DEPTH24_STENCIL8_EXT; + nrb->mesa.DataType = GL_UNSIGNED_INT_24_8_EXT; + nrb->mesa.DepthBits = 24; + nrb->mesa.StencilBits = 8; + nrb->cpp = 4; + break; + default: + return GL_FALSE; + break; + } + + return GL_TRUE; +} + +static GLboolean +nouveau_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, + GLenum internalFormat, + GLuint width, + GLuint height) +{ + nouveau_renderbuffer *nrb = (nouveau_renderbuffer*)rb; + + if (!nouveau_renderbuffer_pixelformat(nrb, internalFormat)) { + fprintf(stderr, "%s: unknown internalFormat\n", __func__); + return GL_FALSE; + } + + /* If this buffer isn't statically alloc'd, we may need to ask the + * drm for more memory */ + if (!nrb->map && (rb->Width != width || rb->Height != height)) { + GLuint pitch; + + /* align pitches to 64 bytes */ + pitch = ((width * nrb->cpp) + 63) & ~63; + + if (nrb->mem) + nouveau_mem_free(ctx, nrb->mem); + nrb->mem = nouveau_mem_alloc(ctx, + NOUVEAU_MEM_FB | NOUVEAU_MEM_MAPPED, + pitch*height, + 0); + if (!nrb->mem) + return GL_FALSE; + + /* update nouveau_renderbuffer info */ + nrb->offset = nouveau_mem_gpu_offset_get(ctx, nrb->mem); + nrb->pitch = pitch; + } + + rb->Width = width; + rb->Height = height; + rb->InternalFormat = internalFormat; + return GL_TRUE; +} + +static void +nouveau_renderbuffer_delete(struct gl_renderbuffer *rb) +{ + GET_CURRENT_CONTEXT(ctx); + nouveau_renderbuffer *nrb = (nouveau_renderbuffer*)rb; + + if (nrb->mem) + nouveau_mem_free(ctx, nrb->mem); + FREE(nrb); +} + +nouveau_renderbuffer * +nouveau_renderbuffer_new(GLenum internalFormat, GLvoid *map, + GLuint offset, GLuint pitch, + __DRIdrawablePrivate *dPriv) +{ + nouveau_renderbuffer *nrb; + + nrb = CALLOC_STRUCT(nouveau_renderbuffer_t); + if (nrb) { + _mesa_init_renderbuffer(&nrb->mesa, 0); + + nouveau_renderbuffer_pixelformat(nrb, internalFormat); + + nrb->mesa.AllocStorage = nouveau_renderbuffer_storage; + nrb->mesa.Delete = nouveau_renderbuffer_delete; + + nrb->dPriv = dPriv; + nrb->offset = offset; + nrb->pitch = pitch; + nrb->map = map; + } + + return nrb; +} + +void +nouveau_window_moved(GLcontext *ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + /* Viewport depends on window size/position, nouveauCalcViewport + * will take care of calling the hw-specific WindowMoved + */ + ctx->Driver.Viewport(ctx, ctx->Viewport.X, ctx->Viewport.Y, + ctx->Viewport.Width, ctx->Viewport.Height); + /* Scissor depends on window position */ + ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height); +} + +GLboolean +nouveau_build_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_renderbuffer *color[MAX_DRAW_BUFFERS]; + nouveau_renderbuffer *depth; + + _mesa_update_framebuffer(ctx); + _mesa_update_draw_buffer_bounds(ctx); + + color[0] = (nouveau_renderbuffer *)fb->_ColorDrawBuffers[0][0]; + depth = (nouveau_renderbuffer *)fb->_DepthBuffer; + + if (!nmesa->hw_func.BindBuffers(nmesa, 1, color, depth)) + return GL_FALSE; + nouveau_window_moved(ctx); + + return GL_TRUE; +} + +nouveau_renderbuffer * +nouveau_current_draw_buffer(GLcontext *ctx) +{ + struct gl_framebuffer *fb = ctx->DrawBuffer; + nouveau_renderbuffer *nrb; + + if (!fb) + return NULL; + + if (fb->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT) + nrb = (nouveau_renderbuffer *) + fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer; + else if (fb->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT) + nrb = (nouveau_renderbuffer *) + fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer; + else + nrb = NULL; + return nrb; +} + +static struct gl_framebuffer * +nouveauNewFramebuffer(GLcontext *ctx, GLuint name) +{ + return _mesa_new_framebuffer(ctx, name); +} + +static struct gl_renderbuffer * +nouveauNewRenderbuffer(GLcontext *ctx, GLuint name) +{ + nouveau_renderbuffer *nrb; + + nrb = CALLOC_STRUCT(nouveau_renderbuffer_t); + if (nrb) { + _mesa_init_renderbuffer(&nrb->mesa, name); + + nrb->mesa.AllocStorage = nouveau_renderbuffer_storage; + nrb->mesa.Delete = nouveau_renderbuffer_delete; + } + return &nrb->mesa; +} + +static void +nouveauBindFramebuffer(GLcontext *ctx, GLenum target, struct gl_framebuffer *fb) +{ + nouveau_build_framebuffer(ctx, fb); +} + +static void +nouveauFramebufferRenderbuffer(GLcontext *ctx, + struct gl_framebuffer *fb, + GLenum attachment, + struct gl_renderbuffer *rb) +{ + _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb); + nouveau_build_framebuffer(ctx, fb); +} + +static void +nouveauRenderTexture(GLcontext *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att) +{ +} + +static void +nouveauFinishRenderTexture(GLcontext *ctx, + struct gl_renderbuffer_attachment *att) +{ +} + +void +nouveauInitBufferFuncs(struct dd_function_table *func) +{ + func->NewFramebuffer = nouveauNewFramebuffer; + func->NewRenderbuffer = nouveauNewRenderbuffer; + func->BindFramebuffer = nouveauBindFramebuffer; + func->FramebufferRenderbuffer = nouveauFramebufferRenderbuffer; + func->RenderTexture = nouveauRenderTexture; + func->FinishRenderTexture = nouveauFinishRenderTexture; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h new file mode 100644 index 0000000000..bb297ad558 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h @@ -0,0 +1,41 @@ +#ifndef __NOUVEAU_BUFFERS_H__ +#define __NOUVEAU_BUFFERS_H__ + +#include +#include "mtypes.h" +#include "utils.h" +#include "renderbuffer.h" + +typedef struct nouveau_mem_t { + int type; + uint64_t offset; + uint64_t size; + void* map; +} nouveau_mem; + +extern nouveau_mem *nouveau_mem_alloc(GLcontext *ctx, int type, + GLuint size, GLuint align); +extern void nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem); +extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem); + +typedef struct nouveau_renderbuffer_t { + struct gl_renderbuffer mesa; /* must be first! */ + __DRIdrawablePrivate *dPriv; + + nouveau_mem *mem; + void * map; + + int cpp; + uint32_t offset; + uint32_t pitch; +} nouveau_renderbuffer; + +extern nouveau_renderbuffer *nouveau_renderbuffer_new(GLenum internalFormat, + GLvoid *map, GLuint offset, GLuint pitch, __DRIdrawablePrivate *dPriv); +extern void nouveau_window_moved(GLcontext *ctx); +extern GLboolean nouveau_build_framebuffer(GLcontext *, struct gl_framebuffer *); +extern nouveau_renderbuffer *nouveau_current_draw_buffer(GLcontext *ctx); + +extern void nouveauInitBufferFuncs(struct dd_function_table *func); + +#endif diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index b208d6c9f5..f48c54416a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -32,6 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" #include "array_cache/acache.h" +#include "framebuffer.h" #include "tnl/tnl.h" #include "tnl/t_pipeline.h" @@ -47,6 +48,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_fifo.h" #include "nouveau_tex.h" #include "nouveau_msg.h" +#include "nouveau_reg.h" #include "nv10_swtcl.h" #include "vblank.h" @@ -96,10 +98,17 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, screen=nmesa->screen; /* Create the hardware context */ + if (!nouveauDRMGetParam(nmesa, NOUVEAU_GETPARAM_FB_PHYSICAL, + &nmesa->vram_phys)) + return GL_FALSE; + if (!nouveauDRMGetParam(nmesa, NOUVEAU_GETPARAM_AGP_PHYSICAL, + &nmesa->agp_phys)) + return GL_FALSE; if (!nouveauFifoInit(nmesa)) return GL_FALSE; nouveauObjectInit(nmesa); + /* Init default driver functions then plug in our nouveau-specific functions * (the texture functions are especially important) */ @@ -169,6 +178,7 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, break; } + nmesa->hw_func.InitCard(nmesa); nouveauInitState(ctx); driContextPriv->driverPrivate = (void *)nmesa; @@ -208,17 +218,26 @@ GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv, __DRIdrawablePrivate *driReadPriv ) { if ( driContextPriv ) { - GET_CURRENT_CONTEXT(ctx); - nouveauContextPtr oldNOUVEAUCtx = ctx ? NOUVEAU_CONTEXT(ctx) : NULL; - nouveauContextPtr newNOUVEAUCtx = (nouveauContextPtr) driContextPriv->driverPrivate; - - driDrawableInitVBlank(driDrawPriv, newNOUVEAUCtx->vblank_flags, &newNOUVEAUCtx->vblank_seq ); - newNOUVEAUCtx->driDrawable = driDrawPriv; - - _mesa_make_current( newNOUVEAUCtx->glCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate ); - + nouveauContextPtr nmesa = (nouveauContextPtr) driContextPriv->driverPrivate; + struct gl_framebuffer *draw_fb = + (struct gl_framebuffer*)driDrawPriv->driverPrivate; + struct gl_framebuffer *read_fb = + (struct gl_framebuffer*)driReadPriv->driverPrivate; + + driDrawableInitVBlank(driDrawPriv, nmesa->vblank_flags, &nmesa->vblank_seq ); + nmesa->driDrawable = driDrawPriv; + + _mesa_resize_framebuffer(nmesa->glCtx, draw_fb, + driDrawPriv->w, driDrawPriv->h); + if (draw_fb != read_fb) { + _mesa_resize_framebuffer(nmesa->glCtx, draw_fb, + driReadPriv->w, + driReadPriv->h); + } + _mesa_make_current(nmesa->glCtx, draw_fb, read_fb); + + nouveau_build_framebuffer(nmesa->glCtx, + driDrawPriv->driverPrivate); } else { _mesa_make_current( NULL, NULL, NULL ); } @@ -234,8 +253,46 @@ GLboolean nouveauUnbindContext( __DRIcontextPrivate *driContextPriv ) return GL_TRUE; } +static void nouveauDoSwapBuffers(nouveauContextPtr nmesa, + __DRIdrawablePrivate *dPriv) +{ + struct gl_framebuffer *fb; + nouveau_renderbuffer *src, *dst; + + fb = (struct gl_framebuffer *)dPriv->driverPrivate; + dst = (nouveau_renderbuffer*) + fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer; + src = (nouveau_renderbuffer*) + fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer; + +#ifdef ALLOW_MULTI_SUBCHANNEL + /* Ignore this.. it's a hack to test double-buffering, and not how + * SwapBuffers should look :) + */ + BEGIN_RING_SIZE(NvSubCtxSurf2D, NV10_CONTEXT_SURFACES_2D_FORMAT, 4); + OUT_RING (6); /* X8R8G8B8 */ + OUT_RING ((dst->pitch << 16) | src->pitch); + OUT_RING (src->offset); + OUT_RING (dst->offset); + + BEGIN_RING_SIZE(NvSubImageBlit, NV10_IMAGE_BLIT_SET_POINT, 3); + OUT_RING ((0 << 16) | 0); /* src point */ + OUT_RING ((0 << 16) | 0); /* dst point */ + OUT_RING ((fb->Height << 16) | fb->Width); /* width/height */ +#endif +} + void nouveauSwapBuffers(__DRIdrawablePrivate *dPriv) { + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + nouveauContextPtr nmesa = dPriv->driContextPriv->driverPrivate; + + if (nmesa->glCtx->Visual.doubleBufferMode) { + _mesa_notifySwapBuffers(nmesa->glCtx); + nouveauDoSwapBuffers(nmesa, dPriv); + } + + } } void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 947e95d18b..211d4e0a6d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -38,6 +38,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_screen.h" #include "nouveau_state_cache.h" +#include "nouveau_buffers.h" #include "nouveau_shader.h" #include "xmlconfig.h" @@ -75,6 +76,17 @@ typedef void (*nouveau_line_func)( struct nouveau_context*, typedef void (*nouveau_point_func)( struct nouveau_context*, nouveauVertex * ); +typedef struct nouveau_hw_func_t { + /* Initialise any card-specific non-GL related state */ + GLboolean (*InitCard)(struct nouveau_context *); + /* Update buffer offset/pitch/format */ + GLboolean (*BindBuffers)(struct nouveau_context *, int num_color, + nouveau_renderbuffer **color, + nouveau_renderbuffer *depth); + /* Update anything that depends on the window position/size */ + void (*WindowMoved)(struct nouveau_context *); +} nouveau_hw_func; + typedef struct nouveau_context { /* Mesa context */ GLcontext *glCtx; @@ -85,6 +97,13 @@ typedef struct nouveau_context { /* The read-only regs */ volatile unsigned char* mmio; + /* Physical addresses of AGP/VRAM apertures */ + uint64_t vram_phys; + uint64_t agp_phys; + + /* Additional hw-specific functions */ + nouveau_hw_func hw_func; + /* FIXME : do we want to put all state into a separate struct ? */ /* State for tris */ GLuint color_offset; @@ -132,6 +151,7 @@ typedef struct nouveau_context { __DRIcontextPrivate *driContext; /* DRI context */ __DRIscreenPrivate *driScreen; /* DRI screen */ __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + GLint lastStamp; drm_context_t hHWContext; drm_hw_lock_t *driHwLock; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index a45530e451..f85dc62e74 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -36,6 +36,35 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "utils.h" +/* Wrapper for DRM_NOUVEAU_GETPARAM ioctl */ +GLboolean nouveauDRMGetParam(nouveauContextPtr nmesa, + unsigned int param, + uint64_t* value) +{ + drm_nouveau_getparam_t getp; + + getp.param = param; + if (!value || drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_GETPARAM, + &getp, sizeof(getp))) + return GL_FALSE; + *value = getp.value; + return GL_TRUE; +} + +/* Wrapper for DRM_NOUVEAU_GETPARAM ioctl */ +GLboolean nouveauDRMSetParam(nouveauContextPtr nmesa, + unsigned int param, + uint64_t value) +{ + drm_nouveau_setparam_t setp; + + setp.param = param; + setp.value = value; + if (drmCommandWrite(nmesa->driFd, DRM_NOUVEAU_SETPARAM, &setp, + sizeof(setp))) + return GL_FALSE; + return GL_TRUE; +} /* Return the width and height of the current color buffer */ static void nouveauGetBufferSize( GLframebuffer *buffer, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h index e1541aa3c5..6164012b5b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h @@ -33,7 +33,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define DRIVER_AUTHOR "Stephane Marchesin" extern void nouveauDriverInitFunctions( struct dd_function_table *functions ); - +extern GLboolean nouveauDRMGetParam(nouveauContextPtr nmesa, unsigned int param, + uint64_t *value); +extern GLboolean nouveauDRMSetParam(nouveauContextPtr nmesa, unsigned int param, + uint64_t value); #endif /* __NOUVEAU_DRIVER_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_lock.c b/src/mesa/drivers/dri/nouveau/nouveau_lock.c index 7dd67a143a..c119d14dd7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_lock.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_lock.c @@ -29,6 +29,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_lock.h" #include "drirenderbuffer.h" +#include "framebuffer.h" /* Update the hardware state. This is called if another context has @@ -57,6 +58,23 @@ void nouveauGetLock( nouveauContextPtr nmesa, GLuint flags ) */ DRI_VALIDATE_DRAWABLE_INFO( sPriv, dPriv ); + /* If timestamps don't match, the window has been changed */ + if (nmesa->lastStamp != dPriv->lastStamp) { + struct gl_framebuffer *fb = (struct gl_framebuffer *)dPriv->driverPrivate; + + /* _mesa_resize_framebuffer will take care of calling the renderbuffer's + * AllocStorage function if we need more memory to hold it */ + if (fb->Width != dPriv->w || fb->Height != dPriv->h) { + _mesa_resize_framebuffer(nmesa->glCtx, fb, dPriv->w, dPriv->h); + /* resize buffers, will call nouveau_window_moved */ + nouveau_build_framebuffer(nmesa->glCtx, fb); + } else { + nouveau_window_moved(nmesa->glCtx); + } + + nmesa->lastStamp = dPriv->lastStamp; + } + nmesa->numClipRects = dPriv->numClipRects; nmesa->pClipRects = dPriv->pClipRects; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index 032cdee2f7..ef8a428c22 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -1,6 +1,7 @@ #include "nouveau_fifo.h" #include "nouveau_object.h" +#include "nouveau_reg.h" static GLboolean nouveauCreateContextObject(nouveauContextPtr nmesa, int handle, int class, uint32_t flags, uint32_t dma_in, uint32_t dma_out, uint32_t dma_notifier) @@ -51,14 +52,30 @@ void nouveauObjectInit(nouveauContextPtr nmesa) return; #endif - nouveauCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, 0, 0, 0, 0); - nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); /* We need to know vram size.. */ -#if 0 nouveauCreateDmaObject( nmesa, NvDmaFB, 0, (256*1024*1024), 0 /*NV_DMA_TARGET_FB*/, 0 /*NV_DMA_ACCESS_RW*/); + + nouveauCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, + 0, 0, 0, 0); + nouveauCreateContextObject(nmesa, NvCtxSurf2D, NV10_CONTEXT_SURFACES_2D, + 0, 0, 0, 0); + nouveauCreateContextObject(nmesa, NvImageBlit, NV10_IMAGE_BLIT, + NV_DMA_CONTEXT_FLAGS_PATCH_SRCCOPY, 0, 0, 0); + +#ifdef ALLOW_MULTI_SUBCHANNEL + nouveauObjectOnSubchannel(nmesa, NvSubCtxSurf2D, NvCtxSurf2D); + BEGIN_RING_SIZE(NvSubCtxSurf2D, NV10_CONTEXT_SURFACES_2D_SET_DMA_IN_MEMORY0, 2); + OUT_RING(NvDmaFB); + OUT_RING(NvDmaFB); + + nouveauObjectOnSubchannel(nmesa, NvSubImageBlit, NvImageBlit); + BEGIN_RING_SIZE(NvSubImageBlit, NV10_IMAGE_BLIT_SET_CONTEXT_SURFACES_2D, 1); + OUT_RING(NvCtxSurf2D); #endif + + nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index 8386f923c3..f555eba9b4 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -3,14 +3,21 @@ #include "nouveau_context.h" +#define ALLOW_MULTI_SUBCHANNEL + void nouveauObjectInit(nouveauContextPtr nmesa); enum DMAObjects { Nv3D = 0x80000019, - NvDmaFB = 0xD0FB0001 + NvCtxSurf2D = 0x80000020, + NvImageBlit = 0x80000021, + NvDmaFB = 0xD0FB0001, + NvDmaAGP = 0xD0AA0001 }; enum DMASubchannel { + NvSubCtxSurf2D = 0, + NvSubImageBlit = 1, NvSub3D = 7, }; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 51f9fb1487..15c1c40925 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -120,86 +120,69 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, GLboolean isPixmap) { nouveauScreenPtr screen = (nouveauScreenPtr) driScrnPriv->private; + nouveau_renderbuffer *nrb; + struct gl_framebuffer *fb; + const GLboolean swAccum = mesaVis->accumRedBits > 0; + const GLboolean swStencil = mesaVis->stencilBits > 0 && mesaVis->depthBits != 24; - if (isPixmap) { + if (isPixmap) return GL_FALSE; /* not implemented */ - } - else { - const GLboolean swDepth = GL_FALSE; - const GLboolean swAlpha = GL_FALSE; - const GLboolean swAccum = mesaVis->accumRedBits > 0; - const GLboolean swStencil = mesaVis->stencilBits > 0 && mesaVis->depthBits != 24; - struct gl_framebuffer *fb = _mesa_create_framebuffer(mesaVis); - - /* front color renderbuffer */ - { - driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, - driScrnPriv->pFB + screen->frontOffset, - screen->fbFormat, - screen->frontOffset, screen->frontPitch, - driDrawPriv); - nouveauSpanSetFunctions(frontRb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base); - } - /* back color renderbuffer */ - if (mesaVis->doubleBufferMode) { - driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, - driScrnPriv->pFB + screen->backOffset, - screen->fbFormat, - screen->backOffset, screen->backPitch, - driDrawPriv); - nouveauSpanSetFunctions(backRb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base); - } + fb = _mesa_create_framebuffer(mesaVis); + if (!fb) + return GL_FALSE; - /* depth renderbuffer */ - if (mesaVis->depthBits == 16) { - driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, - driScrnPriv->pFB + screen->depthOffset, - screen->fbFormat, - screen->depthOffset, screen->depthPitch, - driDrawPriv); - nouveauSpanSetFunctions(depthRb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); - } - else if (mesaVis->depthBits == 24) { - driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, - driScrnPriv->pFB + screen->depthOffset, - screen->fbFormat, - screen->depthOffset, screen->depthPitch, - driDrawPriv); - nouveauSpanSetFunctions(depthRb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); + /* Front buffer */ + nrb = nouveau_renderbuffer_new(GL_RGBA, + driScrnPriv->pFB + screen->frontOffset, + screen->frontOffset, + screen->frontPitch * 4, + driDrawPriv); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &nrb->mesa); + + if (0 /* unified buffers if we choose to support them.. */) { + } else { + if (mesaVis->doubleBufferMode) { + nrb = nouveau_renderbuffer_new(GL_RGBA, NULL, + 0, 0, + driDrawPriv); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &nrb->mesa); } - /* stencil renderbuffer */ - if (mesaVis->stencilBits > 0 && !swStencil) { - driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, - driScrnPriv->pFB + screen->depthOffset, - screen->fbFormat, - screen->depthOffset, screen->depthPitch, - driDrawPriv); - nouveauSpanSetFunctions(stencilRb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &stencilRb->Base); + if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) { + nrb = nouveau_renderbuffer_new(GL_DEPTH24_STENCIL8_EXT, NULL, + 0, 0, + driDrawPriv); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); + _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &nrb->mesa); + } else if (mesaVis->depthBits == 24) { + nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT24, NULL, + 0, 0, + driDrawPriv); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); + } else if (mesaVis->depthBits == 16) { + nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT16, NULL, + 0, 0, + driDrawPriv); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); } + } - _mesa_add_soft_renderbuffers(fb, - GL_FALSE, /* color */ - swDepth, - swStencil, - swAccum, - swAlpha, - GL_FALSE /* aux */); - driDrawPriv->driverPrivate = (void *) fb; + _mesa_add_soft_renderbuffers(fb, + GL_FALSE, /* color */ + GL_FALSE, /* depth */ + swStencil, + swAccum, + GL_FALSE, /* alpha */ + GL_FALSE /* aux */); - return (driDrawPriv->driverPrivate != NULL); - } + driDrawPriv->driverPrivate = (void *) fb; + return (driDrawPriv->driverPrivate != NULL); } @@ -363,7 +346,8 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc *driver_modes = nouveauFillInModes(dri_priv->bpp, (dri_priv->bpp == 16) ? 16 : 24, (dri_priv->bpp == 16) ? 0 : 8, - (dri_priv->back_offset != dri_priv->depth_offset)); + 1 + ); /* Calling driInitExtensions here, with a NULL context pointer, does not actually * enable the extensions. It just makes sure that all the dispatch offsets for all diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index 63da8420b2..4dedefe5a3 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -132,6 +132,8 @@ nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs) */ nvs->func->UpdateConst(ctx, nvs, i); } else if (plist->Parameters[i].Type == PROGRAM_STATE_VAR) { + if (!nvs->params[i].source_val) /* this is a workaround when consts aren't alloc'd from id=0.. */ + continue; /* update any changed state parameters */ if (!TEST_EQ_4V(nvs->params[i].val, nvs->params[i].source_val)) nvs->func->UpdateConst(ctx, nvs, i); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index a1e7794487..dce2e23f46 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -2,6 +2,7 @@ #define __SHADER_COMMON_H__ #include "mtypes.h" +#include "nouveau_buffers.h" typedef struct _nvsFunc nvsFunc; @@ -40,6 +41,7 @@ typedef struct _nouveauShader { unsigned int program_alloc_size; unsigned int program_start_id; unsigned int program_current; + nouveau_mem *program_buffer; unsigned int inputs_read; unsigned int outputs_written; int inst_count; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.c b/src/mesa/drivers/dri/nouveau/nouveau_span.c index 1763b37e53..6d99728b85 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_span.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_span.c @@ -109,14 +109,10 @@ void nouveauSpanInitFunctions( GLcontext *ctx ) * Plug in the Get/Put routines for the given driRenderbuffer. */ void -nouveauSpanSetFunctions(driRenderbuffer *drb, const GLvisual *vis) +nouveauSpanSetFunctions(nouveau_renderbuffer *nrb, const GLvisual *vis) { - if (drb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - nouveauInitPointers_RGB565(&drb->Base); - } - else { - nouveauInitPointers_ARGB8888(&drb->Base); - } - } + if (nrb->mesa._ActualFormat == GL_RGBA8) + nouveauInitPointers_ARGB8888(&nrb->mesa); + else if (nrb->mesa._ActualFormat == GL_RGB5) + nouveauInitPointers_RGB565(&nrb->mesa); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.h b/src/mesa/drivers/dri/nouveau/nouveau_span.h index f5e5733ba8..bc39ecd17b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_span.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_span.h @@ -30,9 +30,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define __NOUVEAU_SPAN_H__ #include "drirenderbuffer.h" +#include "nouveau_buffers.h" extern void nouveauSpanInitFunctions( GLcontext *ctx ); -extern void nouveauSpanSetFunctions(driRenderbuffer *rb, const GLvisual *vis); +extern void nouveauSpanSetFunctions(nouveau_renderbuffer *nrb, const GLvisual *vis); #endif /* __NOUVEAU_SPAN_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 88a8c9ed59..6406b2d9cd 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -59,20 +59,33 @@ static void nouveauCalcViewport(GLcontext *ctx) /* Calculate the Viewport Matrix */ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_renderbuffer *nrb; const GLfloat *v = ctx->Viewport._WindowMap.m; GLfloat *m = nmesa->viewport.m; + GLfloat xoffset, yoffset; GLint h = 0; - - if (nmesa->driDrawable) - h = nmesa->driDrawable->h + SUBPIXEL_Y; - + + nrb = nouveau_current_draw_buffer(ctx); + nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF; + + if (nrb && nrb->map) { + /* Window */ + xoffset = nrb->dPriv->x; + yoffset = nrb->dPriv->y; + } else { + /* Offscreen or back buffer */ + xoffset = 0.0; + yoffset = 0.0; + } + m[MAT_SX] = v[MAT_SX]; - m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X; + m[MAT_TX] = v[MAT_TX] + xoffset + SUBPIXEL_X; m[MAT_SY] = - v[MAT_SY]; - m[MAT_TY] = - v[MAT_TY] + h; + m[MAT_TY] = v[MAT_TY] + yoffset + SUBPIXEL_Y; m[MAT_SZ] = v[MAT_SZ] * nmesa->depth_scale; m[MAT_TZ] = v[MAT_TZ] * nmesa->depth_scale; + nmesa->hw_func.WindowMoved(nmesa); } static void nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) @@ -96,7 +109,7 @@ static void nouveauViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei nouveauCalcViewport(ctx); } -static void nouveauDepthRange(GLcontext *ctx) +static void nouveauDepthRange(GLcontext *ctx, GLclampd near, GLclampd far) { nouveauCalcViewport(ctx); } @@ -161,15 +174,15 @@ void nouveauDDInitState(nouveauContextPtr nmesa) /* No TCL engines for these ones */ break; case NV_10: - nv10InitStateFuncs(&nmesa->glCtx->Driver); + nv10InitStateFuncs(nmesa->glCtx, &nmesa->glCtx->Driver); break; case NV_20: - nv20InitStateFuncs(&nmesa->glCtx->Driver); + nv20InitStateFuncs(nmesa->glCtx, &nmesa->glCtx->Driver); break; case NV_30: case NV_40: case NV_50: - nv30InitStateFuncs(&nmesa->glCtx->Driver); + nv30InitStateFuncs(nmesa->glCtx, &nmesa->glCtx->Driver); break; default: break; @@ -270,7 +283,6 @@ void nouveauInitState(GLcontext *ctx) STATE_INIT(CullFace)( ctx, ctx->Polygon.CullFaceMode ); STATE_INIT(DepthFunc)( ctx, ctx->Depth.Func ); STATE_INIT(DepthMask)( ctx, ctx->Depth.Mask ); - STATE_INIT(DepthRange)( ctx, ctx->Viewport.Near, ctx->Viewport.Far ); STATE_INIT(Enable)( ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled ); STATE_INIT(Enable)( ctx, GL_BLEND, ctx->Color.BlendEnabled ); @@ -320,8 +332,6 @@ void nouveauInitState(GLcontext *ctx) ctx->Polygon.OffsetFactor, ctx->Polygon.OffsetUnits ); STATE_INIT(PolygonStipple)( ctx, (const GLubyte *)ctx->PolygonStipple ); - STATE_INIT(Scissor)( ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height ); STATE_INIT(ShadeModel)( ctx, ctx->Light.ShadeModel ); STATE_INIT(StencilFuncSeparate)( ctx, GL_FRONT, ctx->Stencil.Function[0], @@ -341,10 +351,4 @@ void nouveauInitState(GLcontext *ctx) ctx->Stencil.FailFunc[1], ctx->Stencil.ZFailFunc[1], ctx->Stencil.ZPassFunc[1]); - - STATE_INIT(Viewport)( ctx, - ctx->Viewport.X, ctx->Viewport.Y, - ctx->Viewport.Width, ctx->Viewport.Height ); - - STATE_INIT(DrawBuffer)( ctx, ctx->Color.DrawBuffer[0] ); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h index 37f04f41bd..16d63a6ac2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h @@ -32,9 +32,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. extern void nouveauDDInitState(nouveauContextPtr nmesa); extern void nouveauDDInitStateFuncs(GLcontext *ctx); -extern void nv10InitStateFuncs(struct dd_function_table *func); -extern void nv20InitStateFuncs(struct dd_function_table *func); -extern void nv30InitStateFuncs(struct dd_function_table *func); +extern void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func); +extern void nv20InitStateFuncs(GLcontext *ctx, struct dd_function_table *func); +extern void nv30InitStateFuncs(GLcontext *ctx, struct dd_function_table *func); extern void nouveauInitState(GLcontext *ctx); diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c index 1c2664ec70..98aa27ea9c 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c +++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c @@ -10,6 +10,7 @@ #include "nouveau_shader.h" #include "nouveau_object.h" #include "nouveau_msg.h" +#include "nouveau_buffers.h" #include "nv30_shader.h" unsigned int NVFP_TX_AOP_COUNT = 64; @@ -19,31 +20,22 @@ struct _op_xlat NVFP_TX_AOP[64]; * Support routines */ -/*XXX: bad bad bad bad */ -static uint64_t fragprog_ofs; -static uint32_t *fragprog_buf = NULL; - static void NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); drm_nouveau_mem_alloc_t mem; - if (!fragprog_buf) { - mem.flags = NOUVEAU_MEM_FB|NOUVEAU_MEM_MAPPED; - mem.size = nvs->program_size * sizeof(uint32_t); - mem.alignment = 0; - mem.region_offset = &fragprog_ofs; - if (drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_MEM_ALLOC, &mem, - sizeof(mem))) { - fprintf(stderr, "MEM_ALLOC fail\n"); - return; - } + if (!nvs->program_buffer) { + nouveau_mem *fpbuf; - if (drmMap(nmesa->driFd, fragprog_ofs, mem.size, &fragprog_buf)) { - fprintf(stderr, "MEM_MAP fail\n"); + fpbuf = nouveau_mem_alloc(ctx, NOUVEAU_MEM_FB|NOUVEAU_MEM_MAPPED, + nvs->program_size * sizeof(uint32_t), 0); + if (!fpbuf) { + fprintf(stderr, "fragprog vram alloc fail!\n"); return; } + nvs->program_buffer = fpbuf; } /*XXX: should do a DMA.. and not copy over a possibly in-use program.. */ @@ -52,9 +44,10 @@ NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs) * caches the program somewhere? so, maybe not so bad to just clobber the * old program in vram.. */ - memcpy(fragprog_buf, nvs->program, nvs->program_size * sizeof(uint32_t)); + memcpy(nvs->program_buffer->map, nvs->program, + nvs->program_size * sizeof(uint32_t)); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM, 1); - OUT_RING(((uint32_t)fragprog_ofs-0xE0000000)|1); + OUT_RING(nouveau_mem_gpu_offset_get(ctx, nvs->program_buffer) | 1); } static void diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 3ffb5d3a41..3228320623 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -304,10 +304,16 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_POST_COLOR_MATRIX_COLOR_TABLE: // case GL_POST_CONVOLUTION_COLOR_TABLE: // case GL_RESCALE_NORMAL: -// case GL_SCISSOR_TEST: + case GL_SCISSOR_TEST: + /* No enable bit, nv30Scissor will adjust to max range */ + ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height); + break; // case GL_SEPARABLE_2D: case GL_STENCIL_TEST: // TODO BACK and FRONT ? + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_ENABLE, 1); + OUT_RING_CACHE(state); BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_STENCIL_BACK_ENABLE, 1); OUT_RING_CACHE(state); break; @@ -514,9 +520,26 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_renderbuffer *nrb; + + /* Adjust offsets if drawing to a window */ + nrb = nouveau_current_draw_buffer(ctx); + if (nrb && nrb->map) { + x += nrb->dPriv->x; + y += nrb->dPriv->y; + } + + /* There's no scissor enable bit, so adjust the scissor to cover the + * maximum draw buffer bounds + */ + if (!ctx->Scissor.Enabled) { + x = y = 0; + w = h = 4095; + } + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2); - OUT_RING_CACHE((w << 16) | x); - OUT_RING_CACHE((h << 16) | y); + OUT_RING_CACHE(((w) << 16) | x); + OUT_RING_CACHE(((h) << 16) | y); } /** Select flat or smooth shading */ @@ -602,18 +625,117 @@ static void nv30TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) OUT_RING_CACHEp(mat->m, 16); } -/** Set the viewport */ -static void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +static void nv30WindowMoved(nouveauContextPtr nmesa) { - /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLcontext *ctx = nmesa->glCtx; + nouveau_renderbuffer *nrb; + GLfloat *v = nmesa->viewport.m; + GLuint w = ctx->Viewport.Width; + GLuint h = ctx->Viewport.Height; + GLuint x = ctx->Viewport.X; + GLuint y = ctx->Viewport.Y; + + /* Adjust offsets if drawing to a window */ + nrb = nouveau_current_draw_buffer(ctx); + if (nrb && nrb->map) { + x += nrb->dPriv->x; + y += nrb->dPriv->y; + } + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); OUT_RING_CACHE((w << 16) | x); OUT_RING_CACHE((h << 16) | y); -} - -void nv30InitStateFuncs(struct dd_function_table *func) + /* something to do with clears, possibly doesn't belong here */ + BEGIN_RING_CACHE(NvSub3D, + NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_OFS0, 2); + OUT_RING_CACHE(((w+x) << 16) | x); + OUT_RING_CACHE(((h+y) << 16) | y); + /* viewport transform */ + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_OX, 8); + OUT_RING_CACHEf (v[MAT_TX]); + OUT_RING_CACHEf (v[MAT_TY]); + OUT_RING_CACHEf (v[MAT_TZ]); + OUT_RING_CACHEf (0.0); + OUT_RING_CACHEf (v[MAT_SX]); + OUT_RING_CACHEf (v[MAT_SY]); + OUT_RING_CACHEf (v[MAT_SZ]); + OUT_RING_CACHEf (0.0); + + ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height); +} + +static GLboolean nv30InitCard(nouveauContextPtr nmesa) +{ + /* Need some love.. */ + return GL_FALSE; +} + +static GLboolean nv40InitCard(nouveauContextPtr nmesa) +{ + nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); + + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SET_OBJECT1, 2); + OUT_RING(NvDmaFB); + OUT_RING(NvDmaFB); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SET_OBJECT8, 1); + OUT_RING(NvDmaFB); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SET_OBJECT4, 2); + OUT_RING(NvDmaFB); + OUT_RING(NvDmaFB); + BEGIN_RING_SIZE(NvSub3D, 0x0220, 1); + OUT_RING(1); + BEGIN_RING_SIZE(NvSub3D, 0x1fc8, 2); + OUT_RING(0xedcba987); + OUT_RING(0x00000021); + BEGIN_RING_SIZE(NvSub3D, 0x1d60, 1); + OUT_RING(0x03008000); + + return GL_TRUE; +} + +static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color, + nouveau_renderbuffer **color, + nouveau_renderbuffer *depth) +{ + nouveau_renderbuffer *nrb; + GLuint x, y, w, h; + + /* Adjust offsets if drawing to a window */ + nrb = nouveau_current_draw_buffer(nmesa->glCtx); + w = nrb->mesa.Width; + h = nrb->mesa.Height; + if (nrb && nrb->map) { + x = nrb->dPriv->x; + y = nrb->dPriv->y; + } else { + x = 0; + y = 0; + } + + if (num_color != 1) + return GL_FALSE; + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_DIM0, 5); + OUT_RING (((w+x)<<16)|x); + OUT_RING (((h+y)<<16)|y); + OUT_RING (0x148); + OUT_RING (color[0]->pitch); + OUT_RING (color[0]->offset); + + if (depth) { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DEPTH_OFFSET, 1); + OUT_RING (depth->offset); + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LMA_DEPTH_BUFFER_PITCH, 1); + OUT_RING (depth->pitch); + } + + return GL_TRUE; +} + +void nv30InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) { + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + func->AlphaFunc = nv30AlphaFunc; func->BlendColor = nv30BlendColor; func->BlendEquationSeparate = nv30BlendEquationSeparate; @@ -628,7 +750,6 @@ void nv30InitStateFuncs(struct dd_function_table *func) func->FrontFace = nv30FrontFace; func->DepthFunc = nv30DepthFunc; func->DepthMask = nv30DepthMask; - func->DepthRange = nv30DepthRange; func->Enable = nv30Enable; func->Fogfv = nv30Fogfv; func->Hint = nv30Hint; @@ -656,6 +777,13 @@ void nv30InitStateFuncs(struct dd_function_table *func) func->TexParameter = nv30TexParameter; #endif func->TextureMatrix = nv30TextureMatrix; - func->Viewport = nv30Viewport; + + + if (nmesa->screen->card->type >= NV_40) + nmesa->hw_func.InitCard = nv40InitCard; + else + nmesa->hw_func.InitCard = nv30InitCard; + nmesa->hw_func.BindBuffers = nv30BindBuffers; + nmesa->hw_func.WindowMoved = nv30WindowMoved; } -- cgit v1.2.3 From 1d6f13986c40c014708175ed3289811d03a8c724 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 03:04:10 +0000 Subject: oops, we don't want this by default just yet... --- src/mesa/drivers/dri/nouveau/nouveau_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index f555eba9b4..a49a39719b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -3,7 +3,7 @@ #include "nouveau_context.h" -#define ALLOW_MULTI_SUBCHANNEL +//#define ALLOW_MULTI_SUBCHANNEL void nouveauObjectInit(nouveauContextPtr nmesa); -- cgit v1.2.3 From 011377622fa78d141486ba0536a1546cea8cb8c6 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 07:15:43 +0000 Subject: Create visuals for modes the ddx provides --- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 82 +++++++++++++-------------- 1 file changed, 38 insertions(+), 44 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 15c1c40925..18ca37918f 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -226,8 +226,17 @@ nouveauFillInModes( unsigned pixel_bits, unsigned depth_bits, unsigned num_modes; unsigned depth_buffer_factor; unsigned back_buffer_factor; - GLenum fb_format; - GLenum fb_type; + unsigned fb_format_factor; + int i; + + static const struct { + GLenum format; + GLenum type; + } fb_format_array[] = { + { GL_RGB , GL_UNSIGNED_SHORT_5_6_5 }, + { GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV }, + { GL_RGB , GL_UNSIGNED_INT_8_8_8_8_REV }, + }; /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't * support pageflipping at all. @@ -236,58 +245,43 @@ nouveauFillInModes( unsigned pixel_bits, unsigned depth_bits, GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML }; - u_int8_t depth_bits_array[3]; - u_int8_t stencil_bits_array[3]; - - depth_bits_array[0] = 0; - depth_bits_array[1] = depth_bits; - depth_bits_array[2] = depth_bits; - - /* Just like with the accumulation buffer, always provide some modes - * with a stencil buffer. It will be a sw fallback, but some apps won't - * care about that. - */ - stencil_bits_array[0] = 0; - stencil_bits_array[1] = 0; - stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; + u_int8_t depth_bits_array[4] = { 0, 16, 24, 24 }; + u_int8_t stencil_bits_array[4] = { 0, 0, 0, 8 }; - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; + depth_buffer_factor = 4; back_buffer_factor = (have_back_buffer) ? 3 : 1; - num_modes = depth_buffer_factor * back_buffer_factor * 4; - - if ( pixel_bits == 16 ) { - fb_format = GL_RGB; - fb_type = GL_UNSIGNED_SHORT_5_6_5; - } else { - fb_format = GL_BGRA; - fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; - } - - modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) ); + num_modes = ((pixel_bits==16) ? 1 : 2) * + depth_buffer_factor * back_buffer_factor * 4; + modes = (*dri_interface->createContextModes)(num_modes, + sizeof(__GLcontextModes)); m = modes; - if (!driFillInModes(&m, fb_format, fb_type, - depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor, - GLX_TRUE_COLOR)) { + + for (i=((pixel_bits==16)?0:1);i<((pixel_bits==16)?1:3);i++) { + if (!driFillInModes(&m, fb_format_array[i].format, + fb_format_array[i].type, + depth_bits_array, + stencil_bits_array, + depth_buffer_factor, + back_buffer_modes, + back_buffer_factor, + GLX_TRUE_COLOR)) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); return NULL; - } - if (!driFillInModes(&m, fb_format, fb_type, - depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor, - GLX_DIRECT_COLOR)) { + } + + if (!driFillInModes(&m, fb_format_array[i].format, + fb_format_array[i].type, + depth_bits_array, + stencil_bits_array, + depth_buffer_factor, + back_buffer_modes, + back_buffer_factor, + GLX_DIRECT_COLOR)) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); return NULL; - } - - /* Mark the visual as slow if there are "fake" stencil bits. - */ - for ( m = modes ; m != NULL ; m = m->next ) { - if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) { - m->visualRating = GLX_SLOW_CONFIG; } } -- cgit v1.2.3 From bda66ac426e7ebd0c9383c665a43bc9dbe3154f7 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 07:27:39 +0000 Subject: oops, typo --- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 18ca37918f..93f66826e8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -234,8 +234,8 @@ nouveauFillInModes( unsigned pixel_bits, unsigned depth_bits, GLenum type; } fb_format_array[] = { { GL_RGB , GL_UNSIGNED_SHORT_5_6_5 }, - { GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV }, - { GL_RGB , GL_UNSIGNED_INT_8_8_8_8_REV }, + { GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV }, + { GL_BGR , GL_UNSIGNED_INT_8_8_8_8_REV }, }; /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't -- cgit v1.2.3 From 5449f5a97524cb21194b20d05449d7211faaa51c Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 8 Dec 2006 17:00:59 +0800 Subject: fix bug#9045 --- src/mesa/drivers/dri/i965/intel_ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_ioctl.c b/src/mesa/drivers/dri/i965/intel_ioctl.c index d1f2e3f27c..f3b76db215 100644 --- a/src/mesa/drivers/dri/i965/intel_ioctl.c +++ b/src/mesa/drivers/dri/i965/intel_ioctl.c @@ -75,7 +75,7 @@ void intelWaitIrq( struct intel_context *intel, int seq ) { if (!intel->no_hw) { drmI830IrqWait iw; - int ret; + int ret, lastdispatch; if (0) fprintf(stderr, "%s %d\n", __FUNCTION__, seq ); @@ -83,11 +83,12 @@ void intelWaitIrq( struct intel_context *intel, int seq ) iw.irq_seq = seq; do { + lastdispatch = intel->sarea->last_dispatch; ret = drmCommandWrite( intel->driFd, DRM_I830_IRQ_WAIT, &iw, sizeof(iw) ); /* This seems quite often to return before it should!?! */ - } while (ret == -EAGAIN || ret == -EINTR || (ret == 0 && seq > intel->sarea->last_dispatch)); + } while (ret == -EAGAIN || ret == -EINTR || (ret == -EBUSY && lastdispatch != intel->sarea->last_dispatch) || (ret == 0 && seq > intel->sarea->last_dispatch)); if ( ret ) { -- cgit v1.2.3 From f79360858d4c94629ef543a35e4e44a13419ac0e Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 8 Dec 2006 17:05:14 +0800 Subject: fix bug#9237 --- src/mesa/drivers/dri/i965/brw_misc_state.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index 6a6c4503c7..d5779680ff 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -88,10 +88,10 @@ static void upload_drawing_rect(struct brw_context *brw) if (brw->intel.numClipRects > 1) return; - x1 = dPriv->x; - y1 = dPriv->y; - x2 = dPriv->x + dPriv->w; - y2 = dPriv->y + dPriv->h; + x1 = brw->intel.pClipRects[0].x1; + y1 = brw->intel.pClipRects[0].y1; + x2 = brw->intel.pClipRects[0].x2; + y2 = brw->intel.pClipRects[0].y2; if (x1 < 0) x1 = 0; if (y1 < 0) y1 = 0; -- cgit v1.2.3 From e62b2f9c2ec083db40abcf2991201e9e108861f1 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 11:45:39 +0000 Subject: Implement a simple nv30Clear, and make sure we get a nouveau_renderbuffer for the depth buffer and not a Mesa renderbuffer adaptor --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 5 ++++- src/mesa/drivers/dri/nouveau/nv30_state.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index a356fd1212..42d8691752 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -239,7 +239,10 @@ nouveau_build_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) _mesa_update_draw_buffer_bounds(ctx); color[0] = (nouveau_renderbuffer *)fb->_ColorDrawBuffers[0][0]; - depth = (nouveau_renderbuffer *)fb->_DepthBuffer; + if (fb->_DepthBuffer && fb->_DepthBuffer->Wrapped) + depth = (nouveau_renderbuffer *)fb->_DepthBuffer->Wrapped; + else + depth = (nouveau_renderbuffer *)fb->_DepthBuffer; if (!nmesa->hw_func.BindBuffers(nmesa, 1, color, depth)) return GL_FALSE; diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 3228320623..aab0bd9fda 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -79,6 +79,23 @@ static void nv30BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfac OUT_RING_CACHE((dfactorA<<16) | dfactorRGB); } +static void nv30Clear(GLcontext *ctx, GLbitfield mask) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLuint hw_bufs = 0; + + if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) + hw_bufs |= 0xf0; + if (mask & (BUFFER_BIT_DEPTH)) + hw_bufs |= 0x03; + + if (hw_bufs) { + /* should we flush the state cache before this? */ + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_WHICH_BUFFERS, 1); + OUT_RING(hw_bufs); + } +} + static void nv30ClearColor(GLcontext *ctx, const GLfloat color[4]) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -740,6 +757,7 @@ void nv30InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) func->BlendColor = nv30BlendColor; func->BlendEquationSeparate = nv30BlendEquationSeparate; func->BlendFuncSeparate = nv30BlendFuncSeparate; + func->Clear = nv30Clear; func->ClearColor = nv30ClearColor; func->ClearDepth = nv30ClearDepth; func->ClearStencil = nv30ClearStencil; -- cgit v1.2.3 From 046ece3a2da89c30c8d1bfa25389b19caad0a64c Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 11:51:50 +0000 Subject: state cache is automagically flushed on a normal BEGIN_RING_SIZE --- src/mesa/drivers/dri/nouveau/nv30_state.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index aab0bd9fda..f0b37a76f5 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -90,7 +90,6 @@ static void nv30Clear(GLcontext *ctx, GLbitfield mask) hw_bufs |= 0x03; if (hw_bufs) { - /* should we flush the state cache before this? */ BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_CLEAR_WHICH_BUFFERS, 1); OUT_RING(hw_bufs); } -- cgit v1.2.3 From fe91d00e332b42d0aea9f7aa266f8cc28ac9ec39 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 12:36:26 +0000 Subject: NV_44 uses nv30InitStateFuncs too --- src/mesa/drivers/dri/nouveau/nouveau_state.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 6406b2d9cd..cec7120d43 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -181,6 +181,7 @@ void nouveauDDInitState(nouveauContextPtr nmesa) break; case NV_30: case NV_40: + case NV_44: case NV_50: nv30InitStateFuncs(nmesa->glCtx, &nmesa->glCtx->Driver); break; -- cgit v1.2.3 From c04c74bc5da454478fd0dbf3b25dd54190ac0942 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 8 Dec 2006 14:12:47 +0000 Subject: Skeletal extension handling across chipsets. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 45 ++++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_screen.c | 10 ++++++ src/mesa/drivers/dri/nouveau/nouveau_shader.c | 3 -- 3 files changed, 55 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index f48c54416a..53d26e0d74 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -65,11 +65,44 @@ static const struct dri_debug_control debug_control[] = { NULL, 0 } }; +#define need_GL_ARB_vertex_program +#include "extension_helper.h" + const struct dri_extension common_extensions[] = { { NULL, 0 } }; +const struct dri_extension nv10_extensions[] = +{ + { NULL, 0 } +}; + +const struct dri_extension nv20_extensions[] = +{ + { NULL, 0 } +}; + +const struct dri_extension nv30_extensions[] = +{ + { "GL_ARB_fragment_program", NULL }, + { NULL, 0 } +}; + +const struct dri_extension nv40_extensions[] = +{ + /* ARB_vp can be moved to nv20/30 once the shader backend has been + * written for those cards. + */ + { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, + { NULL, 0 } +}; + +const struct dri_extension nv50_extensions[] = +{ + { NULL, 0 } +}; + /* Create the device specific context. */ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, @@ -137,6 +170,18 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, nmesa->sarea = (drm_nouveau_sarea_t *)((char *)sPriv->pSAREA + screen->sarea_priv_offset); + /* Enable any supported extensions */ + driInitExtensions(ctx, common_extensions, GL_TRUE); + if (nmesa->screen->card->type >= NV_10) + driInitExtensions(ctx, nv10_extensions, GL_FALSE); + if (nmesa->screen->card->type >= NV_20) + driInitExtensions(ctx, nv20_extensions, GL_FALSE); + if (nmesa->screen->card->type >= NV_30) + driInitExtensions(ctx, nv30_extensions, GL_FALSE); + if (nmesa->screen->card->type >= NV_40) + driInitExtensions(ctx, nv40_extensions, GL_FALSE); + if (nmesa->screen->card->type >= NV_50) + driInitExtensions(ctx, nv50_extensions, GL_FALSE); nmesa->current_primitive = -1; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 93f66826e8..8e548dbcbd 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -53,6 +53,11 @@ DRI_CONF_END; static const GLuint __driNConfigOptions = 1; extern const struct dri_extension common_extensions[]; +extern const struct dri_extension nv10_extensions[]; +extern const struct dri_extension nv20_extensions[]; +extern const struct dri_extension nv30_extensions[]; +extern const struct dri_extension nv40_extensions[]; +extern const struct dri_extension nv50_extensions[]; static nouveauScreenPtr nouveauCreateScreen(__DRIscreenPrivate *sPriv) { @@ -352,6 +357,11 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc * Hello chicken. Hello egg. How are you two today? */ driInitExtensions( NULL, common_extensions, GL_FALSE ); + driInitExtensions( NULL, nv10_extensions, GL_FALSE ); + driInitExtensions( NULL, nv10_extensions, GL_FALSE ); + driInitExtensions( NULL, nv30_extensions, GL_FALSE ); + driInitExtensions( NULL, nv40_extensions, GL_FALSE ); + driInitExtensions( NULL, nv50_extensions, GL_FALSE ); } return (void *) psp; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index 4dedefe5a3..e3082ebc69 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -184,7 +184,6 @@ nouveauShaderInitFuncs(GLcontext * ctx) return; } - _mesa_enable_extension(ctx, "GL_ARB_vertex_program"); ctx->Const.VertexProgram.MaxNativeInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeAluInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeTexInstructions = nmesa->VPfunc.MaxInst; @@ -196,8 +195,6 @@ nouveauShaderInitFuncs(GLcontext * ctx) ctx->Const.VertexProgram.MaxNativeParameters = nmesa->VPfunc.MaxConst; if (nmesa->screen->card->type >= NV_30) { - _mesa_enable_extension(ctx, "GL_ARB_fragment_program"); - ctx->Const.FragmentProgram.MaxNativeInstructions = nmesa->FPfunc.MaxInst; ctx->Const.FragmentProgram.MaxNativeAluInstructions = nmesa->FPfunc.MaxInst; ctx->Const.FragmentProgram.MaxNativeTexInstructions = nmesa->FPfunc.MaxInst; -- cgit v1.2.3 From 65c54a685a0ac7d08ad608c25d0e3c318f8be43f Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Dec 2006 16:39:12 +0000 Subject: Resend spot light parameters when part of it changes --- src/mesa/drivers/dri/nouveau/nv10_state.c | 87 ++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 26 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index da26ccba87..bb9abe9867 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -326,11 +326,18 @@ static void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) // void (*IndexMask)(GLcontext *ctx, GLuint mask); +enum { + SPOTLIGHT_UPDATE_EXPONENT, + SPOTLIGHT_UPDATE_DIRECTION, + SPOTLIGHT_UPDATE_ALL +}; + static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLint p = light - GL_LIGHT0; struct gl_light *l = &ctx->Light.Light[p]; + int spotlightUpdate = -1; switch(pname) { @@ -352,41 +359,20 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; - case GL_SPOT_DIRECTION: - { - GLfloat x,y,z; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); - OUT_RING_CACHEf(x); - OUT_RING_CACHEf(y); - OUT_RING_CACHEf(z); - } - break; case GL_POSITION: BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; + case GL_SPOT_DIRECTION: + spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + break; case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(p), 1); - OUT_RING_CACHEf(*params); + spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; break; case GL_SPOT_CUTOFF: - /* you can't factor these */ - { - GLfloat c; - c = -2.0 * (0.5 + l->_CosCutoff); - - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 1); - OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(p), 1); - OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(p), 1); - OUT_RING_CACHEf(c); - } + spotlightUpdate = SPOTLIGHT_UPDATE_ALL; break; case GL_CONSTANT_ATTENUATION: BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); @@ -403,6 +389,55 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa default: break; } + + switch(spotlightUpdate) { + case SPOTLIGHT_UPDATE_DIRECTION: + { + GLfloat x,y,z; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + } + break; + case SPOTLIGHT_UPDATE_EXPONENT: + { + GLfloat cc,lc,qc; + cc = 1.0; /* These need to be correctly computed */ + lc = 0.0; + qc = 2.0; + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 3); + OUT_RING_CACHEf(cc); + OUT_RING_CACHEf(lc); + OUT_RING_CACHEf(qc); + } + break; + case SPOTLIGHT_UPDATE_ALL: + { + GLfloat cc,lc,qc, x,y,z, c; + cc = 1.0; /* These need to be correctly computed */ + lc = 0.0; + qc = 2.0; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + c = -2.0 * (0.5 + l->_CosCutoff); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 7); + OUT_RING_CACHEf(cc); + OUT_RING_CACHEf(lc); + OUT_RING_CACHEf(qc); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + OUT_RING_CACHEf(c); + } + break; + default: + break; + } } /** Set the lighting model parameters */ -- cgit v1.2.3 From 5c80270b91a3054a00a3c95f7b15b7398c8dccab Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Dec 2006 16:40:34 +0000 Subject: grr, always check twice before commit --- src/mesa/drivers/dri/nouveau/nv10_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index bb9abe9867..ed688a076b 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -369,7 +369,7 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; break; case GL_SPOT_EXPONENT: - spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + spotlightUpdate = SPOTLIGHT_UPDATE_EXPONENT; break; case GL_SPOT_CUTOFF: spotlightUpdate = SPOTLIGHT_UPDATE_ALL; -- cgit v1.2.3 From aadcf1a9ff7e3f92977380d16b4ad2e676d7eb18 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 8 Dec 2006 18:56:51 +0000 Subject: Update spot light params also for nv20 and nv30 --- src/mesa/drivers/dri/nouveau/nv10_state.c | 4 +- src/mesa/drivers/dri/nouveau/nv20_state.c | 87 ++++++++++++++++++++++--------- src/mesa/drivers/dri/nouveau/nv30_state.c | 87 ++++++++++++++++++++++--------- 3 files changed, 124 insertions(+), 54 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index ed688a076b..e88ac2bfe6 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -406,7 +406,7 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa case SPOTLIGHT_UPDATE_EXPONENT: { GLfloat cc,lc,qc; - cc = 1.0; /* These need to be correctly computed */ + cc = 1.0; /* FIXME: These need to be correctly computed */ lc = 0.0; qc = 2.0; BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 3); @@ -418,7 +418,7 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa case SPOTLIGHT_UPDATE_ALL: { GLfloat cc,lc,qc, x,y,z, c; - cc = 1.0; /* These need to be correctly computed */ + cc = 1.0; /* FIXME: These need to be correctly computed */ lc = 0.0; qc = 2.0; x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index 082dc64b83..ff06d481ee 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -337,11 +337,18 @@ static void nv20Hint(GLcontext *ctx, GLenum target, GLenum mode) // void (*IndexMask)(GLcontext *ctx, GLuint mask); +enum { + SPOTLIGHT_UPDATE_EXPONENT, + SPOTLIGHT_UPDATE_DIRECTION, + SPOTLIGHT_UPDATE_ALL +}; + static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLint p = light - GL_LIGHT0; struct gl_light *l = &ctx->Light.Light[p]; + int spotlightUpdate = -1; /* not sure where the fourth param value goes...*/ switch(pname) @@ -364,41 +371,20 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; - case GL_SPOT_DIRECTION: - { - GLfloat x,y,z; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); - OUT_RING_CACHEf(x); - OUT_RING_CACHEf(y); - OUT_RING_CACHEf(z); - } - break; case GL_POSITION: BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; + case GL_SPOT_DIRECTION: + spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + break; case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(p), 1); - OUT_RING_CACHEf(*params); + spotlightUpdate = SPOTLIGHT_UPDATE_EXPONENT; break; case GL_SPOT_CUTOFF: - /* you can't factor these */ - { - GLfloat c; - c = -2.0 * (0.5 + l->_CosCutoff); - - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 1); - OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(p), 1); - OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(p), 1); - OUT_RING_CACHEf(c); - } + spotlightUpdate = SPOTLIGHT_UPDATE_ALL; break; case GL_CONSTANT_ATTENUATION: BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); @@ -415,6 +401,55 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa default: break; } + + switch(spotlightUpdate) { + case SPOTLIGHT_UPDATE_DIRECTION: + { + GLfloat x,y,z; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + } + break; + case SPOTLIGHT_UPDATE_EXPONENT: + { + GLfloat cc,lc,qc; + cc = 1.0; /* FIXME: These need to be correctly computed */ + lc = 0.0; + qc = 2.0; + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 3); + OUT_RING_CACHEf(cc); + OUT_RING_CACHEf(lc); + OUT_RING_CACHEf(qc); + } + break; + case SPOTLIGHT_UPDATE_ALL: + { + GLfloat cc,lc,qc, x,y,z, c; + cc = 1.0; /* FIXME: These need to be correctly computed */ + lc = 0.0; + qc = 2.0; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + c = -2.0 * (0.5 + l->_CosCutoff); + BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 7); + OUT_RING_CACHEf(cc); + OUT_RING_CACHEf(lc); + OUT_RING_CACHEf(qc); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + OUT_RING_CACHEf(c); + } + break; + default: + break; + } } /** Set the lighting model parameters */ diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index f0b37a76f5..e30dc8a37c 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -366,11 +366,18 @@ static void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) // void (*IndexMask)(GLcontext *ctx, GLuint mask); +enum { + SPOTLIGHT_UPDATE_EXPONENT, + SPOTLIGHT_UPDATE_DIRECTION, + SPOTLIGHT_UPDATE_ALL +}; + static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLint p = light - GL_LIGHT0; struct gl_light *l = &ctx->Light.Light[p]; + int spotlightUpdate = -1; if (NOUVEAU_CARD_USING_SHADERS) return; @@ -396,41 +403,20 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; - case GL_SPOT_DIRECTION: - { - GLfloat x,y,z; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); - OUT_RING_CACHEf(x); - OUT_RING_CACHEf(y); - OUT_RING_CACHEf(z); - } - break; case GL_POSITION: BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(p), 3); OUT_RING_CACHEf(params[0]); OUT_RING_CACHEf(params[1]); OUT_RING_CACHEf(params[2]); break; + case GL_SPOT_DIRECTION: + spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + break; case GL_SPOT_EXPONENT: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(p), 1); - OUT_RING_CACHEf(*params); + spotlightUpdate = SPOTLIGHT_UPDATE_EXPONENT; break; case GL_SPOT_CUTOFF: - /* you can't factor these */ - { - GLfloat c; - c = -2.0 * (0.5 + l->_CosCutoff); - - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 1); - OUT_RING_CACHEf(params[0]); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(p), 1); - OUT_RING_CACHEf(params[1]); - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(p), 1); - OUT_RING_CACHEf(c); - } + spotlightUpdate = SPOTLIGHT_UPDATE_ALL; break; case GL_CONSTANT_ATTENUATION: BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); @@ -447,6 +433,55 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa default: break; } + + switch(spotlightUpdate) { + case SPOTLIGHT_UPDATE_DIRECTION: + { + GLfloat x,y,z; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + } + break; + case SPOTLIGHT_UPDATE_EXPONENT: + { + GLfloat cc,lc,qc; + cc = 1.0; /* FIXME: These need to be correctly computed */ + lc = 0.0; + qc = 2.0; + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 3); + OUT_RING_CACHEf(cc); + OUT_RING_CACHEf(lc); + OUT_RING_CACHEf(qc); + } + break; + case SPOTLIGHT_UPDATE_ALL: + { + GLfloat cc,lc,qc, x,y,z, c; + cc = 1.0; /* FIXME: These need to be correctly computed */ + lc = 0.0; + qc = 2.0; + x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; + y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; + z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + c = -2.0 * (0.5 + l->_CosCutoff); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 7); + OUT_RING_CACHEf(cc); + OUT_RING_CACHEf(lc); + OUT_RING_CACHEf(qc); + OUT_RING_CACHEf(x); + OUT_RING_CACHEf(y); + OUT_RING_CACHEf(z); + OUT_RING_CACHEf(c); + } + break; + default: + break; + } } /** Set the lighting model parameters */ -- cgit v1.2.3 From d7b24fec245f90db4b8c66f4f7c167b8f20a9b9e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 9 Dec 2006 22:35:07 -0800 Subject: i965: Fix a crash with wine by not allocating >1MB on the stack. --- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_wm.c | 49 ++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 19 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index a57c794834..cac4d86d3a 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -599,6 +599,7 @@ struct brw_context struct { struct brw_wm_prog_data *prog_data; + struct brw_wm_compile *compile_data; /* Input sizes, calculated from active vertex program: */ diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 3e2f2d06b8..0f842d289d 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -138,64 +138,75 @@ static void do_wm_prog( struct brw_context *brw, struct brw_fragment_program *fp, struct brw_wm_prog_key *key) { - struct brw_wm_compile c; + struct brw_wm_compile *c; const GLuint *program; GLuint program_size; - memset(&c, 0, sizeof(c)); - memcpy(&c.key, key, sizeof(*key)); + c = brw->wm.compile_data; + if (c == NULL) { + brw->wm.compile_data = calloc(1, sizeof(*brw->wm.compile_data)); + c = brw->wm.compile_data; + } else { + memset(c, 0, sizeof(*brw->wm.compile_data)); + } + memcpy(&c->key, key, sizeof(*key)); - c.fp = fp; - c.env_param = brw->intel.ctx.FragmentProgram.Parameters; + c->fp = fp; + c->env_param = brw->intel.ctx.FragmentProgram.Parameters; /* Augment fragment program. Add instructions for pre- and * post-fragment-program tasks such as interpolation and fogging. */ - brw_wm_pass_fp(&c); + brw_wm_pass_fp(c); /* Translate to intermediate representation. Build register usage * chains. */ - brw_wm_pass0(&c); + brw_wm_pass0(c); /* Dead code removal. */ - brw_wm_pass1(&c); + brw_wm_pass1(c); /* Hal optimization */ - brw_wm_pass_hal (&c); + brw_wm_pass_hal (c); /* Register allocation. */ - c.grf_limit = BRW_WM_MAX_GRF/2; + c->grf_limit = BRW_WM_MAX_GRF/2; /* This is where we start emitting gen4 code: */ - brw_init_compile(&c.func); + brw_init_compile(&c->func); - brw_wm_pass2(&c); + brw_wm_pass2(c); - c.prog_data.total_grf = c.max_wm_grf; - c.prog_data.total_scratch = c.last_scratch ? c.last_scratch + 0x40 : 0; + c->prog_data.total_grf = c->max_wm_grf; + if (c->last_scratch) { + c->prog_data.total_scratch = + c->last_scratch + 0x40; + } else { + c->prog_data.total_scratch = 0; + } /* Emit GEN4 code. */ - brw_wm_emit(&c); + brw_wm_emit(c); /* get the program */ - program = brw_get_program(&c.func, &program_size); + program = brw_get_program(&c->func, &program_size); /* */ brw->wm.prog_gs_offset = brw_upload_cache( &brw->cache[BRW_WM_PROG], - &c.key, - sizeof(c.key), + &c->key, + sizeof(c->key), program, program_size, - &c.prog_data, + &c->prog_data, &brw->wm.prog_data ); } -- cgit v1.2.3 From eed1a6de4b396ed6305cf34812a269c10c746d3c Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 7 Dec 2006 17:53:59 +0200 Subject: Bug 7790: Polygons incorrectly clipped by mach64 driver un-break strict-aliasing rules --- src/mesa/drivers/dri/mach64/mach64_tris.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.c b/src/mesa/drivers/dri/mach64/mach64_tris.c index 4a0044be88..08cc1849a1 100644 --- a/src/mesa/drivers/dri/mach64/mach64_tris.c +++ b/src/mesa/drivers/dri/mach64/mach64_tris.c @@ -1583,7 +1583,10 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, mach64ContextPtr mmesa = MACH64_CONTEXT( ctx ); const GLuint vertsize = mmesa->vertex_size; GLint a; - GLfloat ooa; + union { + GLfloat f; + CARD32 u; + } ooa; GLuint xy; const GLuint xyoffset = 9; GLint xx[3], yy[3]; /* 2 fractional bits for hardware */ @@ -1621,7 +1624,7 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, return; } - ooa = 16.0 / a; + ooa.f = 16.0 / a; vb = (CARD32 *)mach64AllocDmaLow( mmesa, vbsiz * sizeof(CARD32) ); vbchk = vb + vbsiz; @@ -1629,7 +1632,7 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, COPY_VERTEX( vb, vertsize, v0, 1 ); COPY_VERTEX( vb, vertsize, v1, 2 ); COPY_VERTEX_OOA( vb, vertsize, v2, 3 ); - LE32_OUT( vb++, *(CARD32 *)&ooa ); + LE32_OUT( vb++, ooa.u ); i = 3; while (1) { @@ -1644,10 +1647,10 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, a = (xx[0] - xx[2]) * (yy[1] - yy[2]) - (yy[0] - yy[2]) * (xx[1] - xx[2]); - ooa = 16.0 / a; + ooa.f = 16.0 / a; COPY_VERTEX_OOA( vb, vertsize, v0, 1 ); - LE32_OUT( vb++, *(CARD32 *)&ooa ); + LE32_OUT( vb++, ooa.u ); if (i >= n) break; @@ -1660,10 +1663,10 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, a = (xx[0] - xx[2]) * (yy[1] - yy[2]) - (yy[0] - yy[2]) * (xx[1] - xx[2]); - ooa = 16.0 / a; + ooa.f = 16.0 / a; COPY_VERTEX_OOA( vb, vertsize, v1, 2 ); - LE32_OUT( vb++, *(CARD32 *)&ooa ); + LE32_OUT( vb++, ooa.u ); } assert( vb == vbchk ); -- cgit v1.2.3 From c180678d92e6427c60acd4e984c11d27853e1304 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 7 Dec 2006 17:56:47 +0200 Subject: Bug 7861: mach64 with render acceleration should restore texture state RENDER acceleration uses texturing, thus when RENDER acceleration is enabled, the mach64 DRI driver should restore texture state when acquiring the DRI lock. --- src/mesa/drivers/dri/mach64/mach64_lock.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/mach64/mach64_lock.c b/src/mesa/drivers/dri/mach64/mach64_lock.c index b214495d9a..26f66f0230 100644 --- a/src/mesa/drivers/dri/mach64/mach64_lock.c +++ b/src/mesa/drivers/dri/mach64/mach64_lock.c @@ -82,6 +82,9 @@ void mach64GetLock( mach64ContextPtr mmesa, GLuint flags ) | MACH64_UPLOAD_MISC | MACH64_UPLOAD_CLIPRECTS); + /* EXA render acceleration uses the texture engine, so restore it */ + mmesa->dirty |= (MACH64_UPLOAD_TEXTURE); + if ( sarea->ctx_owner != mmesa->hHWContext ) { sarea->ctx_owner = mmesa->hHWContext; mmesa->dirty = MACH64_UPLOAD_ALL; -- cgit v1.2.3 From 5b35132b41427798e02a66a8e39583fffbe9d232 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 7 Dec 2006 18:01:13 +0200 Subject: Bug 7260: mach64 texture memory mng cleanup mach64 uses its own set of texture memory management routines which are buggy, running a second DRI client kills the first one. This patch ports mach64 code to the stock dri texture managment code. --- src/mesa/drivers/dri/mach64/mach64_context.c | 76 +-- src/mesa/drivers/dri/mach64/mach64_context.h | 57 +-- src/mesa/drivers/dri/mach64/mach64_lock.c | 4 +- src/mesa/drivers/dri/mach64/mach64_screen.c | 2 +- src/mesa/drivers/dri/mach64/mach64_tex.c | 131 ++---- src/mesa/drivers/dri/mach64/mach64_tex.h | 10 - src/mesa/drivers/dri/mach64/mach64_texmem.c | 655 ++++++-------------------- src/mesa/drivers/dri/mach64/mach64_texstate.c | 135 ++---- 8 files changed, 305 insertions(+), 765 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 03ec96a222..2ab1cf2617 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -102,6 +102,7 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, mach64ContextPtr mmesa; mach64ScreenPtr mach64Screen; int i, heap; + GLuint *c_textureSwapsPtr = NULL; #if DO_DEBUG MACH64_DEBUG = driParseDebugString(getenv("MACH64_DEBUG"), debug_control); @@ -153,15 +154,28 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, mmesa->CurrentTexObj[0] = NULL; mmesa->CurrentTexObj[1] = NULL; - make_empty_list( &mmesa->SwappedOut ); + (void) memset( mmesa->texture_heaps, 0, sizeof( mmesa->texture_heaps ) ); + make_empty_list( &mmesa->swapped ); mmesa->firstTexHeap = mach64Screen->firstTexHeap; mmesa->lastTexHeap = mach64Screen->firstTexHeap + mach64Screen->numTexHeaps; for ( i = mmesa->firstTexHeap ; i < mmesa->lastTexHeap ; i++ ) { - make_empty_list( &mmesa->TexObjList[i] ); - mmesa->texHeap[i] = mmInit( 0, mach64Screen->texSize[i] ); - mmesa->lastTexAge[i] = -1; + mmesa->texture_heaps[i] = driCreateTextureHeap( i, mmesa, + mach64Screen->texSize[i], + 6, /* align to 64-byte boundary, use 12 for page-size boundary */ + MACH64_NR_TEX_REGIONS, + (drmTextureRegionPtr)mmesa->sarea->tex_list[i], + &mmesa->sarea->tex_age[i], + &mmesa->swapped, + sizeof( mach64TexObj ), + (destroy_texture_object_t *) mach64DestroyTexObj ); + +#if ENABLE_PERF_BOXES + c_textureSwapsPtr = & mmesa->c_textureSwaps; +#endif + driSetTextureSwapCounterLocation( mmesa->texture_heaps[i], + c_textureSwapsPtr ); } mmesa->RenderIndex = -1; /* Impossible value */ @@ -176,17 +190,25 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, * Test for 2 textures * bytes/texel * size * size. There's no * need to account for mipmaps since we only upload one level. */ - heap = mach64Screen->IsPCI ? MACH64_CARD_HEAP : MACH64_AGP_HEAP; - - if ( mach64Screen->texSize[heap] >= 2 * mach64Screen->cpp * 1024*1024 ) { - ctx->Const.MaxTextureLevels = 11; /* 1024x1024 */ - } else if ( mach64Screen->texSize[heap] >= 2 * mach64Screen->cpp * 512*512 ) { - ctx->Const.MaxTextureLevels = 10; /* 512x512 */ - } else { - ctx->Const.MaxTextureLevels = 9; /* 256x256 */ - } ctx->Const.MaxTextureUnits = 2; + ctx->Const.MaxTextureImageUnits = 2; + ctx->Const.MaxTextureCoordUnits = 2; + + heap = mach64Screen->IsPCI ? MACH64_CARD_HEAP : MACH64_AGP_HEAP; + + driCalculateMaxTextureLevels( & mmesa->texture_heaps[heap], + 1, + & ctx->Const, + mach64Screen->cpp, + 10, /* max 2D texture size is 1024x1024 */ + 0, /* 3D textures unsupported. */ + 0, /* cube textures unsupported. */ + 0, /* texture rectangles unsupported. */ + 1, /* mipmapping unsupported. */ + GL_TRUE, /* need to have both textures in + either local or AGP memory */ + 0 ); #if ENABLE_PERF_BOXES mmesa->boxes = ( getenv( "LIBGL_PERFORMANCE_BOXES" ) != NULL ); @@ -250,31 +272,29 @@ void mach64DestroyContext( __DRIcontextPrivate *driContextPriv ) assert(mmesa); /* should never be null */ if ( mmesa ) { - if (mmesa->glCtx->Shared->RefCount == 1) { + GLboolean release_texture_heaps; + + release_texture_heaps = (mmesa->glCtx->Shared->RefCount == 1); + + _swsetup_DestroyContext( mmesa->glCtx ); + _tnl_DestroyContext( mmesa->glCtx ); + _ac_DestroyContext( mmesa->glCtx ); + _swrast_DestroyContext( mmesa->glCtx ); + + if (release_texture_heaps) { /* This share group is about to go away, free our private * texture object data. */ - mach64TexObjPtr t, next_t; int i; for ( i = mmesa->firstTexHeap ; i < mmesa->lastTexHeap ; i++ ) { - foreach_s ( t, next_t, &mmesa->TexObjList[i] ) { - mach64DestroyTexObj( mmesa, t ); - } - mmDestroy( mmesa->texHeap[i] ); - mmesa->texHeap[i] = NULL; + driDestroyTextureHeap( mmesa->texture_heaps[i] ); + mmesa->texture_heaps[i] = NULL; } - foreach_s ( t, next_t, &mmesa->SwappedOut ) { - mach64DestroyTexObj( mmesa, t ); - } + assert( is_empty_list( & mmesa->swapped ) ); } - _swsetup_DestroyContext( mmesa->glCtx ); - _tnl_DestroyContext( mmesa->glCtx ); - _ac_DestroyContext( mmesa->glCtx ); - _swrast_DestroyContext( mmesa->glCtx ); - mach64FreeVB( mmesa->glCtx ); /* Free the vertex buffer */ diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h index e718b96c18..8d89452412 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.h +++ b/src/mesa/drivers/dri/mach64/mach64_context.h @@ -134,46 +134,17 @@ typedef void (*mach64_line_func)( mach64ContextPtr, typedef void (*mach64_point_func)( mach64ContextPtr, mach64Vertex * ); -#ifdef TEXMEM struct mach64_texture_object { driTextureObject base; - GLuint offset; + GLuint bufAddr; - GLuint dirty; - GLuint age; + GLint heap; /* same as base.heap->heapId */ - GLint widthLog2; - GLint heightLog2; - GLint maxLog2; - - GLint hasAlpha; - GLint textureFormat; - - /* Have to keep these separate due to how they are programmed. - * FIXME: Why don't we just use the tObj values? + /* For communicating values from mach64AllocTexObj(), mach64SetTexImages() + * to mach64UpdateTextureUnit(). Alternately, we can use the tObj values or + * set the context registers directly. */ - GLboolean BilinearMin; - GLboolean BilinearMag; - GLboolean ClampS; - GLboolean ClampT; -}; -#else -struct mach64_texture_object { - struct mach64_texture_object *next; - struct mach64_texture_object *prev; - struct gl_texture_object *tObj; - - struct mem_block *memBlock; - GLuint offset; - GLuint size; - - GLuint dirty; - GLuint age; - - GLint bound; - GLint heap; - GLint widthLog2; GLint heightLog2; GLint maxLog2; @@ -181,19 +152,14 @@ struct mach64_texture_object { GLint hasAlpha; GLint textureFormat; - /* Have to keep these separate due to how they are programmed. - * FIXME: Why don't we just use the tObj values? - */ GLboolean BilinearMin; GLboolean BilinearMag; GLboolean ClampS; GLboolean ClampT; }; -#endif typedef struct mach64_texture_object mach64TexObj, *mach64TexObjPtr; - struct mach64_context { GLcontext *glCtx; @@ -229,17 +195,10 @@ struct mach64_context { /* Texture object bookkeeping */ mach64TexObjPtr CurrentTexObj[2]; -#ifdef TEXMEM - unsigned nr_heaps; - driTexHeap * texture_heaps[ R128_NR_TEX_HEAPS ]; - driTextureObject swapped; -#else - mach64TexObj TexObjList[MACH64_NR_TEX_HEAPS]; - mach64TexObj SwappedOut; - struct mem_block *texHeap[MACH64_NR_TEX_HEAPS]; - GLuint lastTexAge[MACH64_NR_TEX_HEAPS]; + GLint firstTexHeap, lastTexHeap; -#endif + driTexHeap *texture_heaps[MACH64_NR_TEX_HEAPS]; + driTextureObject swapped; /* Fallback rasterization functions */ diff --git a/src/mesa/drivers/dri/mach64/mach64_lock.c b/src/mesa/drivers/dri/mach64/mach64_lock.c index 26f66f0230..b73e350111 100644 --- a/src/mesa/drivers/dri/mach64/mach64_lock.c +++ b/src/mesa/drivers/dri/mach64/mach64_lock.c @@ -91,8 +91,6 @@ void mach64GetLock( mach64ContextPtr mmesa, GLuint flags ) } for ( i = mmesa->firstTexHeap ; i < mmesa->lastTexHeap ; i++ ) { - if ( mmesa->texHeap[i] && (sarea->tex_age[i] != mmesa->lastTexAge[i]) ) { - mach64AgeTextures( mmesa, i ); - } + DRI_AGE_TEXTURES( mmesa->texture_heaps[i] ); } } diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index b17de01acc..1014b8acd5 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -305,7 +305,7 @@ mach64CreateScreen( __DRIscreenPrivate *sPriv ) mach64Screen->texSize[MACH64_AGP_HEAP] = 0; mach64Screen->logTexGranularity[MACH64_AGP_HEAP] = 0; } else { - if (mach64Screen->texSize[MACH64_CARD_HEAP] > 0) { + if (serverInfo->textureSize > 0) { mach64Screen->numTexHeaps = MACH64_NR_TEX_HEAPS; mach64Screen->firstTexHeap = MACH64_CARD_HEAP; } else { diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.c b/src/mesa/drivers/dri/mach64/mach64_tex.c index 6459deef78..5288d321ce 100644 --- a/src/mesa/drivers/dri/mach64/mach64_tex.c +++ b/src/mesa/drivers/dri/mach64/mach64_tex.c @@ -116,21 +116,20 @@ mach64AllocTexObj( struct gl_texture_object *texObj ) fprintf( stderr, "%s( %p )\n", __FUNCTION__, texObj ); t = (mach64TexObjPtr) CALLOC_STRUCT( mach64_texture_object ); + texObj->DriverData = t; if ( !t ) return NULL; /* Initialize non-image-dependent parts of the state: */ - t->tObj = texObj; + t->base.tObj = texObj; + t->base.dirty_images[0] = (1 << 0); - t->offset = 0; + t->bufAddr = 0; - t->dirty = 1; - - make_empty_list( t ); + make_empty_list( (driTextureObject *) t ); mach64SetTexWrap( t, texObj->WrapS, texObj->WrapT ); - /*mach64SetTexMaxAnisotropy( t, texObj->MaxAnisotropy );*/ mach64SetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); mach64SetTexBorderColor( t, texObj->_BorderChan ); @@ -251,18 +250,17 @@ static void mach64TexImage1D( GLcontext *ctx, GLenum target, GLint level, struct gl_texture_image *texImage ) { mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); - mach64TexObjPtr t = (mach64TexObjPtr) texObj->DriverData; + driTextureObject * t = (driTextureObject *) texObj->DriverData; if ( t ) { - mach64SwapOutTexObj( mmesa, t ); + driSwapOutTextureObject( t ); } else { - t = mach64AllocTexObj(texObj); + t = (driTextureObject *) mach64AllocTexObj(texObj); if (!t) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); return; } - texObj->DriverData = t; } /* Note, this will call mach64ChooseTextureFormat */ @@ -285,19 +283,18 @@ static void mach64TexSubImage1D( GLcontext *ctx, struct gl_texture_image *texImage ) { mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); - mach64TexObjPtr t = (mach64TexObjPtr) texObj->DriverData; + driTextureObject * t = (driTextureObject *) texObj->DriverData; assert( t ); /* this _should_ be true */ if ( t ) { - mach64SwapOutTexObj( mmesa, t ); + driSwapOutTextureObject( t ); } else { - t = mach64AllocTexObj(texObj); + t = (driTextureObject *) mach64AllocTexObj(texObj); if (!t) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D"); return; } - texObj->DriverData = t; } _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, @@ -316,18 +313,17 @@ static void mach64TexImage2D( GLcontext *ctx, GLenum target, GLint level, struct gl_texture_image *texImage ) { mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); - mach64TexObjPtr t = (mach64TexObjPtr) texObj->DriverData; + driTextureObject * t = (driTextureObject *) texObj->DriverData; if ( t ) { - mach64SwapOutTexObj( mmesa, t ); + driSwapOutTextureObject( t ); } else { - t = mach64AllocTexObj(texObj); + t = (driTextureObject *) mach64AllocTexObj(texObj); if (!t) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); return; } - texObj->DriverData = t; } /* Note, this will call mach64ChooseTextureFormat */ @@ -350,19 +346,18 @@ static void mach64TexSubImage2D( GLcontext *ctx, struct gl_texture_image *texImage ) { mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); - mach64TexObjPtr t = (mach64TexObjPtr) texObj->DriverData; + driTextureObject * t = (driTextureObject *) texObj->DriverData; assert( t ); /* this _should_ be true */ if ( t ) { - mach64SwapOutTexObj( mmesa, t ); + driSwapOutTextureObject( t ); } else { - t = mach64AllocTexObj(texObj); + t = (driTextureObject *) mach64AllocTexObj(texObj); if (!t) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D"); return; } - texObj->DriverData = t; } _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, @@ -372,44 +367,6 @@ static void mach64TexSubImage2D( GLcontext *ctx, mmesa->new_state |= MACH64_NEW_TEXTURE; } -/* Due to the way we must program texture state into the Rage Pro, - * we must leave these calculations to the absolute last minute. - */ -void mach64EmitTexStateLocked( mach64ContextPtr mmesa, - mach64TexObjPtr t0, - mach64TexObjPtr t1 ) -{ - drm_mach64_sarea_t *sarea = mmesa->sarea; - drm_mach64_context_regs_t *regs = &(mmesa->setup); - - /* for multitex, both textures must be local or AGP */ - if ( t0 && t1 ) - assert(t0->heap == t1->heap); - - if ( t0 ) { - if (t0->heap == MACH64_CARD_HEAP) { -#if ENABLE_PERF_BOXES - mmesa->c_texsrc_card++; -#endif - mmesa->setup.tex_cntl &= ~MACH64_TEX_SRC_AGP; - } else { -#if ENABLE_PERF_BOXES - mmesa->c_texsrc_agp++; -#endif - mmesa->setup.tex_cntl |= MACH64_TEX_SRC_AGP; - } - mmesa->setup.tex_offset = t0->offset; - } - - if ( t1 ) { - mmesa->setup.secondary_tex_off = t1->offset; - } - - memcpy( &sarea->context_state.tex_size_pitch, ®s->tex_size_pitch, - MACH64_NR_TEXTURE_REGS * sizeof(GLuint) ); -} - - /* ================================================================ * Device Driver API texture functions */ @@ -491,24 +448,23 @@ static void mach64DDTexParameter( GLcontext *ctx, GLenum target, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexParameter"); return; } - tObj->DriverData = t; } switch ( pname ) { case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_MAG_FILTER: - if ( t->bound ) FLUSH_BATCH( mmesa ); + if ( t->base.bound ) FLUSH_BATCH( mmesa ); mach64SetTexFilter( t, tObj->MinFilter, tObj->MagFilter ); break; case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: - if ( t->bound ) FLUSH_BATCH( mmesa ); + if ( t->base.bound ) FLUSH_BATCH( mmesa ); mach64SetTexWrap( t, tObj->WrapS, tObj->WrapT ); break; case GL_TEXTURE_BORDER_COLOR: - if ( t->bound ) FLUSH_BATCH( mmesa ); + if ( t->base.bound ) FLUSH_BATCH( mmesa ); mach64SetTexBorderColor( t, tObj->_BorderChan ); break; @@ -522,8 +478,8 @@ static void mach64DDTexParameter( GLcontext *ctx, GLenum target, * For mach64 we're only concerned with the base level * since that's the only texture we upload. */ - if ( t->bound ) FLUSH_BATCH( mmesa ); - mach64SwapOutTexObj( mmesa, t ); + if ( t->base.bound ) FLUSH_BATCH( mmesa ); + driSwapOutTextureObject( (driTextureObject *) t ); break; default: @@ -547,7 +503,7 @@ static void mach64DDBindTexture( GLcontext *ctx, GLenum target, FLUSH_BATCH( mmesa ); if ( mmesa->CurrentTexObj[unit] ) { - mmesa->CurrentTexObj[unit]->bound &= ~(unit+1); + mmesa->CurrentTexObj[unit]->base.bound &= ~(1 << unit); mmesa->CurrentTexObj[unit] = NULL; } @@ -558,33 +514,37 @@ static void mach64DDDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) { mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); - mach64TexObjPtr t = (mach64TexObjPtr)tObj->DriverData; + driTextureObject * t = (driTextureObject *) tObj->DriverData; if ( t ) { if ( t->bound && mmesa ) { FLUSH_BATCH( mmesa ); - mmesa->CurrentTexObj[t->bound-1] = 0; mmesa->new_state |= MACH64_NEW_TEXTURE; } - mach64DestroyTexObj( mmesa, t ); - tObj->DriverData = NULL; + driDestroyTextureObject( t ); + /* Free mipmap images and the texture object itself */ _mesa_delete_texture_object(ctx, tObj); - } } -static GLboolean mach64DDIsTextureResident( GLcontext *ctx, - struct gl_texture_object *tObj ) +/** + * Allocate a new texture object. + * Called via ctx->Driver.NewTextureObject. + * Note: we could use containment here to 'derive' the driver-specific + * texture object from the core mesa gl_texture_object. Not done at this time. + */ +static struct gl_texture_object * +mach64NewTextureObject( GLcontext *ctx, GLuint name, GLenum target ) { - mach64TexObjPtr t = (mach64TexObjPtr)tObj->DriverData; - - return ( t && t->memBlock ); + struct gl_texture_object *obj; + obj = _mesa_new_texture_object(ctx, name, target); + mach64AllocTexObj( obj ); + return obj; } - void mach64InitTextureFuncs( struct dd_function_table *functions ) { functions->TexEnv = mach64DDTexEnv; @@ -593,18 +553,15 @@ void mach64InitTextureFuncs( struct dd_function_table *functions ) functions->TexSubImage1D = mach64TexSubImage1D; functions->TexImage2D = mach64TexImage2D; functions->TexSubImage2D = mach64TexSubImage2D; - functions->TexImage3D = _mesa_store_teximage3d; - functions->TexSubImage3D = _mesa_store_texsubimage3d; - functions->CopyTexImage1D = _swrast_copy_teximage1d; - functions->CopyTexImage2D = _swrast_copy_teximage2d; - functions->CopyTexSubImage1D = _swrast_copy_texsubimage1d; - functions->CopyTexSubImage2D = _swrast_copy_texsubimage2d; - functions->CopyTexSubImage3D = _swrast_copy_texsubimage3d; functions->TexParameter = mach64DDTexParameter; functions->BindTexture = mach64DDBindTexture; + functions->NewTextureObject = mach64NewTextureObject; functions->DeleteTexture = mach64DDDeleteTexture; + functions->IsTextureResident = driIsTextureResident; + functions->UpdateTexturePalette = NULL; functions->ActiveTexture = NULL; - functions->IsTextureResident = mach64DDIsTextureResident; - functions->PrioritizeTexture = NULL; + functions->PrioritizeTexture = NULL; + + driInitTextureFormats(); } diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.h b/src/mesa/drivers/dri/mach64/mach64_tex.h index d950dd12b4..f6cf1cf802 100644 --- a/src/mesa/drivers/dri/mach64/mach64_tex.h +++ b/src/mesa/drivers/dri/mach64/mach64_tex.h @@ -34,25 +34,15 @@ extern void mach64UpdateTextureState( GLcontext *ctx ); -extern void mach64SwapOutTexObj( mach64ContextPtr mach64ctx, - mach64TexObjPtr t ); - extern void mach64UploadTexImages( mach64ContextPtr mach64ctx, mach64TexObjPtr t ); extern void mach64UploadMultiTexImages( mach64ContextPtr mach64ctx, mach64TexObjPtr t0, mach64TexObjPtr t1 ); -extern void mach64AgeTextures( mach64ContextPtr mach64ctx, int heap ); extern void mach64DestroyTexObj( mach64ContextPtr mach64ctx, mach64TexObjPtr t ); -extern void mach64UpdateTexLRU( mach64ContextPtr mach64ctx, - mach64TexObjPtr t ); - -extern void mach64PrintLocalLRU( mach64ContextPtr mach64ctx, int heap ); -extern void mach64PrintGlobalLRU( mach64ContextPtr mach64ctx, int heap ); - extern void mach64EmitTexStateLocked( mach64ContextPtr mmesa, mach64TexObjPtr t0, mach64TexObjPtr t1 ); diff --git a/src/mesa/drivers/dri/mach64/mach64_texmem.c b/src/mesa/drivers/dri/mach64/mach64_texmem.c index 017fd3535d..3b7b93b984 100644 --- a/src/mesa/drivers/dri/mach64/mach64_texmem.c +++ b/src/mesa/drivers/dri/mach64/mach64_texmem.c @@ -49,333 +49,19 @@ */ void mach64DestroyTexObj( mach64ContextPtr mmesa, mach64TexObjPtr t ) { -#if ENABLE_PERF_BOXES - /* Bump the performace counter */ - if (mmesa) - mmesa->c_textureSwaps++; -#endif - if ( !t ) return; - -#if 0 - if ( t->tObj && t->memBlock && mmesa ) { - /* not a placeholder, so release from global LRU if necessary */ - int heap = t->heap; - drmTextureRegion *list = mmesa->sarea->tex_list[heap]; - int log2sz = mmesa->mach64Screen->logTexGranularity[heap]; - int start = t->memBlock->ofs >> log2sz; - int end = (t->memBlock->ofs + t->memBlock->size - 1) >> log2sz; - int i; - - mmesa->lastTexAge[heap] = ++mmesa->sarea->tex_age[heap]; - - /* Update the global LRU */ - for ( i = start ; i <= end ; i++ ) { - /* do we own this block? */ - if (list[i].in_use == mmesa->hHWContext) { - list[i].in_use = 0; - list[i].age = mmesa->lastTexAge[heap]; - - /* remove_from_list(i) */ - list[(GLuint)list[i].next].prev = list[i].prev; - list[(GLuint)list[i].prev].next = list[i].next; - } - } - } -#endif - - if ( t->memBlock ) { - mmFreeMem( t->memBlock ); - t->memBlock = NULL; - } - - if ( t->tObj ) { - t->tObj->DriverData = NULL; - } - - if ( t->bound && mmesa ) - mmesa->CurrentTexObj[t->bound-1] = NULL; - - remove_from_list( t ); - FREE( t ); -} - -/* Keep track of swapped out texture objects. - */ -void mach64SwapOutTexObj( mach64ContextPtr mmesa, - mach64TexObjPtr t ) -{ -#if ENABLE_PERF_BOXES - /* Bump the performace counter */ - if (mmesa) - mmesa->c_textureSwaps++; -#endif - -#if 0 - if ( t->tObj && t->memBlock && mmesa ) { - /* not a placeholder, so release from global LRU if necessary */ - int heap = t->heap; - drmTextureRegion *list = mmesa->sarea->tex_list[heap]; - int log2sz = mmesa->mach64Screen->logTexGranularity[heap]; - int start = t->memBlock->ofs >> log2sz; - int end = (t->memBlock->ofs + t->memBlock->size - 1) >> log2sz; - int i; - - mmesa->lastTexAge[heap] = ++mmesa->sarea->tex_age[heap]; - - /* Update the global LRU */ - for ( i = start ; i <= end ; i++ ) { - /* do we own this block? */ - if (list[i].in_use == mmesa->hHWContext) { - list[i].in_use = 0; - list[i].age = mmesa->lastTexAge[heap]; - - /* remove_from_list(i) */ - list[(GLuint)list[i].next].prev = list[i].prev; - list[(GLuint)list[i].prev].next = list[i].next; - } - } - } -#endif - - if ( t->memBlock ) { - mmFreeMem( t->memBlock ); - t->memBlock = NULL; - } - - t->dirty = ~0; - move_to_tail( &mmesa->SwappedOut, t ); -} - -/* Print out debugging information about texture LRU. - */ -void mach64PrintLocalLRU( mach64ContextPtr mmesa, int heap ) -{ - mach64TexObjPtr t; - int sz = 1 << (mmesa->mach64Screen->logTexGranularity[heap]); - - fprintf( stderr, "\nLocal LRU, heap %d:\n", heap ); - - foreach( t, &mmesa->TexObjList[heap] ) { - if ( !t->tObj ) { - fprintf( stderr, "Placeholder %d at 0x%x sz 0x%x\n", - t->memBlock->ofs / sz, - t->memBlock->ofs, - t->memBlock->size ); - } else { - fprintf( stderr, "Texture (bound %d) at 0x%x sz 0x%x\n", - t->bound, - t->memBlock->ofs, - t->memBlock->size ); - } - } - - fprintf( stderr, "\n" ); -} - -void mach64PrintGlobalLRU( mach64ContextPtr mmesa, int heap ) -{ - drm_tex_region_t *list = mmesa->sarea->tex_list[heap]; - int i, j; - - fprintf( stderr, "\nGlobal LRU, heap %d list %p:\n", heap, list ); - - for ( i = 0, j = MACH64_NR_TEX_REGIONS ; i < MACH64_NR_TEX_REGIONS ; i++ ) { - fprintf( stderr, "list[%d] age %d in_use %d next %d prev %d\n", - j, list[j].age, list[j].in_use, list[j].next, list[j].prev ); - j = list[j].next; - if ( j == MACH64_NR_TEX_REGIONS ) break; - } - - if ( j != MACH64_NR_TEX_REGIONS ) { - fprintf( stderr, "Loop detected in global LRU\n" ); - for ( i = 0 ; i < MACH64_NR_TEX_REGIONS ; i++ ) { - fprintf( stderr, "list[%d] age %d in_use %d next %d prev %d\n", - i, list[i].age, list[i].in_use, list[i].next, list[i].prev ); - } - } + unsigned i; - fprintf( stderr, "\n" ); -} - -/* Reset the global texture LRU. - */ -/* NOTE: This function is only called while holding the hardware lock */ -static void mach64ResetGlobalLRU( mach64ContextPtr mmesa, int heap ) -{ - drm_tex_region_t *list = mmesa->sarea->tex_list[heap]; - int sz = 1 << mmesa->mach64Screen->logTexGranularity[heap]; - int i; - - /* (Re)initialize the global circular LRU list. The last element in - * the array (MACH64_NR_TEX_REGIONS) is the sentinal. Keeping it at - * the end of the array allows it to be addressed rationally when - * looking up objects at a particular location in texture memory. + /* See if it was the driver's current object. */ - for ( i = 0 ; (i+1) * sz <= mmesa->mach64Screen->texSize[heap] ; i++ ) { - list[i].prev = i-1; - list[i].next = i+1; - list[i].age = 0; - list[i].in_use = 0; - } - - i--; - list[0].prev = MACH64_NR_TEX_REGIONS; - list[i].prev = i-1; - list[i].next = MACH64_NR_TEX_REGIONS; - list[MACH64_NR_TEX_REGIONS].prev = i; - list[MACH64_NR_TEX_REGIONS].next = 0; - mmesa->sarea->tex_age[heap] = 0; -} - -/* Update the local and global texture LRUs. - */ -/* NOTE: This function is only called while holding the hardware lock */ -void mach64UpdateTexLRU( mach64ContextPtr mmesa, - mach64TexObjPtr t ) -{ - int heap = t->heap; - drm_tex_region_t *list = mmesa->sarea->tex_list[heap]; - int log2sz = mmesa->mach64Screen->logTexGranularity[heap]; - int start = t->memBlock->ofs >> log2sz; - int end = (t->memBlock->ofs + t->memBlock->size - 1) >> log2sz; - int i; - - mmesa->lastTexAge[heap] = ++mmesa->sarea->tex_age[heap]; - - if ( !t->memBlock ) { - fprintf( stderr, "no memblock\n\n" ); - return; - } - - /* Update our local LRU */ - move_to_head( &mmesa->TexObjList[heap], t ); - - /* Update the global LRU */ - for ( i = start ; i <= end ; i++ ) { - list[i].in_use = mmesa->hHWContext; - list[i].age = mmesa->lastTexAge[heap]; - -#if 0 - /* if this is the last region, it's not in the list */ - if ( !(i*(1< mmesa->mach64Screen->texSize[heap] ) ) { -#endif - /* remove_from_list(i) */ - list[(GLuint)list[i].next].prev = list[i].prev; - list[(GLuint)list[i].prev].next = list[i].next; -#if 0 - } -#endif - - /* insert_at_head(list, i) */ - list[i].prev = MACH64_NR_TEX_REGIONS; - list[i].next = list[MACH64_NR_TEX_REGIONS].next; - list[(GLuint)list[MACH64_NR_TEX_REGIONS].next].prev = i; - list[MACH64_NR_TEX_REGIONS].next = i; - } - - if ( MACH64_DEBUG & DEBUG_VERBOSE_LRU ) { - mach64PrintGlobalLRU( mmesa, t->heap ); - mach64PrintLocalLRU( mmesa, t->heap ); - } -} - -/* Update our notion of what textures have been changed since we last - * held the lock. This pertains to both our local textures and the - * textures belonging to other clients. Keep track of other client's - * textures by pushing a placeholder texture onto the LRU list -- these - * are denoted by (tObj == NULL). - */ -/* NOTE: This function is only called while holding the hardware lock */ -static void mach64TexturesGone( mach64ContextPtr mmesa, int heap, - int offset, int size, int in_use ) -{ - mach64TexObjPtr t, tmp; - - foreach_s ( t, tmp, &mmesa->TexObjList[heap] ) { - if ( t->memBlock->ofs >= offset + size || - t->memBlock->ofs + t->memBlock->size <= offset ) - continue; - - /* It overlaps - kick it out. Need to hold onto the currently - * bound objects, however. - */ - if ( t->bound ) { - mach64SwapOutTexObj( mmesa, t ); - } else { - mach64DestroyTexObj( mmesa, t ); - } - } - - if ( in_use > 0 && in_use != mmesa->hHWContext ) { - t = (mach64TexObjPtr) CALLOC( sizeof(*t) ); - if (!t) return; - - t->memBlock = mmAllocMem( mmesa->texHeap[heap], size, 0, offset ); - if ( !t->memBlock ) { - fprintf( stderr, "Couldn't alloc placeholder sz %x ofs %x\n", - (int)size, (int)offset ); - mmDumpMemInfo( mmesa->texHeap[heap] ); - return; - } - insert_at_head( &mmesa->TexObjList[heap], t ); - } -} - -/* Update our client's shared texture state. If another client has - * modified a region in which we have textures, then we need to figure - * out which of our textures has been removed, and update our global - * LRU. - */ -void mach64AgeTextures( mach64ContextPtr mmesa, int heap ) -{ - drm_mach64_sarea_t *sarea = mmesa->sarea; - - if ( sarea->tex_age[heap] != mmesa->lastTexAge[heap] ) { - int sz = 1 << mmesa->mach64Screen->logTexGranularity[heap]; - int nr = 0; - int idx; - - /* Have to go right round from the back to ensure stuff ends up - * LRU in our local list... Fix with a cursor pointer. - */ - for ( idx = sarea->tex_list[heap][MACH64_NR_TEX_REGIONS].prev ; - idx != MACH64_NR_TEX_REGIONS && nr < MACH64_NR_TEX_REGIONS ; - idx = sarea->tex_list[heap][idx].prev, nr++ ) + if ( mmesa != NULL ) + { + for ( i = 0 ; i < mmesa->glCtx->Const.MaxTextureUnits ; i++ ) { - /* If switching texturing schemes, then the SAREA might not - * have been properly cleared, so we need to reset the - * global texture LRU. - */ - if ( idx * sz > mmesa->mach64Screen->texSize[heap] ) { - nr = MACH64_NR_TEX_REGIONS; - break; - } - - if ( sarea->tex_list[heap][idx].age > mmesa->lastTexAge[heap] ) { - mach64TexturesGone( mmesa, heap, idx * sz, sz, - sarea->tex_list[heap][idx].in_use ); - } - } - - /* If switching texturing schemes, then the SAREA might not - * have been properly cleared, so we need to reset the - * global texture LRU. - */ - if ( nr == MACH64_NR_TEX_REGIONS ) { - mach64TexturesGone( mmesa, heap, 0, - mmesa->mach64Screen->texSize[heap], 0 ); - mach64ResetGlobalLRU( mmesa, heap ); + if ( t == mmesa->CurrentTexObj[ i ] ) { + assert( t->base.bound & (1 << i) ); + mmesa->CurrentTexObj[ i ] = NULL; + } } - - if ( 0 ) { - mach64PrintGlobalLRU( mmesa, heap ); - mach64PrintLocalLRU( mmesa, heap ); - } - - mmesa->dirty |= (MACH64_UPLOAD_CONTEXT | - MACH64_UPLOAD_TEX0IMAGE | - MACH64_UPLOAD_TEX1IMAGE); - mmesa->lastTexAge[heap] = sarea->tex_age[heap]; } } @@ -395,7 +81,7 @@ static void mach64UploadAGPSubImage( mach64ContextPtr mmesa, if ( ( level < 0 ) || ( level > mmesa->glCtx->Const.MaxTextureLevels ) ) return; - image = t->tObj->Image[0][level]; + image = t->base.tObj->Image[0][level]; if ( !image ) return; @@ -424,14 +110,13 @@ static void mach64UploadAGPSubImage( mach64ContextPtr mmesa, fprintf( stderr, "mach64UploadSubImage: %d,%d of %d,%d at %d,%d\n", width, height, image->Width, image->Height, x, y ); fprintf( stderr, " blit ofs: 0x%07x pitch: 0x%x dwords: %d\n", - (GLuint)t->offset, (GLint)width, dwords ); - mmDumpMemInfo( mmesa->texHeap[t->heap] ); + (GLuint)t->bufAddr, (GLint)width, dwords ); } assert(image->Data); { - CARD32 *dst = (CARD32 *)((char *)mach64Screen->agpTextures.map + t->memBlock->ofs); + CARD32 *dst = (CARD32 *)((char *)mach64Screen->agpTextures.map + t->base.memBlock->ofs); const GLubyte *src = (const GLubyte *) image->Data + (y * image->Width + x) * image->TexFormat->TexelBytes; const GLuint bytes = width * height * image->TexFormat->TexelBytes; @@ -460,7 +145,7 @@ static void mach64UploadLocalSubImage( mach64ContextPtr mmesa, if ( ( level < 0 ) || ( level > mmesa->glCtx->Const.MaxTextureLevels ) ) return; - image = t->tObj->Image[0][level]; + image = t->base.tObj->Image[0][level]; if ( !image ) return; @@ -543,7 +228,7 @@ static void mach64UploadLocalSubImage( mach64ContextPtr mmesa, } dwords = width * height / texelsPerDword; - offset = t->offset; + offset = t->bufAddr; #if ENABLE_PERF_BOXES /* Bump the performance counter */ @@ -555,7 +240,6 @@ static void mach64UploadLocalSubImage( mach64ContextPtr mmesa, width, height, image->Width, image->Height, x, y ); fprintf( stderr, " blit ofs: 0x%07x pitch: 0x%x dwords: %d\n", (GLuint)offset, (GLint)width, dwords ); - mmDumpMemInfo( mmesa->texHeap[t->heap] ); } /* Subdivide the texture if required (account for the registers added by the drm) */ @@ -594,78 +278,32 @@ static void mach64UploadLocalSubImage( mach64ContextPtr mmesa, */ void mach64UploadTexImages( mach64ContextPtr mmesa, mach64TexObjPtr t ) { - GLint heap; - if ( MACH64_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, mmesa->glCtx, t ); } assert(t); - assert(t->tObj); - - /* Choose the heap appropriately */ - heap = MACH64_CARD_HEAP; + assert(t->base.tObj); - if ( !mmesa->mach64Screen->IsPCI && - t->size > mmesa->mach64Screen->texSize[heap] ) { - heap = MACH64_AGP_HEAP; - } - - /* Do we need to eject LRU texture objects? */ - if ( !t->memBlock ) { - t->heap = heap; + if ( !t->base.memBlock ) { + int heap; - /* Allocate a memory block on a 64-byte boundary */ - t->memBlock = mmAllocMem( mmesa->texHeap[heap], t->size, 6, 0 ); + /* NULL heaps are skipped */ + heap = driAllocateTexture( mmesa->texture_heaps, MACH64_NR_TEX_HEAPS, + (driTextureObject *) t ); - /* Try AGP before kicking anything out of local mem */ - if ( !mmesa->mach64Screen->IsPCI && !t->memBlock && heap == MACH64_CARD_HEAP ) { - t->memBlock = mmAllocMem( mmesa->texHeap[MACH64_AGP_HEAP], - t->size, 6, 0 ); - - if ( t->memBlock ) - heap = t->heap = MACH64_AGP_HEAP; + if ( heap == -1 ) { + fprintf( stderr, "%s: upload texture failure, sz=%d\n", __FUNCTION__, + t->base.totalSize ); + exit(-1); + return; } - /* Kick out textures until the requested texture fits */ - while ( !t->memBlock ) { - if ( mmesa->TexObjList[heap].prev->bound ) { - fprintf( stderr, - "mach64UploadTexImages: ran into bound texture\n" ); - return; - } - if ( mmesa->TexObjList[heap].prev == &mmesa->TexObjList[heap] ) { - if ( mmesa->mach64Screen->IsPCI ) { - fprintf( stderr, "%s: upload texture failure on " - "local texture heaps, sz=%d\n", __FUNCTION__, - t->size ); - return; - } else if ( heap == MACH64_CARD_HEAP ) { - heap = t->heap = MACH64_AGP_HEAP; - continue; - } else { - int i; - fprintf( stderr, "%s: upload texture failure on " - "%sAGP texture heaps, sz=%d\n", __FUNCTION__, - mmesa->firstTexHeap == MACH64_CARD_HEAP ? "both local and " : "", - t->size ); - for ( i = mmesa->firstTexHeap ; i < mmesa->lastTexHeap ; i++ ) { - mach64PrintLocalLRU( mmesa, i ); - mmDumpMemInfo( mmesa->texHeap[i] ); - } - exit(-1); - return; - } - } - - mach64SwapOutTexObj( mmesa, mmesa->TexObjList[heap].prev ); - - t->memBlock = mmAllocMem( mmesa->texHeap[heap], t->size, 6, 0 ); - } + t->heap = heap; /* Set the base offset of the texture image */ - t->offset = mmesa->mach64Screen->texOffset[heap] + t->memBlock->ofs; + t->bufAddr = mmesa->mach64Screen->texOffset[heap] + t->base.memBlock->ofs; /* Force loading the new state into the hardware */ mmesa->dirty |= (MACH64_UPLOAD_SCALE_3D_CNTL | @@ -673,142 +311,152 @@ void mach64UploadTexImages( mach64ContextPtr mmesa, mach64TexObjPtr t ) } /* Let the world know we've used this memory recently */ - mach64UpdateTexLRU( mmesa, t ); + driUpdateTextureLRU( (driTextureObject *) t ); /* Upload any images that are new */ - if ( t->dirty ) { + if ( t->base.dirty_images[0] ) { + const GLint j = t->base.tObj->BaseLevel; if (t->heap == MACH64_AGP_HEAP) { /* Need to make sure any vertex buffers in the queue complete */ mach64WaitForIdleLocked( mmesa ); - mach64UploadAGPSubImage( mmesa, t, t->tObj->BaseLevel, 0, 0, - t->tObj->Image[0][t->tObj->BaseLevel]->Width, - t->tObj->Image[0][t->tObj->BaseLevel]->Height ); + mach64UploadAGPSubImage( mmesa, t, j, 0, 0, + t->base.tObj->Image[0][j]->Width, + t->base.tObj->Image[0][j]->Height ); } else { - mach64UploadLocalSubImage( mmesa, t, t->tObj->BaseLevel, 0, 0, - t->tObj->Image[0][t->tObj->BaseLevel]->Width, - t->tObj->Image[0][t->tObj->BaseLevel]->Height ); + mach64UploadLocalSubImage( mmesa, t, j, 0, 0, + t->base.tObj->Image[0][j]->Width, + t->base.tObj->Image[0][j]->Height ); } mmesa->setup.tex_cntl |= MACH64_TEX_CACHE_FLUSH; + t->base.dirty_images[0] = 0; } mmesa->dirty |= MACH64_UPLOAD_TEXTURE; +} + + +/* Allocate memory from the same texture heap `heap' for both textures + * `u0' and `u1'. + */ +static int mach64AllocateMultiTex( mach64ContextPtr mmesa, + mach64TexObjPtr u0, + mach64TexObjPtr u1, + int heap, GLboolean alloc_u0 ) +{ + /* Both objects should be bound */ + assert( u0->base.bound && u1->base.bound ); + + if ( alloc_u0 ) { + /* Evict u0 from its current heap */ + if ( u0->base.memBlock ) { + assert( u0->heap != heap ); + driSwapOutTextureObject( (driTextureObject *) u0 ); + } + + /* Try to allocate u0 in the chosen heap */ + u0->heap = driAllocateTexture( &mmesa->texture_heaps[heap], 1, + (driTextureObject *) u0 ); + + if ( u0->heap == -1 ) { + return -1; + } + } + + /* Evict u1 from its current heap */ + if ( u1->base.memBlock ) { + assert( u1->heap != heap ); + driSwapOutTextureObject( (driTextureObject *) u1 ); + } + + /* Try to allocate u1 in the same heap as u0 */ + u1->heap = driAllocateTexture( &mmesa->texture_heaps[heap], 1, + (driTextureObject *) u1 ); + + if ( u1->heap == -1 ) { + return -1; + } - t->dirty = 0; + /* Bound objects are not evicted */ + assert( u0->base.memBlock && u1->base.memBlock ); + assert( u0->heap == u1->heap ); + + return heap; } /* The mach64 needs to have both primary and secondary textures in either * local or AGP memory, so we need a "buddy system" to make sure that allocation * succeeds or fails for both textures. - * FIXME: This needs to be optimized better. */ void mach64UploadMultiTexImages( mach64ContextPtr mmesa, mach64TexObjPtr t0, mach64TexObjPtr t1 ) { - GLint heap; - if ( MACH64_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %p, %p %p )\n", __FUNCTION__, mmesa->glCtx, t0, t1 ); } assert(t0 && t1); - assert(t0->tObj && t1->tObj); + assert(t0->base.tObj && t1->base.tObj); - /* Choose the heap appropriately */ - heap = MACH64_CARD_HEAP; + if ( !t0->base.memBlock || !t1->base.memBlock || t0->heap != t1->heap ) { + mach64TexObjPtr u0 = NULL; + mach64TexObjPtr u1 = NULL; + unsigned totalSize = t0->base.totalSize + t1->base.totalSize; - if ( !mmesa->mach64Screen->IsPCI && - ((t0->size + t1->size) > mmesa->mach64Screen->texSize[heap]) ) { - heap = MACH64_AGP_HEAP; - } + int heap, ret; - /* Do we need to eject LRU texture objects? */ - if ( !t0->memBlock || !t1->memBlock || t0->heap != t1->heap ) { - /* FIXME: starting from scratch for now to keep it simple */ - if ( t0->memBlock ) { - mach64SwapOutTexObj( mmesa, t0 ); - } - if ( t1->memBlock ) { - mach64SwapOutTexObj( mmesa, t1 ); - } - t0->heap = t1->heap = heap; - /* Allocate a memory block on a 64-byte boundary */ - t0->memBlock = mmAllocMem( mmesa->texHeap[heap], t0->size, 6, 0 ); - if ( t0->memBlock ) { - t1->memBlock = mmAllocMem( mmesa->texHeap[heap], t1->size, 6, 0 ); - if ( !t1->memBlock ) { - mmFreeMem( t0->memBlock ); - t0->memBlock = NULL; - } + /* Check if one of the textures is already swapped in a heap and the + * other texture fits in that heap. + */ + if ( t0->base.memBlock && totalSize <= t0->base.heap->size ) { + u0 = t0; + u1 = t1; + } else if ( t1->base.memBlock && totalSize <= t1->base.heap->size ) { + u0 = t1; + u1 = t0; } - /* Try AGP before kicking anything out of local mem */ - if ( (!t0->memBlock || !t1->memBlock) && heap == MACH64_CARD_HEAP ) { - t0->memBlock = mmAllocMem( mmesa->texHeap[MACH64_AGP_HEAP], t0->size, 6, 0 ); - if ( t0->memBlock ) { - t1->memBlock = mmAllocMem( mmesa->texHeap[MACH64_AGP_HEAP], t1->size, 6, 0 ); - if ( !t1->memBlock ) { - mmFreeMem( t0->memBlock ); - t0->memBlock = NULL; - } + + if ( u0 ) { + heap = u0->heap; + + ret = mach64AllocateMultiTex( mmesa, u0, u1, heap, GL_FALSE ); + } else { + /* Both textures are swapped out or collocation is impossible */ + u0 = t0; + u1 = t1; + + /* Choose the heap appropriately */ + heap = MACH64_CARD_HEAP; + + if ( totalSize > mmesa->texture_heaps[heap]->size ) { + heap = MACH64_AGP_HEAP; } - if ( t0->memBlock && t1->memBlock ) - heap = t0->heap = t1->heap = MACH64_AGP_HEAP; + ret = mach64AllocateMultiTex( mmesa, u0, u1, heap, GL_TRUE ); } - /* Kick out textures until the requested texture fits */ - while ( !t0->memBlock || !t1->memBlock ) { - if ( mmesa->TexObjList[heap].prev->bound ) { - fprintf( stderr, - "%s: ran into bound texture\n", __FUNCTION__ ); - return; - } - if ( mmesa->TexObjList[heap].prev == &mmesa->TexObjList[heap] ) { - if ( mmesa->mach64Screen->IsPCI ) { - fprintf( stderr, "%s: upload texture failure on local " - "texture heaps, tex0 sz=%d tex1 sz=%d\n", __FUNCTION__, - t0->size, t1->size ); - return; - } else if ( heap == MACH64_CARD_HEAP ) { - /* If only one allocation succeeded, start over again in AGP */ - if (t0->memBlock) { - mmFreeMem( t0->memBlock ); - t0->memBlock = NULL; - } - if (t1->memBlock) { - mmFreeMem( t1->memBlock ); - t1->memBlock = NULL; - } - heap = t0->heap = t1->heap = MACH64_AGP_HEAP; - continue; - } else { - int i; - fprintf( stderr, "%s: upload texture failure on %s" - "AGP texture heaps, tex0 sz=%d tex1 sz=%d\n", __FUNCTION__, - mmesa->firstTexHeap == MACH64_CARD_HEAP ? "both local and " : "", - t0->size, t1->size ); - for ( i = mmesa->firstTexHeap ; i < mmesa->lastTexHeap ; i++ ) { - mach64PrintLocalLRU( mmesa, i ); - mmDumpMemInfo( mmesa->texHeap[i] ); - } - exit(-1); - return; - } - } + if ( ret == -1 && heap == MACH64_CARD_HEAP ) { + /* Try AGP if local memory failed */ + heap = MACH64_AGP_HEAP; - mach64SwapOutTexObj( mmesa, mmesa->TexObjList[heap].prev ); - - if (!t0->memBlock) - t0->memBlock = mmAllocMem( mmesa->texHeap[heap], t0->size, 6, 0 ); - if (!t1->memBlock) - t1->memBlock = mmAllocMem( mmesa->texHeap[heap], t1->size, 6, 0 ); + ret = mach64AllocateMultiTex( mmesa, u0, u1, heap, GL_TRUE ); + } + + if ( ret == -1 ) { + /* FIXME: + * Swap out all textures from the AGP heap and re-run allocation, this + * should succeed in all cases. + */ + fprintf( stderr, "%s: upload multi-texture failure, sz0=%d sz1=%d\n", + __FUNCTION__, t0->base.totalSize, t1->base.totalSize ); + exit(-1); } /* Set the base offset of the texture image */ - t0->offset = mmesa->mach64Screen->texOffset[heap] + t0->memBlock->ofs; - t1->offset = mmesa->mach64Screen->texOffset[heap] + t1->memBlock->ofs; + t0->bufAddr = mmesa->mach64Screen->texOffset[heap] + t0->base.memBlock->ofs; + t1->bufAddr = mmesa->mach64Screen->texOffset[heap] + t1->base.memBlock->ofs; /* Force loading the new state into the hardware */ mmesa->dirty |= (MACH64_UPLOAD_SCALE_3D_CNTL | @@ -816,42 +464,43 @@ void mach64UploadMultiTexImages( mach64ContextPtr mmesa, } /* Let the world know we've used this memory recently */ - mach64UpdateTexLRU( mmesa, t0 ); - mach64UpdateTexLRU( mmesa, t1 ); + driUpdateTextureLRU( (driTextureObject *) t0 ); + driUpdateTextureLRU( (driTextureObject *) t1 ); /* Upload any images that are new */ - if ( t0->dirty ) { + if ( t0->base.dirty_images[0] ) { + const GLint j0 = t0->base.tObj->BaseLevel; if (t0->heap == MACH64_AGP_HEAP) { /* Need to make sure any vertex buffers in the queue complete */ mach64WaitForIdleLocked( mmesa ); - mach64UploadAGPSubImage( mmesa, t0, t0->tObj->BaseLevel, 0, 0, - t0->tObj->Image[0][t0->tObj->BaseLevel]->Width, - t0->tObj->Image[0][t0->tObj->BaseLevel]->Height ); + mach64UploadAGPSubImage( mmesa, t0, j0, 0, 0, + t0->base.tObj->Image[0][j0]->Width, + t0->base.tObj->Image[0][j0]->Height ); } else { - mach64UploadLocalSubImage( mmesa, t0, t0->tObj->BaseLevel, 0, 0, - t0->tObj->Image[0][t0->tObj->BaseLevel]->Width, - t0->tObj->Image[0][t0->tObj->BaseLevel]->Height ); + mach64UploadLocalSubImage( mmesa, t0, j0, 0, 0, + t0->base.tObj->Image[0][j0]->Width, + t0->base.tObj->Image[0][j0]->Height ); } mmesa->setup.tex_cntl |= MACH64_TEX_CACHE_FLUSH; + t0->base.dirty_images[0] = 0; } - if ( t1->dirty ) { + if ( t1->base.dirty_images[0] ) { + const GLint j1 = t1->base.tObj->BaseLevel; if (t1->heap == MACH64_AGP_HEAP) { /* Need to make sure any vertex buffers in the queue complete */ mach64WaitForIdleLocked( mmesa ); - mach64UploadAGPSubImage( mmesa, t1, t1->tObj->BaseLevel, 0, 0, - t1->tObj->Image[0][t1->tObj->BaseLevel]->Width, - t1->tObj->Image[0][t1->tObj->BaseLevel]->Height ); + mach64UploadAGPSubImage( mmesa, t1, j1, 0, 0, + t1->base.tObj->Image[0][j1]->Width, + t1->base.tObj->Image[0][j1]->Height ); } else { - mach64UploadLocalSubImage( mmesa, t1, t1->tObj->BaseLevel, 0, 0, - t1->tObj->Image[0][t1->tObj->BaseLevel]->Width, - t1->tObj->Image[0][t1->tObj->BaseLevel]->Height ); + mach64UploadLocalSubImage( mmesa, t1, j1, 0, 0, + t1->base.tObj->Image[0][j1]->Width, + t1->base.tObj->Image[0][j1]->Height ); } mmesa->setup.tex_cntl |= MACH64_TEX_CACHE_FLUSH; + t1->base.dirty_images[0] = 0; } mmesa->dirty |= MACH64_UPLOAD_TEXTURE; - - t0->dirty = 0; - t1->dirty = 0; } diff --git a/src/mesa/drivers/dri/mach64/mach64_texstate.c b/src/mesa/drivers/dri/mach64/mach64_texstate.c index b6a9e3f931..3ace370d70 100644 --- a/src/mesa/drivers/dri/mach64/mach64_texstate.c +++ b/src/mesa/drivers/dri/mach64/mach64_texstate.c @@ -47,11 +47,6 @@ static void mach64SetTexImages( mach64ContextPtr mmesa, { mach64TexObjPtr t = (mach64TexObjPtr) tObj->DriverData; struct gl_texture_image *baseImage = tObj->Image[0][tObj->BaseLevel]; -#if 0 - int log2Pitch, log2Height, log2Size, log2MinSize; - int i; - GLint firstLevel, lastLevel; -#endif int totalSize; assert(t); @@ -92,77 +87,17 @@ static void mach64SetTexImages( mach64ContextPtr mmesa, _mesa_problem(mmesa->glCtx, "Bad texture format in %s", __FUNCTION__); }; -#if 0 - /* Compute which mipmap levels we really want to send to the hardware. - * This depends on the base image size, GL_TEXTURE_MIN_LOD, - * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. - * Yes, this looks overly complicated, but it's all needed. - */ - firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5); - firstLevel = MAX2(firstLevel, tObj->BaseLevel); - lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5); - lastLevel = MAX2(lastLevel, tObj->BaseLevel); - lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); - lastLevel = MIN2(lastLevel, tObj->MaxLevel); - lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ - - log2Pitch = tObj->Image[firstLevel]->WidthLog2; - log2Height = tObj->Image[firstLevel]->HeightLog2; - log2Size = MAX2(log2Pitch, log2Height); - log2MinSize = log2Size; - - t->dirty = 0; - totalSize = 0; - for ( i = firstLevel; i <= lastLevel; i++ ) { - const struct gl_texture_image *texImage; - - texImage = tObj->Image[i]; - if ( !texImage || !texImage->Data ) { - lastLevel = i - 1; - break; - } - - log2MinSize = texImage->MaxLog2; - - t->image[i - firstLevel].offset = totalSize; - t->image[i - firstLevel].width = tObj->Image[i]->Width; - t->image[i - firstLevel].height = tObj->Image[i]->Height; + totalSize = ( baseImage->Height * + baseImage->Width * + baseImage->TexFormat->TexelBytes ); - t->dirty |= (1 << i); - - totalSize += (tObj->Image[i]->Height * - tObj->Image[i]->Width * - tObj->Image[i]->TexFormat->TexelBytes); - - /* Offsets must be 32-byte aligned for host data blits and tiling */ - totalSize = (totalSize + 31) & ~31; - } + totalSize = (totalSize + 31) & ~31; - t->totalSize = totalSize; - t->firstLevel = firstLevel; - t->lastLevel = lastLevel; + t->base.totalSize = totalSize; + t->base.firstLevel = tObj->BaseLevel; + t->base.lastLevel = tObj->BaseLevel; /* Set the texture format */ - t->setup.tex_cntl &= ~(0xf << 16); - t->setup.tex_cntl |= t->textureFormat; - - t->setup.tex_combine_cntl = 0x00000000; /* XXX is this right? */ - - t->setup.tex_size_pitch = ((log2Pitch << R128_TEX_PITCH_SHIFT) | - (log2Size << R128_TEX_SIZE_SHIFT) | - (log2Height << R128_TEX_HEIGHT_SHIFT) | - (log2MinSize << R128_TEX_MIN_SIZE_SHIFT)); - - for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { - t->setup.tex_offset[i] = 0x00000000; - } - - if (firstLevel == lastLevel) - t->setup.tex_cntl |= R128_MIP_MAP_DISABLE; - else - t->setup.tex_cntl &= ~R128_MIP_MAP_DISABLE; - -#else if ( ( baseImage->_BaseFormat == GL_RGBA ) || ( baseImage->_BaseFormat == GL_ALPHA ) || ( baseImage->_BaseFormat == GL_LUMINANCE_ALPHA ) ) { @@ -171,15 +106,9 @@ static void mach64SetTexImages( mach64ContextPtr mmesa, t->hasAlpha = 0; } - totalSize = ( baseImage->Width * baseImage->Height * - baseImage->TexFormat->TexelBytes ); - totalSize = (totalSize + 31) & ~31; - t->size = totalSize; t->widthLog2 = baseImage->WidthLog2; t->heightLog2 = baseImage->HeightLog2; t->maxLog2 = baseImage->MaxLog2; - -#endif } static void mach64UpdateTextureEnv( GLcontext *ctx, int unit ) @@ -387,17 +316,17 @@ static void mach64UpdateTextureUnit( GLcontext *ctx, int unit ) } /* Upload teximages */ - if (t->dirty) { + if (t->base.dirty_images[0]) { mach64SetTexImages( mmesa, tObj ); mmesa->dirty |= (MACH64_UPLOAD_TEX0IMAGE << unit); } /* Bind to the given texture unit */ mmesa->CurrentTexObj[unit] = t; - t->bound |= (1 << unit); + t->base.bound |= (1 << unit); - if ( t->memBlock ) - mach64UpdateTexLRU( mmesa, t ); + if ( t->base.memBlock ) + driUpdateTextureLRU( (driTextureObject *) t ); /* XXX: should be locked! */ /* register setup */ if ( unit == 0 ) { @@ -515,8 +444,8 @@ void mach64UpdateTextureState( GLcontext *ctx ) FALLBACK( mmesa, MACH64_FALLBACK_TEXTURE, GL_FALSE ); /* Unbind any currently bound textures */ - if ( mmesa->CurrentTexObj[0] ) mmesa->CurrentTexObj[0]->bound = 0; - if ( mmesa->CurrentTexObj[1] ) mmesa->CurrentTexObj[1]->bound = 0; + if ( mmesa->CurrentTexObj[0] ) mmesa->CurrentTexObj[0]->base.bound = 0; + if ( mmesa->CurrentTexObj[1] ) mmesa->CurrentTexObj[1]->base.bound = 0; mmesa->CurrentTexObj[0] = NULL; mmesa->CurrentTexObj[1] = NULL; @@ -556,3 +485,41 @@ void mach64UpdateTextureState( GLcontext *ctx ) MACH64_UPLOAD_TEXTURE); } + +/* Due to the way we must program texture state into the Rage Pro, + * we must leave these calculations to the absolute last minute. + */ +void mach64EmitTexStateLocked( mach64ContextPtr mmesa, + mach64TexObjPtr t0, + mach64TexObjPtr t1 ) +{ + drm_mach64_sarea_t *sarea = mmesa->sarea; + drm_mach64_context_regs_t *regs = &(mmesa->setup); + + /* for multitex, both textures must be local or AGP */ + if ( t0 && t1 ) + assert(t0->heap == t1->heap); + + if ( t0 ) { + if (t0->heap == MACH64_CARD_HEAP) { +#if ENABLE_PERF_BOXES + mmesa->c_texsrc_card++; +#endif + mmesa->setup.tex_cntl &= ~MACH64_TEX_SRC_AGP; + } else { +#if ENABLE_PERF_BOXES + mmesa->c_texsrc_agp++; +#endif + mmesa->setup.tex_cntl |= MACH64_TEX_SRC_AGP; + } + mmesa->setup.tex_offset = t0->bufAddr; + } + + if ( t1 ) { + mmesa->setup.secondary_tex_off = t1->bufAddr; + } + + memcpy( &sarea->context_state.tex_size_pitch, ®s->tex_size_pitch, + MACH64_NR_TEXTURE_REGS * sizeof(GLuint) ); +} + -- cgit v1.2.3 From 8dcfcad7a2598ba835930aac8f3fd6576e464c1c Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:31:14 -0700 Subject: Move all the code for computing ctx->_TriangleCaps into state.c. ctx->_TriangleCaps should probably go away altogether someday... --- src/mesa/main/enable.c | 91 +++++++++++++-------------------------- src/mesa/main/extensions.c | 4 +- src/mesa/main/light.c | 14 ++---- src/mesa/main/lines.c | 23 ++-------- src/mesa/main/points.c | 14 +----- src/mesa/main/polygon.c | 38 +---------------- src/mesa/main/polygon.h | 7 +-- src/mesa/main/state.c | 104 ++++++++++++++++++++++++++++++++++++--------- 8 files changed, 129 insertions(+), 166 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 91268b596d..076d8731f8 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -49,8 +49,11 @@ } +/** + * Helper to enable/disable client-side state. + */ static void -client_state( GLcontext *ctx, GLenum cap, GLboolean state ) +client_state(GLcontext *ctx, GLenum cap, GLboolean state) { GLuint flag; GLuint *var; @@ -134,17 +137,14 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Array.ArrayObj->_Enabled &= ~flag; if (ctx->Driver.Enable) { - (*ctx->Driver.Enable)( ctx, cap, state ); + ctx->Driver.Enable( ctx, cap, state ); } } /** * Enable GL capability. - * - * \param cap capability. - * - * \sa glEnable(). + * \param cap state to enable/disable. * * Get's the current context, assures that we're outside glBegin()/glEnd() and * calls client_state(). @@ -160,10 +160,7 @@ _mesa_EnableClientState( GLenum cap ) /** * Disable GL capability. - * - * \param cap capability. - * - * \sa glDisable(). + * \param cap state to enable/disable. * * Get's the current context, assures that we're outside glBegin()/glEnd() and * calls client_state(). @@ -195,10 +192,10 @@ _mesa_DisableClientState( GLenum cap ) /** - * Perform glEnable() and glDisable() calls. + * Helper function to enable or disable state. * * \param ctx GL context. - * \param cap capability. + * \param cap the state to enable/disable * \param state whether to enable or disable the specified capability. * * Updates the current context and flushes the vertices as needed. For @@ -206,7 +203,8 @@ _mesa_DisableClientState( GLenum cap ) * are effectivly present before updating. Notifies the driver via * dd_function_table::Enable. */ -void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) +void +_mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state) { if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "%s %s (newstate is %x)\n", @@ -285,7 +283,6 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) FLUSH_VERTICES(ctx, _NEW_POLYGON); ctx->Polygon.CullFlag = state; break; - case GL_CULL_VERTEX_EXT: CHECK_EXTENSION(EXT_cull_vertex, cap); if (ctx->Transform.CullVertexFlag == state) @@ -293,13 +290,12 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) FLUSH_VERTICES(ctx, _NEW_TRANSFORM); ctx->Transform.CullVertexFlag = state; break; - case GL_DEPTH_TEST: if (state && ctx->DrawBuffer->Visual.depthBits == 0) { _mesa_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer"); return; } - if (ctx->Depth.Test==state) + if (ctx->Depth.Test == state) return; FLUSH_VERTICES(ctx, _NEW_DEPTH); ctx->Depth.Test = state; @@ -308,13 +304,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) if (ctx->NoDither) { state = GL_FALSE; /* MESA_NO_DITHER env var */ } - if (ctx->Color.DitherFlag==state) + if (ctx->Color.DitherFlag == state) return; FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.DitherFlag = state; break; case GL_FOG: - if (ctx->Fog.Enabled==state) + if (ctx->Fog.Enabled == state) return; FLUSH_VERTICES(ctx, _NEW_FOG); ctx->Fog.Enabled = state; @@ -351,26 +347,18 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.Enabled = state; - - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; - break; case GL_LINE_SMOOTH: if (ctx->Line.SmoothFlag == state) return; FLUSH_VERTICES(ctx, _NEW_LINE); ctx->Line.SmoothFlag = state; - ctx->_TriangleCaps ^= DD_LINE_SMOOTH; break; case GL_LINE_STIPPLE: if (ctx->Line.StippleFlag == state) return; FLUSH_VERTICES(ctx, _NEW_LINE); ctx->Line.StippleFlag = state; - ctx->_TriangleCaps ^= DD_LINE_STIPPLE; break; case GL_INDEX_LOGIC_OP: if (ctx->Color.IndexLogicOpEnabled == state) @@ -505,41 +493,38 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Transform.Normalize = state; break; case GL_POINT_SMOOTH: - if (ctx->Point.SmoothFlag==state) + if (ctx->Point.SmoothFlag == state) return; FLUSH_VERTICES(ctx, _NEW_POINT); ctx->Point.SmoothFlag = state; - ctx->_TriangleCaps ^= DD_POINT_SMOOTH; break; case GL_POLYGON_SMOOTH: - if (ctx->Polygon.SmoothFlag==state) + if (ctx->Polygon.SmoothFlag == state) return; FLUSH_VERTICES(ctx, _NEW_POLYGON); ctx->Polygon.SmoothFlag = state; - ctx->_TriangleCaps ^= DD_TRI_SMOOTH; break; case GL_POLYGON_STIPPLE: - if (ctx->Polygon.StippleFlag==state) + if (ctx->Polygon.StippleFlag == state) return; FLUSH_VERTICES(ctx, _NEW_POLYGON); ctx->Polygon.StippleFlag = state; - ctx->_TriangleCaps ^= DD_TRI_STIPPLE; break; case GL_POLYGON_OFFSET_POINT: - if (ctx->Polygon.OffsetPoint==state) + if (ctx->Polygon.OffsetPoint == state) return; FLUSH_VERTICES(ctx, _NEW_POLYGON); ctx->Polygon.OffsetPoint = state; break; case GL_POLYGON_OFFSET_LINE: - if (ctx->Polygon.OffsetLine==state) + if (ctx->Polygon.OffsetLine == state) return; FLUSH_VERTICES(ctx, _NEW_POLYGON); ctx->Polygon.OffsetLine = state; break; case GL_POLYGON_OFFSET_FILL: /*case GL_POLYGON_OFFSET_EXT:*/ - if (ctx->Polygon.OffsetFill==state) + if (ctx->Polygon.OffsetFill == state) return; FLUSH_VERTICES(ctx, _NEW_POLYGON); ctx->Polygon.OffsetFill = state; @@ -551,7 +536,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Transform.RescaleNormals = state; break; case GL_SCISSOR_TEST: - if (ctx->Scissor.Enabled==state) + if (ctx->Scissor.Enabled == state) return; FLUSH_VERTICES(ctx, _NEW_SCISSOR); ctx->Scissor.Enabled = state; @@ -568,7 +553,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) "glEnable(GL_STENCIL_TEST) but no stencil buffer"); return; } - if (ctx->Stencil.Enabled==state) + if (ctx->Stencil.Enabled == state) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); ctx->Stencil.Enabled = state; @@ -916,11 +901,6 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); ctx->Stencil.TestTwoSide = state; - if (state) { - ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL; - } else { - ctx->_TriangleCaps &= ~DD_TRI_TWOSTENCIL; - } break; #if FEATURE_ARB_fragment_program @@ -973,20 +953,14 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) } if (ctx->Driver.Enable) { - (*ctx->Driver.Enable)( ctx, cap, state ); + ctx->Driver.Enable( ctx, cap, state ); } } /** - * Enable GL capability. - * - * \param cap capability. - * - * \sa glEnable(). - * - * Get's the current context, assures that we're outside glBegin()/glEnd() and - * calls _mesa_set_enable(). + * Enable GL capability. Called by glEnable() + * \param cap state to enable. */ void GLAPIENTRY _mesa_Enable( GLenum cap ) @@ -999,14 +973,8 @@ _mesa_Enable( GLenum cap ) /** - * Disable GL capability. - * - * \param cap capability. - * - * \sa glDisable(). - * - * Get's the current context, assures that we're outside glBegin()/glEnd() and - * calls _mesa_set_enable(). + * Disable GL capability. Called by glDisable() + * \param cap state to disable. */ void GLAPIENTRY _mesa_Disable( GLenum cap ) @@ -1032,10 +1000,11 @@ _mesa_Disable( GLenum cap ) return GL_FALSE; \ } + /** - * Test whether a capability is enabled. + * Return simple enable/disable state. * - * \param cap capability. + * \param cap state variable to query. * * Returns the state of the specified capability from the current GL context. * For the capabilities associated with extensions verifies that those diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 135323f9c1..7845ea018e 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -409,7 +409,9 @@ _mesa_enable_2_1_extensions(GLcontext *ctx) #if FEATURE_EXT_texture_sRGB ctx->Extensions.EXT_texture_sRGB = GL_TRUE; #endif - /* plus: shading language extensions, non-square uniform matrices */ +#ifdef FEATURE_ARB_shading_language_120 + ctx->Extensions.ARB_shading_language_120 = GL_TRUE; +#endif } diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 984f7b2abc..92d8a0ae0d 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * @@ -44,7 +44,7 @@ _mesa_ShadeModel( GLenum mode ) _mesa_debug(ctx, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode)); if (mode != GL_FLAT && mode != GL_SMOOTH) { - _mesa_error( ctx, GL_INVALID_ENUM, "glShadeModel" ); + _mesa_error(ctx, GL_INVALID_ENUM, "glShadeModel"); return; } @@ -53,9 +53,8 @@ _mesa_ShadeModel( GLenum mode ) FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.ShadeModel = mode; - ctx->_TriangleCaps ^= DD_FLATSHADE; if (ctx->Driver.ShadeModel) - (*ctx->Driver.ShadeModel)( ctx, mode ); + ctx->Driver.ShadeModel( ctx, mode ); } @@ -442,11 +441,6 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params ) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.Model.TwoSide = newbool; - - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; break; case GL_LIGHT_MODEL_COLOR_CONTROL: if (params[0] == (GLfloat) GL_SINGLE_COLOR) @@ -728,7 +722,7 @@ _mesa_ColorMaterial( GLenum face, GLenum mode ) } if (ctx->Driver.ColorMaterial) - (*ctx->Driver.ColorMaterial)( ctx, face, mode ); + ctx->Driver.ColorMaterial( ctx, face, mode ); } diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index c30d9ac109..dc7195d4eb 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -1,13 +1,8 @@ -/** - * \file lines.c - * Line operations. - */ - /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * 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"), @@ -43,12 +38,6 @@ * \param width line width in pixels. * * \sa glLineWidth(). - * - * Verifies the parameter and updates gl_line_attrib::Width. On a change, - * flushes the vertices, updates the clamped line width and marks the - * DD_LINE_WIDTH flag in __GLcontextRec::_TriangleCaps for the drivers if the - * width is different from one. Notifies the driver via the - * dd_function_table::LineWidth callback. */ void GLAPIENTRY _mesa_LineWidth( GLfloat width ) @@ -70,14 +59,8 @@ _mesa_LineWidth( GLfloat width ) ctx->Const.MinLineWidth, ctx->Const.MaxLineWidth); - - if (width != 1.0) - ctx->_TriangleCaps |= DD_LINE_WIDTH; - else - ctx->_TriangleCaps &= ~DD_LINE_WIDTH; - if (ctx->Driver.LineWidth) - (*ctx->Driver.LineWidth)(ctx, width); + ctx->Driver.LineWidth(ctx, width); } diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index aa36fb6287..c6b032460e 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -5,9 +5,9 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.1 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * 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"), @@ -244,19 +244,9 @@ _mesa_update_point(GLcontext *ctx) ctx->Point.MinSize, ctx->Point.MaxSize); - if (ctx->Point._Size == 1.0F) - ctx->_TriangleCaps &= ~DD_POINT_SIZE; - else - ctx->_TriangleCaps |= DD_POINT_SIZE; - ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 || ctx->Point.Params[1] != 0.0 || ctx->Point.Params[2] != 0.0); - - if (ctx->Point._Attenuated) - ctx->_TriangleCaps |= DD_POINT_ATTEN; - else - ctx->_TriangleCaps &= ~DD_POINT_ATTEN; } diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index b771408cf3..814f7ec5fa 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/polygon.c @@ -5,9 +5,9 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5.1 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * 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"), @@ -166,14 +166,6 @@ _mesa_PolygonMode( GLenum face, GLenum mode ) _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" ); return; } - - ctx->_TriangleCaps &= ~DD_TRI_UNFILLED; - if (ctx->Polygon.FrontMode!=GL_FILL || ctx->Polygon.BackMode!=GL_FILL) - ctx->_TriangleCaps |= DD_TRI_UNFILLED; - - if (ctx->Driver.PolygonMode) { - (*ctx->Driver.PolygonMode)( ctx, face, mode ); - } } #if _HAVE_FULL_GL @@ -320,32 +312,6 @@ _mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ) #endif -/**********************************************************************/ -/** \name State Management */ -/*@{*/ - -/* - * Check polygon state and set DD_TRI_CULL_FRONT_BACK and/or DD_TRI_OFFSET - * in ctx->_TriangleCaps if needed. - */ -void _mesa_update_polygon( GLcontext *ctx ) -{ - ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET); - - if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) - ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; - - /* Any Polygon offsets enabled? */ - if (ctx->Polygon.OffsetPoint || - ctx->Polygon.OffsetLine || - ctx->Polygon.OffsetFill) { - ctx->_TriangleCaps |= DD_TRI_OFFSET; - } -} - -/*@}*/ - - /**********************************************************************/ /** \name Initialization */ /*@{*/ diff --git a/src/mesa/main/polygon.h b/src/mesa/main/polygon.h index 2550ed1687..78e8394d05 100644 --- a/src/mesa/main/polygon.h +++ b/src/mesa/main/polygon.h @@ -5,9 +5,9 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5.1 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * 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"), @@ -60,9 +60,6 @@ _mesa_PolygonStipple( const GLubyte *mask ); extern void GLAPIENTRY _mesa_GetPolygonStipple( GLubyte *mask ); -extern void -_mesa_update_polygon( GLcontext *ctx ); - extern void _mesa_init_polygon( GLcontext * ctx ); diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index e62fbe47d1..4184aeb9d9 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -821,16 +821,6 @@ _mesa_init_exec_table(struct _glapi_table *exec) /*@{*/ -static void -update_separate_specular( GLcontext *ctx ) -{ - if (NEED_SECONDARY_COLOR(ctx)) - ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; - else - ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR; -} - - /** * Update state dependent on vertex arrays. */ @@ -1014,16 +1004,88 @@ update_color(GLcontext *ctx) /** - * If __GLcontextRec::NewState is non-zero then this function \b must be called - * before rendering any primitive. Basically, function pointers and - * miscellaneous flags are updated to reflect the current state of the state - * machine. + * Update the ctx->_TriangleCaps bitfield. + * XXX that bitfield should really go away someday! + * This function must be called after other update_*() functions since + * there are dependencies on some other derived values. + */ +static void +update_tricaps(GLcontext *ctx, GLbitfield new_state) +{ + ctx->_TriangleCaps = 0; + + /* + * Points + */ + if (new_state & _NEW_POINT) { + if (ctx->Point.SmoothFlag) + ctx->_TriangleCaps |= DD_POINT_SMOOTH; + if (ctx->Point._Size != 1.0F) + ctx->_TriangleCaps |= DD_POINT_SIZE; + if (ctx->Point._Attenuated) + ctx->_TriangleCaps |= DD_POINT_ATTEN; + } + + /* + * Lines + */ + if (new_state & _NEW_LINE) { + if (ctx->Line.SmoothFlag) + ctx->_TriangleCaps |= DD_LINE_SMOOTH; + if (ctx->Line.StippleFlag) + ctx->_TriangleCaps |= DD_LINE_STIPPLE; + if (ctx->Line._Width != 1.0) + ctx->_TriangleCaps |= DD_LINE_WIDTH; + } + + /* + * Polygons + */ + if (new_state & _NEW_POLYGON) { + if (ctx->Polygon.SmoothFlag) + ctx->_TriangleCaps |= DD_TRI_SMOOTH; + if (ctx->Polygon.StippleFlag) + ctx->_TriangleCaps |= DD_TRI_STIPPLE; + if (ctx->Polygon.FrontMode != GL_FILL + || ctx->Polygon.BackMode != GL_FILL) + ctx->_TriangleCaps |= DD_TRI_UNFILLED; + if (ctx->Polygon.CullFlag + && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) + ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; + if (ctx->Polygon.OffsetPoint || + ctx->Polygon.OffsetLine || + ctx->Polygon.OffsetFill) + ctx->_TriangleCaps |= DD_TRI_OFFSET; + } + + /* + * Lighting and shading + */ + if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) + ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; + if (ctx->Light.ShadeModel == GL_FLAT) + ctx->_TriangleCaps |= DD_FLATSHADE; + if (NEED_SECONDARY_COLOR(ctx)) + ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; + + /* + * Stencil + */ + if (ctx->Stencil._TestTwoSide) + ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL; +} + + +/** + * Compute derived GL state. + * If __GLcontextRec::NewState is non-zero then this function \b must + * be called before rendering anything. * * Calls dd_function_table::UpdateState to perform any internal state * management necessary. * * \sa _mesa_update_modelview_project(), _mesa_update_texture(), - * _mesa_update_buffer_bounds(), _mesa_update_polygon(), + * _mesa_update_buffer_bounds(), * _mesa_update_lighting() and _mesa_update_tnl_spaces(). */ void @@ -1052,9 +1114,6 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & _NEW_POINT) _mesa_update_point( ctx ); - if (new_state & _NEW_POLYGON) - _mesa_update_polygon( ctx ); - if (new_state & _NEW_LIGHT) _mesa_update_lighting( ctx ); @@ -1064,9 +1123,6 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & _IMAGE_NEW_TRANSFER_STATE) _mesa_update_pixel( ctx, new_state ); - if (new_state & _DD_NEW_SEPARATE_SPECULAR) - update_separate_specular( ctx ); - if (new_state & (_NEW_ARRAY | _NEW_PROGRAM)) update_arrays( ctx ); @@ -1076,6 +1132,10 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & _NEW_COLOR) update_color( ctx ); + if (new_state & (_NEW_POINT | _NEW_LINE | _NEW_POLYGON | _NEW_LIGHT + | _NEW_STENCIL | _DD_NEW_SEPARATE_SPECULAR)) + update_tricaps( ctx, new_state ); + if (ctx->_MaintainTexEnvProgram) { if (new_state & (_NEW_TEXTURE | _DD_NEW_SEPARATE_SPECULAR | _NEW_FOG)) _mesa_UpdateTexEnvProgram(ctx); @@ -1122,3 +1182,5 @@ _mesa_update_state( GLcontext *ctx ) /*@}*/ + + -- cgit v1.2.3 From 2956a0c8a8395e4d9ae00888aeb88ea5c38b89ad Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 14 Dec 2006 00:34:44 +0100 Subject: submit vertex weights to make World of Warcraft maybe happy (bug 8250) submit the vertex weights to hw, which will enable broken vertex programs errorneously using them to work. Note however that this will only work if glWeight is used, there is no code in mesa at all to deal with weight vertex array (glWeightPointerARB). --- src/mesa/drivers/dri/r200/r200_context.h | 1 + src/mesa/drivers/dri/r200/r200_maos_arrays.c | 19 ++++++++++++++++++- src/mesa/drivers/dri/r200/r200_vertprog.c | 1 - 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index fa38a78e26..44c67b68cb 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -735,6 +735,7 @@ struct r200_tcl_info { GLuint *Elts; struct r200_dma_region indexed_verts; + struct r200_dma_region weight; struct r200_dma_region obj; struct r200_dma_region rgba; struct r200_dma_region spec; diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c index 39c1f68911..270dc35a46 100644 --- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c +++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c @@ -423,7 +423,21 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) count ); } component[nr++] = &rmesa->tcl.generic[geninput]; - vfmt0 |= R200_VTX_W0 | R200_VTX_Z0; + vfmt0 |= R200_VTX_W0 | R200_VTX_Z0; + } + + if (inputs & VERT_BIT_WEIGHT) { + if (!rmesa->tcl.weight.buf) + emit_vector( ctx, + &rmesa->tcl.weight, + (char *)VB->AttribPtr[VERT_ATTRIB_WEIGHT]->data, + VB->AttribPtr[VERT_ATTRIB_WEIGHT]->size, + VB->AttribPtr[VERT_ATTRIB_WEIGHT]->stride, + count); + + assert(VB->AttribPtr[VERT_ATTRIB_WEIGHT]->size <= 4); + vfmt0 |= VB->AttribPtr[VERT_ATTRIB_WEIGHT]->size << R200_VTX_WEIGHT_COUNT_SHIFT; + component[nr++] = &rmesa->tcl.weight; } if (inputs & VERT_BIT_NORMAL) { @@ -672,6 +686,9 @@ void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs ) if (newinputs & VERT_BIT_POS) r200ReleaseDmaRegion( rmesa, &rmesa->tcl.obj, __FUNCTION__ ); + if (newinputs & VERT_BIT_WEIGHT) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.weight, __FUNCTION__ ); + if (newinputs & VERT_BIT_NORMAL) r200ReleaseDmaRegion( rmesa, &rmesa->tcl.norm, __FUNCTION__ ); diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 899e84caa0..491701b796 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -503,7 +503,6 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte array_count++; } if (mesa_vp->Base.InputsRead & VERT_BIT_WEIGHT) { - /* we don't actually handle that later. Then again, we don't have to... */ vp->inputs[VERT_ATTRIB_WEIGHT] = 12; array_count++; } -- cgit v1.2.3 From 15c7e8896ba4c0fedbe3510cb04c44ba3e8d644b Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 14 Dec 2006 03:24:57 +0000 Subject: Some more voodoo to get 3D going with a minimal initial context. --- src/mesa/drivers/dri/nouveau/nouveau_object.c | 2 ++ src/mesa/drivers/dri/nouveau/nv30_state.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index ef8a428c22..dda547c916 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -73,6 +73,8 @@ void nouveauObjectInit(nouveauContextPtr nmesa) nouveauObjectOnSubchannel(nmesa, NvSubImageBlit, NvImageBlit); BEGIN_RING_SIZE(NvSubImageBlit, NV10_IMAGE_BLIT_SET_CONTEXT_SURFACES_2D, 1); OUT_RING(NvCtxSurf2D); + BEGIN_RING_SIZE(NvSubImageBlit, NV10_IMAGE_BLIT_SET_OPERATION, 1); + OUT_RING(3); /* SRCCOPY */ #endif nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index e30dc8a37c..eb3606b6e1 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -736,9 +736,28 @@ static GLboolean nv40InitCard(nouveauContextPtr nmesa) OUT_RING(NvDmaFB); BEGIN_RING_SIZE(NvSub3D, 0x0220, 1); OUT_RING(1); + + BEGIN_RING_SIZE(NvSub3D, 0x1ea4, 3); + OUT_RING(0x00000010); + OUT_RING(0x01000100); + OUT_RING(0xff800006); + BEGIN_RING_SIZE(NvSub3D, 0x1fc4, 1); + OUT_RING(0x06144321); BEGIN_RING_SIZE(NvSub3D, 0x1fc8, 2); OUT_RING(0xedcba987); OUT_RING(0x00000021); + BEGIN_RING_SIZE(NvSub3D, 0x1fd0, 1); + OUT_RING(0x00171615); + BEGIN_RING_SIZE(NvSub3D, 0x1fd4, 1); + OUT_RING(0x001b1a19); + + BEGIN_RING_SIZE(NvSub3D, 0x1ef8, 1); + OUT_RING(0x0020ffff); + BEGIN_RING_SIZE(NvSub3D, 0x1d64, 1); + OUT_RING(0x00d30000); + BEGIN_RING_SIZE(NvSub3D, 0x1e94, 1); + OUT_RING(0x00000001); + BEGIN_RING_SIZE(NvSub3D, 0x1d60, 1); OUT_RING(0x03008000); -- cgit v1.2.3 From c95557f48beb132f96cf103822bb433e00131829 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 14 Dec 2006 04:12:05 +0000 Subject: 0x4497 doesn't have NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE --- src/mesa/drivers/dri/nouveau/nv30_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index eb3606b6e1..7592c3fa0a 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -293,8 +293,10 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) // case GL_MAP2_VERTEX_4: // case GL_MINMAX: case GL_NORMALIZE: - BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); - OUT_RING_CACHE(state); + if (nmesa->screen->card->type != NV_44) { + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1); + OUT_RING_CACHE(state); + } break; // case GL_POINT_SMOOTH: case GL_POLYGON_OFFSET_POINT: -- cgit v1.2.3 From 99878298daf37d02fbabb2dded3f7e7b52cd42fe Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 14 Dec 2006 04:34:38 +0000 Subject: Improve SwapBuffers a bit. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 39 +++++++++++++++++--------- 1 file changed, 26 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 53d26e0d74..1e25062c1d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -49,6 +49,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_tex.h" #include "nouveau_msg.h" #include "nouveau_reg.h" +#include "nouveau_lock.h" #include "nv10_swtcl.h" #include "vblank.h" @@ -303,6 +304,8 @@ static void nouveauDoSwapBuffers(nouveauContextPtr nmesa, { struct gl_framebuffer *fb; nouveau_renderbuffer *src, *dst; + drm_clip_rect_t *box; + int nbox, i; fb = (struct gl_framebuffer *)dPriv->driverPrivate; dst = (nouveau_renderbuffer*) @@ -311,19 +314,29 @@ static void nouveauDoSwapBuffers(nouveauContextPtr nmesa, fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer; #ifdef ALLOW_MULTI_SUBCHANNEL - /* Ignore this.. it's a hack to test double-buffering, and not how - * SwapBuffers should look :) - */ - BEGIN_RING_SIZE(NvSubCtxSurf2D, NV10_CONTEXT_SURFACES_2D_FORMAT, 4); - OUT_RING (6); /* X8R8G8B8 */ - OUT_RING ((dst->pitch << 16) | src->pitch); - OUT_RING (src->offset); - OUT_RING (dst->offset); - - BEGIN_RING_SIZE(NvSubImageBlit, NV10_IMAGE_BLIT_SET_POINT, 3); - OUT_RING ((0 << 16) | 0); /* src point */ - OUT_RING ((0 << 16) | 0); /* dst point */ - OUT_RING ((fb->Height << 16) | fb->Width); /* width/height */ + LOCK_HARDWARE(nmesa); + nbox = dPriv->numClipRects; + box = dPriv->pClipRects; + + if (nbox) { + BEGIN_RING_SIZE(NvSubCtxSurf2D, + NV10_CONTEXT_SURFACES_2D_FORMAT, 4); + OUT_RING (6); /* X8R8G8B8 */ + OUT_RING ((dst->pitch << 16) | src->pitch); + OUT_RING (src->offset); + OUT_RING (dst->offset); + } + + for (i=0; iy1 - dPriv->y) << 16) | + (box->x1 - dPriv->x)); + OUT_RING ((box->y1 << 16) | box->x1); + OUT_RING (((box->y2 - box->y1) << 16) | + (box->x2 - box->x1)); + } + + UNLOCK_HARDWARE(nmesa); #endif } -- cgit v1.2.3 From 9c09259b8bef8f120cc6f4bb1a44f0eae37d71b3 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 10:01:43 +0100 Subject: _mesa_swizzle_ubyte_image: Only use single swizzle_copy call when strides match. This fixes texture data corruption with glTexSubimage (and probably glTexImage under some circumstances) with the texstore swizzle path. --- src/mesa/main/texstore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 89563842c2..87f8fa7a0d 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -808,7 +808,8 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx, /* _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */ - if (srcRowStride == srcWidth * srcComponents && + if (srcRowStride == dstRowStride && + srcRowStride == srcWidth * srcComponents && dimensions < 3) { /* 1 and 2D images only */ GLubyte *dstImage = (GLubyte *) dstAddr -- cgit v1.2.3 From 4cb09df015068f6d75e6457b6c98836dd58aaf29 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 10:24:09 +0100 Subject: intelTexSubimage: Fix last parameter for intel_miptree_image_map(). --- src/mesa/drivers/dri/i915tex/intel_tex_subimage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_subimage.c b/src/mesa/drivers/dri/i915tex/intel_tex_subimage.c index 25a2dca685..3935787806 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_subimage.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_subimage.c @@ -50,7 +50,6 @@ intelTexSubimage(GLcontext * ctx, { struct intel_context *intel = intel_context(ctx); struct intel_texture_image *intelImage = intel_texture_image(texImage); - GLuint dstImageStride; GLuint dstRowStride; DBG("%s target %s level %d offset %d,%d %dx%d\n", __FUNCTION__, @@ -79,7 +78,7 @@ intelTexSubimage(GLcontext * ctx, intelImage->face, intelImage->level, &dstRowStride, - &dstImageStride); + texImage->ImageOffsets); assert(dstRowStride); -- cgit v1.2.3 From 5f8a3e586f21219d02912635a93ce312bcf5987c Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 10:49:26 +0100 Subject: intel_batchbuffer_flush: Don't assert cliprects when lock is not held. This is a legitimate situation when copying texture data between mipmap trees. --- src/mesa/drivers/dri/i915tex/intel_batchbuffer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c index b4e0b74f16..be2750d041 100644 --- a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c @@ -252,6 +252,7 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch) { struct intel_context *intel = batch->intel; GLuint used = batch->ptr - batch->map; + GLboolean was_locked = intel->locked; if (used == 0) return batch->last_fence; @@ -278,17 +279,14 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch) /* TODO: Just pass the relocation list and dma buffer up to the * kernel. */ - if (!intel->locked) { - assert(!(batch->flags & INTEL_BATCH_NO_CLIPRECTS)); - + if (!was_locked) LOCK_HARDWARE(intel); - do_flush_locked(batch, used, GL_FALSE, GL_TRUE); + + do_flush_locked(batch, used, !(batch->flags & INTEL_BATCH_CLIPRECTS), + GL_FALSE); + + if (!was_locked) UNLOCK_HARDWARE(intel); - } - else { - GLboolean ignore_cliprects = !(batch->flags & INTEL_BATCH_CLIPRECTS); - do_flush_locked(batch, used, ignore_cliprects, GL_FALSE); - } /* Reset the buffer: */ -- cgit v1.2.3 From cc1afed6718882d13ab66ba0bbeaab6334e0629c Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 10:56:10 +0100 Subject: intel_finalize_mipmap_tree: Add more conditions for rebuilding mipmap trees. These are taken from the i965 driver and fix corruption of some mipmap levels under some circumsances with 945 chipsets at least. Also flush the batchbuffer after copying data between trees, or some apps fail an assertion elsewhere. --- src/mesa/drivers/dri/i915tex/intel_tex_validate.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c index 5f82dfa19e..e73c9c2f21 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c @@ -2,6 +2,7 @@ #include "macros.h" #include "intel_context.h" +#include "intel_batchbuffer.h" #include "intel_mipmap_tree.h" #include "intel_tex.h" @@ -155,9 +156,15 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) * leaving the tree alone. */ if (intelObj->mt && - ((intelObj->mt->first_level > intelObj->firstLevel) || - (intelObj->mt->last_level < intelObj->lastLevel) || - (intelObj->mt->internal_format != firstImage->base.InternalFormat))) { + (intelObj->mt->target != intelObj->base.Target || + intelObj->mt->internal_format != firstImage->base.InternalFormat || + intelObj->mt->first_level != intelObj->firstLevel || + intelObj->mt->last_level != intelObj->lastLevel || + intelObj->mt->width0 != firstImage->base.Width || + intelObj->mt->height0 != firstImage->base.Height || + intelObj->mt->depth0 != firstImage->base.Depth || + intelObj->mt->cpp != firstImage->base.TexFormat->TexelBytes || + intelObj->mt->compressed != firstImage->base.IsCompressed)) { intel_miptree_release(intel, &intelObj->mt); } @@ -198,6 +205,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) } } + intel_batchbuffer_flush(intel->batch); + return GL_TRUE; } -- cgit v1.2.3 From 3416ef303af633668cece0b199b4a8b2388c1e2f Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 12:32:41 +0100 Subject: Share code to lay out >= 945 style 2D mipmaps between i915tex and i965 drivers. Use the i965 version as it has some fixes over the i915tex version. --- src/mesa/drivers/dri/i915tex/Makefile | 5 +- src/mesa/drivers/dri/i915tex/i915_tex_layout.c | 54 +--------------- src/mesa/drivers/dri/i915tex/intel_tex_layout.c | 1 + src/mesa/drivers/dri/i965/Makefile | 5 +- src/mesa/drivers/dri/i965/brw_tex_layout.c | 55 +---------------- src/mesa/drivers/dri/i965/intel_tex_layout.c | 1 + src/mesa/drivers/dri/intel/intel_tex_layout.c | 82 +++++++++++++++++++++++++ src/mesa/drivers/dri/intel/intel_tex_layout.h | 41 +++++++++++++ 8 files changed, 139 insertions(+), 105 deletions(-) create mode 120000 src/mesa/drivers/dri/i915tex/intel_tex_layout.c create mode 120000 src/mesa/drivers/dri/i965/intel_tex_layout.c create mode 100644 src/mesa/drivers/dri/intel/intel_tex_layout.c create mode 100644 src/mesa/drivers/dri/intel/intel_tex_layout.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/Makefile b/src/mesa/drivers/dri/i915tex/Makefile index 94879d209f..3b3f3f5a3f 100644 --- a/src/mesa/drivers/dri/i915tex/Makefile +++ b/src/mesa/drivers/dri/i915tex/Makefile @@ -20,6 +20,7 @@ DRIVER_SOURCES = \ intel_batchbuffer.c \ intel_mipmap_tree.c \ i915_tex_layout.c \ + intel_tex_layout.c \ intel_tex_image.c \ intel_tex_subimage.c \ intel_tex_copy.c \ @@ -59,8 +60,10 @@ C_SOURCES = \ ASM_SOURCES = - +DRIVER_DEFINES = -I../intel include ../Makefile.template +intel_tex_layout.o: ../intel/intel_tex_layout.c + symlinks: diff --git a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c index e9360ecea8..fc98611d31 100644 --- a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c +++ b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c @@ -30,6 +30,7 @@ */ #include "intel_mipmap_tree.h" +#include "intel_tex_layout.h" #include "macros.h" #include "intel_context.h" @@ -52,12 +53,6 @@ static GLint step_offsets[6][2] = { {0, 2}, {-1, 1} }; -static GLuint -minify(GLuint d) -{ - return MAX2(1, d >> 1); -} - GLboolean i915_miptree_layout(struct intel_mipmap_tree * mt) { @@ -322,52 +317,9 @@ i945_miptree_layout(struct intel_mipmap_tree * mt) case GL_TEXTURE_1D: case GL_TEXTURE_2D: - case GL_TEXTURE_RECTANGLE_ARB:{ - GLuint x = 0; - GLuint y = 0; - GLuint width = mt->width0; - GLuint height = mt->height0; - GLint align_h = 2; - - mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp; - mt->total_height = 0; - - for (level = mt->first_level; level <= mt->last_level; level++) { - GLuint img_height; - - intel_miptree_set_level_info(mt, level, 1, - x, y, - width, - mt->compressed ? height/4 : height, 1); - - - if (mt->compressed) - img_height = MAX2(1, height / 4); - else - img_height = MAX2(align_h, height); - - /* LPT change: step right after second mipmap. - */ - if (level == mt->first_level + 1) { - x += mt->pitch / 2; - x = (x + 3) & ~3; - } - else { - y += img_height; - y += align_h - 1; - y &= ~(align_h - 1); - } - - /* Because the images are packed better, the final offset - * might not be the maximal one: - */ - mt->total_height = MAX2(mt->total_height, y); - - width = minify(width); - height = minify(height); - } + case GL_TEXTURE_RECTANGLE_ARB: + i945_miptree_layout_2d(mt); break; - } default: _mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()"); } diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_layout.c b/src/mesa/drivers/dri/i915tex/intel_tex_layout.c new file mode 120000 index 0000000000..fe61b44194 --- /dev/null +++ b/src/mesa/drivers/dri/i915tex/intel_tex_layout.c @@ -0,0 +1 @@ +../intel/intel_tex_layout.c \ No newline at end of file diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 213eac895c..f0a6fa5740 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -20,6 +20,7 @@ DRIVER_SOURCES = \ intel_pixel_bitmap.c \ intel_state.c \ intel_tex.c \ + intel_tex_layout.c \ intel_tex_validate.c \ brw_aub.c \ brw_aub_playback.c \ @@ -92,8 +93,10 @@ C_SOURCES = \ ASM_SOURCES = - +DRIVER_DEFINES = -I../intel include ../Makefile.template +intel_tex_layout.o: ../intel/intel_tex_layout.c + symlinks: diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 1353325aff..af1ad0f1ef 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -34,21 +34,15 @@ */ #include "intel_mipmap_tree.h" +#include "intel_tex_layout.h" #include "macros.h" -static GLuint minify( GLuint d ) -{ - return MAX2(1, d>>1); -} - GLboolean brw_miptree_layout( struct intel_mipmap_tree *mt ) { /* XXX: these vary depending on image format: */ /* GLint align_w = 4; */ - GLint align_h = 2; - switch (mt->target) { case GL_TEXTURE_CUBE_MAP: @@ -107,53 +101,10 @@ GLboolean brw_miptree_layout( struct intel_mipmap_tree *mt ) break; } - default: { - GLuint level; - GLuint x = 0; - GLuint y = 0; - GLuint width = mt->width0; - GLuint height = mt->height0; - - mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp; - mt->total_height = 0; - - for ( level = mt->first_level ; level <= mt->last_level ; level++ ) { - GLuint img_height; - - intel_miptree_set_level_info(mt, level, 1, - x, y, - width, - mt->compressed ? height/4 : height, 1); - - if (mt->compressed) - img_height = MAX2(1, height/4); - else - img_height = MAX2(align_h, height); - - - /* Because the images are packed better, the final offset - * might not be the maximal one: - */ - mt->total_height = MAX2(mt->total_height, y + img_height); - - /* Layout_below: step right after second mipmap. - */ - if (level == mt->first_level + 1) { - x += mt->pitch / 2; - x = (x + 3) & ~ 3; - } - else { - y += img_height; - y += align_h - 1; - y &= ~(align_h - 1); - } - - width = minify(width); - height = minify(height); - } + default: + i945_miptree_layout_2d(mt); break; } - } DBG("%s: %dx%dx%d - sz 0x%x\n", __FUNCTION__, mt->pitch, mt->total_height, diff --git a/src/mesa/drivers/dri/i965/intel_tex_layout.c b/src/mesa/drivers/dri/i965/intel_tex_layout.c new file mode 120000 index 0000000000..fe61b44194 --- /dev/null +++ b/src/mesa/drivers/dri/i965/intel_tex_layout.c @@ -0,0 +1 @@ +../intel/intel_tex_layout.c \ No newline at end of file diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c new file mode 100644 index 0000000000..6b9e1de2ed --- /dev/null +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c @@ -0,0 +1,82 @@ +/************************************************************************** + * + * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + /* + * Authors: + * Keith Whitwell + * Michel Dänzer + */ + +#include "intel_mipmap_tree.h" +#include "intel_tex_layout.h" +#include "macros.h" + + +void i945_miptree_layout_2d( struct intel_mipmap_tree *mt ) +{ + GLint align_h = 2; + GLuint level; + GLuint x = 0; + GLuint y = 0; + GLuint width = mt->width0; + GLuint height = mt->height0; + + mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp; + mt->total_height = 0; + + for ( level = mt->first_level ; level <= mt->last_level ; level++ ) { + GLuint img_height; + + intel_miptree_set_level_info(mt, level, 1, x, y, width, + mt->compressed ? height/4 : height, 1); + + if (mt->compressed) + img_height = MAX2(1, height/4); + else + img_height = MAX2(align_h, height); + + + /* Because the images are packed better, the final offset + * might not be the maximal one: + */ + mt->total_height = MAX2(mt->total_height, y + img_height); + + /* Layout_below: step right after second mipmap. + */ + if (level == mt->first_level + 1) { + x += mt->pitch / 2; + x = (x + 3) & ~ 3; + } + else { + y += img_height; + y += align_h - 1; + y &= ~(align_h - 1); + } + + width = minify(width); + height = minify(height); + } +} diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.h b/src/mesa/drivers/dri/intel/intel_tex_layout.h new file mode 100644 index 0000000000..e685d474ec --- /dev/null +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.h @@ -0,0 +1,41 @@ +/************************************************************************** + * + * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + /* + * Authors: + * Keith Whitwell + * Michel Dänzer + */ + +#include "macros.h" + + +static GLuint minify( GLuint d ) +{ + return MAX2(1, d>>1); +} + +extern void i945_miptree_layout_2d( struct intel_mipmap_tree *mt ); -- cgit v1.2.3 From 81855f22cd8d8df5bd96fdbd76ff975b6cf4150b Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 12:42:51 +0100 Subject: Fix some corner cases in i945_miptree_layout_2d(). Based on a patch from Keith Whitwell, with some further fixes. --- src/mesa/drivers/dri/intel/intel_tex_layout.c | 34 +++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c index 6b9e1de2ed..b503175001 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_layout.c +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c @@ -35,16 +35,39 @@ #include "macros.h" +static int align(int value, int alignment) +{ + return (value + alignment - 1) & ~(alignment - 1); +} + void i945_miptree_layout_2d( struct intel_mipmap_tree *mt ) { - GLint align_h = 2; + GLint align_h = 2, align_w = 4; GLuint level; GLuint x = 0; GLuint y = 0; GLuint width = mt->width0; GLuint height = mt->height0; - mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp; + mt->pitch = mt->width0; + + /* May need to adjust pitch to accomodate the placement of + * the 2nd mipmap. This occurs when the alignment + * constraints of mipmap placement push the right edge of the + * 2nd mipmap out past the width of its parent. + */ + if (mt->first_level != mt->last_level) { + GLuint mip1_width = align(minify(mt->width0), align_w) + + minify(minify(mt->width0)); + + if (mip1_width > mt->width0) + mt->pitch = mip1_width; + } + + /* Pitch must be a whole number of dwords, even though we + * express it in texels. + */ + mt->pitch = align(mt->pitch * mt->cpp, 4) / mt->cpp; mt->total_height = 0; for ( level = mt->first_level ; level <= mt->last_level ; level++ ) { @@ -56,7 +79,7 @@ void i945_miptree_layout_2d( struct intel_mipmap_tree *mt ) if (mt->compressed) img_height = MAX2(1, height/4); else - img_height = MAX2(align_h, height); + img_height = align(height, align_h); /* Because the images are packed better, the final offset @@ -67,13 +90,10 @@ void i945_miptree_layout_2d( struct intel_mipmap_tree *mt ) /* Layout_below: step right after second mipmap. */ if (level == mt->first_level + 1) { - x += mt->pitch / 2; - x = (x + 3) & ~ 3; + x += align(width, align_w); } else { y += img_height; - y += align_h - 1; - y &= ~(align_h - 1); } width = minify(width); -- cgit v1.2.3 From e0c9361a7cd16cc008220cf1933fba4371f46753 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 12:47:44 +0100 Subject: Avoid failing assertion in intel_miptree_set_image_offset() with cube maps. Cube maps still aren't working quite correctly though. --- src/mesa/drivers/dri/i915tex/i915_tex_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c index fc98611d31..333fefef85 100644 --- a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c +++ b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c @@ -212,7 +212,7 @@ i945_miptree_layout(struct intel_mipmap_tree * mt) y = mt->total_height - 4; x = (face - 4) * 8; } - else if (dim < 4) { + else if (dim < 4 && (face > 0 || mt->first_level > 0)) { y = mt->total_height - 4; x = face * 8; } -- cgit v1.2.3 From fde908444af5c826bce84203a9cb4273d8341ed0 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 14 Dec 2006 12:57:59 +0100 Subject: Fix copy-and-paste-o of my e-mail address. --- src/mesa/drivers/dri/intel/intel_tex_layout.c | 2 +- src/mesa/drivers/dri/intel/intel_tex_layout.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c index b503175001..f356480217 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_layout.c +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c @@ -27,7 +27,7 @@ /* * Authors: * Keith Whitwell - * Michel Dänzer + * Michel Dänzer */ #include "intel_mipmap_tree.h" diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.h b/src/mesa/drivers/dri/intel/intel_tex_layout.h index e685d474ec..1e37f8f525 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_layout.h +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.h @@ -27,7 +27,7 @@ /* * Authors: * Keith Whitwell - * Michel Dänzer + * Michel Dänzer */ #include "macros.h" -- cgit v1.2.3 From 5cc12925089ba705e4f0af9649bc30b546d900ff Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 14:27:05 -0700 Subject: Replace __extension__ with LONGSTRING. --- src/mesa/shader/arbprogparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 5a61f30193..72d4909372 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -3703,7 +3703,7 @@ parse_instructions(GLcontext * ctx, const GLubyte * inst, /* XXX temporary */ -__extension__ static char core_grammar_text[] = +LONGSTRING static char core_grammar_text[] = #include "grammar_syn.h" ; -- cgit v1.2.3 From c340dd7d842b3f20a6d3d2bec1ebb0d1de15728e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 15 Dec 2006 21:02:23 +0000 Subject: NV1x/2x hw_func stubs. --- src/mesa/drivers/dri/nouveau/nv10_state.c | 34 ++++++++++++++++++++++++++++--- src/mesa/drivers/dri/nouveau/nv20_state.c | 34 ++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index e88ac2bfe6..be5f5f6e42 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -500,8 +500,11 @@ void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); /** Set rasterization mode */ void (*RenderMode)(GLcontext *ctx, GLenum mode ); + /** Define the scissor box */ -void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +static void nv10Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ +} /** Select flat or smooth shading */ static void nv10ShadeModel(GLcontext *ctx, GLenum mode) @@ -567,8 +570,29 @@ static void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) OUT_RING_CACHE((h << 16) | y); } -void nv10InitStateFuncs(struct dd_function_table *func) +/* Initialise any card-specific non-GL related state */ +static GLboolean nv10InitCard(nouveauContextPtr nmesa) +{ + return GL_TRUE; +} + +/* Update buffer offset/pitch/format */ +static GLboolean nv10BindBuffers(nouveauContextPtr nmesa, int num_color, + nouveau_renderbuffer **color, + nouveau_renderbuffer *depth) +{ + return GL_TRUE; +} + +/* Update anything that depends on the window position/size */ +static void nv10WindowMoved(nouveauContextPtr nmesa) { +} + +void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + func->AlphaFunc = nv10AlphaFunc; func->BlendColor = nv10BlendColor; func->BlendEquationSeparate = nv10BlendEquationSeparate; @@ -602,8 +626,8 @@ void nv10InitStateFuncs(struct dd_function_table *func) func->PolygonStipple = nv10PolygonStipple; func->ReadBuffer = nv10ReadBuffer; func->RenderMode = nv10RenderMode; - func->Scissor = nv10Scissor; #endif + func->Scissor = nv10Scissor; func->ShadeModel = nv10ShadeModel; func->StencilFuncSeparate = nv10StencilFuncSeparate; func->StencilMaskSeparate = nv10StencilMaskSeparate; @@ -614,5 +638,9 @@ void nv10InitStateFuncs(struct dd_function_table *func) func->TextureMatrix = nv10TextureMatrix; #endif func->Viewport = nv10Viewport; + + nmesa->hw_func.InitCard = nv10InitCard; + nmesa->hw_func.BindBuffers = nv10BindBuffers; + nmesa->hw_func.WindowMoved = nv10WindowMoved; } diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index ff06d481ee..6bfac8466b 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -515,8 +515,11 @@ void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); /** Set rasterization mode */ void (*RenderMode)(GLcontext *ctx, GLenum mode ); + /** Define the scissor box */ -void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); +static void nv20Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +{ +} /** Select flat or smooth shading */ static void nv20ShadeModel(GLcontext *ctx, GLenum mode) @@ -582,8 +585,33 @@ static void nv20Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) OUT_RING_CACHE((h << 16) | y); } -void nv20InitStateFuncs(struct dd_function_table *func) +/* Initialise any card-specific non-GL related state */ +static GLboolean nv20InitCard(nouveauContextPtr nmesa) +{ + return GL_TRUE; +} + +/* Update buffer offset/pitch/format */ +static GLboolean nv20BindBuffers(nouveauContextPtr nmesa, int num_color, + nouveau_renderbuffer **color, + nouveau_renderbuffer *depth) +{ + return GL_TRUE; +} + +/* Update anything that depends on the window position/size */ +static void nv20WindowMoved(nouveauContextPtr nmesa) { +} + +void nv20InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + nmesa->hw_func.InitCard = nv20InitCard; + nmesa->hw_func.BindBuffers = nv20BindBuffers; + nmesa->hw_func.WindowMoved = nv20WindowMoved; + func->AlphaFunc = nv20AlphaFunc; func->BlendColor = nv20BlendColor; func->BlendEquationSeparate = nv20BlendEquationSeparate; @@ -615,8 +643,8 @@ void nv20InitStateFuncs(struct dd_function_table *func) func->PolygonStipple = nv20PolygonStipple; func->ReadBuffer = nv20ReadBuffer; func->RenderMode = nv20RenderMode; - func->Scissor = nv20Scissor; #endif + func->Scissor = nv20Scissor; func->ShadeModel = nv20ShadeModel; func->StencilFuncSeparate = nv20StencilFuncSeparate; func->StencilMaskSeparate = nv20StencilMaskSeparate; -- cgit v1.2.3 From 24a495fd77f98b666c1f17e88a8134301cb8dee7 Mon Sep 17 00:00:00 2001 From: Gary Wong Date: Fri, 15 Dec 2006 17:18:36 -0500 Subject: Fix copy-and-paste mistake in comment ("scaling" should read "translation"). Before _mesa_Translatef(). --- src/mesa/main/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 7339b0ce40..b2aa83e189 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -427,7 +427,7 @@ _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ) /** - * Multiply the current matrix with a general scaling matrix. + * Multiply the current matrix with a translation matrix. * * \param x translation vector x coordinate. * \param y translation vector y coordinate. -- cgit v1.2.3 From de947e8a5b2f10eb3fd2bdeacc54209e55447e86 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 16 Dec 2006 12:32:11 +0000 Subject: Get nv10_swtcl.c working enough for glxgears on NV40. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 6 +-- src/mesa/drivers/dri/nouveau/nouveau_context.h | 1 + src/mesa/drivers/dri/nouveau/nouveau_shader.c | 65 +++++++++++++++++++++++++- src/mesa/drivers/dri/nouveau/nouveau_shader.h | 3 ++ src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 27 ++++++++++- 5 files changed, 96 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 1e25062c1d..22c1f58874 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -187,11 +187,9 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, nmesa->current_primitive = -1; nouveauShaderInitFuncs(ctx); - /* Install Mesa's fixed-function shader support */ - if (nmesa->screen->card->type >= NV_40) { - ctx->_MaintainTnlProgram = GL_TRUE; + /* Install Mesa's fixed-function texenv shader support */ + if (nmesa->screen->card->type >= NV_40) ctx->_MaintainTexEnvProgram = GL_TRUE; - } /* Initialize the swrast */ _swrast_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 211d4e0a6d..d7730bd796 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -144,6 +144,7 @@ typedef struct nouveau_context { nvsFunc FPfunc; nouveauShader *current_fragprog; nouveauShader *current_vertprog; + nouveauShader *passthrough_vp; nouveauScreenRec *screen; drm_nouveau_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index e3082ebc69..9a09f43d58 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -37,6 +37,7 @@ #include "program.h" #include "tnl/tnl.h" +#include "shader/arbprogparse.h" #include "nouveau_context.h" #include "nouveau_shader.h" @@ -161,6 +162,63 @@ nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs) return GL_TRUE; } +nouveauShader * +nvsBuildTextShader(GLcontext *ctx, GLenum target, const char *text) +{ + nouveauShader *nvs; + + nvs = CALLOC_STRUCT(_nouveauShader); + if (!nvs) + return NULL; + + if (target == GL_VERTEX_PROGRAM_ARB) { + _mesa_init_vertex_program(ctx, &nvs->mesa.vp, GL_VERTEX_PROGRAM_ARB, 0); + _mesa_parse_arb_vertex_program(ctx, + GL_VERTEX_PROGRAM_ARB, + text, + strlen(text), + &nvs->mesa.vp); + } else if (target == GL_FRAGMENT_PROGRAM_ARB) { + _mesa_init_fragment_program(ctx, &nvs->mesa.fp, GL_VERTEX_PROGRAM_ARB, 0); + _mesa_parse_arb_fragment_program(ctx, + GL_FRAGMENT_PROGRAM_ARB, + text, + strlen(text), + &nvs->mesa.fp); + } + + nouveau_shader_pass0_arb(ctx, nvs); + nouveau_shader_pass1(nvs); + nouveau_shader_pass2(nvs); + + return nvs; +} + +static void +nvsBuildPassthroughVP(GLcontext *ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + const char *vp_text = + "!!ARBvp1.0\n" + "OPTION ARB_position_invariant;" + "" + "MOV result.color, vertex.color;\n" + "MOV result.texcoord[0], vertex.texcoord[0];\n" + "MOV result.texcoord[1], vertex.texcoord[1];\n" + "MOV result.texcoord[2], vertex.texcoord[2];\n" + "MOV result.texcoord[3], vertex.texcoord[3];\n" + "MOV result.texcoord[4], vertex.texcoord[4];\n" + "MOV result.texcoord[5], vertex.texcoord[5];\n" + "MOV result.texcoord[6], vertex.texcoord[6];\n" + "MOV result.texcoord[7], vertex.texcoord[7];\n" + "END"; + + nmesa->passthrough_vp = nvsBuildTextShader(ctx, + GL_VERTEX_PROGRAM_ARB, + vp_text); +} + void nouveauShaderInitFuncs(GLcontext * ctx) { @@ -184,6 +242,11 @@ nouveauShaderInitFuncs(GLcontext * ctx) return; } + /* Build a vertex program that simply passes through all attribs. + * Needed to do swtcl on nv40 + */ + nvsBuildPassthroughVP(ctx); + ctx->Const.VertexProgram.MaxNativeInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeAluInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeTexInstructions = nmesa->VPfunc.MaxInst; @@ -446,7 +509,7 @@ nvsDumpReg(nvsInstruction * inst, nvsRegister * reg) printf(")"); } -void +static void nvsDumpInstruction(nvsInstruction * inst, int slot, int lvl) { struct _opcode_info *opr = &ops[inst->op]; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index dce2e23f46..652775e6c2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -349,6 +349,9 @@ nvsSwizzle(nvsRegister reg, nvsSwzComp x, nvsSwzComp y, extern GLboolean nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs); extern void nvsDisasmHWShader(nvsPtr); +extern void nvsDumpFragmentList(nvsFragmentList *f, int lvl); +extern nouveauShader *nvsBuildTextShader(GLcontext *ctx, GLenum target, + const char *text); extern void NV20VPInitShaderFuncs(nvsFunc *); extern void NV30VPInitShaderFuncs(nvsFunc *); diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 07b3e666df..37d9f001d1 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -366,6 +366,15 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa) int i; int slots=0; int total_size=0; + /* t_vertex_generic dereferences a NULL pointer if we + * pass NULL as the vp transform... + */ + const GLfloat ident_vp[16] = { + 1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + 0.0, 0.0, 0.0, 1.0 + }; RENDERINPUTS_COPY(index, nmesa->render_inputs_bitset); @@ -425,10 +434,11 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa) total_size+=attr_size[i]; } } + nmesa->vertex_size=_tnl_install_attrs( ctx, nmesa->vertex_attrs, nmesa->vertex_attr_count, - NULL, 0 ); + ident_vp, 0 ); assert(nmesa->vertex_size==total_size*4); /* @@ -467,6 +477,8 @@ static inline void nv10OutputVertexFormat(struct nouveau_context* nmesa) OUT_RING_CACHE(NV_VERTEX_ATTRIBUTE_TYPE_FLOAT|(size*0x10)); } } else { + BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_DO_VERTICES, 1); + OUT_RING(0); BEGIN_RING_CACHE(NvSub3D,NV30_TCL_PRIMITIVE_3D_VERTEX_ATTR0_POS,slots); for(i=0;irender_inputs_bitset, index); nv10OutputVertexFormat(nmesa); } + + if (nmesa->screen->card->type >= NV_40) { + /* Ensure passthrough shader is being used, and mvp matrix + * is up to date + */ + nvsUpdateShader(ctx, nmesa->passthrough_vp); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_IN_REG, 2); + OUT_RING_CACHE (0xff09); /*IN : POS, COL, TC0-7 */ + OUT_RING_CACHE (0x3fc001); /*OUT: COL, TC0-7, POS implied */ + + /* Update texenv shader / user fragprog */ + nvsUpdateShader(ctx, (nouveauShader*)ctx->FragmentProgram._Current); + } } -- cgit v1.2.3 From 6d982e53ee079dc6a9a20bd5d80b7f856e943e5d Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 11:07:00 -0700 Subject: don't allow fog when using a fragment shader (bug 9346) --- src/mesa/swrast/s_context.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 52d560ffdb..d4b8080ddc 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -201,7 +201,10 @@ _swrast_update_fog_state( GLcontext *ctx ) /* determine if fog is needed, and if so, which fog mode */ swrast->_FogEnabled = GL_FALSE; - if (ctx->FragmentProgram._Enabled) { + if (ctx->ShaderObjects._FragmentShaderPresent) { + swrast->_FogEnabled = GL_FALSE; + } + else if (ctx->FragmentProgram._Enabled) { if (ctx->FragmentProgram._Current->Base.Target==GL_FRAGMENT_PROGRAM_ARB) { const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; -- cgit v1.2.3 From b497a0cb7c607bfad3389c6831de0dfdc37ee5af Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 11:17:41 -0700 Subject: Don't update span->array->z[] values from SLANG_FRAGMENT_FIXED_FRAGDEPTH. This restores the behaviour of Mesa 6.5.1, fixing a regression in 6.5.2. See bug 9345. Revisit someday... --- src/mesa/swrast/s_arbshader.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c index ee971a36ec..356e43c819 100644 --- a/src/mesa/swrast/s_arbshader.c +++ b/src/mesa/swrast/s_arbshader.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.3 * * Copyright (C) 2006 Brian Paul All Rights Reserved. * @@ -103,18 +103,20 @@ _swrast_exec_arbshader(GLcontext *ctx, SWspan *span) span->writeAll = GL_FALSE; } else { + GLboolean zWritten = GL_FALSE; /* temp hack (bug 9345) */ (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGCOLOR, vec, 0, 4 * sizeof(GLfloat), GL_FALSE); COPY_4V(span->array->color.sz4.rgba[i], vec); - - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGDEPTH, vec, 0, - sizeof (GLfloat), GL_FALSE); - if (vec[0] <= 0.0f) - span->array->z[i] = 0; - else if (vec[0] >= 1.0f) - span->array->z[i] = ctx->DrawBuffer->_DepthMax; - else - span->array->z[i] = IROUND(vec[0] * ctx->DrawBuffer->_DepthMaxF); + if (zWritten) { + (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGDEPTH, + vec, 0, sizeof (GLfloat), GL_FALSE); + if (vec[0] <= 0.0f) + span->array->z[i] = 0; + else if (vec[0] >= 1.0f) + span->array->z[i] = ctx->DrawBuffer->_DepthMax; + else + span->array->z[i] = IROUND(vec[0] * ctx->DrawBuffer->_DepthMaxF); + } } } } -- cgit v1.2.3 From 53d40646bdac2deb7954794e213154e0a4596278 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 17 Dec 2006 03:38:21 +0000 Subject: Don't build passthrough shader on screen->card->type >= NV_40) + nvsBuildPassthroughVP(ctx); ctx->Const.VertexProgram.MaxNativeInstructions = nmesa->VPfunc.MaxInst; ctx->Const.VertexProgram.MaxNativeAluInstructions = nmesa->VPfunc.MaxInst; -- cgit v1.2.3 From b766643e5c3c9ed174c59b54e520f94e3420e39a Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Wed, 6 Dec 2006 06:40:18 +0200 Subject: Drop mesa wrappers for XFree86. --- src/mesa/main/glheader.h | 12 +-- src/mesa/main/imports.c | 222 +++++++++-------------------------------------- src/mesa/main/imports.h | 19 +--- 3 files changed, 45 insertions(+), 208 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index e37499e4be..5abea137d7 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -5,8 +5,8 @@ * This is the top-most include file of the Mesa sources. * It includes gl.h and all system headers which are needed. * Other Mesa source files should \e not directly include any system - * headers. This allows Mesa to be integrated into XFree86 and - * allows system-dependent hacks/workarounds to be collected in one place. + * headers. This allows system-dependent hacks/workarounds to be + * collected in one place. * * \note Actually, a lot of system-dependent stuff is now in imports.[ch]. * @@ -46,18 +46,15 @@ #ifndef GLHEADER_H #define GLHEADER_H +/* This allows Mesa to be integrated into XFree86 */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif -#if defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER) -#include "xf86_ansic.h" -#else #include #include -/* If we can use Compaq's Fast Math Library on Alpha */ #if defined(__alpha__) && defined(CCPML) -#include +#include /* use Compaq's Fast Math Library on Alpha */ #else #include #endif @@ -68,7 +65,6 @@ #if defined(__linux__) && defined(__i386__) #include #endif -#endif #include #include diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index a09c497795..ed809acbe2 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -24,9 +24,6 @@ * - scanf * - qsort * - rand and RAND_MAX - * - * \note When compiled into a XFree86 module these functions wrap around - * XFree86 own wrappers. */ /* @@ -71,50 +68,29 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); #endif #endif -/* If we don't actually want to use the libcwrapper junk (even though we're - * building an Xorg server module), then just undef IN_MODULE to signal that to - * the following code. It's left around for now to allow compiling of newish - * Mesa with older servers, but this whole mess should go away at some point. - */ -#ifdef NO_LIBCWRAPPER -#undef IN_MODULE -#endif - /**********************************************************************/ /** \name Memory */ /*@{*/ -/** Wrapper around either malloc() or xf86malloc() */ +/** Wrapper around malloc() */ void * _mesa_malloc(size_t bytes) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86malloc(bytes); -#else return malloc(bytes); -#endif } -/** Wrapper around either calloc() or xf86calloc() */ +/** Wrapper around calloc() */ void * _mesa_calloc(size_t bytes) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86calloc(1, bytes); -#else return calloc(1, bytes); -#endif } -/** Wrapper around either free() or xf86free() */ +/** Wrapper around free() */ void _mesa_free(void *ptr) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86free(ptr); -#else free(ptr); -#endif } /** @@ -131,7 +107,7 @@ _mesa_free(void *ptr) void * _mesa_align_malloc(size_t bytes, unsigned long alignment) { -#if defined(HAVE_POSIX_MEMALIGN) && !(defined(XFree86LOADER) && defined(IN_MODULE)) +#if defined(HAVE_POSIX_MEMALIGN) void *mem; (void) posix_memalign(& mem, alignment, bytes); @@ -157,7 +133,7 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment) #endif return (void *) buf; -#endif /* defined(HAVE_POSIX_MEMALIGN) && !(defined(XFree86LOADER) && defined(IN_MODULE)) */ +#endif /* defined(HAVE_POSIX_MEMALIGN) */ } /** @@ -167,7 +143,7 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment) void * _mesa_align_calloc(size_t bytes, unsigned long alignment) { -#if defined(HAVE_POSIX_MEMALIGN) && !(defined(XFree86LOADER) && defined(IN_MODULE)) +#if defined(HAVE_POSIX_MEMALIGN) void *mem; mem = _mesa_align_malloc(bytes, alignment); @@ -197,7 +173,7 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment) #endif return (void *)buf; -#endif /* defined(HAVE_POSIX_MEMALIGN) && !(defined(XFree86LOADER) && defined(IN_MODULE)) */ +#endif /* defined(HAVE_POSIX_MEMALIGN) */ } /** @@ -210,13 +186,13 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment) void _mesa_align_free(void *ptr) { -#if defined(HAVE_POSIX_MEMALIGN) && !(defined(XFree86LOADER) && defined(IN_MODULE)) +#if defined(HAVE_POSIX_MEMALIGN) free(ptr); #else void **cubbyHole = (void **) ((char *) ptr - sizeof(void *)); void *realAddr = *cubbyHole; _mesa_free(realAddr); -#endif /* defined(HAVE_POSIX_MEMALIGN) && !(defined(XFree86LOADER) && defined(IN_MODULE)) */ +#endif /* defined(HAVE_POSIX_MEMALIGN) */ } /** @@ -255,22 +231,18 @@ _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize) void * _mesa_memcpy(void *dest, const void *src, size_t n) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86memcpy(dest, src, n); -#elif defined(SUNOS4) +#if defined(SUNOS4) return memcpy((char *) dest, (char *) src, (int) n); #else return memcpy(dest, src, n); #endif } -/** Wrapper around either memset() or xf86memset() */ +/** Wrapper around memset() */ void _mesa_memset( void *dst, int val, size_t n ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86memset( dst, val, n ); -#elif defined(SUNOS4) +#if defined(SUNOS4) memset( (char *) dst, (int) val, (int) n ); #else memset(dst, val, n); @@ -290,26 +262,22 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n ) *dst++ = val; } -/** Wrapper around either memcpy() or xf86memcpy() or bzero() */ +/** Wrapper around either memcpy() or bzero() */ void _mesa_bzero( void *dst, size_t n ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86memset( dst, 0, n ); -#elif defined(__FreeBSD__) +#if defined(__FreeBSD__) bzero( dst, n ); #else memset( dst, 0, n ); #endif } -/** Wrapper around either memcmp() or xf86memcmp() */ +/** Wrapper around memcmp() */ int _mesa_memcmp( const void *s1, const void *s2, size_t n ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86memcmp( s1, s2, n ); -#elif defined(SUNOS4) +#if defined(SUNOS4) return memcmp( (char *) s1, (char *) s2, (int) n ); #else return memcmp(s1, s2, n); @@ -323,70 +291,46 @@ _mesa_memcmp( const void *s1, const void *s2, size_t n ) /** \name Math */ /*@{*/ -/** Wrapper around either sin() or xf86sin() */ +/** Wrapper around sin() */ double _mesa_sin(double a) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86sin(a); -#else return sin(a); -#endif } -/** Single precision wrapper around either sin() or xf86sin() */ +/** Single precision wrapper around sin() */ float _mesa_sinf(float a) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return (float) xf86sin((double) a); -#else return (float) sin((double) a); -#endif } -/** Wrapper around either cos() or xf86cos() */ +/** Wrapper around cos() */ double _mesa_cos(double a) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86cos(a); -#else return cos(a); -#endif } -/** Single precision wrapper around either asin() or xf86asin() */ +/** Single precision wrapper around asin() */ float _mesa_asinf(float x) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return (float) xf86asin((double) x); -#else return (float) asin((double) x); -#endif } -/** Single precision wrapper around either atan() or xf86atan() */ +/** Single precision wrapper around atan() */ float _mesa_atanf(float x) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return (float) xf86atan((double) x); -#else return (float) atan((double) x); -#endif } -/** Wrapper around either sqrt() or xf86sqrt() */ +/** Wrapper around sqrt() */ double _mesa_sqrtd(double x) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86sqrt(x); -#else return sqrt(x); -#endif } @@ -584,25 +528,17 @@ _mesa_inv_sqrtf(float n) return x3 * r3; #endif -#elif defined(XFree86LOADER) && defined(IN_MODULE) - return 1.0F / xf86sqrt(n); #else return (float) (1.0 / sqrt(n)); #endif } -/** - * Wrapper around either pow() or xf86pow(). - */ +/** Wrapper around pow() */ double _mesa_pow(double x, double y) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86pow(x, y); -#else return pow(x, y); -#endif } @@ -633,8 +569,6 @@ _mesa_ffs(int i) } } return bit; -#elif defined(XFree86LOADER) && defined(IN_MODULE) - return xf86ffs(i); #else return ffs(i); #endif @@ -807,11 +741,7 @@ void * _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86bsearch(key, base, nmemb, size, compar); -#else return bsearch(key, base, nmemb, size, compar); -#endif } /*@}*/ @@ -827,9 +757,7 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, char * _mesa_getenv( const char *var ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86getenv(var); -#elif defined(_XBOX) +#if defined(_XBOX) return NULL; #else return getenv(var); @@ -843,81 +771,53 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around either strstr() or xf86strstr() */ +/** Wrapper around strstr() */ char * _mesa_strstr( const char *haystack, const char *needle ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strstr(haystack, needle); -#else return strstr(haystack, needle); -#endif } -/** Wrapper around either strncat() or xf86strncat() */ +/** Wrapper around strncat() */ char * _mesa_strncat( char *dest, const char *src, size_t n ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strncat(dest, src, n); -#else return strncat(dest, src, n); -#endif } -/** Wrapper around either strcpy() or xf86strcpy() */ +/** Wrapper around strcpy() */ char * _mesa_strcpy( char *dest, const char *src ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strcpy(dest, src); -#else return strcpy(dest, src); -#endif } -/** Wrapper around either strncpy() or xf86strncpy() */ +/** Wrapper around strncpy() */ char * _mesa_strncpy( char *dest, const char *src, size_t n ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strncpy(dest, src, n); -#else return strncpy(dest, src, n); -#endif } -/** Wrapper around either strlen() or xf86strlen() */ +/** Wrapper around strlen() */ size_t _mesa_strlen( const char *s ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strlen(s); -#else return strlen(s); -#endif } -/** Wrapper around either strcmp() or xf86strcmp() */ +/** Wrapper around strcmp() */ int _mesa_strcmp( const char *s1, const char *s2 ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strcmp(s1, s2); -#else return strcmp(s1, s2); -#endif } -/** Wrapper around either strncmp() or xf86strncmp() */ +/** Wrapper around strncmp() */ int _mesa_strncmp( const char *s1, const char *s2, size_t n ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strncmp(s1, s2, n); -#else return strncmp(s1, s2, n); -#endif } /** Implemented using _mesa_malloc() and _mesa_strcpy */ @@ -931,26 +831,18 @@ _mesa_strdup( const char *s ) return s2; } -/** Wrapper around either atoi() or xf86atoi() */ +/** Wrapper around atoi() */ int _mesa_atoi(const char *s) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86atoi(s); -#else return atoi(s); -#endif } -/** Wrapper around either strtod() or xf86strtod() */ +/** Wrapper around strtod() */ double _mesa_strtod( const char *s, char **end ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strtod(s, end); -#else return strtod(s, end); -#endif } /*@}*/ @@ -960,24 +852,19 @@ _mesa_strtod( const char *s, char **end ) /** \name I/O */ /*@{*/ -/** Wrapper around either vsprintf() or xf86vsprintf() */ +/** Wrapper around vsprintf() */ int _mesa_sprintf( char *str, const char *fmt, ... ) { int r; va_list args; va_start( args, fmt ); -#if defined(XFree86LOADER) && defined(IN_MODULE) - r = xf86vsprintf( str, fmt, args ); -#else r = vsprintf( str, fmt, args ); -#endif va_end( args ); return r; } -/** Wrapper around either printf() or xf86printf(), using vsprintf() for - * the formatting. */ +/** Wrapper around printf(), using vsprintf() for the formatting. */ void _mesa_printf( const char *fmtString, ... ) { @@ -986,22 +873,14 @@ _mesa_printf( const char *fmtString, ... ) va_start( args, fmtString ); vsnprintf(s, MAXSTRING, fmtString, args); va_end( args ); -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86printf("%s", s); -#else fprintf(stderr,"%s", s); -#endif } -/** Wrapper around either vsprintf() or xf86vsprintf() */ +/** Wrapper around vsprintf() */ int _mesa_vsprintf( char *str, const char *fmt, va_list args ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86vsprintf( str, fmt, args ); -#else return vsprintf( str, fmt, args ); -#endif } /*@}*/ @@ -1019,7 +898,7 @@ _mesa_vsprintf( char *str, const char *fmt, va_list args ) * * If debugging is enabled (either at compile-time via the DEBUG macro, or * run-time via the MESA_DEBUG environment variable), prints the warning to - * stderr, either via fprintf() or xf86printf(). + * stderr via fprintf(). */ void _mesa_warning( GLcontext *ctx, const char *fmtString, ... ) @@ -1037,11 +916,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... ) debug = _mesa_getenv("MESA_DEBUG") ? GL_TRUE : GL_FALSE; #endif if (debug) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86fprintf(stderr, "Mesa warning: %s\n", str); -#else fprintf(stderr, "Mesa warning: %s\n", str); -#endif } } @@ -1052,7 +927,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... ) * \param ctx GL context. * \param s problem description string. * - * Prints the message to stderr, either via fprintf() or xf86fprintf(). + * Prints the message to stderr via fprintf(). */ void _mesa_problem( const GLcontext *ctx, const char *fmtString, ... ) @@ -1065,13 +940,8 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... ) vsnprintf( str, MAXSTRING, fmtString, args ); va_end( args ); -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str); - xf86fprintf(stderr, "Please report at bugzilla.freedesktop.org\n"); -#else fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str); fprintf(stderr, "Please report at bugzilla.freedesktop.org\n"); -#endif } /** @@ -1161,7 +1031,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) * \param ctx GL context. * \param fmtString printf() alike format string. * - * Prints the message to stderr, either via fprintf() or xf86printf(). + * Prints the message to stderr via fprintf(). */ void _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) @@ -1172,11 +1042,7 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) va_start(args, fmtString); vsnprintf(s, MAXSTRING, fmtString, args); va_end(args); -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86fprintf(stderr, "Mesa: %s", s); -#else fprintf(stderr, "Mesa: %s", s); -#endif #endif /* DEBUG */ (void) ctx; (void) fmtString; @@ -1195,11 +1061,7 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) void _mesa_exit( int status ) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86exit(status); -#else exit(status); -#endif } /*@}*/ @@ -1225,16 +1087,12 @@ default_calloc(__GLcontext *gc, size_t numElem, size_t elemSize) return _mesa_calloc(numElem * elemSize); } -/** Wrapper around either realloc() or xf86realloc() */ +/** Wrapper around realloc() */ static void * default_realloc(__GLcontext *gc, void *oldAddr, size_t newSize) { (void) gc; -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86realloc(oldAddr, newSize); -#else return realloc(oldAddr, newSize); -#endif } /** Wrapper around _mesa_free() */ diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index dad2767e72..19a9478f76 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -142,11 +142,6 @@ typedef union { GLfloat f; GLint i; } fi_type; #define FLT_MAX_EXP 128 #endif -/* XXX this is a bit of a hack needed for compilation within XFree86 */ -#ifndef FLT_MIN -#define FLT_MIN (1.0e-37) -#endif - /* Degrees to radians conversion: */ #define DEG2RAD (M_PI/180.0) @@ -173,8 +168,6 @@ typedef union { GLfloat f; GLint i; } fi_type; ***/ #if 0 /* _mesa_sqrtf() not accurate enough - temporarily disabled */ # define SQRTF(X) _mesa_sqrtf(X) -#elif defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER) -# define SQRTF(X) (float) xf86sqrt((float) (X)) #else # define SQRTF(X) (float) sqrt((float) (X)) #endif @@ -221,8 +214,6 @@ static INLINE GLfloat LOG2(GLfloat val) num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3; return num.f + log_2; } -#elif defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER) -#define LOG2(x) ((GLfloat) (xf86log(x) * 1.442695)) #else /* * NOTE: log_base_2(x) = log(x) / log(2) @@ -293,15 +284,7 @@ static INLINE int GET_FLOAT_BITS( float x ) *** LDEXPF: multiply value by an integral power of two *** FREXPF: extract mantissa and exponent from value ***/ -#if defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER) -#define CEILF(x) ((GLfloat) xf86ceil(x)) -#define FLOORF(x) ((GLfloat) xf86floor(x)) -#define FABSF(x) ((GLfloat) xf86fabs(x)) -#define LOGF(x) ((GLfloat) xf86log(x)) -#define EXPF(x) ((GLfloat) xf86exp(x)) -#define LDEXPF(x,y) ((GLfloat) xf86ldexp(x,y)) -#define FREXPF(x,y) ((GLfloat) xf86frexp(x,y)) -#elif defined(__gnu_linux__) +#if defined(__gnu_linux__) /* C99 functions */ #define CEILF(x) ceilf(x) #define FLOORF(x) floorf(x) -- cgit v1.2.3 From 1dd6759c059e054a9a2279d2339a5bd8bb83f6b4 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 23 Dec 2006 10:56:19 +1100 Subject: nouveau: get 16bpp working --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 1 + src/mesa/drivers/dri/nouveau/nouveau_context.c | 5 ++++- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 7 ++++--- src/mesa/drivers/dri/nouveau/nv30_state.c | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 42d8691752..f30e59323d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -89,6 +89,7 @@ nouveau_renderbuffer_pixelformat(nouveau_renderbuffer *nrb, nrb->mesa.AlphaBits = 8; nrb->cpp = 4; break; + case GL_RGB: case GL_RGB5: nrb->mesa._BaseFormat = GL_RGB; nrb->mesa._ActualFormat= GL_RGB5; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 22c1f58874..ac940ac595 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -319,7 +319,10 @@ static void nouveauDoSwapBuffers(nouveauContextPtr nmesa, if (nbox) { BEGIN_RING_SIZE(NvSubCtxSurf2D, NV10_CONTEXT_SURFACES_2D_FORMAT, 4); - OUT_RING (6); /* X8R8G8B8 */ + if (src->mesa._ActualFormat == GL_RGBA8) + OUT_RING (6); /* X8R8G8B8 */ + else + OUT_RING (4); /* R5G6B5 */ OUT_RING ((dst->pitch << 16) | src->pitch); OUT_RING (src->offset); OUT_RING (dst->offset); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 8e548dbcbd..140db496b2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -129,6 +129,7 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, struct gl_framebuffer *fb; const GLboolean swAccum = mesaVis->accumRedBits > 0; const GLboolean swStencil = mesaVis->stencilBits > 0 && mesaVis->depthBits != 24; + GLenum color_format = screen->fbFormat == 4 ? GL_RGBA8 : GL_RGB5; if (isPixmap) return GL_FALSE; /* not implemented */ @@ -138,10 +139,10 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, return GL_FALSE; /* Front buffer */ - nrb = nouveau_renderbuffer_new(GL_RGBA, + nrb = nouveau_renderbuffer_new(color_format, driScrnPriv->pFB + screen->frontOffset, screen->frontOffset, - screen->frontPitch * 4, + screen->frontPitch * screen->fbFormat, driDrawPriv); nouveauSpanSetFunctions(nrb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &nrb->mesa); @@ -149,7 +150,7 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (0 /* unified buffers if we choose to support them.. */) { } else { if (mesaVis->doubleBufferMode) { - nrb = nouveau_renderbuffer_new(GL_RGBA, NULL, + nrb = nouveau_renderbuffer_new(color_format, NULL, 0, 0, driDrawPriv); nouveauSpanSetFunctions(nrb, mesaVis); diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 7592c3fa0a..4169dad661 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -790,7 +790,10 @@ static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color, BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_DIM0, 5); OUT_RING (((w+x)<<16)|x); OUT_RING (((h+y)<<16)|y); - OUT_RING (0x148); + if (color[0]->mesa._ActualFormat == GL_RGBA8) + OUT_RING (0x148); + else + OUT_RING (0x143); OUT_RING (color[0]->pitch); OUT_RING (color[0]->offset); -- cgit v1.2.3 From ae8d8d132600cc544b7295c9554e6531bdbd8094 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 23 Dec 2006 23:03:55 +1100 Subject: nouveau: Don't fill nrb->dPriv for private buffers --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 8 ++++---- src/mesa/drivers/dri/nouveau/nouveau_state.c | 2 +- src/mesa/drivers/dri/nouveau/nv30_state.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index f30e59323d..0a5efa8c2e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -152,7 +152,7 @@ nouveau_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, /* If this buffer isn't statically alloc'd, we may need to ask the * drm for more memory */ - if (!nrb->map && (rb->Width != width || rb->Height != height)) { + if (!nrb->dPriv && (rb->Width != width || rb->Height != height)) { GLuint pitch; /* align pitches to 64 bytes */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 140db496b2..99992b838a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -152,7 +152,7 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { nrb = nouveau_renderbuffer_new(color_format, NULL, 0, 0, - driDrawPriv); + NULL); nouveauSpanSetFunctions(nrb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &nrb->mesa); } @@ -160,20 +160,20 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) { nrb = nouveau_renderbuffer_new(GL_DEPTH24_STENCIL8_EXT, NULL, 0, 0, - driDrawPriv); + NULL); nouveauSpanSetFunctions(nrb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &nrb->mesa); } else if (mesaVis->depthBits == 24) { nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT24, NULL, 0, 0, - driDrawPriv); + NULL); nouveauSpanSetFunctions(nrb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); } else if (mesaVis->depthBits == 16) { nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT16, NULL, 0, 0, - driDrawPriv); + NULL); nouveauSpanSetFunctions(nrb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index cec7120d43..d3c233eb13 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -68,7 +68,7 @@ static void nouveauCalcViewport(GLcontext *ctx) nrb = nouveau_current_draw_buffer(ctx); nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF; - if (nrb && nrb->map) { + if (nrb && nrb->dPriv) { /* Window */ xoffset = nrb->dPriv->x; yoffset = nrb->dPriv->y; diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 4169dad661..35b428b37c 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -577,7 +577,7 @@ static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) /* Adjust offsets if drawing to a window */ nrb = nouveau_current_draw_buffer(ctx); - if (nrb && nrb->map) { + if (nrb && nrb->dPriv) { x += nrb->dPriv->x; y += nrb->dPriv->y; } @@ -690,7 +690,7 @@ static void nv30WindowMoved(nouveauContextPtr nmesa) /* Adjust offsets if drawing to a window */ nrb = nouveau_current_draw_buffer(ctx); - if (nrb && nrb->map) { + if (nrb && nrb->dPriv) { x += nrb->dPriv->x; y += nrb->dPriv->y; } @@ -777,7 +777,7 @@ static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color, nrb = nouveau_current_draw_buffer(nmesa->glCtx); w = nrb->mesa.Width; h = nrb->mesa.Height; - if (nrb && nrb->map) { + if (nrb && nrb->dPriv) { x = nrb->dPriv->x; y = nrb->dPriv->y; } else { -- cgit v1.2.3 From cb6a400dcd26089101c8a29a4eee198bd7ad9a58 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 23 Dec 2006 23:51:24 +1100 Subject: nouveau: maintain numClipRects/pClipRects in context. --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 56 +++++++++++++++++--------- src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 + src/mesa/drivers/dri/nouveau/nouveau_state.c | 13 +----- src/mesa/drivers/dri/nouveau/nv30_state.c | 32 ++++----------- 4 files changed, 46 insertions(+), 57 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 0a5efa8c2e..e3e2a8099e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -214,10 +214,46 @@ nouveau_renderbuffer_new(GLenum internalFormat, GLvoid *map, return nrb; } +static void +nouveau_cliprects_drawable_set(nouveauContextPtr nmesa, + nouveau_renderbuffer *nrb) +{ + __DRIdrawablePrivate *dPriv = nrb->dPriv; + + nmesa->numClipRects = dPriv->numClipRects; + nmesa->pClipRects = dPriv->pClipRects; + nmesa->drawX = dPriv->x; + nmesa->drawY = dPriv->y; +} + +static void +nouveau_cliprects_renderbuffer_set(nouveauContextPtr nmesa, + nouveau_renderbuffer *nrb) +{ + nmesa->numClipRects = 1; + nmesa->pClipRects = &nmesa->osClipRect; + nmesa->osClipRect.x1 = 0; + nmesa->osClipRect.y1 = 0; + nmesa->osClipRect.x2 = nrb->mesa.Width; + nmesa->osClipRect.y2 = nrb->mesa.Height; + nmesa->drawX = 0; + nmesa->drawY = 0; +} + void nouveau_window_moved(GLcontext *ctx) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_renderbuffer *nrb; + + nrb = (nouveau_renderbuffer *)ctx->DrawBuffer->_ColorDrawBuffers[0][0]; + if (!nrb) + return; + + if (!nrb->dPriv) + nouveau_cliprects_renderbuffer_set(nmesa, nrb); + else + nouveau_cliprects_drawable_set(nmesa, nrb); /* Viewport depends on window size/position, nouveauCalcViewport * will take care of calling the hw-specific WindowMoved @@ -252,26 +288,6 @@ nouveau_build_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) return GL_TRUE; } -nouveau_renderbuffer * -nouveau_current_draw_buffer(GLcontext *ctx) -{ - struct gl_framebuffer *fb = ctx->DrawBuffer; - nouveau_renderbuffer *nrb; - - if (!fb) - return NULL; - - if (fb->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT) - nrb = (nouveau_renderbuffer *) - fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer; - else if (fb->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT) - nrb = (nouveau_renderbuffer *) - fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer; - else - nrb = NULL; - return nrb; -} - static struct gl_framebuffer * nouveauNewFramebuffer(GLcontext *ctx, GLuint name) { diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index d7730bd796..ea28506b74 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -134,6 +134,8 @@ typedef struct nouveau_context { /* Cliprects information */ GLuint numClipRects; drm_clip_rect_t *pClipRects; + drm_clip_rect_t osClipRect; + GLuint drawX, drawY; /* The rendering context information */ GLenum current_primitive; /* the current primitive enum */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index d3c233eb13..8df334d700 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -62,22 +62,11 @@ static void nouveauCalcViewport(GLcontext *ctx) nouveau_renderbuffer *nrb; const GLfloat *v = ctx->Viewport._WindowMap.m; GLfloat *m = nmesa->viewport.m; - GLfloat xoffset, yoffset; + GLfloat xoffset = nmesa->drawX, yoffset = nmesa->drawY; GLint h = 0; - nrb = nouveau_current_draw_buffer(ctx); nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF; - if (nrb && nrb->dPriv) { - /* Window */ - xoffset = nrb->dPriv->x; - yoffset = nrb->dPriv->y; - } else { - /* Offscreen or back buffer */ - xoffset = 0.0; - yoffset = 0.0; - } - m[MAT_SX] = v[MAT_SX]; m[MAT_TX] = v[MAT_TX] + xoffset + SUBPIXEL_X; m[MAT_SY] = - v[MAT_SY]; diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 35b428b37c..7ccf5f9875 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -575,19 +575,15 @@ static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nouveau_renderbuffer *nrb; - /* Adjust offsets if drawing to a window */ - nrb = nouveau_current_draw_buffer(ctx); - if (nrb && nrb->dPriv) { - x += nrb->dPriv->x; - y += nrb->dPriv->y; - } - /* There's no scissor enable bit, so adjust the scissor to cover the * maximum draw buffer bounds */ if (!ctx->Scissor.Enabled) { x = y = 0; w = h = 4095; + } else { + x += nmesa->drawX; + y += nmesa->drawY; } BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS, 2); @@ -685,15 +681,8 @@ static void nv30WindowMoved(nouveauContextPtr nmesa) GLfloat *v = nmesa->viewport.m; GLuint w = ctx->Viewport.Width; GLuint h = ctx->Viewport.Height; - GLuint x = ctx->Viewport.X; - GLuint y = ctx->Viewport.Y; - - /* Adjust offsets if drawing to a window */ - nrb = nouveau_current_draw_buffer(ctx); - if (nrb && nrb->dPriv) { - x += nrb->dPriv->x; - y += nrb->dPriv->y; - } + GLuint x = ctx->Viewport.X + nmesa->drawX; + GLuint y = ctx->Viewport.Y + nmesa->drawY; BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2); OUT_RING_CACHE((w << 16) | x); @@ -773,17 +762,10 @@ static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color, nouveau_renderbuffer *nrb; GLuint x, y, w, h; - /* Adjust offsets if drawing to a window */ - nrb = nouveau_current_draw_buffer(nmesa->glCtx); w = nrb->mesa.Width; h = nrb->mesa.Height; - if (nrb && nrb->dPriv) { - x = nrb->dPriv->x; - y = nrb->dPriv->y; - } else { - x = 0; - y = 0; - } + x = nmesa->drawX; + y = nmesa->drawY; if (num_color != 1) return GL_FALSE; -- cgit v1.2.3 From f54c725497cac19294e1465413d21a9416d4245f Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 24 Dec 2006 00:13:34 +1100 Subject: nouveau: Modify span routines to use nouveau_renderbuffer instead of driRenderbuffer --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 8 ++++++++ src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 7 +++++++ src/mesa/drivers/dri/nouveau/nouveau_span.c | 23 +++++++++++++++-------- 3 files changed, 30 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index e3e2a8099e..f6a03ecd9c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -288,6 +288,12 @@ nouveau_build_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) return GL_TRUE; } +static void +nouveauDrawBuffer(GLcontext *ctx, GLenum buffer) +{ + nouveau_build_framebuffer(ctx, ctx->DrawBuffer); +} + static struct gl_framebuffer * nouveauNewFramebuffer(GLcontext *ctx, GLuint name) { @@ -341,6 +347,8 @@ nouveauFinishRenderTexture(GLcontext *ctx, void nouveauInitBufferFuncs(struct dd_function_table *func) { + func->DrawBuffer = nouveauDrawBuffer; + func->NewFramebuffer = nouveauNewFramebuffer; func->NewRenderbuffer = nouveauNewRenderbuffer; func->BindFramebuffer = nouveauBindFramebuffer; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 0b745e1e74..fcfc0ebe14 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -77,6 +77,12 @@ void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) FIRE_RING(); while(RING_AHEAD()>0); + /* We can't wait on PGRAPH going idle.. + * 1) We don't have the regs mapped + * 2) PGRAPH may not go idle with multiple channels active + * Look into replacing this with a NOTIFY/NOP + wait notifier sequence. + */ +#if 0 for(i=0;i<1000000;i++) /* 1 second */ { switch(nmesa->screen->card->type) @@ -100,6 +106,7 @@ void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) return; DO_USLEEP(1); } +#endif } void nouveauWaitForIdle(nouveauContextPtr nmesa) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.c b/src/mesa/drivers/dri/nouveau/nouveau_span.c index 6d99728b85..74dec66afc 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_span.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_span.c @@ -37,12 +37,21 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define HAVE_HW_STENCIL_SPANS 0 #define HAVE_HW_STENCIL_PIXELS 0 +#define HW_CLIPLOOP() \ + do { \ + int _nc = nmesa->numClipRects; \ + while ( _nc-- ) { \ + int minx = nmesa->pClipRects[_nc].x1 - nmesa->drawX; \ + int miny = nmesa->pClipRects[_nc].y1 - nmesa->drawY; \ + int maxx = nmesa->pClipRects[_nc].x2 - nmesa->drawX; \ + int maxy = nmesa->pClipRects[_nc].y2 - nmesa->drawY; + #define LOCAL_VARS \ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \ - __DRIscreenPrivate *sPriv = nmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = nmesa->driDrawable; \ - driRenderbuffer *drb = (driRenderbuffer *) rb; \ - GLuint height = dPriv->h; \ + nouveau_renderbuffer *nrb = (nouveau_renderbuffer *)rb; \ + GLuint height = nrb->mesa.Height; \ + GLubyte *map = (GLubyte *)(nrb->map ? nrb->map : nrb->mem->map) + \ + (nmesa->drawY * nrb->pitch) + (nmesa->drawX * nrb->cpp); \ GLuint p; \ (void) p; @@ -64,8 +73,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define TAG(x) nouveau##x##_RGB565 #define TAG2(x,y) nouveau##x##_RGB565##y -#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \ - + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp) +#define GET_PTR(X,Y) (map + (Y)*nrb->pitch + (X)*nrb->cpp) #include "spantmp2.h" @@ -75,8 +83,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define TAG(x) nouveau##x##_ARGB8888 #define TAG2(x,y) nouveau##x##_ARGB8888##y -#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \ - + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp) +#define GET_PTR(X,Y) (map + (Y)*nrb->pitch + (X)*nrb->cpp) #include "spantmp2.h" static void -- cgit v1.2.3 From d79323bd42864fc4768874f56734bad9dc6d8a9c Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 24 Dec 2006 00:50:13 +1100 Subject: nouveau: Kill some compile warnings. --- src/mesa/drivers/dri/nouveau/nouveau_driver.c | 3 +-- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 10 ++++++---- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 1 + src/mesa/drivers/dri/nouveau/nouveau_screen.c | 1 - src/mesa/drivers/dri/nouveau/nouveau_shader.h | 3 +++ src/mesa/drivers/dri/nouveau/nouveau_state.c | 2 -- src/mesa/drivers/dri/nouveau/nv30_fragprog.c | 1 - src/mesa/drivers/dri/nouveau/nv30_state.c | 7 ++----- src/mesa/drivers/dri/nouveau/nv30_vertprog.c | 3 --- src/mesa/drivers/dri/nouveau/nv40_vertprog.c | 3 --- 10 files changed, 13 insertions(+), 21 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c index f85dc62e74..00956aa8f8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c @@ -129,8 +129,7 @@ static void nouveauFinish( GLcontext *ctx ) } /* glClear */ -static void nouveauClear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) +static void nouveauClear( GLcontext *ctx, GLbitfield mask ) { // XXX we really should do something here... } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index fcfc0ebe14..5c2b2c7552 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -133,12 +133,14 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa) return GL_FALSE; } - if (drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer)) { - FATAL("Unable to map the fifo\n",ret); + ret = drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer); + if (ret) { + FATAL("Unable to map the fifo (returned %d)\n",ret); return GL_FALSE; } - if (drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio)) { - FATAL("Unable to map the control regs\n",ret); + ret = drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio); + if (ret) { + FATAL("Unable to map the control regs (returned %d)\n",ret); return GL_FALSE; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 51993cf556..05d00d4769 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -145,6 +145,7 @@ int i; for(i=0;iViewport._WindowMap.m; GLfloat *m = nmesa->viewport.m; GLfloat xoffset = nmesa->drawX, yoffset = nmesa->drawY; - GLint h = 0; nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF; diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c index 98aa27ea9c..b11bc1809e 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c +++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c @@ -24,7 +24,6 @@ static void NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - drm_nouveau_mem_alloc_t mem; if (!nvs->program_buffer) { nouveau_mem *fpbuf; diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 7ccf5f9875..45befd0e77 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -573,7 +573,6 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode ); static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - nouveau_renderbuffer *nrb; /* There's no scissor enable bit, so adjust the scissor to cover the * maximum draw buffer bounds @@ -677,7 +676,6 @@ static void nv30TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) static void nv30WindowMoved(nouveauContextPtr nmesa) { GLcontext *ctx = nmesa->glCtx; - nouveau_renderbuffer *nrb; GLfloat *v = nmesa->viewport.m; GLuint w = ctx->Viewport.Width; GLuint h = ctx->Viewport.Height; @@ -759,11 +757,10 @@ static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color, nouveau_renderbuffer **color, nouveau_renderbuffer *depth) { - nouveau_renderbuffer *nrb; GLuint x, y, w, h; - w = nrb->mesa.Width; - h = nrb->mesa.Height; + w = color[0]->mesa.Width; + h = color[0]->mesa.Height; x = nmesa->drawX; y = nmesa->drawY; diff --git a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c index e60422dad1..6ba8e35d55 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c +++ b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c @@ -6,9 +6,6 @@ #include "nouveau_shader.h" #include "nv30_shader.h" -extern nvsSwzComp NV20VP_TX_SWIZZLE[4]; -extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz); - /***************************************************************************** * Support routines */ diff --git a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c index f2cb3fb166..0493e18403 100644 --- a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c +++ b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c @@ -2,9 +2,6 @@ #include "nouveau_msg.h" #include "nv40_shader.h" -extern nvsSwzComp NV20VP_TX_SWIZZLE[4]; -extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz); - /***************************************************************************** * Assembly routines */ -- cgit v1.2.3 From b8769f318ff9c2e4a74fbb1d4b058eb521e36dda Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 25 Dec 2006 23:34:56 +0100 Subject: Rework r300 fragprog avoid using bitfield structure. It seems that bitfield structure lead to some strange problem on 64bits arch, don't want to waste time debugging strange things like that so converted pfs_reg_t structure to a GLuint and use good old masking and shifting spell. (cherry picked from 2a7de9d095d8e60da12b11aaa1efe664b87b11d3 commit) --- src/mesa/drivers/dri/r300/r300_fragprog.c | 753 ++++++++++++++++++------------ src/mesa/drivers/dri/r300/r300_fragprog.h | 3 +- 2 files changed, 466 insertions(+), 290 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 32c0128eaa..f00162a6dc 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -51,18 +51,110 @@ #include "r300_fragprog.h" #include "r300_reg.h" +/* + * Usefull macros and values + */ +#define ERROR(fmt, args...) do { \ + fprintf(stderr, "%s::%s(): " fmt "\n", \ + __FILE__, __func__, ##args); \ + rp->error = GL_TRUE; \ + } while(0) + #define PFS_INVAL 0xFFFFFFFF #define COMPILE_STATE struct r300_pfs_compile_state *cs = rp->cs -static void dump_program(struct r300_fragment_program *rp); -static void emit_arith(struct r300_fragment_program *rp, int op, - pfs_reg_t dest, int mask, - pfs_reg_t src0, pfs_reg_t src1, pfs_reg_t src2, - int flags); +#define SWIZZLE_XYZ 0 +#define SWIZZLE_XXX 1 +#define SWIZZLE_YYY 2 +#define SWIZZLE_ZZZ 3 +#define SWIZZLE_WWW 4 +#define SWIZZLE_YZX 5 +#define SWIZZLE_ZXY 6 +#define SWIZZLE_WZY 7 +#define SWIZZLE_111 8 +#define SWIZZLE_000 9 +#define SWIZZLE_HHH 10 + +#define swizzle(r, x, y, z, w) do_swizzle(rp, r, \ + ((SWIZZLE_##x<<0)| \ + (SWIZZLE_##y<<3)| \ + (SWIZZLE_##z<<6)| \ + (SWIZZLE_##w<<9)), \ + 0) + +#define REG_TYPE_INPUT 0 +#define REG_TYPE_OUTPUT 1 +#define REG_TYPE_TEMP 2 +#define REG_TYPE_CONST 3 + +#define REG_TYPE_SHIFT 0 +#define REG_INDEX_SHIFT 2 +#define REG_VSWZ_SHIFT 8 +#define REG_SSWZ_SHIFT 13 +#define REG_NEGV_SHIFT 18 +#define REG_NEGS_SHIFT 19 +#define REG_ABS_SHIFT 20 +#define REG_NO_USE_SHIFT 21 +#define REG_VALID_SHIFT 22 + +#define REG_TYPE_MASK (0x03 << REG_TYPE_SHIFT) +#define REG_INDEX_MASK (0x3F << REG_INDEX_SHIFT) +#define REG_VSWZ_MASK (0x1F << REG_VSWZ_SHIFT) +#define REG_SSWZ_MASK (0x1F << REG_SSWZ_SHIFT) +#define REG_NEGV_MASK (0x01 << REG_NEGV_SHIFT) +#define REG_NEGS_MASK (0x01 << REG_NEGS_SHIFT) +#define REG_ABS_MASK (0x01 << REG_ABS_SHIFT) +#define REG_NO_USE_MASK (0x01 << REG_NO_USE_SHIFT) +#define REG_VALID_MASK (0x01 << REG_VALID_SHIFT) + +#define REG(type, index, vswz, sswz, nouse, valid) \ + (((type << REG_TYPE_SHIFT) & REG_TYPE_MASK) | \ + ((index << REG_INDEX_SHIFT) & REG_INDEX_MASK) | \ + ((nouse << REG_NO_USE_SHIFT) & REG_NO_USE_MASK) | \ + ((valid << REG_VALID_SHIFT) & REG_VALID_MASK) | \ + ((vswz << REG_VSWZ_SHIFT) & REG_VSWZ_MASK) | \ + ((sswz << REG_SSWZ_SHIFT) & REG_SSWZ_MASK)) +#define REG_GET_TYPE(reg) \ + ((reg & REG_TYPE_MASK) >> REG_TYPE_SHIFT) +#define REG_GET_INDEX(reg) \ + ((reg & REG_INDEX_MASK) >> REG_INDEX_SHIFT) +#define REG_GET_VSWZ(reg) \ + ((reg & REG_VSWZ_MASK) >> REG_VSWZ_SHIFT) +#define REG_GET_SSWZ(reg) \ + ((reg & REG_SSWZ_MASK) >> REG_SSWZ_SHIFT) +#define REG_GET_NO_USE(reg) \ + ((reg & REG_NO_USE_MASK) >> REG_NO_USE_SHIFT) +#define REG_GET_VALID(reg) \ + ((reg & REG_VALID_MASK) >> REG_VALID_SHIFT) +#define REG_SET_TYPE(reg, type) \ + reg = ((reg & ~REG_TYPE_MASK) | \ + ((type << REG_TYPE_SHIFT) & REG_TYPE_MASK)) +#define REG_SET_INDEX(reg, index) \ + reg = ((reg & ~REG_INDEX_MASK) | \ + ((index << REG_INDEX_SHIFT) & REG_INDEX_MASK)) +#define REG_SET_VSWZ(reg, vswz) \ + reg = ((reg & ~REG_VSWZ_MASK) | \ + ((vswz << REG_VSWZ_SHIFT) & REG_VSWZ_MASK)) +#define REG_SET_SSWZ(reg, sswz) \ + reg = ((reg & ~REG_SSWZ_MASK) | \ + ((sswz << REG_SSWZ_SHIFT) & REG_SSWZ_MASK)) +#define REG_SET_NO_USE(reg, nouse) \ + reg = ((reg & ~REG_NO_USE_MASK) | \ + ((nouse << REG_NO_USE_SHIFT) & REG_NO_USE_MASK)) +#define REG_SET_VALID(reg, valid) \ + reg = ((reg & ~REG_VALID_MASK) | \ + ((valid << REG_VALID_SHIFT) & REG_VALID_MASK)) +#define REG_ABS(reg) \ + reg = (reg | REG_ABS_MASK) +#define REG_NEGV(reg) \ + reg = (reg | REG_NEGV_MASK) +#define REG_NEGS(reg) \ + reg = (reg | REG_NEGS_MASK) -/*************************************** - * begin: useful data structions for fragment program generation - ***************************************/ + +/* + * Datas structures for fragment program generation + */ /* description of r300 native hw instructions */ static const struct { @@ -86,20 +178,19 @@ static const struct { { "CMPH", 3, R300_FPI0_OUTC_CMPH, PFS_INVAL }, }; -#define MAKE_SWZ3(x, y, z) (MAKE_SWIZZLE4(SWIZZLE_##x, \ - SWIZZLE_##y, \ - SWIZZLE_##z, \ - SWIZZLE_ZERO)) - -#define SLOT_VECTOR (1<<0) -#define SLOT_SCALAR (1<<3) -#define SLOT_BOTH (SLOT_VECTOR|SLOT_SCALAR) /* vector swizzles r300 can support natively, with a couple of * cases we handle specially * - * pfs_reg_t.v_swz/pfs_reg_t.s_swz is an index into this table - **/ + * REG_VSWZ/REG_SSWZ is an index into this table + */ +#define SLOT_VECTOR (1<<0) +#define SLOT_SCALAR (1<<3) +#define SLOT_BOTH (SLOT_VECTOR | SLOT_SCALAR) +#define MAKE_SWZ3(x, y, z) (MAKE_SWIZZLE4(SWIZZLE_##x, \ + SWIZZLE_##y, \ + SWIZZLE_##z, \ + SWIZZLE_ZERO)) static const struct r300_pfs_swizzle { GLuint hash; /* swizzle value this matches */ GLuint base; /* base value for hw swizzle */ @@ -120,39 +211,29 @@ static const struct r300_pfs_swizzle { { PFS_INVAL, R300_FPI0_ARGC_HALF, 0, 0}, { PFS_INVAL, 0, 0, 0}, }; -#define SWIZZLE_XYZ 0 -#define SWIZZLE_XXX 1 -#define SWIZZLE_YYY 2 -#define SWIZZLE_ZZZ 3 -#define SWIZZLE_WWW 4 -#define SWIZZLE_YZX 5 -#define SWIZZLE_ZXY 6 -#define SWIZZLE_WZY 7 -#define SWIZZLE_111 8 -#define SWIZZLE_000 9 -#define SWIZZLE_HHH 10 +/* used during matching of non-native swizzles */ #define SWZ_X_MASK (7 << 0) #define SWZ_Y_MASK (7 << 3) #define SWZ_Z_MASK (7 << 6) #define SWZ_W_MASK (7 << 9) -/* used during matching of non-native swizzles */ static const struct { - GLuint hash; /* used to mask matching swizzle components */ + GLuint hash; /* used to mask matching swizzle components */ int mask; /* actual outmask */ int count; /* count of components matched */ } s_mask[] = { - { SWZ_X_MASK|SWZ_Y_MASK|SWZ_Z_MASK, 1|2|4, 3}, - { SWZ_X_MASK|SWZ_Y_MASK, 1|2, 2}, - { SWZ_X_MASK|SWZ_Z_MASK, 1|4, 2}, - { SWZ_Y_MASK|SWZ_Z_MASK, 2|4, 2}, - { SWZ_X_MASK, 1, 1}, - { SWZ_Y_MASK, 2, 1}, - { SWZ_Z_MASK, 4, 1}, - { PFS_INVAL, PFS_INVAL, PFS_INVAL} + { SWZ_X_MASK|SWZ_Y_MASK|SWZ_Z_MASK, 1|2|4, 3}, + { SWZ_X_MASK|SWZ_Y_MASK, 1|2, 2}, + { SWZ_X_MASK|SWZ_Z_MASK, 1|4, 2}, + { SWZ_Y_MASK|SWZ_Z_MASK, 2|4, 2}, + { SWZ_X_MASK, 1, 1}, + { SWZ_Y_MASK, 2, 1}, + { SWZ_Z_MASK, 4, 1}, + { PFS_INVAL, PFS_INVAL, PFS_INVAL} }; /* mapping from SWIZZLE_* to r300 native values for scalar insns */ +#define SWIZZLE_HALF 6 static const struct { int base; /* hw value of swizzle */ int stride; /* difference between SRC0/1/2 */ @@ -166,58 +247,51 @@ static const struct { { R300_FPI2_ARGA_ONE , 0, 0 }, { R300_FPI2_ARGA_HALF , 0, 0 } }; -#define SWIZZLE_HALF 6 /* boiler-plate reg, for convenience */ -static const pfs_reg_t undef = { - type: REG_TYPE_TEMP, - index: 0, - v_swz: SWIZZLE_XYZ, - s_swz: SWIZZLE_W, - negate_v: 0, - negate_s: 0, - absolute: 0, - no_use: GL_FALSE, - valid: GL_FALSE -}; +static const GLuint undef = REG(REG_TYPE_TEMP, + 0, + SWIZZLE_XYZ, + SWIZZLE_W, + GL_FALSE, + GL_FALSE); /* constant one source */ -static const pfs_reg_t pfs_one = { - type: REG_TYPE_CONST, - index: 0, - v_swz: SWIZZLE_111, - s_swz: SWIZZLE_ONE, - valid: GL_TRUE -}; +static const GLuint pfs_one = REG(REG_TYPE_TEMP, + 0, + SWIZZLE_111, + SWIZZLE_ONE, + GL_FALSE, + GL_TRUE); /* constant half source */ -static const pfs_reg_t pfs_half = { - type: REG_TYPE_CONST, - index: 0, - v_swz: SWIZZLE_HHH, - s_swz: SWIZZLE_HALF, - valid: GL_TRUE -}; +static const GLuint pfs_half = REG(REG_TYPE_TEMP, + 0, + SWIZZLE_HHH, + SWIZZLE_HALF, + GL_FALSE, + GL_TRUE); /* constant zero source */ -static const pfs_reg_t pfs_zero = { - type: REG_TYPE_CONST, - index: 0, - v_swz: SWIZZLE_000, - s_swz: SWIZZLE_ZERO, - valid: GL_TRUE -}; - -/*************************************** - * end: data structures - ***************************************/ +static const GLuint pfs_zero = REG(REG_TYPE_TEMP, + 0, + SWIZZLE_000, + SWIZZLE_ZERO, + GL_FALSE, + GL_TRUE); -#define ERROR(fmt, args...) do { \ - fprintf(stderr, "%s::%s(): " fmt "\n",\ - __FILE__, __func__, ##args); \ - rp->error = GL_TRUE; \ -} while(0) +/* + * Common functions prototypes + */ +static void dump_program(struct r300_fragment_program *rp); +static void emit_arith(struct r300_fragment_program *rp, int op, + GLuint dest, int mask, + GLuint src0, GLuint src1, GLuint src2, + int flags); +/* + * Helper functions prototypes + */ static int get_hw_temp(struct r300_fragment_program *rp) { COMPILE_STATE; @@ -256,263 +330,338 @@ static void free_hw_temp(struct r300_fragment_program *rp, int idx) cs->hwreg_in_use &= ~(1<temp_in_use); - if (!r.index) { + index = ffs(~cs->temp_in_use); + if (!index) { ERROR("Out of program temps\n"); return r; } - cs->temp_in_use |= (1 << --r.index); - - cs->temps[r.index].refcount = 0xFFFFFFFF; - cs->temps[r.index].reg = -1; - r.valid = GL_TRUE; + + cs->temp_in_use |= (1 << --index); + cs->temps[index].refcount = 0xFFFFFFFF; + cs->temps[index].reg = -1; + + REG_SET_TYPE(r, REG_TYPE_TEMP); + REG_SET_INDEX(r, index); + REG_SET_VALID(r, GL_TRUE); return r; } -static pfs_reg_t get_temp_reg_tex(struct r300_fragment_program *rp) +static GLuint get_temp_reg_tex(struct r300_fragment_program *rp) { COMPILE_STATE; - pfs_reg_t r = undef; + GLuint r = undef; + GLuint index; - r.index = ffs(~cs->temp_in_use); - if (!r.index) { + index = ffs(~cs->temp_in_use); + if (!index) { ERROR("Out of program temps\n"); return r; } - cs->temp_in_use |= (1 << --r.index); - - cs->temps[r.index].refcount = 0xFFFFFFFF; - cs->temps[r.index].reg = get_hw_temp_tex(rp); - r.valid = GL_TRUE; + + cs->temp_in_use |= (1 << --index); + cs->temps[index].refcount = 0xFFFFFFFF; + cs->temps[index].reg = get_hw_temp_tex(rp); + + REG_SET_TYPE(r, REG_TYPE_TEMP); + REG_SET_INDEX(r, index); + REG_SET_VALID(r, GL_TRUE); return r; } -static void free_temp(struct r300_fragment_program *rp, pfs_reg_t r) +static void free_temp(struct r300_fragment_program *rp, GLuint r) { COMPILE_STATE; - if (!(cs->temp_in_use & (1<temp_in_use & (1 << index))) + return; - if (r.type == REG_TYPE_TEMP) { - free_hw_temp(rp, cs->temps[r.index].reg); - cs->temps[r.index].reg = -1; - cs->temp_in_use &= ~(1<inputs[r.index].reg); - cs->inputs[r.index].reg = -1; + if (REG_GET_TYPE(r) == REG_TYPE_TEMP) { + free_hw_temp(rp, cs->temps[index].reg); + cs->temps[index].reg = -1; + cs->temp_in_use &= ~(1 << index); + } else if (REG_GET_TYPE(r) == REG_TYPE_INPUT) { + free_hw_temp(rp, cs->inputs[index].reg); + cs->inputs[index].reg = -1; } } -static pfs_reg_t emit_param4fv(struct r300_fragment_program *rp, - GLfloat *values) +static GLuint emit_param4fv(struct r300_fragment_program *rp, + GLfloat *values) { - pfs_reg_t r = undef; - r.type = REG_TYPE_CONST; + GLuint r = undef; + GLuint index; int pidx; pidx = rp->param_nr++; - r.index = rp->const_nr++; - if (pidx >= PFS_NUM_CONST_REGS || r.index >= PFS_NUM_CONST_REGS) { + index = rp->const_nr++; + if (pidx >= PFS_NUM_CONST_REGS || index >= PFS_NUM_CONST_REGS) { ERROR("Out of const/param slots!\n"); return r; } - - rp->param[pidx].idx = r.index; + + rp->param[pidx].idx = index; rp->param[pidx].values = values; rp->params_uptodate = GL_FALSE; - r.valid = GL_TRUE; + REG_SET_TYPE(r, REG_TYPE_CONST); + REG_SET_INDEX(r, index); + REG_SET_VALID(r, GL_TRUE); return r; } -static pfs_reg_t emit_const4fv(struct r300_fragment_program *rp, GLfloat *cp) +static GLuint emit_const4fv(struct r300_fragment_program *rp, GLfloat *cp) { - pfs_reg_t r = undef; - r.type = REG_TYPE_CONST; + GLuint r = undef; + GLuint index; - r.index = rp->const_nr++; - if (r.index >= PFS_NUM_CONST_REGS) { + index = rp->const_nr++; + if (index >= PFS_NUM_CONST_REGS) { ERROR("Out of hw constants!\n"); return r; } - COPY_4V(rp->constant[r.index], cp); - r.valid = GL_TRUE; + COPY_4V(rp->constant[index], cp); + + REG_SET_TYPE(r, REG_TYPE_CONST); + REG_SET_INDEX(r, index); + REG_SET_VALID(r, GL_TRUE); return r; } -static __inline pfs_reg_t negate(pfs_reg_t r) +static inline GLuint negate(GLuint r) { - r.negate_v = 1; - r.negate_s = 1; + REG_NEGS(r); + REG_NEGV(r); return r; } /* Hack, to prevent clobbering sources used multiple times when * emulating non-native instructions */ -static __inline pfs_reg_t keep(pfs_reg_t r) +static inline GLuint keep(GLuint r) { - r.no_use = GL_TRUE; + REG_SET_NO_USE(r, GL_TRUE); return r; } -static __inline pfs_reg_t absolute(pfs_reg_t r) +static inline GLuint absolute(GLuint r) { - r.absolute = 1; + REG_ABS(r); return r; } static int swz_native(struct r300_fragment_program *rp, - pfs_reg_t src, pfs_reg_t *r, GLuint arbneg) + GLuint src, + GLuint *r, + GLuint arbneg) { - /* Native swizzle, nothing to see here */ - src.negate_s = (arbneg >> 3) & 1; + /* Native swizzle, handle negation */ + src |= ((arbneg >> 3) & 1) << REG_NEGS_SHIFT; if ((arbneg & 0x7) == 0x0) { - src.negate_v = 0; + src = src & ~REG_NEGV_MASK; *r = src; } else if ((arbneg & 0x7) == 0x7) { - src.negate_v = 1; + src |= REG_NEGV_MASK; *r = src; } else { - if (!r->valid) + if (!REG_GET_VALID(*r)) *r = get_temp_reg(rp); - src.negate_v = 1; - emit_arith(rp, PFS_OP_MAD, *r, arbneg & 0x7, - keep(src), pfs_one, pfs_zero, 0); - src.negate_v = 0; - emit_arith(rp, PFS_OP_MAD, *r, + src |= REG_NEGV_MASK; + emit_arith(rp, + PFS_OP_MAD, + *r, + arbneg & 0x7, + keep(src), + pfs_one, + pfs_zero, + 0); + src = src & ~REG_NEGV_MASK; + emit_arith(rp, + PFS_OP_MAD, + *r, (arbneg ^ 0x7) | WRITEMASK_W, - src, pfs_one, pfs_zero, 0); + src, + pfs_one, + pfs_zero, + 0); } return 3; } -static int swz_emit_partial(struct r300_fragment_program *rp, pfs_reg_t src, - pfs_reg_t *r, int mask, int mc, GLuint arbneg) +static int swz_emit_partial(struct r300_fragment_program *rp, + GLuint src, + GLuint *r, + int mask, + int mc, + GLuint arbneg) { GLuint tmp; GLuint wmask = 0; - if (!r->valid) + if (!REG_GET_VALID(*r)) *r = get_temp_reg(rp); - /* A partial match, src.v_swz/mask define what parts of the - * desired swizzle we match */ + /* A partial match, VSWZ/mask define what parts of the + * desired swizzle we match + */ if (mc + s_mask[mask].count == 3) { wmask = WRITEMASK_W; - src.negate_s = (arbneg >> 3) & 1; + src |= ((arbneg >> 3) & 1) << REG_NEGS_SHIFT; } tmp = arbneg & s_mask[mask].mask; if (tmp) { tmp = tmp ^ s_mask[mask].mask; if (tmp) { - src.negate_v = 1; - emit_arith(rp, PFS_OP_MAD, *r, + emit_arith(rp, + PFS_OP_MAD, + *r, arbneg & s_mask[mask].mask, - keep(src), pfs_one, pfs_zero, 0); - src.negate_v = 0; - if (!wmask) src.no_use = GL_TRUE; - else src.no_use = GL_FALSE; - emit_arith(rp, PFS_OP_MAD, *r, tmp | wmask, - src, pfs_one, pfs_zero, 0); + keep(src) | REG_NEGV_MASK, + pfs_one, + pfs_zero, + 0); + if (!wmask) { + REG_SET_NO_USE(src, GL_TRUE); + } else { + REG_SET_NO_USE(src, GL_FALSE); + } + emit_arith(rp, + PFS_OP_MAD, + *r, + tmp | wmask, + src, + pfs_one, + pfs_zero, + 0); } else { - src.negate_v = 1; - if (!wmask) src.no_use = GL_TRUE; - else src.no_use = GL_FALSE; - emit_arith(rp, PFS_OP_MAD, *r, + if (!wmask) { + REG_SET_NO_USE(src, GL_TRUE); + } else { + REG_SET_NO_USE(src, GL_FALSE); + } + emit_arith(rp, + PFS_OP_MAD, + *r, (arbneg & s_mask[mask].mask) | wmask, - src, pfs_one, pfs_zero, 0); - src.negate_v = 0; + src | REG_NEGV_MASK, + pfs_one, + pfs_zero, + 0); } } else { - if (!wmask) src.no_use = GL_TRUE; - else src.no_use = GL_FALSE; - emit_arith(rp, PFS_OP_MAD, *r, + if (!wmask) { + REG_SET_NO_USE(src, GL_TRUE); + } else { + REG_SET_NO_USE(src, GL_FALSE); + } + emit_arith(rp, PFS_OP_MAD, + *r, s_mask[mask].mask | wmask, - src, pfs_one, pfs_zero, 0); + src, + pfs_one, + pfs_zero, + 0); } return s_mask[mask].count; } -#define swizzle(r, x, y, z, w) do_swizzle(rp, r, \ - ((SWIZZLE_##x<<0)| \ - (SWIZZLE_##y<<3)| \ - (SWIZZLE_##z<<6)| \ - (SWIZZLE_##w<<9)), \ - 0) - -static pfs_reg_t do_swizzle(struct r300_fragment_program *rp, - pfs_reg_t src, GLuint arbswz, GLuint arbneg) +static GLuint do_swizzle(struct r300_fragment_program *rp, + GLuint src, + GLuint arbswz, + GLuint arbneg) { - pfs_reg_t r = undef; - + GLuint r = undef; + GLuint vswz; int c_mask = 0; - int v_matched = 0; + int v_match = 0; /* If swizzling from something without an XYZW native swizzle, * emit result to a temp, and do new swizzle from the temp. */ - if (src.v_swz != SWIZZLE_XYZ || src.s_swz != SWIZZLE_W) { - pfs_reg_t temp = get_temp_reg(rp); - emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_XYZW, src, pfs_one, - pfs_zero, 0); + if (REG_GET_VSWZ(src) != SWIZZLE_XYZ || + REG_GET_SSWZ(src) != SWIZZLE_W) { + GLuint temp = get_temp_reg(rp); + emit_arith(rp, + PFS_OP_MAD, + temp, + WRITEMASK_XYZW, + src, + pfs_one, + pfs_zero, + 0); src = temp; } - src.s_swz = GET_SWZ(arbswz, 3); + + /* set scalar swizzling */ + REG_SET_SSWZ(src, GET_SWZ(arbswz, 3)); do { + vswz = REG_GET_VSWZ(src); do { -#define CUR_HASH (v_swiz[src.v_swz].hash & s_mask[c_mask].hash) - if (CUR_HASH == (arbswz & s_mask[c_mask].hash)) { - if (s_mask[c_mask].count == 3) - v_matched += swz_native(rp, src, &r, + int chash; + + REG_SET_VSWZ(src, vswz); + chash = v_swiz[REG_GET_VSWZ(src)].hash & + s_mask[c_mask].hash; + + if (chash == (arbswz & s_mask[c_mask].hash)) { + if (s_mask[c_mask].count == 3) { + v_match += swz_native(rp, + src, + &r, arbneg); - else - v_matched += swz_emit_partial(rp, src, - &r, - c_mask, - v_matched, - arbneg); - - if (v_matched == 3) + } else { + v_match += swz_emit_partial(rp, + src, + &r, + c_mask, + v_match, + arbneg); + } + + if (v_match == 3) return r; /* Fill with something invalid.. all 0's was * wrong before, matched SWIZZLE_X. So all - * 1's will be okay for now */ + * 1's will be okay for now + */ arbswz |= (PFS_INVAL & s_mask[c_mask].hash); } - } while(v_swiz[++src.v_swz].hash != PFS_INVAL); - src.v_swz = SWIZZLE_XYZ; + } while(v_swiz[++vswz].hash != PFS_INVAL); + REG_SET_VSWZ(src, SWIZZLE_XYZ); } while (s_mask[++c_mask].hash != PFS_INVAL); ERROR("should NEVER get here\n"); return r; } - -static pfs_reg_t t_src(struct r300_fragment_program *rp, - struct prog_src_register fpsrc) + +static GLuint t_src(struct r300_fragment_program *rp, + struct prog_src_register fpsrc) { - pfs_reg_t r = undef; + GLuint r = undef; switch (fpsrc.File) { case PROGRAM_TEMPORARY: - r.index = fpsrc.Index; - r.valid = GL_TRUE; + REG_SET_INDEX(r, fpsrc.Index); + REG_SET_VALID(r, GL_TRUE); + REG_SET_TYPE(r, REG_TYPE_TEMP); break; case PROGRAM_INPUT: - r.index = fpsrc.Index; - r.type = REG_TYPE_INPUT; - r.valid = GL_TRUE; + REG_SET_INDEX(r, fpsrc.Index); + REG_SET_VALID(r, GL_TRUE); + REG_SET_TYPE(r, REG_TYPE_INPUT); break; case PROGRAM_LOCAL_PARAM: r = emit_param4fv(rp, @@ -533,13 +682,13 @@ static pfs_reg_t t_src(struct r300_fragment_program *rp, } /* no point swizzling ONE/ZERO/HALF constants... */ - if (r.v_swz < SWIZZLE_111 || r.s_swz < SWIZZLE_ZERO) + if (REG_GET_VSWZ(r) < SWIZZLE_111 || REG_GET_SSWZ(r) < SWIZZLE_ZERO) r = do_swizzle(rp, r, fpsrc.Swizzle, fpsrc.NegateBase); return r; } -static pfs_reg_t t_scalar_src(struct r300_fragment_program *rp, - struct prog_src_register fpsrc) +static GLuint t_scalar_src(struct r300_fragment_program *rp, + struct prog_src_register fpsrc) { struct prog_src_register src = fpsrc; int sc = GET_SWZ(fpsrc.Swizzle, 0); /* X */ @@ -549,22 +698,24 @@ static pfs_reg_t t_scalar_src(struct r300_fragment_program *rp, return t_src(rp, src); } -static pfs_reg_t t_dst(struct r300_fragment_program *rp, - struct prog_dst_register dest) { - pfs_reg_t r = undef; +static GLuint t_dst(struct r300_fragment_program *rp, + struct prog_dst_register dest) +{ + GLuint r = undef; switch (dest.File) { case PROGRAM_TEMPORARY: - r.index = dest.Index; - r.valid = GL_TRUE; + REG_SET_INDEX(r, dest.Index); + REG_SET_VALID(r, GL_TRUE); + REG_SET_TYPE(r, REG_TYPE_TEMP); return r; case PROGRAM_OUTPUT: - r.type = REG_TYPE_OUTPUT; + REG_SET_TYPE(r, REG_TYPE_OUTPUT); switch (dest.Index) { case FRAG_RESULT_COLR: case FRAG_RESULT_DEPR: - r.index = dest.Index; - r.valid = GL_TRUE; + REG_SET_INDEX(r, dest.Index); + REG_SET_VALID(r, GL_TRUE); return r; default: ERROR("Bad DstReg->Index 0x%x\n", dest.Index); @@ -576,66 +727,77 @@ static pfs_reg_t t_dst(struct r300_fragment_program *rp, } } -static int t_hw_src(struct r300_fragment_program *rp, pfs_reg_t src, +static int t_hw_src(struct r300_fragment_program *rp, + GLuint src, GLboolean tex) { COMPILE_STATE; int idx; + int index = REG_GET_INDEX(src); - switch (src.type) { + switch(REG_GET_TYPE(src)) { case REG_TYPE_TEMP: /* NOTE: if reg==-1 here, a source is being read that - * hasn't been written to. Undefined results */ - if (cs->temps[src.index].reg == -1) - cs->temps[src.index].reg = get_hw_temp(rp); - idx = cs->temps[src.index].reg; + * hasn't been written to. Undefined results + */ + if (cs->temps[index].reg == -1) + cs->temps[index].reg = get_hw_temp(rp); - if (!src.no_use && (--cs->temps[src.index].refcount == 0)) + idx = cs->temps[index].reg; + + if (!REG_GET_NO_USE(src) && + (--cs->temps[index].refcount == 0)) free_temp(rp, src); break; case REG_TYPE_INPUT: - idx = cs->inputs[src.index].reg; + idx = cs->inputs[index].reg; - if (!src.no_use && (--cs->inputs[src.index].refcount == 0)) - free_hw_temp(rp, cs->inputs[src.index].reg); + if (!REG_GET_NO_USE(src) && + (--cs->inputs[index].refcount == 0)) + free_hw_temp(rp, cs->inputs[index].reg); break; case REG_TYPE_CONST: - return (src.index | SRC_CONST); + return (index | SRC_CONST); default: ERROR("Invalid type for source reg\n"); return (0 | SRC_CONST); } - if (!tex) cs->used_in_node |= (1 << idx); + if (!tex) + cs->used_in_node |= (1 << idx); return idx; } -static int t_hw_dst(struct r300_fragment_program *rp, pfs_reg_t dest, +static int t_hw_dst(struct r300_fragment_program *rp, + GLuint dest, GLboolean tex) { COMPILE_STATE; int idx; - assert(dest.valid); + GLuint index = REG_GET_INDEX(dest); + assert(REG_GET_VALID(dest)); - switch (dest.type) { + switch(REG_GET_TYPE(dest)) { case REG_TYPE_TEMP: - if (cs->temps[dest.index].reg == -1) { - if (!tex) - cs->temps[dest.index].reg = get_hw_temp(rp); - else - cs->temps[dest.index].reg = get_hw_temp_tex(rp); + if (cs->temps[REG_GET_INDEX(dest)].reg == -1) { + if (!tex) { + cs->temps[index].reg = get_hw_temp(rp); + } else { + cs->temps[index].reg = get_hw_temp_tex(rp); + } } - idx = cs->temps[dest.index].reg; + idx = cs->temps[index].reg; - if (!dest.no_use && (--cs->temps[dest.index].refcount == 0)) + if (!REG_GET_NO_USE(dest) && + (--cs->temps[index].refcount == 0)) free_temp(rp, dest); cs->dest_in_node |= (1 << idx); cs->used_in_node |= (1 << idx); break; case REG_TYPE_OUTPUT: - switch (dest.index) { + switch(index) { case FRAG_RESULT_COLR: rp->node[rp->cur_node].flags |= R300_PFS_NODE_OUTPUT_COLOR; break; @@ -643,17 +805,18 @@ static int t_hw_dst(struct r300_fragment_program *rp, pfs_reg_t dest, rp->node[rp->cur_node].flags |= R300_PFS_NODE_OUTPUT_DEPTH; break; } - return dest.index; + return index; break; default: - ERROR("invalid dest reg type %d\n", dest.type); + ERROR("invalid dest reg type %d\n", REG_GET_TYPE(dest)); return 0; } return idx; } -static void emit_nop(struct r300_fragment_program *rp, GLuint mask, +static void emit_nop(struct r300_fragment_program *rp, + GLuint mask, GLboolean sync) { COMPILE_STATE; @@ -679,8 +842,8 @@ static void emit_tex(struct r300_fragment_program *rp, int opcode) { COMPILE_STATE; - pfs_reg_t coord = t_src(rp, fpi->SrcReg[0]); - pfs_reg_t dest = undef, rdest = undef; + GLuint coord = t_src(rp, fpi->SrcReg[0]); + GLuint dest = undef, rdest = undef; GLuint din = cs->dest_in_node, uin = cs->used_in_node; int unit = fpi->TexSrcUnit; int hwsrc, hwdest; @@ -691,7 +854,7 @@ static void emit_tex(struct r300_fragment_program *rp, dest = t_dst(rp, fpi->DstReg); /* r300 doesn't seem to be able to do TEX->output reg */ - if (dest.type == REG_TYPE_OUTPUT) { + if (REG_GET_TYPE(dest) == REG_TYPE_OUTPUT) { rdest = dest; dest = get_temp_reg_tex(rp); } @@ -703,7 +866,7 @@ static void emit_tex(struct r300_fragment_program *rp, if (uin & (1 << hwdest)) { free_hw_temp(rp, hwdest); hwdest = get_hw_temp_tex(rp); - cs->temps[dest.index].reg = hwdest; + cs->temps[REG_GET_INDEX(dest)].reg = hwdest; } } else { hwdest = 0; @@ -713,8 +876,8 @@ static void emit_tex(struct r300_fragment_program *rp, /* Indirection if source has been written in this node, or if the * dest has been read/written in this node */ - if ((coord.type != REG_TYPE_CONST && (din & (1<v_pos = cs->s_pos = MAX2(cs->v_pos, cs->s_pos); @@ -754,13 +917,13 @@ static void emit_tex(struct r300_fragment_program *rp, | (opcode << R300_FPITX_OPCODE_SHIFT); cs->dest_in_node |= (1 << hwdest); - if (coord.type != REG_TYPE_CONST) + if (REG_GET_TYPE(coord) != REG_TYPE_CONST) cs->used_in_node |= (1 << hwsrc); rp->node[rp->cur_node].tex_end++; /* Copy from temp to output if needed */ - if (rdest.valid) { + if (REG_GET_VALID(rdest)) { emit_arith(rp, PFS_OP_MAD, rdest, WRITEMASK_XYZW, dest, pfs_one, pfs_zero, 0); free_temp(rp, dest); @@ -770,7 +933,9 @@ static void emit_tex(struct r300_fragment_program *rp, /* Add sources to FPI1/FPI3 lists. If source is already on list, * reuse the index instead of wasting a source. */ -static int add_src(struct r300_fragment_program *rp, int reg, int pos, +static int add_src(struct r300_fragment_program *rp, + int reg, + int pos, int srcmask) { COMPILE_STATE; @@ -819,9 +984,12 @@ static int add_src(struct r300_fragment_program *rp, int reg, int pos, * It's not necessary to force the first case, but it makes disassembled * shaders easier to read. */ -static GLboolean force_same_slot(int vop, int sop, - GLboolean emit_vop, GLboolean emit_sop, - int argc, pfs_reg_t *src) +static GLboolean force_same_slot(int vop, + int sop, + GLboolean emit_vop, + GLboolean emit_sop, + int argc, + GLuint *src) { int i; @@ -833,20 +1001,24 @@ static GLboolean force_same_slot(int vop, int sop, if (emit_vop) { for (i=0;ialu.inst[vpos].inst1 |= hwdest << R300_FPI1_DSTC_SHIFT; - if (dest.type == REG_TYPE_OUTPUT) { - if (dest.index == FRAG_RESULT_COLR) { + if (REG_GET_TYPE(dest) == REG_TYPE_OUTPUT) { + if (REG_GET_INDEX(dest) == FRAG_RESULT_COLR) { rp->alu.inst[vpos].inst1 |= (mask & WRITEMASK_XYZ) << R300_FPI1_DSTC_OUTPUT_MASK_SHIFT; } else assert(0); @@ -968,11 +1143,11 @@ static void emit_arith(struct r300_fragment_program *rp, int op, sswz[2] << R300_FPI2_ARG2A_SHIFT; if (mask & WRITEMASK_W) { - if (dest.type == REG_TYPE_OUTPUT) { - if (dest.index == FRAG_RESULT_COLR) { + if (REG_GET_TYPE(dest) == REG_TYPE_OUTPUT) { + if (REG_GET_INDEX(dest) == FRAG_RESULT_COLR) { rp->alu.inst[spos].inst3 |= (hwdest << R300_FPI3_DSTA_SHIFT) | R300_FPI3_DSTA_OUTPUT; - } else if (dest.index == FRAG_RESULT_DEPR) { + } else if (REG_GET_INDEX(dest) == FRAG_RESULT_DEPR) { rp->alu.inst[spos].inst3 |= R300_FPI3_DSTA_DEPTH; } else assert(0); } else { @@ -985,22 +1160,22 @@ static void emit_arith(struct r300_fragment_program *rp, int op, rp->alu.inst[vpos].inst2 = NOP_INST2; return; -}; +} #if 0 -static pfs_reg_t get_attrib(struct r300_fragment_program *rp, GLuint attr) +static GLuint get_attrib(struct r300_fragment_program *rp, GLuint attr) { struct gl_fragment_program *mp = &rp->mesa_program; - pfs_reg_t r = undef; + GLuint r = undef; if (!(mp->Base.InputsRead & (1<mesa_program; const struct prog_instruction *inst = mp->Base.Instructions; struct prog_instruction *fpi; - pfs_reg_t src[3], dest, temp; - pfs_reg_t cnst; + GLuint src[3], dest, temp; + GLuint cnst; int flags, mask = 0; GLfloat cnstv[4] = {0.0, 0.0, 0.0, 0.0}; @@ -1167,7 +1342,7 @@ static GLboolean parse_program(struct r300_fragment_program *rp) /* result.x = 1.0 * result.w = src1.w */ if (mask & WRITEMASK_XW) { - src[1].v_swz = SWIZZLE_111; /* Cheat.. */ + REG_SET_VSWZ(src[1], SWIZZLE_111); /*Cheat*/ emit_arith(rp, PFS_OP_MAD, dest, mask & WRITEMASK_XW, src[1], pfs_one, pfs_zero, diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.h b/src/mesa/drivers/dri/r300/r300_fragprog.h index 4bbaa07e01..b0cebe60bb 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.h +++ b/src/mesa/drivers/dri/r300/r300_fragprog.h @@ -41,6 +41,7 @@ #include "r300_context.h" #include "program_instruction.h" +#if 0 /* representation of a register for emit_arith/swizzle */ typedef struct _pfs_reg_t { enum { @@ -58,7 +59,7 @@ typedef struct _pfs_reg_t { GLboolean no_use:1; GLboolean valid:1; } pfs_reg_t; - +#endif typedef struct r300_fragment_program_swizzle { GLuint length; GLuint src[4]; -- cgit v1.2.3 From c0a63d8e5e33b7fe3057e32f04c22969ac2adc1d Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 26 Dec 2006 20:59:49 +1100 Subject: nouveau: Add notifier support functions --- src/mesa/drivers/dri/nouveau/Makefile | 1 + src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 + src/mesa/drivers/dri/nouveau/nouveau_context.h | 4 + src/mesa/drivers/dri/nouveau/nouveau_object.c | 14 +-- src/mesa/drivers/dri/nouveau/nouveau_object.h | 16 +++- src/mesa/drivers/dri/nouveau/nouveau_sync.c | 115 +++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_sync.h | 36 ++++++++ 7 files changed, 179 insertions(+), 8 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_sync.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_sync.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 1a76169156..962978dc7f 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -24,6 +24,7 @@ DRIVER_SOURCES = \ nouveau_shader_2.c \ nouveau_tex.c \ nouveau_swtcl.c \ + nouveau_sync.c \ nv10_swtcl.c \ nv10_state.c \ nv20_state.c \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index ac940ac595..7aca31d0d3 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -222,6 +222,7 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, break; } + nouveauSyncInitFuncs(ctx); nmesa->hw_func.InitCard(nmesa); nouveauInitState(ctx); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index ea28506b74..f54ac9a7c8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -40,6 +40,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_state_cache.h" #include "nouveau_buffers.h" #include "nouveau_shader.h" +#include "nouveau_sync.h" #include "xmlconfig.h" @@ -101,6 +102,9 @@ typedef struct nouveau_context { uint64_t vram_phys; uint64_t agp_phys; + /* Channel synchronisation */ + nouveau_notifier *syncNotifier; + /* Additional hw-specific functions */ nouveau_hw_func hw_func; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index dda547c916..cf7284d2d5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -4,7 +4,7 @@ #include "nouveau_reg.h" -static GLboolean nouveauCreateContextObject(nouveauContextPtr nmesa, int handle, int class, uint32_t flags, uint32_t dma_in, uint32_t dma_out, uint32_t dma_notifier) +GLboolean nouveauCreateContextObject(nouveauContextPtr nmesa, int handle, int class, uint32_t flags, uint32_t dma_in, uint32_t dma_out, uint32_t dma_notifier) { drm_nouveau_object_init_t cto; int ret; @@ -20,12 +20,12 @@ static GLboolean nouveauCreateContextObject(nouveauContextPtr nmesa, int handle, return ret == 0; } -static GLboolean nouveauCreateDmaObject(nouveauContextPtr nmesa, - uint32_t handle, - uint32_t offset, - uint32_t size, - int target, - int access) +GLboolean nouveauCreateDmaObject(nouveauContextPtr nmesa, + uint32_t handle, + uint32_t offset, + uint32_t size, + int target, + int access) { drm_nouveau_dma_object_init_t dma; int ret; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index a49a39719b..87f2dc9ae7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -12,7 +12,8 @@ enum DMAObjects { NvCtxSurf2D = 0x80000020, NvImageBlit = 0x80000021, NvDmaFB = 0xD0FB0001, - NvDmaAGP = 0xD0AA0001 + NvDmaAGP = 0xD0AA0001, + NvSyncNotify = 0xD0000001 }; enum DMASubchannel { @@ -22,4 +23,17 @@ enum DMASubchannel { }; extern void nouveauObjectOnSubchannel(nouveauContextPtr nmesa, int subchannel, int handle); + +extern GLboolean nouveauCreateContextObject(nouveauContextPtr nmesa, + int handle, int class, + uint32_t flags, + uint32_t dma_in, + uint32_t dma_out, + uint32_t dma_notifier); +extern GLboolean nouveauCreateDmaObject(nouveauContextPtr nmesa, + uint32_t handle, + uint32_t offset, + uint32_t size, + int target, + int access); #endif diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.c b/src/mesa/drivers/dri/nouveau/nouveau_sync.c new file mode 100644 index 0000000000..698f778c4b --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.c @@ -0,0 +1,115 @@ +#include "vblank.h" /* for DO_USLEEP */ + +#include "nouveau_context.h" +#include "nouveau_buffers.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" +#include "nouveau_msg.h" +#include "nouveau_sync.h" + +nouveau_notifier * +nouveau_notifier_new(GLcontext *ctx, GLuint handle) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_notifier *notifier; + + notifier = CALLOC_STRUCT(nouveau_notifier_t); + if (!notifier) + return NULL; + + notifier->mem = nouveau_mem_alloc(ctx, NOUVEAU_MEM_FB, 32, 0); + if (!notifier->mem) { + FREE(notifier); + return NULL; + } + + if (!nouveauCreateDmaObject(nmesa, handle, notifier->mem->offset, + notifier->mem->size, + 0 /* NV_DMA_TARGET_FB */, + 0 /* NV_DMA_ACCESS_RW */)) { + nouveau_mem_free(ctx, notifier->mem); + FREE(notifier); + return NULL; + } + + notifier->handle = handle; + return notifier; +} + +void +nouveau_notifier_destroy(GLcontext *ctx, nouveau_notifier *notifier) +{ + /*XXX: free DMA object.. */ + nouveau_mem_free(ctx, notifier->mem); + FREE(notifier); +} + +void +nouveau_notifier_reset(nouveau_notifier *notifier) +{ + volatile GLuint *n = notifier->mem->map; + + n[NV_NOTIFY_TIME_0 /4] = 0x00000000; + n[NV_NOTIFY_TIME_1 /4] = 0x00000000; + n[NV_NOTIFY_RETURN_VALUE/4] = 0x00000000; + n[NV_NOTIFY_STATE /4] = (NV_NOTIFY_STATE_STATUS_IN_PROCESS << + NV_NOTIFY_STATE_STATUS_SHIFT); +} + +GLboolean +nouveau_notifier_wait_status(nouveau_notifier *notifier, GLuint status, + GLuint timeout) +{ + volatile GLuint *n = notifier->mem->map; + unsigned int time = 0; + + while (time <= timeout) { + if (n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_ERROR_CODE_MASK) { + MESSAGE("Notifier returned error: 0x%04x\n", + n[NV_NOTIFY_STATE] & + NV_NOTIFY_STATE_ERROR_CODE_MASK); + return GL_FALSE; + } + + if (((n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_STATUS_MASK) >> + NV_NOTIFY_STATE_STATUS_SHIFT) == status) + return GL_TRUE; + + if (timeout) { + DO_USLEEP(1); + time++; + } + } + + MESSAGE("Notifier timed out\n"); + return GL_FALSE; +} + +void +nouveau_notifier_wait_nop(GLcontext *ctx, nouveau_notifier *notifier, + GLuint subc) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLboolean ret; + + nouveau_notifier_reset(notifier); + + BEGIN_RING_SIZE(subc, NV_NOTIFY, 1); + OUT_RING (NV_NOTIFY_STYLE_WRITE_ONLY); + BEGIN_RING_SIZE(subc, NV_NOP, 1); + OUT_RING (0); + + ret = nouveau_notifier_wait_status(notifier, + NV_NOTIFY_STATE_STATUS_COMPLETED, + 0 /* no timeout */); + if (ret) MESSAGE("wait on notifier failed\n"); +} + +void nouveauSyncInitFuncs(GLcontext *ctx) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + nmesa->syncNotifier = nouveau_notifier_new(ctx, NvSyncNotify); +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.h b/src/mesa/drivers/dri/nouveau/nouveau_sync.h new file mode 100644 index 0000000000..b20c2565ca --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.h @@ -0,0 +1,36 @@ +#ifndef __NOUVEAU_SYNC_H__ +#define __NOUVEAU_SYNC_H__ + +#include "nouveau_buffers.h" + +#define NV_NOTIFY_TIME_0 0x00000000 +#define NV_NOTIFY_TIME_1 0x00000004 +#define NV_NOTIFY_RETURN_VALUE 0x00000008 +#define NV_NOTIFY_STATE 0x0000000C +#define NV_NOTIFY_STATE_STATUS_MASK 0xFF000000 +#define NV_NOTIFY_STATE_STATUS_SHIFT 24 +#define NV_NOTIFY_STATE_STATUS_COMPLETED 0x00 +#define NV_NOTIFY_STATE_STATUS_IN_PROCESS 0x01 +#define NV_NOTIFY_STATE_ERROR_CODE_MASK 0x0000FFFF +#define NV_NOTIFY_STATE_ERROR_CODE_SHIFT 0 + +/* Methods that (hopefully) all objects have */ +#define NV_NOP 0x00000100 +#define NV_NOTIFY 0x00000104 +#define NV_NOTIFY_STYLE_WRITE_ONLY 0 + +typedef struct nouveau_notifier_t { + GLuint handle; + nouveau_mem *mem; +} nouveau_notifier; + +extern nouveau_notifier *nouveau_notifier_new(GLcontext *, GLuint handle); +extern void nouveau_notifier_destroy(GLcontext *, nouveau_notifier *); +extern void nouveau_notifier_reset(nouveau_notifier *); +extern GLboolean nouveau_notifier_wait_status(nouveau_notifier *r, + GLuint status, GLuint timeout); +extern void nouveau_notifier_wait_nop(GLcontext *ctx, + nouveau_notifier *, GLuint subc); + +extern void nouveauSyncInitFuncs(GLcontext *ctx); +#endif -- cgit v1.2.3 From 0b2b2de6cff23bc224f5471cc8d0812661a0d363 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 26 Dec 2006 21:10:38 +1100 Subject: nouveau: Wait on notifier to check for completion of previous commands. We can't wait on NV_PGRAPH_STATUS. We don't have the regs mapped, and there's no guarantee that we'll catch PGRAPH idle when multiple channels are active. --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 3 +- src/mesa/drivers/dri/nouveau/nouveau_fifo.c | 39 +++++--------------------- src/mesa/drivers/dri/nouveau/nouveau_sync.c | 14 ++++++++- src/mesa/drivers/dri/nouveau/nouveau_sync.h | 2 +- 4 files changed, 23 insertions(+), 35 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 7aca31d0d3..d68f4e77e7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -222,7 +222,8 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, break; } - nouveauSyncInitFuncs(ctx); + if (!nouveauSyncInitFuncs(ctx)) + return GL_FALSE; nmesa->hw_func.InitCard(nmesa); nouveauInitState(ctx); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 5c2b2c7552..7af9f1e3c2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -35,6 +35,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_msg.h" #include "nouveau_fifo.h" #include "nouveau_lock.h" +#include "nouveau_object.h" +#include "nouveau_sync.h" #define RING_SKIPS 8 @@ -68,45 +70,18 @@ void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size) } /* - * Wait for the card to be idle + * Wait for the channel to be idle */ void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) { - int i,status; - + /* Wait for FIFO idle */ FIRE_RING(); while(RING_AHEAD()>0); - /* We can't wait on PGRAPH going idle.. - * 1) We don't have the regs mapped - * 2) PGRAPH may not go idle with multiple channels active - * Look into replacing this with a NOTIFY/NOP + wait notifier sequence. + /* Wait on notifier to indicate all commands in the channel have + * been completed. */ -#if 0 - for(i=0;i<1000000;i++) /* 1 second */ - { - switch(nmesa->screen->card->type) - { - case NV_03: - status=NV_READ(NV03_STATUS); - break; - case NV_04: - case NV_05: - case NV_10: - case NV_20: - case NV_30: - case NV_40: - case NV_44: - case NV_50: - default: - status=NV_READ(NV04_STATUS); - break; - } - if (status) - return; - DO_USLEEP(1); - } -#endif + nouveau_notifier_wait_nop(nmesa->glCtx, nmesa->syncNotifier, NvSub3D); } void nouveauWaitForIdle(nouveauContextPtr nmesa) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.c b/src/mesa/drivers/dri/nouveau/nouveau_sync.c index 698f778c4b..5c1c030913 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_sync.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.c @@ -106,10 +106,22 @@ nouveau_notifier_wait_nop(GLcontext *ctx, nouveau_notifier *notifier, if (ret) MESSAGE("wait on notifier failed\n"); } -void nouveauSyncInitFuncs(GLcontext *ctx) +GLboolean nouveauSyncInitFuncs(GLcontext *ctx) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); nmesa->syncNotifier = nouveau_notifier_new(ctx, NvSyncNotify); + if (!nmesa->syncNotifier) { + MESSAGE("Failed to create channel sync notifier\n"); + return GL_FALSE; + } + + /* 0x180 is SET_DMA_NOTIFY, should be correct for all supported 3D + * object classes + */ + BEGIN_RING_CACHE(NvSub3D, 0x180, 1); + OUT_RING_CACHE (NvSyncNotify); + + return GL_TRUE; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.h b/src/mesa/drivers/dri/nouveau/nouveau_sync.h index b20c2565ca..d9e3d4b80c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_sync.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.h @@ -32,5 +32,5 @@ extern GLboolean nouveau_notifier_wait_status(nouveau_notifier *r, extern void nouveau_notifier_wait_nop(GLcontext *ctx, nouveau_notifier *, GLuint subc); -extern void nouveauSyncInitFuncs(GLcontext *ctx); +extern GLboolean nouveauSyncInitFuncs(GLcontext *ctx); #endif -- cgit v1.2.3 From 3fcb7d388d71c6ab147769d35feab29b7f511521 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 26 Dec 2006 21:33:58 +1100 Subject: nouveau: Make the notifier stuff actually work.. --- src/mesa/drivers/dri/nouveau/nouveau_sync.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.c b/src/mesa/drivers/dri/nouveau/nouveau_sync.c index 5c1c030913..e27101d868 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_sync.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.c @@ -18,7 +18,10 @@ nouveau_notifier_new(GLcontext *ctx, GLuint handle) if (!notifier) return NULL; - notifier->mem = nouveau_mem_alloc(ctx, NOUVEAU_MEM_FB, 32, 0); + notifier->mem = nouveau_mem_alloc(ctx, + NOUVEAU_MEM_FB | NOUVEAU_MEM_MAPPED, + 32, + 0); if (!notifier->mem) { FREE(notifier); return NULL; @@ -65,14 +68,14 @@ nouveau_notifier_wait_status(nouveau_notifier *notifier, GLuint status, unsigned int time = 0; while (time <= timeout) { - if (n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_ERROR_CODE_MASK) { + if (n[NV_NOTIFY_STATE/4] & NV_NOTIFY_STATE_ERROR_CODE_MASK) { MESSAGE("Notifier returned error: 0x%04x\n", n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_ERROR_CODE_MASK); return GL_FALSE; } - if (((n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_STATUS_MASK) >> + if (((n[NV_NOTIFY_STATE/4] & NV_NOTIFY_STATE_STATUS_MASK) >> NV_NOTIFY_STATE_STATUS_SHIFT) == status) return GL_TRUE; @@ -99,11 +102,12 @@ nouveau_notifier_wait_nop(GLcontext *ctx, nouveau_notifier *notifier, OUT_RING (NV_NOTIFY_STYLE_WRITE_ONLY); BEGIN_RING_SIZE(subc, NV_NOP, 1); OUT_RING (0); + FIRE_RING(); ret = nouveau_notifier_wait_status(notifier, NV_NOTIFY_STATE_STATUS_COMPLETED, 0 /* no timeout */); - if (ret) MESSAGE("wait on notifier failed\n"); + if (ret == GL_FALSE) MESSAGE("wait on notifier failed\n"); } GLboolean nouveauSyncInitFuncs(GLcontext *ctx) -- cgit v1.2.3 From 257e3d1d5953a94892a31d71bd2e200204d7968f Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 26 Dec 2006 22:03:12 +1100 Subject: nouveau: Make use of NOUVEAU_DEBUG for shader disasm --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 + src/mesa/drivers/dri/nouveau/nouveau_context.h | 5 ++++ src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 33 ++++++++++++++----------- 3 files changed, 24 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index d68f4e77e7..3718900b62 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -63,6 +63,7 @@ int NOUVEAU_DEBUG = 0; static const struct dri_debug_control debug_control[] = { + { "shaders", DEBUG_SHADERS }, { NULL, 0 } }; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index f54ac9a7c8..0efbcce129 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -213,5 +213,10 @@ extern void nouveauSwapBuffers(__DRIdrawablePrivate *dPriv); extern void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv, int x, int y, int w, int h); +/* Debugging utils: */ +extern int NOUVEAU_DEBUG; + +#define DEBUG_SHADERS 0x00000001 + #endif /* __NOUVEAU_CONTEXT_H__ */ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c index b39f4668b9..2177413b66 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c @@ -36,6 +36,7 @@ #include "program.h" +#include "nouveau_context.h" #include "nouveau_shader.h" struct pass2_rec { @@ -219,21 +220,23 @@ nouveau_shader_pass2(nvsPtr nvs) nvs->translated = 1; nvs->on_hardware = 0; -#if 1 - fflush(stdout); fflush(stderr); - fprintf(stderr, "----------------MESA PROGRAM\n"); - fflush(stdout); fflush(stderr); - _mesa_print_program(&nvs->mesa.vp.Base); - fflush(stdout); fflush(stderr); - fprintf(stderr, "^^^^^^^^^^^^^^^^MESA PROGRAM\n"); - fflush(stdout); fflush(stderr); - fprintf(stderr, "----------------NV40 PROGRAM\n"); - fflush(stdout); fflush(stderr); - nvsDisasmHWShader(nvs); - fflush(stdout); fflush(stderr); - fprintf(stderr, "^^^^^^^^^^^^^^^^NV40 PROGRAM\n"); - fflush(stdout); fflush(stderr); -#endif + if (NOUVEAU_DEBUG & DEBUG_SHADERS) { + fflush(stdout); fflush(stderr); + fprintf(stderr, "----------------MESA PROGRAM target=%s, id=0x%x\n", + _mesa_lookup_enum_by_nr(nvs->mesa.vp.Base.Target), + nvs->mesa.vp.Base.Id); + fflush(stdout); fflush(stderr); + _mesa_print_program(&nvs->mesa.vp.Base); + fflush(stdout); fflush(stderr); + fprintf(stderr, "^^^^^^^^^^^^^^^^MESA PROGRAM\n"); + fflush(stdout); fflush(stderr); + fprintf(stderr, "----------------NV PROGRAM\n"); + fflush(stdout); fflush(stderr); + nvsDisasmHWShader(nvs); + fflush(stdout); fflush(stderr); + fprintf(stderr, "^^^^^^^^^^^^^^^^NV PROGRAM\n"); + fflush(stdout); fflush(stderr); + } return GL_TRUE; } -- cgit v1.2.3 From 2dccca57e4325e77d7b2f0a08835eeccc11892cb Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Tue, 26 Dec 2006 18:39:21 +0100 Subject: Deleted unused file which likely have be reintroduced during git move. This file was deleted longtime ago, guess that git migration created it again. --- src/mesa/drivers/dri/r300/r300_fragprog_swz.c | 1328 ------------------------- 1 file changed, 1328 deletions(-) delete mode 100644 src/mesa/drivers/dri/r300/r300_fragprog_swz.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_swz.c b/src/mesa/drivers/dri/r300/r300_fragprog_swz.c deleted file mode 100644 index b29331d7bd..0000000000 --- a/src/mesa/drivers/dri/r300/r300_fragprog_swz.c +++ /dev/null @@ -1,1328 +0,0 @@ -/* - * Copyright (C) 2005 Jerome Glisse. 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 (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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ -#include "r300_fragprog.h" -#include "r300_reg.h" - - -#define I0_000 ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_ZERO) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_111 ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_ZERO) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG2C_SHIFT) ) -#define I0_XXX ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0C_XXX) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_YYY ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0C_YYY) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_ZZZ ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0C_ZZZ) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_XYZ ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0C_XYZ) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_YZX ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0C_YZX) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_ZXY ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0C_ZXY) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_WZY ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0CA_WZY) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) -#define I0_WWW ( (R300_FPI0_OUTC_MAD) | \ - (R300_FPI0_ARGC_SRC0A) | \ - (R300_FPI0_ARGC_ONE << R300_FPI0_ARG1C_SHIFT) | \ - (R300_FPI0_ARGC_ZERO << R300_FPI0_ARG2C_SHIFT) ) - -#define IEMPTY 0 - -#define I1_XYZ ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_X | \ - R300_FPI1_DSTC_REG_Y | \ - R300_FPI1_DSTC_REG_Z ) -#define I1_XY_ ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_X | \ - R300_FPI1_DSTC_REG_Y ) -#define I1_X_Z ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_X | \ - R300_FPI1_DSTC_REG_Z ) -#define I1__YZ ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_Y | \ - R300_FPI1_DSTC_REG_Z ) -#define I1_X__ ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_X ) -#define I1__Y_ ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_Y ) -#define I1___Z ( R300_FPI1_SRC1C_CONST | \ - R300_FPI1_SRC2C_CONST | \ - R300_FPI1_DSTC_REG_Z ) - -#define SEMPTY {0,{0,0,0,0},{0,0,0,0,0,0,0,0}} - -struct r300_fragment_program_swizzle r300_swizzle [512] = { - /* XXX */ - {1,{0,0,0,0},{ I0_XXX, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* YXX */ - {2,{0,0,0,0},{ I0_YZX, I1_X_Z, - I0_XXX, I1__Y_, - 0,0, - 0,0 } }, - /* ZXX */ - {2,{0,0,0,0},{ I0_ZZZ, I1_X__, - I0_XXX, I1__YZ, - 0,0, - 0,0 } }, - /* WXX */ - {2,{0,0,0,0},{ I0_WZY, I1_X__, - I0_XXX, I1__YZ, - 0,0, - 0,0} }, - /* 0XX */ - {2,{0,2,0,0},{ I0_XXX, I1__YZ, - I0_000, I1_X__, - 0,0, - 0,0 } }, - /* 1XX */ - {2,{0,2,0,0},{ I0_XXX, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XYX */ - {2,{0,0,0,0},{ I0_YYY, I1__Y_, - I0_XXX, I1_X_Z, - 0,0,0,0}}, - /* YYX */ - {2,{0,0,0,0},{ I0_YYY, I1_XY_, - I0_XXX, I1___Z, - 0,0,0,0}}, - /* ZYX */ - {3,{0,0,0,0},{ I0_ZZZ, I1_X__, - I0_YYY, I1__Y_, - I0_XXX, I1___Z, - 0,0}}, - /* WYX */ - {3,{0,0,0,0},{ I0_WZY, I1_X__, - I0_YYY, I1__Y_, - I0_XXX, I1___Z, - 0,0}}, - /* 0YX */ - {3,{0,0,2,0},{ I0_YYY, I1__Y_, - I0_XXX, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1YX */ - {3,{0,0,2,0},{ I0_YYY, I1__Y_, - I0_XXX, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* XZX */ - {2,{0,0,0,0},{ I0_YZX, I1__YZ, - I0_XXX, I1_X__, - 0,0,0,0}}, - /* YZX */ - {1,{0,0,0,0},{ I0_YZX, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* ZZX */ - {2,{0,0,0,0},{ I0_YZX, I1__YZ, - I0_ZZZ, I1_X__,0,0,0,0}}, - /* WZX */ - {2,{0,0,0,0},{ I0_WZY, I1_XY_, - I0_XXX, I1___Z,0,0,0,0}}, - /* 0ZX */ - {2,{0,2,0,0},{ I0_YZX, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1ZX */ - {2,{0,2,0,0},{ I0_YZX, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XWX */ - {2,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_XXX, I1_X_Z, - 0,0,0,0}}, - /* YWX */ - {2,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_YZX, I1_X_Z, - 0,0,0,0}}, - /* ZWX */ - {3,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_ZZZ, I1_X__, - I0_XXX, I1___Z, - 0,0}}, - /* WWX */ - {2,{0,0,0,0},{ I0_WWW, I1_XY_, - I0_YZX, I1___Z, - 0,0,0,0}}, - /* 0WX */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_XXX, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1WX */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_XXX, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X0X */ - {2,{0,2,0,0},{ I0_XXX, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* Y0X */ - {2,{0,2,0,0},{ I0_YZX, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* Z0X */ - {3,{0,2,0,0},{ I0_XXX, I1___Z, - I0_000, I1__Y_, - I0_ZZZ, I1_X__, - 0,0}}, - /* W0X */ - {3,{0,0,2,0},{ I0_WZY, I1_XYZ, - I0_XXX, I1___Z, - I0_000, I1__Y_, - 0,0}}, - /* 00X */ - {2,{0,2,0,0},{ I0_XXX, I1___Z, - I0_000, I1_XY_, - 0,0,0,0}}, - /* 10X */ - {3,{0,2,0,0},{ I0_XXX, I1___Z, - I0_000, I1__Y_, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X1X */ - {2,{0,2,0,0},{ I0_XXX, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* Y1X */ - {2,{0,2,0,0},{ I0_YZX, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* Z1X */ - {3,{0,2,0,0},{ I0_XXX, I1___Z, - I0_111, I1__Y_, - I0_ZZZ, I1_X__, - 0,0}}, - /* W1X */ - {3,{0,0,2,0},{ I0_WZY, I1_XYZ, - I0_XXX, I1___Z, - I0_111, I1__Y_, - 0,0}}, - /* 01X */ - {3,{0,2,0,0},{ I0_XXX, I1___Z, - I0_111, I1__Y_, - I0_000, I1_X__, - 0,0}}, - /* 11X */ - {2,{0,2,0,0},{ I0_XXX, I1___Z, - I0_111, I1_XY_, - 0,0,0,0}}, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - /* XXY */ - {2,{0,0,0,0},{ I0_YYY, I1___Z, - I0_XXX, I1_XY_, - 0,0,0,0}}, - /* YXY */ - {2,{0,0,0,0},{ I0_YYY, I1_X_Z, - I0_XXX, I1__Y_, - 0,0,0,0}}, - /* ZXY */ - {1,{0,0,0,0},{ I0_ZXY, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* WXY */ - {2,{0,0,0,0},{ I0_WZY, I1_X__, - I0_ZXY, I1__YZ, - 0,0,0,0}}, - /* 0XY */ - {2,{0,0,0,0},{ I0_ZXY, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1XY */ - {2,{0,0,0,0},{ I0_ZXY, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XYY */ - {2,{0,0,0,0},{ I0_YYY, I1__YZ, - I0_XXX, I1_X__, - 0,0,0,0}}, - /* YYY */ - {1,{0,0,0,0},{ I0_YYY, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* ZYY */ - {2,{0,0,0,0},{ I0_YYY, I1__YZ, - I0_ZZZ, I1_X__, - 0,0,0,0}}, - /* WYY */ - {2,{0,0,0,0},{ I0_WZY, I1_XYZ, - I0_YYY, I1__YZ, - 0,0,0,0}}, - /* 0YY */ - {2,{0,0,0,0},{ I0_YYY, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1YY */ - {2,{0,0,0,0},{ I0_YYY, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XZY */ - {2,{0,0,0,0},{ I0_WZY, I1__YZ, - I0_XXX, I1_X__, - 0,0,0,0}}, - /* YZY */ - {2,{0,0,0,0},{ I0_WZY, I1__YZ, - I0_YYY, I1_X__, - 0,0,0,0}}, - /* ZZY */ - {2,{0,0,0,0},{ I0_WZY, I1__YZ, - I0_ZZZ, I1_X__, - 0,0,0,0}}, - /* WZY */ - {1,{0,0,0,0},{ I0_WZY, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* 0ZY */ - {2,{0,0,0,0},{ I0_WZY, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1ZY */ - {2,{0,0,0,0},{ I0_WZY, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XWY */ - {3,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_XXX, I1_X__, - I0_YYY, I1___Z, - 0,0}}, - /* YWY */ - {2,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_YYY, I1_X_Z, - 0,0,0,0}}, - /* ZWY */ - {2,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_ZXY, I1_X_Z, - 0,0,0,0}}, - /* WWY */ - {2,{0,0,0,0},{ I0_WWW, I1_XY_, - I0_ZXY, I1___Z, - 0,0,0,0}}, - /* 0WY */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_ZXY, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1WY */ - {3,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_ZXY, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X0Y */ - {3,{0,2,0,0},{ I0_XXX, I1_X__, - I0_000, I1__Y_, - I0_YYY, I1___Z, - 0,0}}, - /* Y0Y */ - {2,{0,2,0,0},{ I0_YYY, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* Z0Y */ - {2,{0,2,0,0},{ I0_ZXY, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* W0Y */ - {2,{0,2,0,0},{ I0_WZY, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* 00Y */ - {2,{0,2,0,0},{ I0_YYY, I1___Z, - I0_000, I1_XY_, - 0,0,0,0}}, - /* 10Y */ - {3,{0,2,0,0},{ I0_YYY, I1___Z, - I0_000, I1__Y_, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X1Y */ - {3,{0,2,0,0},{ I0_XXX, I1_X__, - I0_111, I1__Y_, - I0_YYY, I1___Z, - 0,0}}, - /* Y1Y */ - {2,{0,2,0,0},{ I0_YYY, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* Z1Y */ - {2,{0,2,0,0},{ I0_ZXY, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* W1Y */ - {3,{0,2,0,0},{ I0_WZY, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* 01Y */ - {3,{0,2,0,0},{ I0_YYY, I1___Z, - I0_111, I1__Y_, - I0_000, I1_X__, - 0,0}}, - /* 11Y */ - {2,{0,2,0,0},{ I0_YYY, I1___Z, - I0_111, I1_XY_, - 0,0,0,0}}, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - /* XXZ */ - {2,{0,0,0,0},{ I0_XXX, I1_XY_, - I0_ZZZ, I1___Z, - 0,0,0,0}}, - /* YXZ */ - {3,{0,0,0,0},{ I0_XXX, I1__Y_, - I0_YYY, I1_X__, - I0_ZZZ, I1___Z, - 0,0}}, - /* ZXZ */ - {2,{0,0,0,0},{ I0_XXX, I1__Y_, - I0_ZZZ, I1_X_Z, - 0,0,0,0}}, - /* WXZ */ - {3,{0,0,0,0},{ I0_WZY, I1_XYZ, - I0_XXX, I1__Y_, - I0_ZZZ, I1___Z, - 0,0}}, - /* 0XZ */ - {3,{0,0,2,0},{ I0_XXX, I1__Y_, - I0_ZZZ, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1XZ */ - {3,{0,0,2,0},{ I0_XXX, I1__Y_, - I0_ZZZ, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* XYZ */ - {1,{0,0,0,0},{ I0_XYZ, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* YYZ */ - {2,{0,0,0,0},{ I0_ZZZ, I1___Z, - I0_YYY, I1_XY_, - 0,0,0,0}}, - /* ZYZ */ - {2,{0,0,0,0},{ I0_ZZZ, I1_X_Z, - I0_YYY, I1__Y_, - 0,0,0,0}}, - /* WYZ */ - {2,{0,0,0,0},{ I0_WZY, I1_XYZ, - I0_XYZ, I1__YZ, - 0,0,0,0}}, - /* 0YZ */ - {2,{0,2,0,0},{ I0_XYZ, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1YZ */ - {2,{0,2,0,0},{ I0_XYZ, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XZZ */ - {2,{0,0,0,0},{ I0_ZZZ, I1__YZ, - I0_XXX, I1_X__, - 0,0,0,0}}, - /* YZZ */ - {2,{0,0,0,0},{ I0_ZZZ, I1__YZ, - I0_YYY, I1_X__, - 0,0,0,0}}, - /* ZZZ */ - {1,{0,0,0,0},{ I0_ZZZ, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* WZZ */ - {2,{0,0,0,0},{ I0_WZY, I1_XYZ, - I0_ZZZ, I1__YZ, - 0,0,0,0}}, - /* 0ZZ */ - {2,{0,2,0,0},{ I0_ZZZ, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1ZZ */ - {2,{0,2,0,0},{ I0_ZZZ, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XWZ */ - {2,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_XYZ, I1_X_Z, - 0,0,0,0}}, - /* YWZ */ - {3,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_YYY, I1_X__, - I0_XYZ, I1___Z, - 0,0}}, - /* ZWZ */ - {2,{0,0,0,0},{ I0_WWW, I1__Y_, - I0_ZZZ, I1_X_Z, - 0,0,0,0}}, - /* WWZ */ - {2,{0,0,0,0},{ I0_WWW, I1_XY_, - I0_XYZ, I1___Z, - 0,0,0,0}}, - /* 0WZ */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_XYZ, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1WZ */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_XYZ, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X0Z */ - {2,{0,2,0,0},{ I0_XYZ, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* Y0Z */ - {3,{0,2,0,0},{ I0_ZZZ, I1___Z, - I0_000, I1__Y_, - I0_YYY, I1_X__, - 0,0}}, - /* Z0Z */ - {2,{0,2,0,0},{ I0_ZZZ, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* W0Z */ - {3,{0,0,2,0},{ I0_WZY, I1_X_Z, - I0_ZZZ, I1___Z, - I0_000, I1__Y_, - 0,0}}, - /* 00Z */ - {2,{0,2,0,0},{ I0_ZZZ, I1___Z, - I0_000, I1_XY_, - 0,0,0,0}}, - /* 10Z */ - {3,{0,2,2,0},{ I0_ZZZ, I1___Z, - I0_000, I1__Y_, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X1Z */ - {2,{0,2,0,0},{ I0_XYZ, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* Y1Z */ - {3,{0,2,0,0},{ I0_ZZZ, I1___Z, - I0_111, I1__Y_, - I0_YYY, I1_X__, - 0,0}}, - /* Z1Z */ - {2,{0,2,0,0},{ I0_ZZZ, I1_X_Z, - I0_111, I1__Y_, - 0,0,0,0}}, - /* W1Z */ - {3,{0,0,2,0},{ I0_WZY, I1_XYZ, - I0_ZZZ, I1___Z, - I0_111, I1__Y_, - 0,0}}, - /* 01Z */ - {3,{0,2,2,0},{ I0_ZZZ, I1___Z, - I0_111, I1__Y_, - I0_000, I1_X__, - 0,0}}, - /* 11Z */ - {2,{0,2,0,0},{ I0_ZZZ, I1___Z, - I0_111, I1_XY_, - 0,0,0,0}}, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - /* XXW */ - {2,{0,0,0,0},{ I0_WWW, I1___Z, - I0_XXX, I1_XY_, - 0,0,0,0}}, - /* YXW */ - {3,{0,0,0,0},{ I0_WWW, I1___Z, - I0_XXX, I1__Y_, - I0_YYY, I1_X__, - 0,0}}, - /* ZXW */ - {2,{0,0,0,0},{ I0_WWW, I1___Z, - I0_ZXY, I1_XY_, - 0,0,0,0}}, - /* WXW */ - {2,{0,0,0,0},{ I0_WWW, I1_X_Z, - I0_XXX, I1__Y_, - 0,0,0,0}}, - /* 0XW */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_XXX, I1__Y_, - I0_000, I1_X__, - 0,0}}, - /* 1XW */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_XXX, I1__Y_, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* XYW */ - {2,{0,0,0,0},{ I0_WWW, I1___Z, - I0_XYZ, I1_XY_, - 0,0,0,0}}, - /* YYW */ - {2,{0,0,0,0},{ I0_WWW, I1___Z, - I0_YYY, I1_XY_, - 0,0}}, - /* ZYW */ - {3,{0,0,0,0},{ I0_WWW, I1___Z, - I0_XYZ, I1__Y_, - I0_ZZZ, I1_X__, - 0,0}}, - /* WYW */ - {2,{0,0,0,0},{ I0_WWW, I1_X_Z, - I0_YYY, I1__Y_, - 0,0,0,0}}, - /* 0YW */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_YYY, I1__Y_, - I0_000, I1_X__, - 0,0}}, - /* 1YW */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_YYY, I1__Y_, - I0_111, I1_X__, - 0,0}}, - - SEMPTY,SEMPTY, - /* XZW */ - {3,{0,0,0,0},{ I0_WWW, I1___Z, - I0_XYZ, I1_X__, - I0_ZZZ, I1__Y_, - 0,0}}, - /* YZW */ - {2,{0,0,0,0},{ I0_WWW, I1___Z, - I0_YZX, I1_XY_, - 0,0,0,0}}, - /* ZZW */ - {2,{0,0,0,0},{ I0_WWW, I1___Z, - I0_ZZZ, I1_XY_, - 0,0,0,0}}, - /* WZW */ - {2,{0,0,0,0},{ I0_WWW, I1_X_Z, - I0_ZZZ, I1__Y_, - 0,0,0,0}}, - /* 0ZW */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_ZZZ, I1__Y_, - I0_000, I1_X__, - 0,0}}, - /* 1ZW */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_ZZZ, I1__Y_, - I0_111, I1_X__, - 0,0}}, - - SEMPTY,SEMPTY, - /* XWW */ - {2,{0,0,0,0},{ I0_WWW, I1__YZ, - I0_XYZ, I1_X__, - 0,0,0,0}}, - /* YWW */ - {2,{0,0,0,0},{ I0_WWW, I1__YZ, - I0_YYY, I1_X__, - 0,0,0,0}}, - /* ZWW */ - {2,{0,0,0,0},{ I0_WWW, I1__YZ, - I0_ZZZ, I1_X__, - 0,0,0,0}}, - /* WWW */ - {1,{0,0,0,0},{ I0_WWW, I1_XYZ, - 0,0,0,0,0,0}}, - /* 0WW */ - {2,{0,2,0,0},{ I0_WWW, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 1WW */ - {2,{0,2,0,0},{ I0_WWW, I1__YZ, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X0W */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_XYZ, I1_X__, - I0_000, I1__Y_, - 0,0}}, - /* Y0W */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_YYY, I1_X__, - I0_000, I1__Y_, - 0,0}}, - /* Z0W */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_ZZZ, I1_X__, - I0_000, I1__Y_, - 0,0}}, - /* W0W */ - {2,{0,2,0,0},{ I0_WWW, I1_X_Z, - I0_000, I1__Y_, - 0,0,0,0}}, - /* 00W */ - {2,{0,2,0,0},{ I0_WWW, I1___Z, - I0_000, I1_XY_, - 0,0,0,0}}, - /* 10W */ - {3,{0,2,2,0},{ I0_WWW, I1___Z, - I0_111, I1_X__, - I0_000, I1__Y_, - 0,0}}, - SEMPTY,SEMPTY, - /* X1W */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_XYZ, I1_X__, - I0_111, I1__Y_, - 0,0}}, - /* Y1W */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_YYY, I1_X__, - I0_111, I1__Y_, - 0,0}}, - /* Z1W */ - {3,{0,0,2,0},{ I0_WWW, I1___Z, - I0_ZZZ, I1_X__, - I0_111, I1__Y_, - 0,0}}, - /* W1W */ - {2,{0,2,0,0},{ I0_WWW, I1_XYZ, - I0_111, I1__Y_, - 0,0,0,0}}, - /* 01W */ - {3,{0,2,2,0},{ I0_WWW, I1___Z, - I0_000, I1_X__, - I0_111, I1__Y_, - 0,0}}, - /* 11W */ - {2,{0,2,0,0},{ I0_WWW, I1___Z, - I0_111, I1_XY_, - 0,0,0,0}}, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - /* XX0 */ - {2,{0,2,0,0},{ I0_XXX, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* YX0 */ - {3,{0,0,2,0},{ I0_YYY, I1_X__, - I0_XXX, I1__Y_, - I0_000, I1___Z, - 0,0}}, - /* ZX0 */ - {2,{0,2,0,0},{ I0_ZXY, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* WX0 */ - {3,{0,0,2,0},{ I0_WZY, I1_X__, - I0_XXX, I1__Y_, - I0_000, I1___Z, - 0,0}}, - /* 0X0 */ - {2,{0,2,0,0},{ I0_XXX, I1__Y_, - I0_000, I1_X_Z, - 0,0,0,0}}, - /* 1X0 */ - {3,{0,2,2,0},{ I0_XXX, I1__Y_, - I0_000, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* XY0 */ - {2,{0,2,0,0},{ I0_XYZ, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* YY0 */ - {2,{0,2,0,0},{ I0_YYY, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* ZY0 */ - {3,{0,0,2,0},{ I0_YYY, I1__Y_, - I0_ZZZ, I1_X__, - I0_000, I1___Z, - 0,0}}, - /* WY0 */ - {3,{0,0,2,0},{ I0_WZY, I1_X__, - I0_XYZ, I1__Y_, - I0_000, I1___Z, - 0,0}}, - /* 0Y0 */ - {2,{0,2,0,0},{ I0_XYZ, I1__Y_, - I0_000, I1_X_Z, - 0,0,0,0}}, - /* 1Y0 */ - {3,{0,2,2,0},{ I0_XYZ, I1__Y_, - I0_000, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* XZ0 */ - {3,{0,0,2,0},{ I0_ZZZ, I1__Y_, - I0_XYZ, I1_X__, - I0_000, I1___Z, - 0,0}}, - /* YZ0 */ - {2,{0,2,0,0},{ I0_YZX, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* ZZ0 */ - {2,{0,2,0,0},{ I0_ZZZ, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* WZ0 */ - {3,{0,0,2,0},{ I0_XYZ, I1_XYZ, - I0_WZY, I1_XY_, - I0_000, I1___Z, - 0,0}}, - /* 0Z0 */ - {2,{0,2,0,0},{ I0_ZZZ, I1__Y_, - I0_000, I1_X_Z, - 0,0,0,0}}, - /* 1Z0 */ - {3,{0,2,2,0},{ I0_ZZZ, I1__Y_, - I0_000, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* XW0 */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_XYZ, I1_X__, - I0_000, I1___Z, - 0,0}}, - /* YW0 */ - {3,{0,2,0,0},{ I0_WWW, I1__Y_, - I0_000, I1___Z, - I0_YYY, I1_X__, - 0,0}}, - /* ZW0 */ - {3,{0,2,0,0},{ I0_WWW, I1__Y_, - I0_000, I1___Z, - I0_ZZZ, I1_X__, - 0,0}}, - /* WW0 */ - {2,{0,2,0,0},{ I0_WWW, I1_XY_, - I0_000, I1___Z, - 0,0,0,0}}, - /* 0W0 */ - {2,{0,2,0,0},{ I0_WWW, I1__Y_, - I0_000, I1_X_Z, - 0,0,0,0}}, - /* 1W0 */ - {3,{0,2,2,0},{ I0_WWW, I1__Y_, - I0_000, I1___Z, - I0_111, I1_X__, - 0,0}}, - SEMPTY,SEMPTY, - /* X00 */ - {2,{0,2,0,0},{ I0_XYZ, I1_X__, - I0_000, I1__YZ, - 0,0,0,0}}, - /* Y00 */ - {2,{0,2,0,0},{ I0_YYY, I1_X__, - I0_000, I1__YZ, - 0,0,0,0}}, - /* Z00 */ - {2,{0,2,0,0},{ I0_ZZZ, I1_X__, - I0_000, I1__YZ, - 0,0,0,0}}, - /* W00 */ - {2,{2,0,0,0},{ I0_WZY, I1_X__, - I0_000, I1__YZ, - 0,0,0,0}}, - /* 000 */ - {1,{2,0,0,0},{ I0_000, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - /* 100 */ - {2,{2,2,0,0},{ I0_000, I1__YZ, - I0_111, I1_X__, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* X10 */ - {3,{0,2,2,0},{ I0_XYZ, I1_XYZ, - I0_000, I1___Z, - I0_111, I1__Y_, - 0,0}}, - /* Y10 */ - {3,{0,2,2,0},{ I0_YYY, I1_XYZ, - I0_000, I1___Z, - I0_111, I1__Y_, - 0,0}}, - /* Z10 */ - {3,{0,2,2,0},{ I0_ZZZ, I1_XYZ, - I0_000, I1___Z, - I0_111, I1__Y_, - 0,0}}, - /* W10 */ - {3,{0,2,2,0},{ I0_WZY, I1_XYZ, - I0_000, I1___Z, - I0_111, I1__Y_, - 0,0}}, - /* 010 */ - {2,{2,2,0,0},{ I0_000, I1_X_Z, - I0_111, I1__Y_, - 0, 0, 0, 0 } }, - /* 110 */ - {2,{2,2,0,0},{ I0_000, I1___Z, - I0_111, I1_XY_, - 0,0,0,0}}, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - - - - /* XX1 */ - {2,{0,2,0,0},{ I0_XXX, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* YX1 */ - {3,{0,0,2,0},{ I0_YYY, I1_X__, - I0_XXX, I1__Y_, - I0_111, I1___Z, - 0,0}}, - /* ZX1 */ - {2,{0,2,0,0},{ I0_ZXY, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* WX1 */ - {3,{0,0,2,0},{ I0_WZY, I1_XYZ, - I0_XXX, I1__Y_, - I0_111, I1___Z, - 0,0}}, - /* 0X1 */ - {3,{0,2,2,0},{ I0_XXX, I1__Y_, - I0_111, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1X1 */ - {2,{0,2,0,0},{ I0_XXX, I1__Y_, - I0_111, I1_X_Z, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XY1 */ - {2,{0,2,0,0},{ I0_XYZ, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* YY1 */ - {2,{0,2,0,0},{ I0_YYY, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* ZY1 */ - {3,{0,0,2,0},{ I0_YYY, I1__Y_, - I0_ZZZ, I1_X__, - I0_111, I1___Z, - 0,0}}, - /* WY1 */ - {3,{0,0,2,0},{ I0_WZY, I1_XYZ, - I0_XYZ, I1__Y_, - I0_111, I1___Z, - 0,0}}, - /* 0Y1 */ - {3,{0,2,2,0},{ I0_XYZ, I1__Y_, - I0_111, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1Y1 */ - {2,{0,2,0,0},{ I0_XYZ, I1__Y_, - I0_111, I1_X_Z, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XZ1 */ - {3,{0,0,2,0},{ I0_ZZZ, I1__Y_, - I0_XYZ, I1_X__, - I0_111, I1___Z, - 0,0}}, - /* YZ1 */ - {2,{0,2,0,0},{ I0_YZX, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* ZZ1 */ - {2,{0,2,0,0},{ I0_ZZZ, I1_XYZ, - I0_111, I1___Z, - 0,0,0,0}}, - /* WZ1 */ - {2,{0,2,0,0},{ I0_WZY, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* 0Z1 */ - {3,{0,2,2,0},{ I0_ZZZ, I1_XYZ, - I0_111, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1Z1 */ - {2,{0,2,0,0},{ I0_ZZZ, I1__Y_, - I0_111, I1_X_Z, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* XW1 */ - {3,{0,0,2,0},{ I0_WWW, I1__Y_, - I0_XYZ, I1_X__, - I0_111, I1___Z, - 0,0}}, - /* YW1 */ - {3,{0,2,0,0},{ I0_WWW, I1__Y_, - I0_111, I1___Z, - I0_YYY, I1_X__, - 0,0}}, - /* ZW1 */ - {3,{0,2,0,0},{ I0_WWW, I1__Y_, - I0_111, I1___Z, - I0_ZZZ, I1_X__, - 0,0}}, - /* WW1 */ - {2,{0,2,0,0},{ I0_WWW, I1_XY_, - I0_111, I1___Z, - 0,0,0,0}}, - /* 0W1 */ - {3,{0,2,2,0},{ I0_WWW, I1__Y_, - I0_111, I1___Z, - I0_000, I1_X__, - 0,0}}, - /* 1W1 */ - {2,{0,2,0,0},{ I0_WWW, I1__Y_, - I0_111, I1_X_Z, - 0,0,0,0}}, - SEMPTY,SEMPTY, - /* X01 */ - {3,{0,2,2,0},{ I0_XYZ, I1_X__, - I0_111, I1___Z, - I0_000, I1__Y_, - 0,0}}, - /* Y01 */ - {3,{0,2,2,0},{ I0_YYY, I1_X__, - I0_111, I1___Z, - I0_000, I1__Y_, - 0,0}}, - /* Z01 */ - {3,{0,2,2,0},{ I0_ZZZ, I1_X__, - I0_111, I1___Z, - I0_000, I1__Y_, - 0,0}}, - /* W01 */ - {3,{0,2,2,0},{ I0_WZY, I1_XYZ, - I0_111, I1___Z, - I0_000, I1__Y_, - 0,0}}, - /* 001 */ - {2,{2,2,0,0},{ I0_111, I1___Z, - I0_000, I1_XY_, - 0,0,0,0}}, - /* 101 */ - {2,{2,2,0,0},{ I0_111, I1_X_Z, - I0_000, I1__Y_, - 0, 0, 0, 0 } }, - SEMPTY,SEMPTY, - /* X11 */ - {2,{0,2,0,0},{ I0_XYZ, I1_X__, - I0_111, I1__YZ, - 0,0,0,0}}, - /* Y11 */ - {2,{0,2,0,0},{ I0_YYY, I1_X__, - I0_111, I1__YZ, - 0,0,0,0}}, - /* Z11 */ - {2,{0,2,0,0},{ I0_ZZZ, I1_X__, - I0_111, I1__YZ, - 0,0,0,0}}, - /* W11 */ - {2,{0,2,0,0},{ I0_WZY, I1_XYZ, - I0_111, I1__YZ, - 0,0,0,0}}, - /* 011 */ - {2,{2,2,0,0},{ I0_111, I1__YZ, - I0_000, I1_X__, - 0,0,0,0}}, - /* 111 */ - {1,{2,0,0,0},{ I0_111, I1_XYZ, - 0, 0, 0, 0, 0, 0 } }, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY, - SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY,SEMPTY -}; - -/****************************************************************************** -* Color source mask table -******************************************************************************/ - -#define S_111 R300_FPI0_ARGC_ONE -#define S_000 R300_FPI0_ARGC_ZERO - -#define S0XXX R300_FPI0_ARGC_SRC0C_XXX -#define S0YYY R300_FPI0_ARGC_SRC0C_YYY -#define S0ZZZ R300_FPI0_ARGC_SRC0C_ZZZ -#define S0WWW R300_FPI0_ARGC_SRC0A -#define S0XYZ R300_FPI0_ARGC_SRC0C_XYZ -#define S0ZXY R300_FPI0_ARGC_SRC0C_ZXY -#define S0YZX R300_FPI0_ARGC_SRC0C_YZX -#define S0WZY R300_FPI0_ARGC_SRC0CA_WZY -#define S0WZY R300_FPI0_ARGC_SRC0CA_WZY - -#define S1XXX R300_FPI0_ARGC_SRC1C_XXX -#define S1YYY R300_FPI0_ARGC_SRC1C_YYY -#define S1ZZZ R300_FPI0_ARGC_SRC1C_ZZZ -#define S1WWW R300_FPI0_ARGC_SRC1A -#define S1XYZ R300_FPI0_ARGC_SRC1C_XYZ -#define S1ZXY R300_FPI0_ARGC_SRC1C_ZXY -#define S1YZX R300_FPI0_ARGC_SRC1C_YZX -#define S1WZY R300_FPI0_ARGC_SRC1CA_WZY - -#define S2XXX R300_FPI0_ARGC_SRC2C_XXX -#define S2YYY R300_FPI0_ARGC_SRC2C_YYY -#define S2ZZZ R300_FPI0_ARGC_SRC2C_ZZZ -#define S2WWW R300_FPI0_ARGC_SRC2A -#define S2XYZ R300_FPI0_ARGC_SRC2C_XYZ -#define S2ZXY R300_FPI0_ARGC_SRC2C_ZXY -#define S2YZX R300_FPI0_ARGC_SRC2C_YZX -#define S2WZY R300_FPI0_ARGC_SRC2CA_WZY - -#define ntnat 32 - -const GLuint r300_swz_srcc_mask[3][512] = { - { - S0XXX,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S0YZX,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S0ZXY,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,S0YYY,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,S0WZY,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S0XYZ,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S0ZZZ,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S0WWW, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,S_000,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,S_111,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat - }, - { - S1XXX,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S1YZX,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S1ZXY,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,S1YYY,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,S1WZY,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S1XYZ,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S1ZZZ,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S1WWW, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,S_000,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,S_111,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat - }, - { - S2XXX,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S2YZX,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S2ZXY,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,S2YYY,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,S2WZY,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S2XYZ,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S2ZZZ,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,S2WWW, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,S_000,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,S_111,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat,ntnat, - ntnat,ntnat - } -}; - -/****************************************************************************** -* Alpha source mask table -******************************************************************************/ - -GLuint r300_swz_srca_mask[3][6] = { - { R300_FPI2_ARGA_SRC0C_X, - R300_FPI2_ARGA_SRC0C_Y, - R300_FPI2_ARGA_SRC0C_Z, - R300_FPI2_ARGA_SRC0A, - R300_FPI2_ARGA_ZERO, - R300_FPI2_ARGA_ONE }, - { R300_FPI2_ARGA_SRC1C_X, - R300_FPI2_ARGA_SRC1C_Y, - R300_FPI2_ARGA_SRC1C_Z, - R300_FPI2_ARGA_SRC1A, - R300_FPI2_ARGA_ZERO, - R300_FPI2_ARGA_ONE }, - { R300_FPI2_ARGA_SRC2C_X, - R300_FPI2_ARGA_SRC2C_Y, - R300_FPI2_ARGA_SRC2C_Z, - R300_FPI2_ARGA_SRC2A, - R300_FPI2_ARGA_ZERO, - R300_FPI2_ARGA_ONE }, -}; -- cgit v1.2.3 From 297a35eb69382193a4cc9ba4b51619984a8969db Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 00:02:38 +1100 Subject: nouveau: Add simple wrapper for NV_MEMORY_TO_MEMORY_FORMAT. --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 59 ++++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_buffers.h | 5 +++ src/mesa/drivers/dri/nouveau/nouveau_object.c | 10 ++++- src/mesa/drivers/dri/nouveau/nouveau_object.h | 2 + 4 files changed, 75 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index f6a03ecd9c..92329e514f 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -5,6 +5,65 @@ #include "nouveau_context.h" #include "nouveau_buffers.h" +#include "nouveau_object.h" +#include "nouveau_fifo.h" +#include "nouveau_reg.h" +#include "nouveau_msg.h" + +#define MAX_MEMFMT_LENGTH 32768 + +/* Unstrided blit using NV_MEMORY_TO_MEMORY_FORMAT */ +GLboolean +nouveau_memformat_flat_emit(GLcontext *ctx, + nouveau_mem *dst, nouveau_mem *src, + GLuint dst_offset, GLuint src_offset, + GLuint size) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + uint32_t src_handle, dst_handle; + GLuint count; + + if (src_offset + size > src->size) { + MESSAGE("src out of nouveau_mem bounds\n"); + return GL_FALSE; + } + if (dst_offset + size > dst->size) { + MESSAGE("dst out of nouveau_mem bounds\n"); + return GL_FALSE; + } + + src_handle = (src->type & NOUVEAU_MEM_FB) ? NvDmaFB : NvDmaAGP; + dst_handle = (src->type & NOUVEAU_MEM_FB) ? NvDmaFB : NvDmaAGP; + src_offset += nouveau_mem_gpu_offset_get(ctx, src); + dst_offset += nouveau_mem_gpu_offset_get(ctx, dst); + + BEGIN_RING_SIZE(NvSubMemFormat, NV_MEMORY_TO_MEMORY_FORMAT_OBJECT_IN, 2); + OUT_RING (src_handle); + OUT_RING (dst_handle); + + count = (size / MAX_MEMFMT_LENGTH) + ((size % MAX_MEMFMT_LENGTH) ? 1 : 0); + + while (count--) { + GLuint length = (size > MAX_MEMFMT_LENGTH) ? MAX_MEMFMT_LENGTH : size; + + BEGIN_RING_SIZE(NvSubMemFormat, NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); + OUT_RING (src_offset); + OUT_RING (dst_offset); + OUT_RING (0); /* pitch in */ + OUT_RING (0); /* pitch out */ + OUT_RING (length); /* line length */ + OUT_RING (1); /* number of lines */ + OUT_RING ((1 << 8) /* dst_inc */ | (1 << 0) /* src_inc */); + OUT_RING (0); /* buffer notify? */ + FIRE_RING(); + + src_offset += length; + dst_offset += length; + size -= length; + } + + return GL_TRUE; +} void nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h index bb297ad558..a8d85b279b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h @@ -18,6 +18,11 @@ extern nouveau_mem *nouveau_mem_alloc(GLcontext *ctx, int type, extern void nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem); extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem); +extern GLboolean nouveau_memformat_flat_emit(GLcontext *ctx, + nouveau_mem *dst, nouveau_mem *src, + GLuint dst_offset, GLuint src_offset, + GLuint size); + typedef struct nouveau_renderbuffer_t { struct gl_renderbuffer mesa; /* must be first! */ __DRIdrawablePrivate *dPriv; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.c b/src/mesa/drivers/dri/nouveau/nouveau_object.c index cf7284d2d5..1558f2963d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.c @@ -52,10 +52,13 @@ void nouveauObjectInit(nouveauContextPtr nmesa) return; #endif -/* We need to know vram size.. */ +/* We need to know vram size.. and AGP size (and even if the card is AGP..) */ nouveauCreateDmaObject( nmesa, NvDmaFB, 0, (256*1024*1024), 0 /*NV_DMA_TARGET_FB*/, 0 /*NV_DMA_ACCESS_RW*/); + nouveauCreateDmaObject( nmesa, NvDmaAGP, + nmesa->agp_phys, (128*1024*1024), + 3 /* AGP */, 0 /* RW */); nouveauCreateContextObject(nmesa, Nv3D, nmesa->screen->card->class_3d, 0, 0, 0, 0); @@ -63,6 +66,9 @@ void nouveauObjectInit(nouveauContextPtr nmesa) 0, 0, 0, 0); nouveauCreateContextObject(nmesa, NvImageBlit, NV10_IMAGE_BLIT, NV_DMA_CONTEXT_FLAGS_PATCH_SRCCOPY, 0, 0, 0); + nouveauCreateContextObject(nmesa, NvMemFormat, + NV_MEMORY_TO_MEMORY_FORMAT, + 0, 0, 0, 0); #ifdef ALLOW_MULTI_SUBCHANNEL nouveauObjectOnSubchannel(nmesa, NvSubCtxSurf2D, NvCtxSurf2D); @@ -75,6 +81,8 @@ void nouveauObjectInit(nouveauContextPtr nmesa) OUT_RING(NvCtxSurf2D); BEGIN_RING_SIZE(NvSubImageBlit, NV10_IMAGE_BLIT_SET_OPERATION, 1); OUT_RING(3); /* SRCCOPY */ + + nouveauObjectOnSubchannel(nmesa, NvSubMemFormat, NvMemFormat); #endif nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index 87f2dc9ae7..d5fcc6df8d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -11,6 +11,7 @@ enum DMAObjects { Nv3D = 0x80000019, NvCtxSurf2D = 0x80000020, NvImageBlit = 0x80000021, + NvMemFormat = 0x80000022, NvDmaFB = 0xD0FB0001, NvDmaAGP = 0xD0AA0001, NvSyncNotify = 0xD0000001 @@ -19,6 +20,7 @@ enum DMAObjects { enum DMASubchannel { NvSubCtxSurf2D = 0, NvSubImageBlit = 1, + NvSubMemFormat = 2, NvSub3D = 7, }; -- cgit v1.2.3 From 7b59a424b519c37b7c94e4ea8c420794c6a0eb4c Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 15:38:09 +1100 Subject: nouveau: Typo --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 92329e514f..6d73e9ff51 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -33,7 +33,7 @@ nouveau_memformat_flat_emit(GLcontext *ctx, } src_handle = (src->type & NOUVEAU_MEM_FB) ? NvDmaFB : NvDmaAGP; - dst_handle = (src->type & NOUVEAU_MEM_FB) ? NvDmaFB : NvDmaAGP; + dst_handle = (dst->type & NOUVEAU_MEM_FB) ? NvDmaFB : NvDmaAGP; src_offset += nouveau_mem_gpu_offset_get(ctx, src); dst_offset += nouveau_mem_gpu_offset_get(ctx, dst); -- cgit v1.2.3 From 2dd37534506e85351fb114c79fd6c994a9c355c0 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 15:39:52 +1100 Subject: nouveau: record *actual* type of memory that was alloc'd, not the requested types. --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 3 ++- src/mesa/drivers/dri/nouveau/nouveau_buffers.h | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 6d73e9ff51..e628dd5b3c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -91,7 +91,7 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) if (!mem) return NULL; - mema.flags = mem->type = type; + mema.flags = type; mema.size = mem->size = size; mema.alignment = align; mem->map = NULL; @@ -102,6 +102,7 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) return NULL; } mem->offset = mema.region_offset; + mem->type = mema.flags; if (type & NOUVEAU_MEM_MAPPED) ret = drmMap(nmesa->driFd, mem->offset, mem->size, &mem->map); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h index a8d85b279b..d86455184c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h @@ -19,8 +19,10 @@ extern void nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem); extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem); extern GLboolean nouveau_memformat_flat_emit(GLcontext *ctx, - nouveau_mem *dst, nouveau_mem *src, - GLuint dst_offset, GLuint src_offset, + nouveau_mem *dst, + nouveau_mem *src, + GLuint dst_offset, + GLuint src_offset, GLuint size); typedef struct nouveau_renderbuffer_t { -- cgit v1.2.3 From 885a7cc38d80366396f463a54ef4af00c9fd07ff Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 15:50:59 +1100 Subject: nouveau: add nouveau_mem_alloc/free debugging --- src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 15 +++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_context.c | 5 +++-- src/mesa/drivers/dri/nouveau/nouveau_context.h | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index e628dd5b3c..b54f68f402 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -71,6 +71,11 @@ nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem) nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); drm_nouveau_mem_free_t memf; + if (NOUVEAU_DEBUG & DEBUG_MEM) { + fprintf(stderr, "%s: type=0x%x, offset=0x%x, size=0x%x\n", + __func__, mem->type, (GLuint)mem->offset, (GLuint)mem->size); + } + if (mem->map) drmUnmap(mem->map, mem->size); memf.flags = mem->type; @@ -87,6 +92,11 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) nouveau_mem *mem; int ret; + if (NOUVEAU_DEBUG & DEBUG_MEM) { + fprintf(stderr, "%s: requested: type=0x%x, size=0x%x, align=0x%x\n", + __func__, type, (GLuint)size, align); + } + mem = CALLOC(sizeof(nouveau_mem)); if (!mem) return NULL; @@ -104,6 +114,11 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) mem->offset = mema.region_offset; mem->type = mema.flags; + if (NOUVEAU_DEBUG & DEBUG_MEM) { + fprintf(stderr, "%s: actual: type=0x%x, offset=0x%x, size=0x%x\n", + __func__, mem->type, (GLuint)mem->offset, (GLuint)mem->size); + } + if (type & NOUVEAU_MEM_MAPPED) ret = drmMap(nmesa->driFd, mem->offset, mem->size, &mem->map); if (ret) { diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 3718900b62..bb67f72f4a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -63,8 +63,9 @@ int NOUVEAU_DEBUG = 0; static const struct dri_debug_control debug_control[] = { - { "shaders", DEBUG_SHADERS }, - { NULL, 0 } + { "shaders" , DEBUG_SHADERS }, + { "mem" , DEBUG_MEM }, + { NULL , 0 } }; #define need_GL_ARB_vertex_program diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 0efbcce129..b0952070c7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -216,7 +216,8 @@ extern void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv, /* Debugging utils: */ extern int NOUVEAU_DEBUG; -#define DEBUG_SHADERS 0x00000001 +#define DEBUG_SHADERS 0x00000001 +#define DEBUG_MEM 0x00000002 #endif /* __NOUVEAU_CONTEXT_H__ */ -- cgit v1.2.3 From 1780fd4eeeef2358e929c23cfae2c348cb4a709e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 15:54:30 +1100 Subject: nouveau: We'll need syncNotifier for NV_MEMORY_TO_MEMORY_FORMAT too. --- src/mesa/drivers/dri/nouveau/nouveau_sync.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.c b/src/mesa/drivers/dri/nouveau/nouveau_sync.c index e27101d868..0bf20e723b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_sync.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.c @@ -125,6 +125,11 @@ GLboolean nouveauSyncInitFuncs(GLcontext *ctx) */ BEGIN_RING_CACHE(NvSub3D, 0x180, 1); OUT_RING_CACHE (NvSyncNotify); +#ifdef ALLOW_MULTI_SUBCHANNEL + BEGIN_RING_SIZE(NvSubMemFormat, + NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY, 1); + OUT_RING (NvSyncNotify); +#endif return GL_TRUE; } -- cgit v1.2.3 From 9a20ae70ecda2e78ea6b52c3fd829d283434c1ad Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 23:30:34 +1100 Subject: nouveau: Initial buffer object support --- src/mesa/drivers/dri/nouveau/Makefile | 1 + src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c | 272 +++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h | 27 +++ src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 + src/mesa/drivers/dri/nouveau/nouveau_context.h | 1 + 5 files changed, 303 insertions(+) create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c create mode 100644 src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 962978dc7f..d31b42a568 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -8,6 +8,7 @@ LIBNAME = nouveau_dri.so MINIGLX_SOURCES = DRIVER_SOURCES = \ + nouveau_bufferobj.c \ nouveau_buffers.c \ nouveau_card.c \ nouveau_context.c \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c new file mode 100644 index 0000000000..d36196aeef --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c @@ -0,0 +1,272 @@ +#include "bufferobj.h" +#include "enums.h" + +#include "nouveau_bufferobj.h" +#include "nouveau_buffers.h" +#include "nouveau_context.h" +#include "nouveau_drm.h" +#include "nouveau_object.h" +#include "nouveau_msg.h" + +#define DEBUG(fmt,args...) do { \ + if (NOUVEAU_DEBUG & DEBUG_BUFFEROBJ) { \ + fprintf(stderr, "%s: "fmt, __func__, ##args); \ + } \ +} while(0) + +/* Wrapper for nouveau_mem_gpu_offset_get() that marks the bufferobj dirty + * if the GPU modifies the data. + */ +uint32_t +nouveau_bufferobj_gpu_ref(GLcontext *ctx, GLenum access, + struct gl_buffer_object *obj) +{ + nouveau_buffer_object *nbo = (nouveau_buffer_object *)obj; + + DEBUG("obj=%p, access=%s\n", obj, _mesa_lookup_enum_by_nr(access)); + + if (access == GL_WRITE_ONLY_ARB || access == GL_READ_WRITE_ARB) + nbo->gpu_dirty = GL_TRUE; + + return nouveau_mem_gpu_offset_get(ctx, nbo->gpu_mem); +} + +static void +nouveauBindBuffer(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj) +{ +} + +static struct gl_buffer_object * +nouveauNewBufferObject(GLcontext *ctx, GLuint buffer, GLenum target) +{ + nouveau_buffer_object *nbo; + + nbo = CALLOC_STRUCT(nouveau_buffer_object_t); + DEBUG("name=0x%08x, target=%s, obj=%p\n", + buffer, _mesa_lookup_enum_by_nr(target), nbo); + _mesa_initialize_buffer_object(&nbo->mesa, buffer, target); + return &nbo->mesa; +} + +static void +nouveauDeleteBuffer(GLcontext *ctx, struct gl_buffer_object *obj) +{ + nouveau_buffer_object *nbo = (nouveau_buffer_object *)obj; + + DEBUG("obj=%p\n", obj); + + if (nbo->gpu_mem) { + nouveau_mem_free(ctx, nbo->gpu_mem); + } + _mesa_delete_buffer_object(ctx, obj); +} + +static void +nouveauBufferData(GLcontext *ctx, GLenum target, GLsizeiptrARB size, + const GLvoid *data, GLenum usage, + struct gl_buffer_object *obj) +{ + nouveau_buffer_object *nbo = (nouveau_buffer_object *)obj; + + DEBUG("obj=%p, target=%s, usage=%s, size=%d, data=%p\n", + obj, + _mesa_lookup_enum_by_nr(target), + _mesa_lookup_enum_by_nr(usage), + (unsigned int)size, + data); + + if (nbo->gpu_mem && nbo->gpu_mem->size != size) + nouveau_mem_free(ctx, nbo->gpu_mem); + + /* Always have the GPU access the data from VRAM if possible. For + * some "usage" values it may be better from AGP be default? + * + * TODO: At some point we should drop the NOUVEAU_MEM_MAPPED flag. + * TODO: Use the NOUVEAU_MEM_AGP_ACCEPTABLE flag. + * TODO: What about PCI-E and shared system memory? + */ + if (!nbo->gpu_mem) + nbo->gpu_mem = nouveau_mem_alloc(ctx, + NOUVEAU_MEM_FB | + NOUVEAU_MEM_MAPPED, + size, + 0); + + if (!nbo->gpu_mem) { + MESSAGE("AIII bufferobj malloc failed\n"); + return; + } + + obj->Usage = usage; + obj->Size = size; + if (!data) + return; + + ctx->Driver.MapBuffer(ctx, target, GL_WRITE_ONLY_ARB, obj); + _mesa_memcpy(nbo->cpu_mem->map, data, size); + ctx->Driver.UnmapBuffer(ctx, target, obj); +} + +/*TODO: we don't need to DMA the entire buffer like MapBuffer does.. */ +static void +nouveauBufferSubData(GLcontext *ctx, GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid *data, + struct gl_buffer_object *obj) +{ + DEBUG("obj=%p, target=%s, offset=0x%x, size=%d, data=%p\n", + obj, + _mesa_lookup_enum_by_nr(target), + (unsigned int)offset, + (unsigned int)size, + data); + + ctx->Driver.MapBuffer(ctx, target, GL_WRITE_ONLY_ARB, obj); + _mesa_memcpy((GLubyte *)obj->Pointer + offset, data, size); + ctx->Driver.UnmapBuffer(ctx, target, obj); +} + +/*TODO: we don't need to DMA the entire buffer like MapBuffer does.. */ +static void +nouveauGetBufferSubData(GLcontext *ctx, GLenum target, GLintptrARB offset, + GLsizeiptrARB size, GLvoid *data, + struct gl_buffer_object *obj) +{ + DEBUG("obj=%p, target=%s, offset=0x%x, size=%d, data=%p\n", + obj, + _mesa_lookup_enum_by_nr(target), + (unsigned int)offset, + (unsigned int)size, + data); + + ctx->Driver.MapBuffer(ctx, target, GL_READ_ONLY_ARB, obj); + _mesa_memcpy(data, (GLubyte *)obj->Pointer + offset, size); + ctx->Driver.UnmapBuffer(ctx, target, obj); +} + +static void * +nouveauMapBuffer(GLcontext *ctx, GLenum target, GLenum access, + struct gl_buffer_object *obj) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_buffer_object *nbo = (nouveau_buffer_object *)obj; + + DEBUG("obj=%p, target=%s, access=%s\n", + obj, + _mesa_lookup_enum_by_nr(target), + _mesa_lookup_enum_by_nr(access)); + + if (obj->Pointer) { + DEBUG("already mapped, return NULL\n"); + return NULL; + } + +#ifdef ALLOW_MULTI_SUBCHANNEL + /* If GPU is accessing the data from VRAM, copy to faster AGP memory + * before CPU access to the buffer. + */ + if (nbo->gpu_mem->type & NOUVEAU_MEM_FB) { + DEBUG("Data in VRAM, copying to AGP for CPU access\n"); + + /* This can happen if BufferData grows the GPU-access buffer */ + if (nbo->cpu_mem && nbo->cpu_mem->size != nbo->gpu_mem->size) { + nouveau_mem_free(ctx, nbo->cpu_mem); + nbo->cpu_mem = NULL; + } + + if (!nbo->cpu_mem) { + nbo->cpu_mem = nouveau_mem_alloc(ctx, + NOUVEAU_MEM_AGP | + NOUVEAU_MEM_MAPPED, + nbo->gpu_mem->size, + 0); + + /* Mark GPU data as modified, so it gets copied to + * the new buffer */ + nbo->gpu_dirty = GL_TRUE; + } + + if (nbo->cpu_mem && nbo->gpu_dirty) { + nouveau_memformat_flat_emit(ctx, nbo->cpu_mem, + nbo->gpu_mem, + 0, 0, + nbo->gpu_mem->size); + + nouveau_notifier_wait_nop(ctx, + nmesa->syncNotifier, + NvSubMemFormat); + nbo->gpu_dirty = GL_FALSE; + } + + /* buffer isn't guaranteed to be up-to-date on the card now */ + nbo->cpu_dirty = GL_TRUE; + } +#endif + + /* If the copy to AGP failed for some reason, just return a pointer + * directly to vram.. + */ + if (!nbo->cpu_mem) { + DEBUG("Returning direct pointer to VRAM\n"); + nbo->cpu_mem = nbo->gpu_mem; + nbo->cpu_dirty = GL_FALSE; + } + + obj->Pointer = nbo->cpu_mem->map; + return obj->Pointer; +} + +static GLboolean +nouveauUnmapBuffer(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nouveau_buffer_object *nbo = (nouveau_buffer_object *)obj; + + DEBUG("obj=%p, target=%s\n", obj, _mesa_lookup_enum_by_nr(target)); + +#ifdef ALLOW_MULTI_SUBCHANNEL + if (nbo->cpu_dirty && nbo->cpu_mem != nbo->gpu_mem) { + DEBUG("Copying potentially modified data back to GPU\n"); + + /* blit from GPU buffer -> CPU buffer */ + nouveau_memformat_flat_emit(ctx, nbo->gpu_mem, nbo->cpu_mem, + 0, 0, nbo->cpu_mem->size); + + /* buffer is now up-to-date on the hardware (or rather, will + * be by the time any other commands in this channel reference + * the data.) + */ + nbo->cpu_dirty = GL_FALSE; + + /* we can avoid this wait in some cases.. */ + nouveau_notifier_wait_nop(ctx, + nmesa->syncNotifier, + NvSubMemFormat); + + /* If it's likely CPU access to the buffer will occur often, + * keep the cpu_mem around to avoid repeated allocs. + */ + if (obj->Usage != GL_DYNAMIC_DRAW_ARB) { + + nouveau_mem_free(ctx, nbo->cpu_mem); + nbo->cpu_mem = NULL; + } + } +#endif + + obj->Pointer = NULL; + return GL_TRUE; +} + +void +nouveauInitBufferObjects(GLcontext *ctx) +{ + ctx->Driver.BindBuffer = nouveauBindBuffer; + ctx->Driver.NewBufferObject = nouveauNewBufferObject; + ctx->Driver.DeleteBuffer = nouveauDeleteBuffer; + ctx->Driver.BufferData = nouveauBufferData; + ctx->Driver.BufferSubData = nouveauBufferSubData; + ctx->Driver.GetBufferSubData = nouveauGetBufferSubData; + ctx->Driver.MapBuffer = nouveauMapBuffer; + ctx->Driver.UnmapBuffer = nouveauUnmapBuffer; +} + diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h new file mode 100644 index 0000000000..fccc349b83 --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h @@ -0,0 +1,27 @@ +#ifndef __NOUVEAU_BUFFEROBJ_H__ +#define __NOUVEAU_BUFFEROBJ_H__ + +#include "mtypes.h" +#include "nouveau_buffers.h" + +typedef struct nouveau_buffer_object_t { + /* Base class, must be first */ + struct gl_buffer_object mesa; + + /* Memory used for GPU access to the buffer*/ + nouveau_mem * gpu_mem; + /* Buffer has been dirtied by the GPU */ + GLboolean gpu_dirty; + + /* Memory used for CPU access to the buffer */ + nouveau_mem * cpu_mem; + /* Buffer has possibly been dirtied by the CPU */ + GLboolean cpu_dirty; +} nouveau_buffer_object; + +extern uint32_t nouveau_bufferobj_gpu_ref(GLcontext *ctx, GLenum access, + struct gl_buffer_object *obj); + +extern void nouveauInitBufferObjects(GLcontext *ctx); + +#endif diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index bb67f72f4a..79da46fc0b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -65,6 +65,7 @@ static const struct dri_debug_control debug_control[] = { { "shaders" , DEBUG_SHADERS }, { "mem" , DEBUG_MEM }, + { "bufferobj" , DEBUG_BUFFEROBJ }, { NULL , 0 } }; @@ -224,6 +225,7 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, break; } + nouveauInitBufferObjects(ctx); if (!nouveauSyncInitFuncs(ctx)) return GL_FALSE; nmesa->hw_func.InitCard(nmesa); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index b0952070c7..134e2a417e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -218,6 +218,7 @@ extern int NOUVEAU_DEBUG; #define DEBUG_SHADERS 0x00000001 #define DEBUG_MEM 0x00000002 +#define DEBUG_BUFFEROBJ 0x00000004 #endif /* __NOUVEAU_CONTEXT_H__ */ -- cgit v1.2.3 From 8c180c72d5fed5f26f258759f9649fc647a764ff Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 27 Dec 2006 23:52:40 +1100 Subject: nouveau: Use bufferobj interface for fragment program uploads --- src/mesa/drivers/dri/nouveau/nouveau_shader.h | 4 +-- src/mesa/drivers/dri/nouveau/nv30_fragprog.c | 37 +++++++++++++-------------- 2 files changed, 20 insertions(+), 21 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index 6e934f2908..08cb7817cf 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -2,7 +2,7 @@ #define __SHADER_COMMON_H__ #include "mtypes.h" -#include "nouveau_buffers.h" +#include "bufferobj.h" typedef struct _nvsFunc nvsFunc; @@ -41,7 +41,7 @@ typedef struct _nouveauShader { unsigned int program_alloc_size; unsigned int program_start_id; unsigned int program_current; - nouveau_mem *program_buffer; + struct gl_buffer_object *program_buffer; unsigned int inputs_read; unsigned int outputs_written; int inst_count; diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c index b11bc1809e..cd7c955c9e 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c +++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c @@ -10,7 +10,7 @@ #include "nouveau_shader.h" #include "nouveau_object.h" #include "nouveau_msg.h" -#include "nouveau_buffers.h" +#include "nouveau_bufferobj.h" #include "nv30_shader.h" unsigned int NVFP_TX_AOP_COUNT = 64; @@ -24,29 +24,28 @@ static void NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + uint32_t offset; - if (!nvs->program_buffer) { - nouveau_mem *fpbuf; + if (!nvs->program_buffer) + nvs->program_buffer = ctx->Driver.NewBufferObject(ctx, 0, + GL_ARRAY_BUFFER_ARB); - fpbuf = nouveau_mem_alloc(ctx, NOUVEAU_MEM_FB|NOUVEAU_MEM_MAPPED, - nvs->program_size * sizeof(uint32_t), 0); - if (!fpbuf) { - fprintf(stderr, "fragprog vram alloc fail!\n"); - return; - } - nvs->program_buffer = fpbuf; - } + /* Should use STATIC_DRAW_ARB if shader doesn't use changable params */ + ctx->Driver.BufferData(ctx, GL_ARRAY_BUFFER_ARB, + nvs->program_size * sizeof(uint32_t), + (const GLvoid *)nvs->program, + GL_DYNAMIC_DRAW_ARB, + nvs->program_buffer); + + offset = nouveau_bufferobj_gpu_ref(ctx, GL_READ_ONLY_ARB, + nvs->program_buffer); - /*XXX: should do a DMA.. and not copy over a possibly in-use program.. */ - /* not using state cache here, updated programs at the same address - * seem to not take effect unless ACTIVE_PROGRAM is called again. hw - * caches the program somewhere? so, maybe not so bad to just clobber the - * old program in vram.. + /* Not using state cache here, updated programs at the same address don't + * seem to take effect unless the ACTIVE_PROGRAM method is called again. + * HW caches the program somewhere? */ - memcpy(nvs->program_buffer->map, nvs->program, - nvs->program_size * sizeof(uint32_t)); BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM, 1); - OUT_RING(nouveau_mem_gpu_offset_get(ctx, nvs->program_buffer) | 1); + OUT_RING (offset | 1); } static void -- cgit v1.2.3 From 3943d7f8b12370dd77dda66e70aa8f1fcd217f9f Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Sat, 30 Dec 2006 10:30:42 -0800 Subject: Use the tiled flag in the sarea to determine region tiling. This fixes mis-rendering if back/depth fail to get set up as tiled. While it probably won't ever be the case now that the pitch limits are loosened, this is still the right thing to do. --- src/mesa/drivers/dri/i965/intel_context.c | 6 +++--- src/mesa/drivers/dri/i965/intel_screen.c | 6 +++++- src/mesa/drivers/dri/i965/intel_screen.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index d13e287fa7..5e97e4d609 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -403,7 +403,7 @@ GLboolean intelInitContext( struct intel_context *intel, intelScreen->cpp, intelScreen->front.pitch / intelScreen->cpp, intelScreen->height, - GL_FALSE); + intelScreen->front.tiled != 0); /* 0: LINEAR */ intel->back_region = @@ -414,7 +414,7 @@ GLboolean intelInitContext( struct intel_context *intel, intelScreen->cpp, intelScreen->back.pitch / intelScreen->cpp, intelScreen->height, - (INTEL_DEBUG & DEBUG_TILE) ? 0 : 1); + intelScreen->back.tiled != 0); /* Still assuming front.cpp == depth.cpp * @@ -430,7 +430,7 @@ GLboolean intelInitContext( struct intel_context *intel, intelScreen->cpp, intelScreen->depth.pitch / intelScreen->cpp, intelScreen->height, - (INTEL_DEBUG & DEBUG_TILE) ? 0 : 1); + intelScreen->depth.tiled != 0); intel_bufferobj_init( intel ); intel->batch = intel_batchbuffer_alloc( intel ); diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 56e6a792fa..8269deba66 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -230,16 +230,19 @@ intelUpdateScreenFromSAREA(intelScreenPrivate *intelScreen, intelScreen->front.pitch = sarea->pitch * intelScreen->cpp; intelScreen->front.handle = sarea->front_handle; intelScreen->front.size = sarea->front_size; + intelScreen->front.tiled = sarea->front_tiled; intelScreen->back.offset = sarea->back_offset; intelScreen->back.pitch = sarea->pitch * intelScreen->cpp; intelScreen->back.handle = sarea->back_handle; intelScreen->back.size = sarea->back_size; - + intelScreen->back.tiled = sarea->back_tiled; + intelScreen->depth.offset = sarea->depth_offset; intelScreen->depth.pitch = sarea->pitch * intelScreen->cpp; intelScreen->depth.handle = sarea->depth_handle; intelScreen->depth.size = sarea->depth_size; + intelScreen->depth.tiled = sarea->depth_tiled; intelScreen->tex.offset = sarea->tex_offset; intelScreen->logTextureGranularity = sarea->log_tex_granularity; @@ -249,6 +252,7 @@ intelUpdateScreenFromSAREA(intelScreenPrivate *intelScreen, intelScreen->rotated.offset = sarea->rotated_offset; intelScreen->rotated.pitch = sarea->rotated_pitch * intelScreen->cpp; intelScreen->rotated.size = sarea->rotated_size; + intelScreen->rotated.tiled = sarea->rotated_tiled; intelScreen->current_rotation = sarea->rotation; #if 0 matrix23Rotate(&intelScreen->rotMatrix, diff --git a/src/mesa/drivers/dri/i965/intel_screen.h b/src/mesa/drivers/dri/i965/intel_screen.h index 094158afd8..bf9a716082 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.h +++ b/src/mesa/drivers/dri/i965/intel_screen.h @@ -42,6 +42,7 @@ typedef struct { char *map; /* memory map */ int offset; /* from start of video mem, in bytes */ int pitch; /* row stride, in pixels */ + unsigned int tiled; } intelRegion; typedef struct -- cgit v1.2.3 From b6becfae1087f2577b489677bdd680d64a7ffb4c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 31 Dec 2006 10:01:17 +1100 Subject: fix issue with i915tex advertising visuals it can't support This may not be the proper way to fix this but it does work easily. --- src/mesa/drivers/dri/i915tex/intel_screen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_screen.c b/src/mesa/drivers/dri/i915tex/intel_screen.c index 9bbfabbb8c..efa1b014a6 100644 --- a/src/mesa/drivers/dri/i915tex/intel_screen.c +++ b/src/mesa/drivers/dri/i915tex/intel_screen.c @@ -737,6 +737,9 @@ intelFillInModes(unsigned pixel_bits, unsigned depth_bits, */ stencil_bits_array[0] = 0; stencil_bits_array[1] = 0; + if (depth_bits == 24) + stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; + stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; -- cgit v1.2.3 From 254ce75ac300d8d20ba4e2fce81c4459c692d2b1 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 2 Jan 2007 15:09:10 +1100 Subject: nouveau: bump drm patchlevel. --- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 97bca84d8b..0e3901cfca 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -320,7 +320,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc __DRIscreenPrivate *psp; static const __DRIversion ddx_expected = { 1, 2, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; - static const __DRIversion drm_expected = { 0, 0, 1 }; + static const __DRIversion drm_expected = { 0, 0, 2 }; dri_interface = interface; -- cgit v1.2.3 From bbfd963f492683dc359b7e3f8fcb7ceb2483f886 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Tue, 2 Jan 2007 14:31:16 +0100 Subject: Update spot light params --- src/mesa/drivers/dri/nouveau/nv10_state.c | 27 +++++++++++++++------------ src/mesa/drivers/dri/nouveau/nv20_state.c | 27 +++++++++++++++------------ src/mesa/drivers/dri/nouveau/nv30_state.c | 27 +++++++++++++++------------ 3 files changed, 45 insertions(+), 36 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index be5f5f6e42..c028be2867 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -327,6 +327,7 @@ static void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) // void (*IndexMask)(GLcontext *ctx, GLuint mask); enum { + SPOTLIGHT_NO_UPDATE, SPOTLIGHT_UPDATE_EXPONENT, SPOTLIGHT_UPDATE_DIRECTION, SPOTLIGHT_UPDATE_ALL @@ -337,7 +338,7 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLint p = light - GL_LIGHT0; struct gl_light *l = &ctx->Light.Light[p]; - int spotlightUpdate = -1; + int spotlight_update = SPOTLIGHT_NO_UPDATE; switch(pname) { @@ -366,13 +367,13 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + spotlight_update = SPOTLIGHT_UPDATE_DIRECTION; break; case GL_SPOT_EXPONENT: - spotlightUpdate = SPOTLIGHT_UPDATE_EXPONENT; + spotlight_update = SPOTLIGHT_UPDATE_EXPONENT; break; case GL_SPOT_CUTOFF: - spotlightUpdate = SPOTLIGHT_UPDATE_ALL; + spotlight_update = SPOTLIGHT_UPDATE_ALL; break; case GL_CONSTANT_ATTENUATION: BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); @@ -390,13 +391,14 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa break; } - switch(spotlightUpdate) { + switch(spotlight_update) { case SPOTLIGHT_UPDATE_DIRECTION: { GLfloat x,y,z; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + GLfloat spot_light_coef_a = 1.0 / (l->_CosCutoff - 1.0); + x = spot_light_coef_a * l->_NormDirection[0]; + y = spot_light_coef_a * l->_NormDirection[1]; + z = spot_light_coef_a * l->_NormDirection[2]; BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); OUT_RING_CACHEf(x); OUT_RING_CACHEf(y); @@ -418,13 +420,14 @@ static void nv10Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa case SPOTLIGHT_UPDATE_ALL: { GLfloat cc,lc,qc, x,y,z, c; + GLfloat spot_light_coef_a = 1.0 / (l->_CosCutoff - 1.0); cc = 1.0; /* FIXME: These need to be correctly computed */ lc = 0.0; qc = 2.0; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; - c = -2.0 * (0.5 + l->_CosCutoff); + x = spot_light_coef_a * l->_NormDirection[0]; + y = spot_light_coef_a * l->_NormDirection[1]; + z = spot_light_coef_a * l->_NormDirection[2]; + c = spot_light_coef_a + 1.0; BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 7); OUT_RING_CACHEf(cc); OUT_RING_CACHEf(lc); diff --git a/src/mesa/drivers/dri/nouveau/nv20_state.c b/src/mesa/drivers/dri/nouveau/nv20_state.c index 6bfac8466b..8e38d6eba0 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_state.c +++ b/src/mesa/drivers/dri/nouveau/nv20_state.c @@ -338,6 +338,7 @@ static void nv20Hint(GLcontext *ctx, GLenum target, GLenum mode) // void (*IndexMask)(GLcontext *ctx, GLuint mask); enum { + SPOTLIGHT_NO_UPDATE, SPOTLIGHT_UPDATE_EXPONENT, SPOTLIGHT_UPDATE_DIRECTION, SPOTLIGHT_UPDATE_ALL @@ -348,7 +349,7 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLint p = light - GL_LIGHT0; struct gl_light *l = &ctx->Light.Light[p]; - int spotlightUpdate = -1; + int spotlight_update = SPOTLIGHT_NO_UPDATE; /* not sure where the fourth param value goes...*/ switch(pname) @@ -378,13 +379,13 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + spotlight_update = SPOTLIGHT_UPDATE_DIRECTION; break; case GL_SPOT_EXPONENT: - spotlightUpdate = SPOTLIGHT_UPDATE_EXPONENT; + spotlight_update = SPOTLIGHT_UPDATE_EXPONENT; break; case GL_SPOT_CUTOFF: - spotlightUpdate = SPOTLIGHT_UPDATE_ALL; + spotlight_update = SPOTLIGHT_UPDATE_ALL; break; case GL_CONSTANT_ATTENUATION: BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); @@ -402,13 +403,14 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa break; } - switch(spotlightUpdate) { + switch(spotlight_update) { case SPOTLIGHT_UPDATE_DIRECTION: { GLfloat x,y,z; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + GLfloat spot_light_coef_a = 1.0 / (l->_CosCutoff - 1.0); + x = spot_light_coef_a * l->_NormDirection[0]; + y = spot_light_coef_a * l->_NormDirection[1]; + z = spot_light_coef_a * l->_NormDirection[2]; BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); OUT_RING_CACHEf(x); OUT_RING_CACHEf(y); @@ -430,13 +432,14 @@ static void nv20Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa case SPOTLIGHT_UPDATE_ALL: { GLfloat cc,lc,qc, x,y,z, c; + GLfloat spot_light_coef_a = 1.0 / (l->_CosCutoff - 1.0); cc = 1.0; /* FIXME: These need to be correctly computed */ lc = 0.0; qc = 2.0; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; - c = -2.0 * (0.5 + l->_CosCutoff); + x = spot_light_coef_a * l->_NormDirection[0]; + y = spot_light_coef_a * l->_NormDirection[1]; + z = spot_light_coef_a * l->_NormDirection[2]; + c = spot_light_coef_a + 1.0; BEGIN_RING_CACHE(NvSub3D, NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 7); OUT_RING_CACHEf(cc); OUT_RING_CACHEf(lc); diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 45befd0e77..9bf5f2adea 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -369,6 +369,7 @@ static void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) // void (*IndexMask)(GLcontext *ctx, GLuint mask); enum { + SPOTLIGHT_NO_UPDATE, SPOTLIGHT_UPDATE_EXPONENT, SPOTLIGHT_UPDATE_DIRECTION, SPOTLIGHT_UPDATE_ALL @@ -379,7 +380,7 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); GLint p = light - GL_LIGHT0; struct gl_light *l = &ctx->Light.Light[p]; - int spotlightUpdate = -1; + int spotlight_update = SPOTLIGHT_NO_UPDATE; if (NOUVEAU_CARD_USING_SHADERS) return; @@ -412,13 +413,13 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa OUT_RING_CACHEf(params[2]); break; case GL_SPOT_DIRECTION: - spotlightUpdate = SPOTLIGHT_UPDATE_DIRECTION; + spotlight_update = SPOTLIGHT_UPDATE_DIRECTION; break; case GL_SPOT_EXPONENT: - spotlightUpdate = SPOTLIGHT_UPDATE_EXPONENT; + spotlight_update = SPOTLIGHT_UPDATE_EXPONENT; break; case GL_SPOT_CUTOFF: - spotlightUpdate = SPOTLIGHT_UPDATE_ALL; + spotlight_update = SPOTLIGHT_UPDATE_ALL; break; case GL_CONSTANT_ATTENUATION: BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(p), 1); @@ -436,13 +437,14 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa break; } - switch(spotlightUpdate) { + switch(spotlight_update) { case SPOTLIGHT_UPDATE_DIRECTION: { GLfloat x,y,z; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; + GLfloat spot_light_coef_a = 1.0 / (l->_CosCutoff - 1.0); + x = spot_light_coef_a * l->_NormDirection[0]; + y = spot_light_coef_a * l->_NormDirection[1]; + z = spot_light_coef_a * l->_NormDirection[2]; BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(p), 3); OUT_RING_CACHEf(x); OUT_RING_CACHEf(y); @@ -464,13 +466,14 @@ static void nv30Lightfv(GLcontext *ctx, GLenum light, GLenum pname, const GLfloa case SPOTLIGHT_UPDATE_ALL: { GLfloat cc,lc,qc, x,y,z, c; + GLfloat spot_light_coef_a = 1.0 / (l->_CosCutoff - 1.0); cc = 1.0; /* FIXME: These need to be correctly computed */ lc = 0.0; qc = 2.0; - x = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[0]; - y = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[1]; - z = -2.0 * (1.0 + l->_CosCutoff) * l->_NormDirection[2]; - c = -2.0 * (0.5 + l->_CosCutoff); + x = spot_light_coef_a * l->_NormDirection[0]; + y = spot_light_coef_a * l->_NormDirection[1]; + z = spot_light_coef_a * l->_NormDirection[2]; + c = spot_light_coef_a + 1.0; BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(p), 7); OUT_RING_CACHEf(cc); OUT_RING_CACHEf(lc); -- cgit v1.2.3 From 1d312ae0137eb39bf74fac91eb97ed25c289a4ca Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 4 Jan 2007 20:27:49 +0100 Subject: r300: Correct bug introduced by fragprog rework. Thx for Tilman who spoted the bugs. --- src/mesa/drivers/dri/r300/r300_fragprog.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index f00162a6dc..179bc58e9e 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -257,7 +257,7 @@ static const GLuint undef = REG(REG_TYPE_TEMP, GL_FALSE); /* constant one source */ -static const GLuint pfs_one = REG(REG_TYPE_TEMP, +static const GLuint pfs_one = REG(REG_TYPE_CONST, 0, SWIZZLE_111, SWIZZLE_ONE, @@ -265,7 +265,7 @@ static const GLuint pfs_one = REG(REG_TYPE_TEMP, GL_TRUE); /* constant half source */ -static const GLuint pfs_half = REG(REG_TYPE_TEMP, +static const GLuint pfs_half = REG(REG_TYPE_CONST, 0, SWIZZLE_HHH, SWIZZLE_HALF, @@ -273,7 +273,7 @@ static const GLuint pfs_half = REG(REG_TYPE_TEMP, GL_TRUE); /* constant zero source */ -static const GLuint pfs_zero = REG(REG_TYPE_TEMP, +static const GLuint pfs_zero = REG(REG_TYPE_CONST, 0, SWIZZLE_000, SWIZZLE_ZERO, @@ -463,7 +463,8 @@ static int swz_native(struct r300_fragment_program *rp, GLuint arbneg) { /* Native swizzle, handle negation */ - src |= ((arbneg >> 3) & 1) << REG_NEGS_SHIFT; + src = (src & ~REG_NEGS_SHIFT) | + (((arbneg >> 3) & 1) << REG_NEGS_SHIFT); if ((arbneg & 0x7) == 0x0) { src = src & ~REG_NEGV_MASK; -- cgit v1.2.3 From 92be800146ffa5aab1c3072fa4c9b48289985176 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 4 Jan 2007 14:47:41 -0800 Subject: Add missing files to server generation list. The files indirect_reqsize.c and indirect_reqsize.h were missing from the list of files to be generated for the server. Add them back to the list. Also, update the INDENT_FLAGS to prevent conversion of 'GLbyte *pc' to 'GLbyte * pc' in function prototypes. --- src/mesa/glapi/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile index 2f8da126b8..6d2e3cdeeb 100644 --- a/src/mesa/glapi/Makefile +++ b/src/mesa/glapi/Makefile @@ -26,6 +26,8 @@ GLX_DIR = $(XORG_BASE)/GL/glx SERVER_OUTPUTS = $(GLX_DIR)/indirect_dispatch.c \ $(GLX_DIR)/indirect_dispatch_swap.c \ $(GLX_DIR)/indirect_dispatch.h \ + $(GLX_DIR)/indirect_reqsize.c \ + $(GLX_DIR)/indirect_reqsize.h \ $(GLX_DIR)/indirect_size_get.c \ $(GLX_DIR)/indirect_size_get.h \ $(GLX_DIR)/indirect_table.c @@ -37,7 +39,7 @@ API_XML = gl_API.xml \ COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py -INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce +INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool all: $(OUTPUTS) @@ -104,6 +106,12 @@ $(GLX_DIR)/indirect_size_get.h: $(COMMON_GLX) glX_proto_size.py $(GLX_DIR)/indirect_size_get.c: $(COMMON_GLX) glX_proto_size.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | indent $(INDENT_FLAGS) > $@ +$(GLX_DIR)/indirect_reqsize.h: $(COMMON_GLX) glX_proto_size.py + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) > $@ + +$(GLX_DIR)/indirect_reqsize.c: $(COMMON_GLX) glX_proto_size.py + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | indent $(INDENT_FLAGS) > $@ + $(GLX_DIR)/indirect_table.c: $(COMMON_GLX) glX_server_table.py glX_API.xml $(PYTHON2) $(PYTHON_FLAGS) glX_server_table.py -f gl_and_glX_API.xml > $@ -- cgit v1.2.3 From 6d29e1de735b446b7a6e2d069375a6cc47c83ce4 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 4 Jan 2007 14:52:53 -0800 Subject: Hack indent flags for indirect_reqsize.h to eliminate extra diffs. --- src/mesa/glapi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile index 6d2e3cdeeb..c52c090347 100644 --- a/src/mesa/glapi/Makefile +++ b/src/mesa/glapi/Makefile @@ -107,7 +107,7 @@ $(GLX_DIR)/indirect_size_get.c: $(COMMON_GLX) glX_proto_size.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | indent $(INDENT_FLAGS) > $@ $(GLX_DIR)/indirect_reqsize.h: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) > $@ + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) -l200 > $@ $(GLX_DIR)/indirect_reqsize.c: $(COMMON_GLX) glX_proto_size.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | indent $(INDENT_FLAGS) > $@ -- cgit v1.2.3 From 5ca107a4f215b84176123fd7a2d5fe14508a9f62 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 4 Jan 2007 14:53:48 -0800 Subject: Use glxbyteorder.h in server-side source files. --- src/mesa/glapi/glX_proto_recv.py | 21 +-------------------- src/mesa/glapi/glX_proto_size.py | 12 ++---------- 2 files changed, 3 insertions(+), 30 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/glX_proto_recv.py b/src/mesa/glapi/glX_proto_recv.py index 527f6f10ee..20f75575cf 100644 --- a/src/mesa/glapi/glX_proto_recv.py +++ b/src/mesa/glapi/glX_proto_recv.py @@ -81,31 +81,12 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): print '#include ' print '#include ' - - # FIXME: Since this block will require changes as other - # FIXME: platforms are added, it should probably be in a - # FIXME: header file that is not generated by a script. - - if self.do_swap: - print '#ifdef __linux__' - print '#include ' - print '#elif defined(__OpenBSD__)' - print '#include ' - print '#define bswap_16 __swap16' - print '#define bswap_32 __swap32' - print '#define bswap_64 __swap64' - print '#else' - print '#include ' - print '#define bswap_16 bswap16' - print '#define bswap_32 bswap32' - print '#define bswap_64 bswap64' - print '#endif' - print '#include ' print '#include "indirect_size.h"' print '#include "indirect_size_get.h"' print '#include "indirect_dispatch.h"' print '#include "glxserver.h"' + print '#include "glxbyteorder.h"' print '#include "indirect_util.h"' print '#include "singlesize.h"' print '#include "glapitable.h"' diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/glX_proto_size.py index 18bfa1b71b..2b9a643362 100644 --- a/src/mesa/glapi/glX_proto_size.py +++ b/src/mesa/glapi/glX_proto_size.py @@ -447,17 +447,9 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): print '' print '#include ' print '#include "glxserver.h"' + print '#include "glxbyteorder.h"' print '#include "indirect_size.h"' print '#include "indirect_reqsize.h"' - print '' - print '#if defined(linux)' - print '# include ' - print '# define SWAP_32(v) do { (v) = bswap_32(v); } while(0)' - print '#else' - print '# include ' - print '# define SWAP_32(v) do { char tmp; swapl(&v, tmp); } while(0)' - print '#endif' - print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' print '' @@ -538,7 +530,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): if fixup: print ' if (swap) {' for name in fixup: - print ' SWAP_32( %s );' % (name) + print ' %s = bswap_32(%s);' % (name, name) print ' }' return -- cgit v1.2.3 From 7da7404fdf1be778534d2d155072114e3f92226a Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 08:40:06 -0700 Subject: Fix glPush/PopClientAttrib() for VBO state (bug 9445). --- src/mesa/main/attrib.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 9993a0021b..2b1a35f3de 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 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"), @@ -1285,6 +1285,12 @@ _mesa_PushClientAttrib(GLbitfield mask) attr = MALLOC_STRUCT( gl_array_attrib ); obj = MALLOC_STRUCT( gl_array_object ); +#if FEATURE_ARB_vertex_buffer_object + /* increment ref counts since we're copying pointers to these objects */ + ctx->Array.ArrayBufferObj->RefCount++; + ctx->Array.ElementArrayBufferObj->RefCount++; +#endif + MEMCPY( attr, &ctx->Array, sizeof(struct gl_array_attrib) ); MEMCPY( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) ); @@ -1359,6 +1365,13 @@ _mesa_PopClientAttrib(void) _mesa_BindVertexArrayAPPLE( data->ArrayObj->Name ); +#if FEATURE_ARB_vertex_buffer_object + _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, + data->ArrayBufferObj->Name); + _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, + data->ElementArrayBufferObj->Name); +#endif + MEMCPY( ctx->Array.ArrayObj, data->ArrayObj, sizeof( struct gl_array_object ) ); -- cgit v1.2.3 From c2b185cff82a6cdb723cda4e05ffe1a213a9de3e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 5 Jan 2007 18:19:58 -0800 Subject: Add reporting of damage by DRI drivers when the extension support is available. With this, tools like ximagesrc in gstreamer correctly see updates from GL rendering. Support requires that the Xdamage library be current (but will be disabled if not present) plus a new X Server with support for the new XDamagePost request. libGL now has a new interface version, and also links against libXdamage and libXfixes to support it, but backwards compatibility is retained. Currently, all drivers report damage at SwapBuffers time through common code -- front buffer rendering doesn't result in damage being reported. Also, the damage is against the root window, as our drivers don't yet render to backing store when they should (composited environments). --- configs/freebsd-dri | 3 +- configs/linux-dri | 3 +- include/GL/internal/dri_interface.h | 20 +++++++++++ src/glx/x11/glxcmds.c | 3 +- src/glx/x11/glxext.c | 66 ++++++++++++++++++++++++++++++++++ src/mesa/drivers/dri/common/dri_util.c | 21 ++++++++++- 6 files changed, 112 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/configs/freebsd-dri b/configs/freebsd-dri index 68877c612e..1492e4a4d9 100644 --- a/configs/freebsd-dri +++ b/configs/freebsd-dri @@ -28,7 +28,8 @@ ASM_SOURCES = LIBDRM_CFLAGS = `pkg-config --cflags libdrm` LIBDRM_LIB = `pkg-config --libs libdrm` DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB) -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB) +GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ + -lm -lpthread $(LIBDRM_LIB) GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11 diff --git a/configs/linux-dri b/configs/linux-dri index 7e822e2eb6..5f945a73f1 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -41,7 +41,8 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib LIBDRM_CFLAGS = `pkg-config --cflags libdrm` LIBDRM_LIB = `pkg-config --libs libdrm` DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) -GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ +GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ + -lm -lpthread -ldl \ $(LIBDRM_LIB) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index c204ecfe62..a3de2c6aab 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -237,6 +237,26 @@ struct __DRIinterfaceMethodsRec { GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable, int32_t * numerator, int32_t * denominator); /*@}*/ + + /** + * Reports areas of the given drawable which have been modified by the + * driver. + * + * \param drawable which the drawing was done to. + * \param rects rectangles affected, with the drawable origin as the + * origin. + * \param x X offset of the drawable within the screen (used in the + * front_buffer case) + * \param y Y offset of the drawable within the screen. + * \param front_buffer boolean flag for whether the drawing to the + * drawable was actually done directly to the front buffer (instead + * of backing storage, for example) + */ + void (*reportDamage)(__DRInativeDisplay * dpy, int screen, + __DRIid drawable, + int x, int y, + drm_clip_rect_t *rects, int num_rects, + int front_buffer); }; diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 9d1bb2a0b5..f52b71ffcd 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -2883,8 +2883,9 @@ int __glXGetInternalVersion(void) * 20050727 - Gut all the old interfaces. This breaks compatability with * any DRI driver built to any previous version. * 20060314 - Added support for GLX_MESA_copy_sub_buffer. + * 20070105 - Added support for damage reporting. */ - return 20060314; + return 20070105; } diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 8bec2c34c6..29b3a1c01c 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -48,6 +48,8 @@ #include #include #include +#include +#include #include #include "indirect_init.h" #include "glapi.h" @@ -698,6 +700,68 @@ static __DRIfuncPtr get_proc_address( const char * proc_name ) return NULL; } +#ifdef XDAMAGE_1_1_INTERFACE +static GLboolean has_damage_post(__DRInativeDisplay *dpy) +{ + static GLboolean inited = GL_FALSE; + static GLboolean has_damage; + + if (!inited) { + int major, minor; + + if (XDamageQueryVersion(dpy, &major, &minor) && + major == 1 && minor >= 1) + { + has_damage = GL_TRUE; + } else { + has_damage = GL_FALSE; + } + inited = GL_TRUE; + } + + return has_damage; +} +#endif /* XDAMAGE_1_1_INTERFACE */ + +static void __glXReportDamage(__DRInativeDisplay *dpy, int screen, + __DRIid drawable, + int x, int y, + drm_clip_rect_t *rects, int num_rects, + GLboolean front_buffer) +{ +#ifdef XDAMAGE_1_1_INTERFACE + XRectangle *xrects; + XserverRegion region; + int i; + int x_off, y_off; + + if (!has_damage_post(dpy)) + return; + + if (front_buffer) { + x_off = x; + y_off = y; + drawable = RootWindow(dpy, screen); + } else{ + x_off = 0; + y_off = 0; + } + + xrects = malloc(sizeof(XRectangle) * num_rects); + if (xrects == NULL) + return; + + for (i = 0; i < num_rects; i++) { + xrects[i].x = rects[i].x1 + x_off; + xrects[i].y = rects[i].y1 + y_off; + xrects[i].width = rects[i].x2 - rects[i].x1; + xrects[i].height = rects[i].y2 - rects[i].y1; + } + region = XFixesCreateRegion(dpy, xrects, num_rects); + XDamagePost(dpy, drawable, region); + XFixesDestroyRegion(dpy, region); +#endif +} /** * Table of functions exported by the loader to the driver. @@ -720,6 +784,8 @@ static const __DRIinterfaceMethods interface_methods = { __glXGetUST, __glXGetMscRateOML, + + __glXReportDamage, }; diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index ba251a8143..cc3dcf9d8d 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -482,8 +482,27 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate ) { __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + drm_clip_rect_t rect; + dPriv->swapBuffers(dPriv); - (void) dpy; + + /* Check that we actually have the new damage report method */ + if (api_ver < 20070105 || dri_interface->reportDamage == NULL) + return; + + /* Assume it's affecting the whole drawable for now */ + rect.x1 = 0; + rect.y1 = 0; + rect.x2 = rect.x1 + dPriv->w; + rect.y2 = rect.y1 + dPriv->h; + + /* Report the damage. Currently, all our drivers draw directly to the + * front buffer, so we report the damage there rather than to the backing + * store (if any). + */ + (*dri_interface->reportDamage)(dpy, dPriv->screen, dPriv->draw, + dPriv->x, dPriv->y, + &rect, 1, GL_TRUE); } /** -- cgit v1.2.3 From 113b0a7f2e83f02ae9da6977ff416df5cf9671de Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 6 Jan 2007 12:55:17 -0700 Subject: Use GLuint instead of GLint to store intermediate Z values. Fixes problems when using 32-bit Z buffer. --- src/mesa/swrast/s_linetemp.h | 11 ++++++----- src/mesa/swrast/s_pointtemp.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index f5b2d95653..8b3918511d 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 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"), @@ -80,14 +80,15 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) GLint numPixels; GLint xstep, ystep; #if defined(DEPTH_TYPE) - const GLint depthBits = ctx->Visual.depthBits; + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; const GLint fixedToDepthShift = depthBits <= 16 ? FIXED_SHIFT : 0; struct gl_renderbuffer *zrb = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; #define FixedToDepth(F) ((F) >> fixedToDepthShift) GLint zPtrXstep, zPtrYstep; DEPTH_TYPE *zPtr; #elif defined(INTERP_Z) - const GLint depthBits = ctx->Visual.depthBits; + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; +/*ctx->Visual.depthBits;*/ #endif #ifdef PIXEL_ADDRESS PIXEL_TYPE *pixelPtr; @@ -268,7 +269,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) } else { /* don't use fixed point */ - span.z = (GLint) vert0->win[2]; + span.z = (GLuint) vert0->win[2]; span.zStep = (GLint) ((vert1->win[2] - vert0->win[2]) / numPixels); } } diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index 6316833a68..083f1ebe83 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 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"), @@ -194,7 +194,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) {{ GLint x, y; const GLfloat radius = 0.5F * size; - const GLint z = (GLint) (vert->win[2] + 0.5F); + const GLuint z = (GLuint) (vert->win[2] + 0.5F); GLuint count; #if FLAGS & SMOOTH const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */ -- cgit v1.2.3 From e54ec49155052ab663d8671e7036d985992464a3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 11 Oct 2006 12:16:09 -0700 Subject: i965: Connect INTEL_DEBUG=sync up to cmd/batch ioctls. Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/intel_ioctl.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_ioctl.c b/src/mesa/drivers/dri/i965/intel_ioctl.c index f3b76db215..4da31277ea 100644 --- a/src/mesa/drivers/dri/i965/intel_ioctl.c +++ b/src/mesa/drivers/dri/i965/intel_ioctl.c @@ -43,6 +43,26 @@ #include "drm.h" #include "bufmgr.h" +static int intelWaitIdleLocked( struct intel_context *intel ) +{ + static int in_wait_idle = 0; + unsigned int fence; + + if (!in_wait_idle) { + if (INTEL_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "waiting for idle\n"); + } + + in_wait_idle = 1; + fence = bmSetFence(intel); + intelWaitIrq(intel, fence); + in_wait_idle = 0; + + return bmTestFence(intel, fence); + } else { + return 1; + } +} int intelEmitIrqLocked( struct intel_context *intel ) { @@ -140,7 +160,11 @@ void intel_batch_ioctl( struct intel_context *intel, UNLOCK_HARDWARE(intel); exit(1); } - } + + if (INTEL_DEBUG & DEBUG_SYNC) { + intelWaitIdleLocked(intel); + } + } } void intel_cmd_ioctl( struct intel_context *intel, @@ -172,5 +196,9 @@ void intel_cmd_ioctl( struct intel_context *intel, UNLOCK_HARDWARE(intel); exit(1); } - } + + if (INTEL_DEBUG & DEBUG_SYNC) { + intelWaitIdleLocked(intel); + } + } } -- cgit v1.2.3 From 1b9f78195f62959601d440475a6cbba5e8046813 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 18 Oct 2006 00:24:01 -0700 Subject: i965: Avoid branch instructions while in single program flow mode. There is an errata for Broadwater that threads don't have the instruction/loop mask stacks initialized on thread spawn. In single program flow mode, those stacks are not writable, so we can't initialize them. However, they do get read during ELSE and ENDIF instructions. So, instead, replace branch instructions in single program flow mode with predicated jumps (ADD to the ip register), avoiding use of the more complicated branch instructions that may fail. This is also a minor optimization as no ENDIF equivalent is necessary. Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/brw_clip.c | 2 + src/mesa/drivers/dri/i965/brw_eu.h | 1 + src/mesa/drivers/dri/i965/brw_eu_emit.c | 155 ++++++++++++++++++++------------ src/mesa/drivers/dri/i965/brw_gs.c | 4 +- src/mesa/drivers/dri/i965/brw_structs.h | 22 ++++- 5 files changed, 125 insertions(+), 59 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index 0e8591aaa8..3bec153075 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -62,6 +62,8 @@ static void compile_clip_prog( struct brw_context *brw, */ brw_init_compile(&c.func); + c.func.single_program_flow = 1; + c.key = *key; diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index 1afa0f816b..d4dbcf38a7 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -104,6 +104,7 @@ struct brw_compile { struct brw_instruction *current; GLuint flag_value; + GLboolean single_program_flow; }; diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 6425c91450..9992b47d8a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -464,7 +464,6 @@ struct brw_instruction *brw_JMPI(struct brw_compile *p, return insn; } - /* EU takes the value from the flag register and pushes it onto some * sort of a stack (presumably merging with any flag value already on * the stack). Within an if block, the flags at the top of the stack @@ -482,7 +481,16 @@ struct brw_instruction *brw_JMPI(struct brw_compile *p, */ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size) { - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_IF); + struct brw_instruction *insn; + + if (p->single_program_flow) { + assert(execute_size == BRW_EXECUTE_1); + + insn = next_insn(p, BRW_OPCODE_ADD); + insn->header.predicate_inverse = 1; + } else { + insn = next_insn(p, BRW_OPCODE_IF); + } /* Override the defaults for this instruction: */ @@ -504,7 +512,13 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size) struct brw_instruction *brw_ELSE(struct brw_compile *p, struct brw_instruction *if_insn) { - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_ELSE); + struct brw_instruction *insn; + + if (p->single_program_flow) { + insn = next_insn(p, BRW_OPCODE_ADD); + } else { + insn = next_insn(p, BRW_OPCODE_ELSE); + } brw_set_dest(insn, brw_ip_reg()); brw_set_src0(insn, brw_ip_reg()); @@ -516,11 +530,17 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p, /* Patch the if instruction to point at this instruction. */ - assert(if_insn->header.opcode == BRW_OPCODE_IF); + if (p->single_program_flow) { + assert(if_insn->header.opcode == BRW_OPCODE_ADD); - if_insn->bits3.if_else.jump_count = insn - if_insn; - if_insn->bits3.if_else.pop_count = 1; - if_insn->bits3.if_else.pad0 = 0; + if_insn->bits3.ud = (insn - if_insn + 1) * 16; + } else { + assert(if_insn->header.opcode == BRW_OPCODE_IF); + + if_insn->bits3.if_else.jump_count = insn - if_insn; + if_insn->bits3.if_else.pop_count = 1; + if_insn->bits3.if_else.pad0 = 0; + } return insn; } @@ -528,63 +548,76 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p, void brw_ENDIF(struct brw_compile *p, struct brw_instruction *patch_insn) { - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_ENDIF); + if (p->single_program_flow) { + /* In single program flow mode, there's no need to execute an ENDIF, + * since we don't need to do any stack operations, and if we're executing + * currently, we want to just continue executing. + */ + struct brw_instruction *next = &p->store[p->nr_insn]; - brw_set_dest(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src0(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src1(insn, brw_imm_d(0x0)); + assert(patch_insn->header.opcode == BRW_OPCODE_ADD); - insn->header.compression_control = BRW_COMPRESSION_NONE; - insn->header.execution_size = patch_insn->header.execution_size; - insn->header.mask_control = BRW_MASK_ENABLE; + patch_insn->bits3.ud = (next - patch_insn) * 16; + } else { + struct brw_instruction *insn = next_insn(p, BRW_OPCODE_ENDIF); - assert(patch_insn->bits3.if_else.jump_count == 0); - - /* Patch the if or else instructions to point at this or the next - * instruction respectively. - */ - if (patch_insn->header.opcode == BRW_OPCODE_IF) { - /* Automagically turn it into an IFF: + brw_set_dest(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src0(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src1(insn, brw_imm_d(0x0)); + + insn->header.compression_control = BRW_COMPRESSION_NONE; + insn->header.execution_size = patch_insn->header.execution_size; + insn->header.mask_control = BRW_MASK_ENABLE; + + assert(patch_insn->bits3.if_else.jump_count == 0); + + /* Patch the if or else instructions to point at this or the next + * instruction respectively. */ - patch_insn->header.opcode = BRW_OPCODE_IFF; - patch_insn->bits3.if_else.jump_count = insn - patch_insn + 1; - patch_insn->bits3.if_else.pop_count = 0; - patch_insn->bits3.if_else.pad0 = 0; + if (patch_insn->header.opcode == BRW_OPCODE_IF) { + /* Automagically turn it into an IFF: + */ + patch_insn->header.opcode = BRW_OPCODE_IFF; + patch_insn->bits3.if_else.jump_count = insn - patch_insn + 1; + patch_insn->bits3.if_else.pop_count = 0; + patch_insn->bits3.if_else.pad0 = 0; + } else if (patch_insn->header.opcode == BRW_OPCODE_ELSE) { + patch_insn->bits3.if_else.jump_count = insn - patch_insn + 1; + patch_insn->bits3.if_else.pop_count = 1; + patch_insn->bits3.if_else.pad0 = 0; + } else { + assert(0); + } + /* Also pop item off the stack in the endif instruction: + */ + insn->bits3.if_else.jump_count = 0; + insn->bits3.if_else.pop_count = 1; + insn->bits3.if_else.pad0 = 0; } - else if (patch_insn->header.opcode == BRW_OPCODE_ELSE) { - patch_insn->bits3.if_else.jump_count = insn - patch_insn + 1; - patch_insn->bits3.if_else.pop_count = 1; - patch_insn->bits3.if_else.pad0 = 0; - } - else { - assert(0); - } - - /* Also pop item off the stack in the endif instruction: - */ - insn->bits3.if_else.jump_count = 0; - insn->bits3.if_else.pop_count = 1; - insn->bits3.if_else.pad0 = 0; } /* DO/WHILE loop: */ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size) { - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_DO); + if (p->single_program_flow) { + return &p->store[p->nr_insn]; + } else { + struct brw_instruction *insn = next_insn(p, BRW_OPCODE_DO); - /* Override the defaults for this instruction: - */ - brw_set_dest(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src0(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD)); - brw_set_src1(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD)); + /* Override the defaults for this instruction: + */ + brw_set_dest(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src0(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD)); + brw_set_src1(insn, retype(brw_vec1_grf(0,0), BRW_REGISTER_TYPE_UD)); - insn->header.compression_control = BRW_COMPRESSION_NONE; - insn->header.execution_size = execute_size; -/* insn->header.mask_control = BRW_MASK_ENABLE; */ + insn->header.compression_control = BRW_COMPRESSION_NONE; + insn->header.execution_size = execute_size; + /* insn->header.mask_control = BRW_MASK_ENABLE; */ - return insn; + return insn; + } } @@ -592,19 +625,31 @@ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size) void brw_WHILE(struct brw_compile *p, struct brw_instruction *do_insn) { - struct brw_instruction *insn = next_insn(p, BRW_OPCODE_WHILE); + struct brw_instruction *insn; + + if (p->single_program_flow) + insn = next_insn(p, BRW_OPCODE_ADD); + else + insn = next_insn(p, BRW_OPCODE_WHILE); brw_set_dest(insn, brw_ip_reg()); brw_set_src0(insn, brw_ip_reg()); brw_set_src1(insn, brw_imm_d(0x0)); insn->header.compression_control = BRW_COMPRESSION_NONE; - insn->header.execution_size = do_insn->header.execution_size; - assert(do_insn->header.opcode == BRW_OPCODE_DO); - insn->bits3.if_else.jump_count = do_insn - insn; - insn->bits3.if_else.pop_count = 0; - insn->bits3.if_else.pad0 = 0; + if (p->single_program_flow) { + insn->header.execution_size = BRW_EXECUTE_1; + + insn->bits3.d = (do_insn - insn) * 16; + } else { + insn->header.execution_size = do_insn->header.execution_size; + + assert(do_insn->header.opcode == BRW_OPCODE_DO); + insn->bits3.if_else.jump_count = do_insn - insn; + insn->bits3.if_else.pop_count = 0; + insn->bits3.if_else.pad0 = 0; + } /* insn->header.mask_control = BRW_MASK_ENABLE; */ diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 7d3f9dd5e3..9066e42252 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -66,7 +66,9 @@ static void compile_gs_prog( struct brw_context *brw, /* Begin the compilation: */ brw_init_compile(&c.func); - + + c.func.single_program_flow = 1; + /* For some reason the thread is spawned with only 4 channels * unmasked. */ diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 25acdcfe94..10fee944e8 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -519,7 +519,22 @@ struct thread3 struct brw_clip_unit_state { struct thread0 thread0; - struct thread1 thread1; + struct + { + GLuint pad0:7; + GLuint sw_exception_enable:1; + GLuint pad1:3; + GLuint mask_stack_exception_enable:1; + GLuint pad2:1; + GLuint illegal_op_exception_enable:1; + GLuint pad3:2; + GLuint floating_point_mode:1; + GLuint thread_priority:1; + GLuint binding_table_entry_count:8; + GLuint pad4:5; + GLuint single_program_flow:1; + } thread1; + struct thread2 thread2; struct thread3 thread3; @@ -532,8 +547,8 @@ struct brw_clip_unit_state GLuint pad1:1; GLuint urb_entry_allocation_size:5; GLuint pad2:1; - GLuint max_threads:6; /* may be less */ - GLuint pad3:1; + GLuint max_threads:1; /* may be less */ + GLuint pad3:6; } thread4; struct @@ -1322,6 +1337,7 @@ struct brw_instruction GLuint end_of_thread:1; } generic; + GLint d; GLuint ud; } bits3; }; -- cgit v1.2.3 From 4068e2d1b766a9ccedcb8d7cd07c49d22dff39f0 Mon Sep 17 00:00:00 2001 From: Wang Zhenyu Date: Mon, 11 Dec 2006 00:01:56 -0800 Subject: i965: ARB_occlusion_query support Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/brw_wm_state.c | 2 +- src/mesa/drivers/dri/i965/intel_context.c | 34 ++++++++++++++++++++++++++ src/mesa/drivers/dri/i965/intel_context.h | 1 + src/mesa/drivers/dri/i965/server/i830_common.h | 19 ++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c index 4707a709e7..e41042d6d2 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_state.c @@ -168,7 +168,7 @@ static void upload_wm_unit(struct brw_context *brw ) wm.wm5.line_stipple = 1; } - if (INTEL_DEBUG & DEBUG_STATS) + if (INTEL_DEBUG & DEBUG_STATS || intel->stats_wm) wm.wm4.stats_enable = 1; brw->wm.state_gs_offset = brw_cache_data( &brw->cache[BRW_WM_UNIT], &wm ); diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 5e97e4d609..9acafe5310 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -70,6 +70,7 @@ int INTEL_DEBUG = (0); #define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_program #define need_GL_ARB_window_pos +#define need_GL_ARB_occlusion_query #define need_GL_EXT_blend_color #define need_GL_EXT_blend_equation_separate #define need_GL_EXT_blend_func_separate @@ -157,6 +158,7 @@ const struct dri_extension card_extensions[] = { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, { "GL_ARB_window_pos", GL_ARB_window_pos_functions }, + { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, { "GL_EXT_blend_color", GL_EXT_blend_color_functions }, { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions }, { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions }, @@ -241,6 +243,36 @@ void intelFinish( GLcontext *ctx ) bmFinishFence(intel, bmLockAndFence(intel)); } +static void +intelBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) +{ + struct intel_context *intel = intel_context( ctx ); + GLuint64EXT tmp = 0; + drmI830MMIO io = { + .read_write = MMIO_WRITE, + .reg = MMIO_REGS_PS_DEPTH_COUNT, + .data = &tmp + }; + intel->stats_wm = GL_TRUE; + intelFinish(&intel->ctx); + drmCommandWrite(intel->driFd, DRM_I830_MMIO, &io, sizeof(io)); +} + +static void +intelEndQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q) +{ + struct intel_context *intel = intel_context( ctx ); + drmI830MMIO io = { + .read_write = MMIO_READ, + .reg = MMIO_REGS_PS_DEPTH_COUNT, + .data = &q->Result + }; + intelFinish(&intel->ctx); + drmCommandRead(intel->driFd, DRM_I830_MMIO, &io, sizeof(io)); + q->Ready = GL_TRUE; + intel->stats_wm = GL_FALSE; +} + void intelInitDriverFunctions( struct dd_function_table *functions ) { @@ -250,6 +282,8 @@ void intelInitDriverFunctions( struct dd_function_table *functions ) functions->Finish = intelFinish; functions->GetString = intelGetString; functions->UpdateState = intelInvalidateState; + functions->BeginQuery = intelBeginQuery; + functions->EndQuery = intelEndQuery; /* CopyPixels can be accelerated even with the current memory * manager: diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 8367a95710..fe7ee382a1 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -177,6 +177,7 @@ struct intel_context GLuint second_last_swap_fence; GLboolean aub_wrap; + GLboolean stats_wm; struct intel_batchbuffer *batch; diff --git a/src/mesa/drivers/dri/i965/server/i830_common.h b/src/mesa/drivers/dri/i965/server/i830_common.h index e3bbdc7907..f320378c2a 100644 --- a/src/mesa/drivers/dri/i965/server/i830_common.h +++ b/src/mesa/drivers/dri/i965/server/i830_common.h @@ -52,6 +52,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define DRM_I830_INIT_HEAP 0x0a #define DRM_I830_CMDBUFFER 0x0b #define DRM_I830_DESTROY_HEAP 0x0c +#define DRM_I830_MMIO 0x10 typedef struct { enum { @@ -199,5 +200,23 @@ typedef struct { int region; } drmI830MemDestroyHeap; +#define MMIO_READ 0 +#define MMIO_WRITE 1 + +#define MMIO_REGS_IA_PRIMATIVES_COUNT 0 +#define MMIO_REGS_IA_VERTICES_COUNT 1 +#define MMIO_REGS_VS_INVOCATION_COUNT 2 +#define MMIO_REGS_GS_PRIMITIVES_COUNT 3 +#define MMIO_REGS_GS_INVOCATION_COUNT 4 +#define MMIO_REGS_CL_PRIMITIVES_COUNT 5 +#define MMIO_REGS_CL_INVOCATION_COUNT 6 +#define MMIO_REGS_PS_INVOCATION_COUNT 7 +#define MMIO_REGS_PS_DEPTH_COUNT 8 + +typedef struct { + unsigned int read_write:1; + unsigned int reg:31; + void __user *data; +} drmI830MMIO; #endif /* _I830_DRM_H_ */ -- cgit v1.2.3 From 652ae2c3765a471f94ca7b7328a0d572182bb127 Mon Sep 17 00:00:00 2001 From: Zou Nan hai Date: Tue, 12 Dec 2006 15:00:27 +0800 Subject: i965: Take clip rects into account when computing max prim Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/brw_exec_api.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_exec_api.c b/src/mesa/drivers/dri/i965/brw_exec_api.c index 470fa6f417..8b243c6084 100644 --- a/src/mesa/drivers/dri/i965/brw_exec_api.c +++ b/src/mesa/drivers/dri/i965/brw_exec_api.c @@ -42,6 +42,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "dispatch.h" #include "brw_exec.h" +#include "intel_context.h" + static void reset_attrfv( struct brw_exec_context *exec ); @@ -522,6 +524,14 @@ static void GLAPIENTRY brw_exec_Begin( GLenum mode ) } +static GLuint brw_max_prim( GLcontext *ctx ) +{ + struct intel_context *intel = intel_context( ctx ); + if (intel->numClipRects <= 1) + return BRW_MAX_PRIM; + return BRW_MAX_PRIM/intel->numClipRects; +} + static void GLAPIENTRY brw_exec_End( void ) { GET_CURRENT_CONTEXT( ctx ); @@ -536,7 +546,7 @@ static void GLAPIENTRY brw_exec_End( void ) ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1; - if (exec->vtx.prim_count == BRW_MAX_PRIM) + if (exec->vtx.prim_count >= brw_max_prim(ctx)) brw_exec_vtx_flush( exec ); } else -- cgit v1.2.3 From ef02f8be10a9f95788fee48bb9e7801dea0c2ba6 Mon Sep 17 00:00:00 2001 From: Zou Nan hai Date: Wed, 13 Dec 2006 15:27:17 +0800 Subject: i965: xdemos/glxthreads get: Assertion `block->fenced' failed (9201) Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/bufmgr.h | 2 ++ src/mesa/drivers/dri/i965/bufmgr_fake.c | 16 ++++++++++++++-- src/mesa/drivers/dri/i965/intel_blit.c | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/bufmgr.h b/src/mesa/drivers/dri/i965/bufmgr.h index 6932522d3d..e748c0d6d0 100644 --- a/src/mesa/drivers/dri/i965/bufmgr.h +++ b/src/mesa/drivers/dri/i965/bufmgr.h @@ -199,9 +199,11 @@ void *bmFindVirtual( struct intel_context *intel, * For now they can stay, but will likely change/move before final: */ unsigned bmSetFence( struct intel_context * ); +unsigned bmSetFenceLock( struct intel_context * ); unsigned bmLockAndFence( struct intel_context *intel ); int bmTestFence( struct intel_context *, unsigned fence ); void bmFinishFence( struct intel_context *, unsigned fence ); +void bmFinishFenceLock( struct intel_context *, unsigned fence ); void bm_fake_NotifyContendedLockTake( struct intel_context * ); diff --git a/src/mesa/drivers/dri/i965/bufmgr_fake.c b/src/mesa/drivers/dri/i965/bufmgr_fake.c index ed88ab3797..205dc722c0 100644 --- a/src/mesa/drivers/dri/i965/bufmgr_fake.c +++ b/src/mesa/drivers/dri/i965/bufmgr_fake.c @@ -338,7 +338,6 @@ static int evict_mru( struct intel_context *intel, GLuint *pool ) } - static int check_fenced( struct intel_context *intel ) { struct bufmgr *bm = intel->bm; @@ -1328,11 +1327,19 @@ unsigned bmSetFence( struct intel_context *intel ) return intel->bm->last_fence; } +unsigned bmSetFenceLock( struct intel_context *intel ) +{ + LOCK(intel->bm); + bmSetFence(intel); + UNLOCK(intel->bm); +} unsigned bmLockAndFence( struct intel_context *intel ) { if (intel->bm->need_fence) { LOCK_HARDWARE(intel); + LOCK(intel->bm); bmSetFence(intel); + UNLOCK(intel->bm); UNLOCK_HARDWARE(intel); } @@ -1350,7 +1357,12 @@ void bmFinishFence( struct intel_context *intel, unsigned fence ) check_fenced(intel); } - +void bmFinishFenceLock( struct intel_context *intel, unsigned fence ) +{ + LOCK(intel->bm); + bmFinishFence(intel, fence); + UNLOCK(intel->bm); +} /* Specifically ignore texture memory sharing. diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index c8c5bf93c9..173d1d5b6c 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.c +++ b/src/mesa/drivers/dri/i965/intel_blit.c @@ -66,7 +66,7 @@ void intelCopyBuffer( const __DRIdrawablePrivate *dPriv, intelFlush( &intel->ctx ); - bmFinishFence(intel, intel->last_swap_fence); + bmFinishFenceLock(intel, intel->last_swap_fence); /* The LOCK_HARDWARE is required for the cliprects. Buffer offsets * should work regardless. @@ -155,7 +155,7 @@ void intelCopyBuffer( const __DRIdrawablePrivate *dPriv, intel_batchbuffer_flush( intel->batch ); intel->second_last_swap_fence = intel->last_swap_fence; - intel->last_swap_fence = bmSetFence( intel ); + intel->last_swap_fence = bmSetFenceLock( intel ); UNLOCK_HARDWARE( intel ); if (!rect) -- cgit v1.2.3 From 9311c29558156859c6b26389c1b20a25d361d39d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 6 Jan 2007 17:13:29 -0800 Subject: Initialize GL_ARB_occlusion_query only if DRM support is present. DRM versions before 1.8 do not include the necessary ioctls to support GL_ARB_occlusion_query, don't enable it on these versions. --- src/mesa/drivers/dri/i965/intel_context.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 9acafe5310..459ed109ed 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -33,6 +33,7 @@ #include "extensions.h" #include "framebuffer.h" #include "imports.h" +#include "points.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" @@ -158,7 +159,6 @@ const struct dri_extension card_extensions[] = { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, { "GL_ARB_window_pos", GL_ARB_window_pos_functions }, - { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, { "GL_EXT_blend_color", GL_EXT_blend_color_functions }, { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions }, { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions }, @@ -184,7 +184,8 @@ const struct dri_extension card_extensions[] = { NULL, NULL } }; - +static const struct dri_extension arb_oc_extension = + { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}; static const struct dri_debug_control debug_control[] = { @@ -412,6 +413,9 @@ GLboolean intelInitContext( struct intel_context *intel, driInitExtensions( ctx, card_extensions, GL_TRUE ); + if (intel->intelScreen->drmMinor >= 8) + driInitSingleExtension (ctx, &arb_oc_extension); + INTEL_DEBUG = driParseDebugString( getenv( "INTEL_DEBUG" ), debug_control ); -- cgit v1.2.3 From 62db3cc34982d2fec9165633813ef6e656f7d497 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 6 Jan 2007 17:13:45 -0800 Subject: Various warning fixes for i965 driver. vertex/fragment programs provided as const. bmSetFenceLock should return bmSetFence value. --- src/mesa/drivers/dri/i965/brw_context.h | 4 ++-- src/mesa/drivers/dri/i965/brw_metaops.c | 3 +-- src/mesa/drivers/dri/i965/brw_vs_tnl.c | 4 ++-- src/mesa/drivers/dri/i965/brw_wm_state.c | 2 +- src/mesa/drivers/dri/i965/bufmgr_fake.c | 4 +++- 5 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index cac4d86d3a..9ee81b8725 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -505,8 +505,8 @@ struct brw_context /* Active vertex program: */ - struct gl_vertex_program *vertex_program; - struct gl_fragment_program *fragment_program; + const struct gl_vertex_program *vertex_program; + const struct gl_fragment_program *fragment_program; /* For populating the gtt: diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c index 2deec5eae3..acd1d58191 100644 --- a/src/mesa/drivers/dri/i965/brw_metaops.c +++ b/src/mesa/drivers/dri/i965/brw_metaops.c @@ -492,8 +492,7 @@ static void meta_draw_quad(struct intel_context *intel, } -static void install_meta_state( struct intel_context *intel, - GLenum state ) +static void install_meta_state( struct intel_context *intel ) { GLcontext *ctx = &intel->ctx; struct brw_context *brw = brw_context(ctx); diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index b7893ca3e5..82c1958887 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -114,7 +114,7 @@ static GLuint translate_texgen( GLboolean enabled, GLenum mode ) static void make_state_key( GLcontext *ctx, struct state_key *key ) { struct brw_context *brw = brw_context(ctx); - struct gl_fragment_program *fp = brw->fragment_program; + const struct gl_fragment_program *fp = brw->fragment_program; GLuint i; /* This now relies on texenvprogram.c being active: @@ -1628,7 +1628,7 @@ const struct brw_tracked_state brw_tnl_vertprog = { static void update_active_vertprog( struct brw_context *brw ) { - struct gl_vertex_program *prev = brw->vertex_program; + const struct gl_vertex_program *prev = brw->vertex_program; /* NEW_PROGRAM */ if (brw->attribs.VertexProgram->_Enabled) { diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c index e41042d6d2..ff5cb31bdd 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_state.c @@ -122,7 +122,7 @@ static void upload_wm_unit(struct brw_context *brw ) /* BRW_NEW_FRAGMENT_PROGRAM */ { - struct gl_fragment_program *fp = brw->fragment_program; + const struct gl_fragment_program *fp = brw->fragment_program; if (fp->Base.InputsRead & (1<bm); - bmSetFence(intel); + last = bmSetFence(intel); UNLOCK(intel->bm); + return last; } unsigned bmLockAndFence( struct intel_context *intel ) { -- cgit v1.2.3 From 026939b00897665f97669bafb1d486a71f90f935 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 8 Jan 2007 11:53:45 +1100 Subject: nouveau: allow the use of multiple subchannels/objects by default. --- src/mesa/drivers/dri/nouveau/nouveau_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_object.h b/src/mesa/drivers/dri/nouveau/nouveau_object.h index d5fcc6df8d..b1ff5a5d0d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_object.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_object.h @@ -3,7 +3,7 @@ #include "nouveau_context.h" -//#define ALLOW_MULTI_SUBCHANNEL +#define ALLOW_MULTI_SUBCHANNEL void nouveauObjectInit(nouveauContextPtr nmesa); -- cgit v1.2.3 From 92fb742065f4de941e444916c5a146db87c71701 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 21 Dec 2006 17:30:00 +0100 Subject: intel_finalize_mipmap_tree: Only flush batchbuffer when necessary. --- src/mesa/drivers/dri/i915tex/intel_tex_validate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c index e73c9c2f21..79d587a174 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c @@ -110,6 +110,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) GLuint nr_faces = 0; struct intel_texture_image *firstImage; + GLboolean need_flush = GL_FALSE; + /* We know/require this is true by now: */ assert(intelObj->base.Complete); @@ -201,11 +203,13 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) */ if (intelObj->mt != intelImage->mt) { copy_image_data_to_tree(intel, intelObj, intelImage); + need_flush = GL_TRUE; } } } - intel_batchbuffer_flush(intel->batch); + if (need_flush) + intel_batchbuffer_flush(intel->batch); return GL_TRUE; } -- cgit v1.2.3 From dfabf9660751f0d7cfc7cad6539af4d7ccd9147e Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 21 Dec 2006 18:06:58 +0100 Subject: i915tex: Remove unused tex_program field. --- src/mesa/drivers/dri/i915tex/i915_context.h | 1 - src/mesa/drivers/dri/i915tex/i915_state.c | 1 - src/mesa/drivers/dri/i915tex/i915_tex.c | 35 ----------------------------- 3 files changed, 37 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915tex/i915_context.h b/src/mesa/drivers/dri/i915tex/i915_context.h index 5ae76fcd18..d2713e88f9 100644 --- a/src/mesa/drivers/dri/i915tex/i915_context.h +++ b/src/mesa/drivers/dri/i915tex/i915_context.h @@ -243,7 +243,6 @@ struct i915_context GLuint lodbias_ss2[MAX_TEXTURE_UNITS]; - struct i915_fragment_program tex_program; struct i915_fragment_program *current_program; struct i915_hw_state meta, initial, state, *current; diff --git a/src/mesa/drivers/dri/i915tex/i915_state.c b/src/mesa/drivers/dri/i915tex/i915_state.c index 2f5a30787e..7c742a7bd9 100644 --- a/src/mesa/drivers/dri/i915tex/i915_state.c +++ b/src/mesa/drivers/dri/i915tex/i915_state.c @@ -520,7 +520,6 @@ update_specular(GLcontext * ctx) /* A hack to trigger the rebuild of the fragment program. */ intel_context(ctx)->NewGLState |= _NEW_TEXTURE; - I915_CONTEXT(ctx)->tex_program.translated = 0; } static void diff --git a/src/mesa/drivers/dri/i915tex/i915_tex.c b/src/mesa/drivers/dri/i915tex/i915_tex.c index a53abe9a92..59e148ca04 100644 --- a/src/mesa/drivers/dri/i915tex/i915_tex.c +++ b/src/mesa/drivers/dri/i915tex/i915_tex.c @@ -52,27 +52,6 @@ i915TexEnv(GLcontext * ctx, GLenum target, struct i915_context *i915 = I915_CONTEXT(ctx); switch (pname) { - case GL_TEXTURE_ENV_COLOR: /* Should be a tracked param */ - case GL_TEXTURE_ENV_MODE: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_RGB_SCALE: - case GL_ALPHA_SCALE: - i915->tex_program.translated = 0; - break; - case GL_TEXTURE_LOD_BIAS:{ GLuint unit = ctx->Texture.CurrentUnit; GLint b = (int) ((*param) * 16.0); @@ -92,22 +71,8 @@ i915TexEnv(GLcontext * ctx, GLenum target, } -static void -i915BindTexture(GLcontext * ctx, GLenum target, - struct gl_texture_object *texobj) -{ - /* Need this if image format changes between bound textures. - * Could try and shortcircuit by checking for differences in - * state between incoming and outgoing textures: - */ - I915_CONTEXT(ctx)->tex_program.translated = 0; -} - - - void i915InitTextureFuncs(struct dd_function_table *functions) { - functions->BindTexture = i915BindTexture; functions->TexEnv = i915TexEnv; } -- cgit v1.2.3 From 96c5db5f7ae2cb9d98f534285c34217ce9c2abf3 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Tue, 9 Jan 2007 14:42:22 +0100 Subject: put back missing Driver.PolygonMode call (bug 9578) --- src/mesa/main/polygon.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index 814f7ec5fa..fd02e5a652 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/polygon.c @@ -166,6 +166,9 @@ _mesa_PolygonMode( GLenum face, GLenum mode ) _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" ); return; } + + if (ctx->Driver.PolygonMode) + ctx->Driver.PolygonMode(ctx, face, mode); } #if _HAVE_FULL_GL -- cgit v1.2.3 From b55f1ec9af30ddc5fa44818f85518fffe4580dc6 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 11 Jan 2007 12:53:06 +0100 Subject: Fix typo from commit 1d312ae0137eb39bf74fac91eb97ed25c289a4ca . --- src/mesa/drivers/dri/r300/r300_fragprog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 179bc58e9e..6e85f0b5dd 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -463,7 +463,7 @@ static int swz_native(struct r300_fragment_program *rp, GLuint arbneg) { /* Native swizzle, handle negation */ - src = (src & ~REG_NEGS_SHIFT) | + src = (src & ~REG_NEGS_MASK) | (((arbneg >> 3) & 1) << REG_NEGS_SHIFT); if ((arbneg & 0x7) == 0x0) { -- cgit v1.2.3 From ca75853f9d9e7d131f25daeaa7c646894ab4807e Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sat, 13 Jan 2007 13:22:03 +0100 Subject: nv10 has alpha color mask --- src/mesa/drivers/dri/nouveau/nv10_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index c028be2867..162a5e2718 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -106,13 +106,12 @@ static void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) OUT_RING_CACHEf(equation[3]); } -/* Seems does not support alpha in color mask */ static void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_MASK, 1); - OUT_RING_CACHE(/*((amask && 0x01) << 24) |*/ ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); + OUT_RING_CACHE(((amask && 0x01) << 24) | ((rmask && 0x01) << 16) | ((gmask && 0x01)<< 8) | ((bmask && 0x01) << 0)); } static void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) -- cgit v1.2.3 From 308ef2dc3208e9c274763726b541f28e2169324b Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sat, 13 Jan 2007 13:56:18 +0100 Subject: nouveau: Add clear color for nv10 --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 134e2a417e..c7bf387210 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -119,7 +119,10 @@ typedef struct nouveau_context { struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; GLuint vertex_attr_count; - /* Depth/stencil clear state */ + /* Color buffer clear value */ + uint32_t clear_color_value; + + /* Depth/stencil clear value */ uint32_t clear_value; /* Light state */ -- cgit v1.2.3 From fb5f359b93073d85f4cae05cd89ff1012fafeda6 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sat, 13 Jan 2007 14:14:19 +0100 Subject: nouveau: update nv10 state --- src/mesa/drivers/dri/nouveau/nv10_state.c | 116 +++++++++++++++--------------- 1 file changed, 56 insertions(+), 60 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 162a5e2718..d65eb94e42 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -61,40 +61,42 @@ static void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) static void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); - OUT_RING_CACHE((modeA<<16) | modeRGB); + /* Not for NV10 */ } static void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); - OUT_RING_CACHE((sfactorA<<16) | sfactorRGB); - OUT_RING_CACHE((dfactorA<<16) | dfactorRGB); + /* Not for NV10 */ +} + +static void nv10Clear(GLcontext *ctx, GLbitfield mask) +{ + /* TODO */ } -/* static void nv10ClearColor(GLcontext *ctx, const GLfloat color[4]) { + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte c[4]; + UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,color); + nmesa->clear_color_value = PACK_COLOR_8888(c[3],c[0],c[1],c[2]); } static void nv10ClearDepth(GLcontext *ctx, GLclampd d) { + /* FIXME: check if 16 or 24/32 bits depth buffer */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0x000000FF)|(((uint32_t)(d*0xFFFFFF))<<8)); } -*/ -/* we're don't support indexed buffers - void (*ClearIndex)(GLcontext *ctx, GLuint index) - */ - -/* static void nv10ClearStencil(GLcontext *ctx, GLint s) { + /* FIXME: not valid for 16 bits depth buffer (0 stencil bits) */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + nmesa->clear_value=((nmesa->clear_value&0xFFFFFF00)|(s&0x000000FF)); } -*/ static void nv10ClipPlane(GLcontext *ctx, GLenum plane, const GLfloat *equation) { @@ -116,7 +118,7 @@ static void nv10ColorMask(GLcontext *ctx, GLboolean rmask, GLboolean gmask, static void nv10ColorMaterial(GLcontext *ctx, GLenum face, GLenum mode) { - // TODO I need love + /* TODO I need love */ } static void nv10CullFace(GLcontext *ctx, GLenum mode) @@ -320,7 +322,7 @@ static void nv10Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) static void nv10Hint(GLcontext *ctx, GLenum target, GLenum mode) { - // TODO I need love (fog and line_smooth hints) + /* TODO I need love (fog and line_smooth hints) */ } // void (*IndexMask)(GLcontext *ctx, GLuint mask); @@ -448,6 +450,7 @@ static void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params) static void nv10LineStipple(GLcontext *ctx, GLint factor, GLushort pattern ) { + /* Not for NV10 */ } static void nv10LineWidth(GLcontext *ctx, GLfloat width) @@ -471,7 +474,6 @@ static void nv10PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *pa } -/** Specify the diameter of rasterized points */ static void nv10PointSize(GLcontext *ctx, GLfloat size) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -479,7 +481,6 @@ static void nv10PointSize(GLcontext *ctx, GLfloat size) OUT_RING_CACHE(((int) (size * 8.0)) & -4); } -/** Select a polygon rasterization mode */ static void nv10PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -495,9 +496,20 @@ static void nv10PolygonMode(GLcontext *ctx, GLenum face, GLenum mode) } /** Set the scale and units used to calculate depth values */ -void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); +static void nv10PolygonOffset(GLcontext *ctx, GLfloat factor, GLfloat units) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR, 2); + OUT_RING_CACHEf(factor); + OUT_RING_CACHEf(units); +} + /** Set the polygon stippling pattern */ -void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); +static void nv10PolygonStipple(GLcontext *ctx, const GLubyte *mask ) +{ + /* Not for NV10 */ +} + /* Specifies the current buffer for reading */ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); /** Set rasterization mode */ @@ -517,37 +529,21 @@ static void nv10ShadeModel(GLcontext *ctx, GLenum mode) OUT_RING_CACHE(mode); } -/** OpenGL 2.0 two-sided StencilFunc */ static void nv10StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref, GLuint mask) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); - OUT_RING_CACHE(func); - OUT_RING_CACHE(ref); - OUT_RING_CACHE(mask); + /* Not for NV10 */ } -/** OpenGL 2.0 two-sided StencilMask */ static void nv10StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); - OUT_RING_CACHE(mask); + /* Not for NV10 */ } -/** OpenGL 2.0 two-sided StencilOp */ static void nv10StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1); - OUT_RING_CACHE(fail); - OUT_RING_CACHE(zfail); - OUT_RING_CACHE(zpass); + /* Not for NV10 */ } /** Control the generation of texture coordinates */ @@ -560,7 +556,14 @@ void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, void (*TexParameter)(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params); -void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); + +static void nv10TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) +{ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16); + /*XXX: This SHOULD work.*/ + OUT_RING_CACHEp(mat->m, 16); +} /** Set the viewport */ static void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) @@ -597,13 +600,12 @@ void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) func->AlphaFunc = nv10AlphaFunc; func->BlendColor = nv10BlendColor; - func->BlendEquationSeparate = nv10BlendEquationSeparate; - func->BlendFuncSeparate = nv10BlendFuncSeparate; -#if 0 + func->BlendEquationSeparate = nv10BlendEquationSeparate; /* Not for NV10 */ + func->BlendFuncSeparate = nv10BlendFuncSeparate; /* Not for NV10 */ + func->Clear = nv10Clear; func->ClearColor = nv10ClearColor; func->ClearDepth = nv10ClearDepth; func->ClearStencil = nv10ClearStencil; -#endif func->ClipPlane = nv10ClipPlane; func->ColorMask = nv10ColorMask; func->ColorMaterial = nv10ColorMaterial; @@ -617,32 +619,26 @@ void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) func->Hint = nv10Hint; func->Lightfv = nv10Lightfv; /* func->LightModelfv = nv10LightModelfv; */ - func->LineStipple = nv10LineStipple; + func->LineStipple = nv10LineStipple; /* Not for NV10 */ func->LineWidth = nv10LineWidth; func->LogicOpcode = nv10LogicOpcode; func->PointParameterfv = nv10PointParameterfv; func->PointSize = nv10PointSize; func->PolygonMode = nv10PolygonMode; -#if 0 func->PolygonOffset = nv10PolygonOffset; - func->PolygonStipple = nv10PolygonStipple; - func->ReadBuffer = nv10ReadBuffer; - func->RenderMode = nv10RenderMode; -#endif + func->PolygonStipple = nv10PolygonStipple; /* Not for NV10 */ +/* func->ReadBuffer = nv10ReadBuffer;*/ +/* func->RenderMode = nv10RenderMode;*/ func->Scissor = nv10Scissor; func->ShadeModel = nv10ShadeModel; - func->StencilFuncSeparate = nv10StencilFuncSeparate; - func->StencilMaskSeparate = nv10StencilMaskSeparate; - func->StencilOpSeparate = nv10StencilOpSeparate; -#if 0 - func->TexGen = nv10TexGen; - func->TexParameter = nv10TexParameter; + func->StencilFuncSeparate = nv10StencilFuncSeparate; /* Not for NV10 */ + func->StencilMaskSeparate = nv10StencilMaskSeparate; /* Not for NV10 */ + func->StencilOpSeparate = nv10StencilOpSeparate; /* Not for NV10 */ +/* func->TexGen = nv10TexGen;*/ +/* func->TexParameter = nv10TexParameter;*/ func->TextureMatrix = nv10TextureMatrix; -#endif - func->Viewport = nv10Viewport; nmesa->hw_func.InitCard = nv10InitCard; nmesa->hw_func.BindBuffers = nv10BindBuffers; nmesa->hw_func.WindowMoved = nv10WindowMoved; } - -- cgit v1.2.3 From f1ad10b338996275a376809d98c420cda4d6d05a Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 12:45:15 +0100 Subject: nouveau: nv10 blending done, remove nv10Viewport --- src/mesa/drivers/dri/nouveau/nv10_state.c | 38 +++++++++++++++++++------------ 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index d65eb94e42..518ceb31f1 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -45,6 +45,14 @@ static void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) OUT_RING_CACHE(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ } +/* + Supported blend extensions on NV10 + EXT_blend_color + EXT_blend_minmax + EXT_blend_subtract + NV_blend_square +*/ + static void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -61,14 +69,26 @@ static void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) static void nv10BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB, GLenum modeA) { - /* Not for NV10 */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + assert( modeRGB == modeA ); + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION, 1); + OUT_RING_CACHE(modeRGB); } static void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA) { - /* Not for NV10 */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + assert( sfactorRGB == sfactorA ); + assert( dfactorRGB == dfactorA ); + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); + OUT_RING_CACHE(sfactorRGB); + OUT_RING_CACHE(dfactorRGB); /* NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST */ } static void nv10Clear(GLcontext *ctx, GLbitfield mask) @@ -565,16 +585,6 @@ static void nv10TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) OUT_RING_CACHEp(mat->m, 16); } -/** Set the viewport */ -static void nv10Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) -{ - /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */ - nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); - BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); - OUT_RING_CACHE((w << 16) | x); - OUT_RING_CACHE((h << 16) | y); -} - /* Initialise any card-specific non-GL related state */ static GLboolean nv10InitCard(nouveauContextPtr nmesa) { @@ -600,8 +610,8 @@ void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) func->AlphaFunc = nv10AlphaFunc; func->BlendColor = nv10BlendColor; - func->BlendEquationSeparate = nv10BlendEquationSeparate; /* Not for NV10 */ - func->BlendFuncSeparate = nv10BlendFuncSeparate; /* Not for NV10 */ + func->BlendEquationSeparate = nv10BlendEquationSeparate; + func->BlendFuncSeparate = nv10BlendFuncSeparate; func->Clear = nv10Clear; func->ClearColor = nv10ClearColor; func->ClearDepth = nv10ClearDepth; -- cgit v1.2.3 From 29484f24fb2c21772c6a3ddf33a77ec83d415fdc Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 12:51:30 +0100 Subject: nouveau: nv10: currently fails initcard and bindbuffers, till done --- src/mesa/drivers/dri/nouveau/nv10_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 518ceb31f1..17336a7b2a 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -588,7 +588,7 @@ static void nv10TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) /* Initialise any card-specific non-GL related state */ static GLboolean nv10InitCard(nouveauContextPtr nmesa) { - return GL_TRUE; + return GL_FALSE; } /* Update buffer offset/pitch/format */ @@ -596,7 +596,7 @@ static GLboolean nv10BindBuffers(nouveauContextPtr nmesa, int num_color, nouveau_renderbuffer **color, nouveau_renderbuffer *depth) { - return GL_TRUE; + return GL_FALSE; } /* Update anything that depends on the window position/size */ -- cgit v1.2.3 From faada2485a864298562b5e59b0703748c6f6f9d5 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 14:03:42 +0100 Subject: nouveau: nv10: stencil functions --- src/mesa/drivers/dri/nouveau/nv10_state.c | 45 +++++++++++++++++++------------ 1 file changed, 28 insertions(+), 17 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 17336a7b2a..a9cce932d8 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -41,18 +41,10 @@ static void nv10AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) CLAMPED_FLOAT_TO_UBYTE(ubRef, ref); BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2); - OUT_RING_CACHE(func); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC */ - OUT_RING_CACHE(ubRef); /* NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF */ + OUT_RING_CACHE(func); + OUT_RING_CACHE(ubRef); } -/* - Supported blend extensions on NV10 - EXT_blend_color - EXT_blend_minmax - EXT_blend_subtract - NV_blend_square -*/ - static void nv10BlendColor(GLcontext *ctx, const GLfloat color[4]) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -88,7 +80,7 @@ static void nv10BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, GLenum dfac BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2); OUT_RING_CACHE(sfactorRGB); - OUT_RING_CACHE(dfactorRGB); /* NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_DST */ + OUT_RING_CACHE(dfactorRGB); } static void nv10Clear(GLcontext *ctx, GLbitfield mask) @@ -549,21 +541,40 @@ static void nv10ShadeModel(GLcontext *ctx, GLenum mode) OUT_RING_CACHE(mode); } +/** OpenGL 2.0 two-sided StencilFunc */ static void nv10StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref, GLuint mask) { - /* Not for NV10 */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + /* NV10 do not have separate FRONT and BACK stencils */ + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3); + OUT_RING_CACHE(func); + OUT_RING_CACHE(ref); + OUT_RING_CACHE(mask); } +/** OpenGL 2.0 two-sided StencilMask */ static void nv10StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask) { - /* Not for NV10 */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + /* NV10 do not have separate FRONT and BACK stencils */ + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 1); + OUT_RING_CACHE(mask); } +/** OpenGL 2.0 two-sided StencilOp */ static void nv10StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { - /* Not for NV10 */ + nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + /* NV10 do not have separate FRONT and BACK stencils */ + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 3); + OUT_RING_CACHE(fail); + OUT_RING_CACHE(zfail); + OUT_RING_CACHE(zpass); } /** Control the generation of texture coordinates */ @@ -641,9 +652,9 @@ void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) /* func->RenderMode = nv10RenderMode;*/ func->Scissor = nv10Scissor; func->ShadeModel = nv10ShadeModel; - func->StencilFuncSeparate = nv10StencilFuncSeparate; /* Not for NV10 */ - func->StencilMaskSeparate = nv10StencilMaskSeparate; /* Not for NV10 */ - func->StencilOpSeparate = nv10StencilOpSeparate; /* Not for NV10 */ + func->StencilFuncSeparate = nv10StencilFuncSeparate; + func->StencilMaskSeparate = nv10StencilMaskSeparate; + func->StencilOpSeparate = nv10StencilOpSeparate; /* func->TexGen = nv10TexGen;*/ /* func->TexParameter = nv10TexParameter;*/ func->TextureMatrix = nv10TextureMatrix; -- cgit v1.2.3 From 86f10c7144d08bc0603a796a9b8aa53f1a37a7e0 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 14:09:04 +0100 Subject: nouveau: import color material r,g,b,a --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 200e770903..74f55c649a 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -383,7 +383,10 @@ Object NV11_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c # define NV10_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 # define NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 -# define NV10_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL_R 0x000003a8 +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL_G 0x000003ac +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL_B 0x000003b0 +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL_A 0x000003b4 # define NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL 0x000003b8 /* Parameters: color_control */ # define NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ # define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE( d) (0x000003c0 + d * 0x0004) @@ -729,8 +732,10 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_CULL_FACE 0x0000039c # define NV20_TCL_PRIMITIVE_3D_FRONT_FACE 0x000003a0 # define NV20_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x000003a4 -# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT 0x000003a8 -# define NV20_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_R 0x000003a8 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_G 0x000003ac +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_B 0x000003b0 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_A 0x000003b4 # define NV20_TCL_PRIMITIVE_3D_SEPARATE_SPECULAR_ENABLE 0x000003b8 # define NV20_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x000003bc /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ # define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x000003c0 + d * 0x0004) @@ -930,8 +935,10 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000017a0 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000017a4 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000017a8 -# define NV20_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_BACK 0x000017ac -# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK 0x000017b0 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_A 0x000017ac +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_R 0x000017b0 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_G 0x000017b4 +# define NV20_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_B 0x000017b8 # define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x000017bc # define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x000017c0 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_TWO_SIDE_ENABLE 0x000017c4 @@ -1004,7 +1011,10 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x0000037c # define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 # define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000398 -# define NV30_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_FRONT 0x000003b4 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_R 0x000003a0 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_G 0x000003a4 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_B 0x000003a8 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_A 0x000003b4 # define NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH 0x000003b8 # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x00000400 + d * 0x0004) # define NV30_TCL_PRIMITIVE_3D_MODELVIEW_MATRIX( d) (0x00000480 + d * 0x0004) @@ -1196,7 +1206,10 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000017a0 # define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000017a4 # define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000017a8 -# define NV30_TCL_PRIMITIVE_3D_MATERIAL_DIFFUSE_ALPHA_BACK 0x000017c0 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_R 0x000017b0 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_G 0x000017b4 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_B 0x000017b8 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_A 0x000017c0 # define NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM 0x000008e4 # define NV30_TCL_PRIMITIVE_3D_TX_ADDRESS_UNIT(d) (0x00001a00 + d * 0x0020) # define NV30_TCL_PRIMITIVE_3D_TX_FORMAT_UNIT(d) (0x00001a04 + d * 0x0020) /* Parameters: mipmap type format ncomp cubic */ -- cgit v1.2.3 From e7112be7321c58e6039fde28f47ffe3dce5cc205 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 14:11:10 +0100 Subject: nouveau: remove already defined NV15_TCL and NV17_TCL --- src/mesa/drivers/dri/nouveau/nouveau_card.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card.c b/src/mesa/drivers/dri/nouveau/nouveau_card.c index a0628389bf..ae4f4c7ae5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_card.c @@ -2,9 +2,6 @@ #include "nouveau_card.h" #include "nouveau_reg.h" #include "nouveau_drm.h" -// FIXME hack for now -#define NV15_TCL_PRIMITIVE_3D 0x0096 -#define NV17_TCL_PRIMITIVE_3D 0x0099 #include "nouveau_card_list.h" -- cgit v1.2.3 From 6dd967e74ff4cb03220d5785bd583203464d299d Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sun, 14 Jan 2007 14:49:36 +0100 Subject: mesa: Update _Current ptr along Current when a new vertex program is bind. On new vertex program bind only the Current ptr where updated to point to the new program; this could lead to _Current pointing to and out of date or even a no more existing program which in turn could lead to a segfault in some driver. To avoid this _Current ptr is updated along Current if _Current where previously pointing to the same program. --- src/mesa/shader/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index ddfad47b89..6db62f591c 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -1947,6 +1947,8 @@ _mesa_BindProgram(GLenum target, GLuint id) /* bind newProg */ if (target == GL_VERTEX_PROGRAM_ARB) { /* == GL_VERTEX_PROGRAM_NV */ + if (ctx->VertexProgram._Current == ctx->VertexProgram.Current) + ctx->VertexProgram._Current = (struct gl_vertex_program *) newProg; ctx->VertexProgram.Current = (struct gl_vertex_program *) newProg; } else if (target == GL_FRAGMENT_PROGRAM_NV || @@ -1969,7 +1971,7 @@ _mesa_BindProgram(GLenum target, GLuint id) * \note Not compiled into display lists. * \note Called by both glDeleteProgramsNV and glDeleteProgramsARB. */ -void GLAPIENTRY +void GLAPIENTRY _mesa_DeletePrograms(GLsizei n, const GLuint *ids) { GLint i; -- cgit v1.2.3 From 9a4e49aef2abb277544138640c2b71169badaa42 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Sun, 14 Jan 2007 19:31:30 +0100 Subject: r300: Fix vertex program position invariant bug, force position reading. When we have a position invariant program we need to force routing the position otherwise you may handle transform quite random data which might be funny but unlikely what you want :). --- src/mesa/drivers/dri/r300/r300_vertexprog.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index 2492a4a3a0..c08c98767e 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -1072,6 +1072,8 @@ static void insert_wpos(struct r300_vertex_program *vp, vpi = &prog->Instructions[prog->NumInstructions-1]; assert(vpi->Opcode == OPCODE_END); + /* we need position, don't we ? :) */ + prog->InputsRead |= (1 << VERT_ATTRIB_POS); } static void pos_as_texcoord(struct r300_vertex_program *vp, @@ -1101,8 +1103,9 @@ static struct r300_vertex_program *build_program(struct r300_vertex_program_key vp->wpos_idx = wpos_idx; - if(mesa_vp->IsPositionInvariant) + if(mesa_vp->IsPositionInvariant) { position_invariant(&mesa_vp->Base); + } if(wpos_idx > -1) pos_as_texcoord(vp, &mesa_vp->Base); @@ -1158,6 +1161,10 @@ void r300_select_vertex_shader(r300ContextPtr r300) wanted_key.OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i); wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead; + if(vpc->mesa_program.IsPositionInvariant) { + /* we wan't position don't we ? */ + wanted_key.InputsRead |= (1 << VERT_ATTRIB_POS); + } for (vp = vpc->progs; vp; vp = vp->next) if (_mesa_memcmp(&vp->key, &wanted_key, sizeof(wanted_key)) == 0) { @@ -1170,6 +1177,5 @@ void r300_select_vertex_shader(r300ContextPtr r300) vp = build_program(&wanted_key, &vpc->mesa_program, wpos_idx); vp->next = vpc->progs; vpc->progs = vp; - r300->selected_vp = vp; } -- cgit v1.2.3 From 8aabd636f5dd303774a07f8705068d812f7feef8 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 19:55:45 +0100 Subject: nouveau: nv10: added missing functions --- src/mesa/drivers/dri/nouveau/nv10_state.c | 91 +++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index a9cce932d8..8785879d9d 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -596,10 +596,67 @@ static void nv10TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat) OUT_RING_CACHEp(mat->m, 16); } +/* Update anything that depends on the window position/size */ +static void nv10WindowMoved(nouveauContextPtr nmesa) +{ + GLcontext *ctx = nmesa->glCtx; + GLfloat *v = nmesa->viewport.m; + GLuint w = ctx->Viewport.Width; + GLuint h = ctx->Viewport.Height; + GLuint x = ctx->Viewport.X + nmesa->drawX; + GLuint y = ctx->Viewport.Y + nmesa->drawY; + int i; + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2); + OUT_RING_CACHE((w << 16) | x); + OUT_RING_CACHE((h << 16) | y); + + /* something to do with clears, possibly doesn't belong here */ + BEGIN_RING_CACHE(NvSub3D, + NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 2); + OUT_RING_CACHE(((w+x) << 16) | x | 0x800); + OUT_RING_CACHE(((h+y) << 16) | y | 0x800); + for (i=1; i<7; i++) { + BEGIN_RING_CACHE(NvSub3D, + NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 2); + OUT_RING_CACHE(0); + OUT_RING_CACHE(0); + } + + /* viewport transform */ + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X, 4); + OUT_RING_CACHEf ((GLfloat) x); + OUT_RING_CACHEf ((GLfloat) (y+h)); + OUT_RING_CACHEf (0.0); + OUT_RING_CACHEf (0.0); + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X, 4); + OUT_RING_CACHEf ((((GLfloat) w) * 0.5) - 2048.0); + OUT_RING_CACHEf ((((GLfloat) h) * 0.5) - 2048.0); + OUT_RING_CACHEf (16777215.0 * 0.5); + OUT_RING_CACHEf (0.0); +} + /* Initialise any card-specific non-GL related state */ static GLboolean nv10InitCard(nouveauContextPtr nmesa) { - return GL_FALSE; + nouveauObjectOnSubchannel(nmesa, NvSub3D, Nv3D); + + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY0, 2); + OUT_RING(NvDmaFB); /* 184 dma_in_memory0 */ + OUT_RING(NvDmaFB); /* 188 dma_in_memory1 */ + BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY2, 2); + OUT_RING(NvDmaFB); /* 194 dma_in_memory2 */ + OUT_RING(NvDmaFB); /* 198 dma_in_memory3 */ + + BEGIN_RING_SIZE(NvSub3D, 0x02b4, 1); + OUT_RING(0); + BEGIN_RING_SIZE(NvSub3D, 0x0290, 1); + OUT_RING(0x00100001); + BEGIN_RING_SIZE(NvSub3D, 0x03f4, 1); + OUT_RING(0); + + return GL_FALSE; } /* Update buffer offset/pitch/format */ @@ -607,12 +664,34 @@ static GLboolean nv10BindBuffers(nouveauContextPtr nmesa, int num_color, nouveau_renderbuffer **color, nouveau_renderbuffer *depth) { - return GL_FALSE; -} + GLuint x, y, w, h; + GLuint pitch, format; -/* Update anything that depends on the window position/size */ -static void nv10WindowMoved(nouveauContextPtr nmesa) -{ + w = color[0]->mesa.Width; + h = color[0]->mesa.Height; + x = nmesa->drawX; + y = nmesa->drawY; + + if (num_color != 1) + return GL_FALSE; + + BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 6); + OUT_RING_CACHE((w << 16) | x); + OUT_RING_CACHE((h << 16) | y); + pitch = color[0]->pitch; + if (depth) { + pitch |= (depth->pitch << 16); + } + format = 0x108; + if (color[0]->mesa._ActualFormat != GL_RGBA8) { + /* FIXME: set 16 bits format */ + } + OUT_RING(format); + OUT_RING(pitch); + OUT_RING(color[0]->offset); + OUT_RING(depth ? depth->offset : color[0]->offset); + + return GL_TRUE; } void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) -- cgit v1.2.3 From 81bd826de8897f3784ad301023bde6e7eb77b5b2 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 14 Jan 2007 20:14:58 +0100 Subject: nouveau: nv10: 16 bits color buffer format --- src/mesa/drivers/dri/nouveau/nv10_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 8785879d9d..dbd8bf306e 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -684,7 +684,7 @@ static GLboolean nv10BindBuffers(nouveauContextPtr nmesa, int num_color, } format = 0x108; if (color[0]->mesa._ActualFormat != GL_RGBA8) { - /* FIXME: set 16 bits format */ + format = 0x103; /* R5G6B5 color buffer */ } OUT_RING(format); OUT_RING(pitch); -- cgit v1.2.3 From d57ce408b34b604f9b85114eedc88b5463df4218 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sat, 13 Jan 2007 23:56:55 +0100 Subject: nouveau: Cleanup the nv10 swtcl module. --- src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 58 ------------------------------- 1 file changed, 58 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 37d9f001d1..12b277de45 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -56,9 +56,6 @@ static void nv10ResetLineStipple( GLcontext *ctx ); -/* the size above which we fire the ring. this is a performance-tunable */ -#define NOUVEAU_FIRE_SIZE (2048/4) - static inline void nv10StartPrimitive(struct nouveau_context* nmesa,uint32_t primitive,uint32_t size) { if (nmesa->screen->card->type==NV_10) @@ -99,52 +96,6 @@ static inline void nv10ExtendPrimitive(struct nouveau_context* nmesa, int size) } } -static inline void nv10_draw_quad(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1, - nouveauVertexPtr v2, - nouveauVertexPtr v3) -{ - GLuint vertsize = nmesa->vertex_size; - nv10ExtendPrimitive(nmesa, 4 * 4 * vertsize); - - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); - OUT_RINGp(v2,vertsize); - OUT_RINGp(v3,vertsize); -} - -static inline void nv10_draw_triangle(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1, - nouveauVertexPtr v2) -{ - GLuint vertsize = nmesa->vertex_size; - nv10ExtendPrimitive(nmesa, 3 * 4 * vertsize); - - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); - OUT_RINGp(v2,vertsize); -} - -static inline void nv10_draw_line(nouveauContextPtr nmesa, - nouveauVertexPtr v0, - nouveauVertexPtr v1) -{ - GLuint vertsize = nmesa->vertex_size; - nv10ExtendPrimitive(nmesa, 2 * 4 * vertsize); - OUT_RINGp(v0,vertsize); - OUT_RINGp(v1,vertsize); -} - -static inline void nv10_draw_point(nouveauContextPtr nmesa, - nouveauVertexPtr v0) -{ - GLuint vertsize = nmesa->vertex_size; - nv10ExtendPrimitive(nmesa, 1 * 4 * vertsize); - OUT_RINGp(v0,vertsize); -} - /**********************************************************************/ /* Render unclipped begin/end objects */ /**********************************************************************/ @@ -343,10 +294,6 @@ static void nv10ChooseRenderState(GLcontext *ctx) TNLcontext *tnl = TNL_CONTEXT(ctx); struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); - nmesa->draw_point = nv10_draw_point; - nmesa->draw_line = nv10_draw_line; - nmesa->draw_tri = nv10_draw_triangle; - tnl->Driver.Render.PrimTabVerts = nv10_render_tab_verts; tnl->Driver.Render.PrimTabElts = nv10_render_tab_elts; tnl->Driver.Render.ClippedLine = NULL; @@ -538,11 +485,6 @@ static void nv10RenderStart(GLcontext *ctx) nmesa->new_render_state |= nmesa->new_state; } - if (nmesa->Fallback) { - tnl->Driver.Render.Start(ctx); - return; - } - if (nmesa->new_render_state) { nv10ChooseVertexState(ctx); nv10ChooseRenderState(ctx); -- cgit v1.2.3 From 8d7e5651fba9fd62e1055c05d1814c7d2de7f43c Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 14 Jan 2007 20:37:57 +0100 Subject: nouveau: add the nv04 swtcl module (it's untested for now). --- src/mesa/drivers/dri/nouveau/Makefile | 1 + src/mesa/drivers/dri/nouveau/nouveau_swtcl.c | 4 +- src/mesa/drivers/dri/nouveau/nv04_swtcl.c | 570 +++++++++++++++++++++++++++ src/mesa/drivers/dri/nouveau/nv04_swtcl.h | 12 + 4 files changed, 585 insertions(+), 2 deletions(-) create mode 100644 src/mesa/drivers/dri/nouveau/nv04_swtcl.c create mode 100644 src/mesa/drivers/dri/nouveau/nv04_swtcl.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index d31b42a568..9eb40fb9c1 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -26,6 +26,7 @@ DRIVER_SOURCES = \ nouveau_tex.c \ nouveau_swtcl.c \ nouveau_sync.c \ + nv04_swtcl.c \ nv10_swtcl.c \ nv10_state.c \ nv20_state.c \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c index 746b0fac8c..f5c92a1b4e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_swtcl.c @@ -82,7 +82,7 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode) nmesa->Fallback |= bit; if (oldfallback == 0) { if (nmesa->screen->card->typescreen->card->type +#include + +#include "glheader.h" +#include "context.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" +#include "enums.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "nouveau_swtcl.h" +#include "nv04_swtcl.h" +#include "nouveau_context.h" +#include "nouveau_span.h" +#include "nouveau_reg.h" +#include "nouveau_tex.h" +#include "nouveau_fifo.h" +#include "nouveau_msg.h" +#include "nouveau_object.h" + +static void nv04RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); +static void nv04RenderPrimitive( GLcontext *ctx, GLenum prim ); +static void nv04ResetLineStipple( GLcontext *ctx ); + + +static inline void nv04_2triangles(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2,nouveauVertex* v3,nouveauVertex* v4,nouveauVertex* v5) +{ + BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0xA),49); + OUT_RINGp(v0,8); + OUT_RINGp(v1,8); + OUT_RINGp(v2,8); + OUT_RINGp(v3,8); + OUT_RINGp(v4,8); + OUT_RINGp(v5,8); + OUT_RING(0xFEDCBA); +} + +static inline void nv04_1triangle(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2) +{ + BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0xD),25); + OUT_RINGp(v0,8); + OUT_RINGp(v1,8); + OUT_RINGp(v2,8); + OUT_RING(0xFED); +} + +static inline void nv04_1quad(struct nouveau_context *nmesa,nouveauVertex* v0,nouveauVertex* v1,nouveauVertex* v2,nouveauVertex* v3) +{ + BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0xC),33); + OUT_RINGp(v0,8); + OUT_RINGp(v1,8); + OUT_RINGp(v2,8); + OUT_RINGp(v3,8); + OUT_RING(0xFECEDC); +} + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +static void nv04_render_points_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + // erm +} + +static void nv04_render_lines_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + // umm +} + +static void nv04_render_line_strip_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + // yeah +} + +static void nv04_render_line_loop_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + // right +} + +static void nv04_render_triangles_verts(GLcontext *ctx,GLuint start,GLuint count,GLuint flags) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLubyte *vertptr = (GLubyte *)nmesa->verts; + GLuint vertsize = nmesa->vertex_size; + int i; + + for(i=start;iverts; + GLuint vertsize = nmesa->vertex_size; + uint32_t striptbl[]={0x321210,0x543432,0x765654,0x987876,0xBA9A98,0xDCBCBA,0xFEDEDC}; + int i,j; + + for(i=start;iverts; + GLuint vertsize = nmesa->vertex_size; + uint32_t fantbl[]={0x320210,0x540430,0x760650,0x980870,0xBA0A90,0xDC0CB0,0xFE0ED0}; + int i,j; + + BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0x0),8); + OUT_RINGp((nouveauVertex*)(vertptr+start*vertsize),8); + + for(i=start+1;iverts; + GLuint vertsize = nmesa->vertex_size; + int i; + + for(i=start;iverts; + GLuint vertsize = nmesa->vertex_size; + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; + int i; + + for(i=start;iverts; + GLuint vertsize = nmesa->vertex_size; + uint32_t striptbl[]={0x321210,0x543432,0x765654,0x987876,0xBA9A98,0xDCBCBA,0xFEDEDC}; + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; + int i,j; + + for(i=start;iverts; + GLuint vertsize = nmesa->vertex_size; + uint32_t fantbl[]={0x320210,0x540430,0x760650,0x980870,0xBA0A90,0xDC0CB0,0xFE0ED0}; + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; + int i,j; + + BEGIN_RING_SIZE(NvSub3D,NV04_DX5_TEXTURED_TRIANGLE_TLVERTEX_SX(0x0),8); + OUT_RINGp((nouveauVertex*)(vertptr+elt[start]*vertsize),8); + + for(i=start+1;iverts; + GLuint vertsize = nmesa->vertex_size; + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; + int i; + + for(i=start;ivertex_attrs[nmesa->vertex_attr_count].attrib = (ATTR); \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].format = (STYLE); \ + nmesa->vertex_attr_count++; \ +} while (0) + +#define EMIT_PAD( N ) \ +do { \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].attrib = 0; \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].format = EMIT_PAD; \ + nmesa->vertex_attrs[nmesa->vertex_attr_count].offset = (N); \ + nmesa->vertex_attr_count++; \ +} while (0) + + +static void nv04ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + + tnl->Driver.Render.PrimTabVerts = nv04_render_tab_verts; + tnl->Driver.Render.PrimTabElts = nv04_render_tab_elts; + tnl->Driver.Render.ClippedLine = NULL; + tnl->Driver.Render.ClippedPolygon = NULL; +} + + + +static inline void nv04OutputVertexFormat(struct nouveau_context* nmesa) +{ + GLcontext* ctx=nmesa->glCtx; + DECLARE_RENDERINPUTS(index); + + /* + * Tell t_vertex about the vertex format + */ + RENDERINPUTS_COPY(index, nmesa->render_inputs_bitset); + + // SX SY SZ INVW + // FIXME : we use W instead of INVW, but since W=1 it doesn't matter + if (RENDERINPUTS_TEST(index, _TNL_ATTRIB_POS)) + EMIT_ATTR(_TNL_ATTRIB_POS,EMIT_4F_VIEWPORT); + else + EMIT_PAD(4*sizeof(float)); + + // COLOR + if (RENDERINPUTS_TEST(index, _TNL_ATTRIB_COLOR0)) + EMIT_ATTR(_TNL_ATTRIB_COLOR0,EMIT_4UB_4F_ABGR); + else + EMIT_PAD(4); + + // SPECULAR + if (RENDERINPUTS_TEST(index, _TNL_ATTRIB_COLOR1)) + EMIT_ATTR(_TNL_ATTRIB_COLOR1,EMIT_4UB_4F_ABGR); + else + EMIT_PAD(4); + + // TEXTURE + if (RENDERINPUTS_TEST(index, _TNL_ATTRIB_TEX0)) + EMIT_ATTR(_TNL_ATTRIB_TEX0,EMIT_2F); + else + EMIT_PAD(2*sizeof(float)); + + nmesa->vertex_size=_tnl_install_attrs( ctx, + nmesa->vertex_attrs, + nmesa->vertex_attr_count, + ctx->Viewport._WindowMap.m, 0 ); +} + + +static void nv04ChooseVertexState( GLcontext *ctx ) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + DECLARE_RENDERINPUTS(index); + + RENDERINPUTS_COPY(index, tnl->render_inputs_bitset); + if (!RENDERINPUTS_EQUAL(index, nmesa->render_inputs_bitset)) + { + RENDERINPUTS_COPY(nmesa->render_inputs_bitset, index); + nv04OutputVertexFormat(nmesa); + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void nv04RenderStart(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + if (nmesa->new_state) { + nmesa->new_render_state |= nmesa->new_state; + } + + if (nmesa->new_render_state) { + nv04ChooseVertexState(ctx); + nv04ChooseRenderState(ctx); + nmesa->new_render_state = 0; + } +} + +static void nv04RenderFinish(GLcontext *ctx) +{ +} + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void nv04RasterPrimitive(GLcontext *ctx, + GLenum glprim, + GLuint hwprim) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + + assert (!nmesa->new_state); + + if (hwprim != nmesa->current_primitive) + { + nmesa->current_primitive=hwprim; + + } +} + +static const GLuint hw_prim[GL_POLYGON+1] = { + GL_POINTS+1, + GL_LINES+1, + GL_LINE_STRIP+1, + GL_LINE_LOOP+1, + GL_TRIANGLES+1, + GL_TRIANGLE_STRIP+1, + GL_TRIANGLE_FAN+1, + GL_QUADS+1, + GL_QUAD_STRIP+1, + GL_POLYGON+1 +}; + +/* Callback for mesa: + */ +static void nv04RenderPrimitive( GLcontext *ctx, GLuint prim ) +{ + nv04RasterPrimitive( ctx, prim, hw_prim[prim] ); +} + +static void nv04ResetLineStipple( GLcontext *ctx ) +{ + /* FIXME do something here */ + WARN_ONCE("Unimplemented nv04ResetLineStipple\n"); +} + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + +void nv04TriInitFunctions(GLcontext *ctx) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + + tnl->Driver.RunPipeline = nouveauRunPipeline; + tnl->Driver.Render.Start = nv04RenderStart; + tnl->Driver.Render.Finish = nv04RenderFinish; + tnl->Driver.Render.PrimitiveNotify = nv04RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = nv04ResetLineStipple; + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, 32 ); + + nmesa->verts = (GLubyte *)tnl->clipspace.vertex_buf; +} + + diff --git a/src/mesa/drivers/dri/nouveau/nv04_swtcl.h b/src/mesa/drivers/dri/nouveau/nv04_swtcl.h new file mode 100644 index 0000000000..42dde5383e --- /dev/null +++ b/src/mesa/drivers/dri/nouveau/nv04_swtcl.h @@ -0,0 +1,12 @@ +#ifndef __NV04_SWTCL_H__ +#define __NV04_SWTCL_H__ + +#include "mtypes.h" + +extern void nv04Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +extern void nv04FinishPrimitive(struct nouveau_context *nmesa); +extern void nv04TriInitFunctions(GLcontext *ctx); +#define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode ) + +#endif /* __NV04_SWTCL_H__ */ + -- cgit v1.2.3 From 65e3d5e45e3d14f4ff98a15af0662e6c6e589cd2 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 14 Jan 2007 21:17:08 +0100 Subject: nouveau: Make the state cache hierarchical. --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 3 +++ src/mesa/drivers/dri/nouveau/nouveau_state_cache.c | 5 +++++ src/mesa/drivers/dri/nouveau/nouveau_state_cache.h | 8 +++++++- 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 05d00d4769..9056bfb255 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -31,6 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "nouveau_context.h" #include "nouveau_ctrlreg.h" +#include "nouveau_state_cache.h" //#define NOUVEAU_RING_DEBUG //#define NOUVEAU_STATE_CACHE_DISABLE @@ -114,6 +115,7 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); #define OUT_RING_CACHE(n) do { \ if (nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value!=(n)) { \ nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ + nmesa->state_cache.hdirty[nmesa->state_cache.current_pos/NOUVEAU_STATE_CACHE_HIER_SIZE]=1; \ nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value=(n); \ } \ nmesa->state_cache.current_pos++; \ @@ -122,6 +124,7 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); #define OUT_RING_CACHEf(n) do { \ if ((*(float*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))!=(n)){ \ nmesa->state_cache.atoms[nmesa->state_cache.current_pos].dirty=1; \ + nmesa->state_cache.hdirty[nmesa->state_cache.current_pos/NOUVEAU_STATE_CACHE_HIER_SIZE]=1; \ (*(float*)(&nmesa->state_cache.atoms[nmesa->state_cache.current_pos].value))=(n);\ } \ nmesa->state_cache.current_pos++; \ diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c index 36f0c1024b..cb4b9d3027 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.c @@ -25,6 +25,8 @@ void nouveau_state_cache_flush(nouveauContextPtr nmesa) do { // jump to a dirty state + while((nmesa->state_cache.hdirty[i/NOUVEAU_STATE_CACHE_HIER_SIZE]==0)&&(istate_cache.atoms[i].dirty==0)&&(istate_cache.atoms[i+j].value); nmesa->state_cache.atoms[i+j].dirty=0; + if ((i+j)%NOUVEAU_STATE_CACHE_HIER_SIZE==0) + nmesa->state_cache.hdirty[(i+j)/NOUVEAU_STATE_CACHE_HIER_SIZE-1]=0; } i+=run; } } while(istate_cache.hdirty[NOUVEAU_STATE_CACHE_HIER_SIZE/NOUVEAU_STATE_CACHE_HIER_SIZE-1]=0; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h index 2488274846..5f9d426450 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_state_cache.h @@ -5,6 +5,10 @@ #include "mtypes.h" #define NOUVEAU_STATE_CACHE_ENTRIES 2048 +// size of a dirty requests block +// you can play with that and tune the value to increase/decrease performance +// but keep it a power of 2 ! +#define NOUVEAU_STATE_CACHE_HIER_SIZE 32 typedef struct nouveau_state_atom_t{ uint32_t value; @@ -14,8 +18,10 @@ typedef struct nouveau_state_atom_t{ typedef struct nouveau_state_cache_t{ nouveau_state_atom atoms[NOUVEAU_STATE_CACHE_ENTRIES]; uint32_t current_pos; + // hierarchical dirty flags + uint8_t hdirty[NOUVEAU_STATE_CACHE_ENTRIES/NOUVEAU_STATE_CACHE_HIER_SIZE]; // master dirty flag - uint32_t dirty; + uint8_t dirty; }nouveau_state_cache; -- cgit v1.2.3 From e2295511f5ee5fc4f5b39cba9e9c1c7a2f4e1eb5 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Sun, 14 Jan 2007 22:39:37 +0100 Subject: nouveau: Update nouveau_reg.h from renouveau to the latest version. --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 230 ++++++++++++++++++++++++++--- 1 file changed, 212 insertions(+), 18 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index 74f55c649a..f52d381f74 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -43,7 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ************************************************************************** - Created from objects.c rev. 1.350 + Created from objects.c rev. 1.398 */ #ifndef _NOUVEAU_REG_H @@ -60,6 +60,7 @@ Object NV01_CONTEXT_CLIP_RECTANGLE used on: NV03 NV04 NV10 NV15 NV20 NV40 G70 Object NV_MEMORY_TO_MEMORY_FORMAT used on: NV04 NV10 NV15 NV20 NV30 NV40 G70 */ #define NV_MEMORY_TO_MEMORY_FORMAT 0x00000039 +# define NV_MEMORY_TO_MEMORY_FORMAT_NOP 0x00000100 # define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104 # define NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY 0x00000180 # define NV_MEMORY_TO_MEMORY_FORMAT_OBJECT_IN 0x00000184 @@ -70,6 +71,8 @@ Object NV_MEMORY_TO_MEMORY_FORMAT used on: NV04 NV10 NV15 NV20 NV30 NV40 G70 # define NV_MEMORY_TO_MEMORY_FORMAT_PITCH_OUT 0x00000318 # define NV_MEMORY_TO_MEMORY_FORMAT_LINE_LENGTH_IN 0x0000031c # define NV_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT 0x00000320 +# define NV_MEMORY_TO_MEMORY_FORMAT_FORMAT 0x00000324 /* Parameters: src_inc dst_inc */ +# define NV_MEMORY_TO_MEMORY_FORMAT_BUF_NOTIFY 0x00000328 /****************************************** Object NV03_PRIMITIVE_RASTER_OP used on: NV03 NV04 NV10 NV15 NV20 NV30 NV40 G70 @@ -322,18 +325,19 @@ Object NV11_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(d) (0x00000230 + d * 0x0004) /* Parameters: pitch */ # define NV10_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(d) (0x00000240 + d * 0x0004) /* Parameters: width height */ # define NV10_TCL_PRIMITIVE_3D_TX_FILTER(d) (0x00000248 + d * 0x0004) /* Parameters: mag_filter min_filter */ +# define NV10_TCL_PRIMITIVE_3D_TX_PALETTE_OFFSET(d) (0x00000250 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x000003e0 + d * 0x0004) +# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x00000540 + y * 0x0010 + x * 0x0004) # define NV10_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000260 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ # define NV10_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000268 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ # define NV10_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000278 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ # define NV10_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00000280 + d * 0x0004) /* Parameters: rc1_tx_units_enabled rc1_rc_enabled scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ -# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX_ENABLE(d) (0x000003e0 + d * 0x0004) -# define NV10_TCL_PRIMITIVE_3D_TX_MATRIX(x,y) (0x00000540 + y * 0x0010 + x * 0x0004) # define NV10_TCL_PRIMITIVE_3D_RC_COLOR0 0x00000270 /* Parameters: a r g b */ # define NV10_TCL_PRIMITIVE_3D_RC_COLOR1 0x00000274 /* Parameters: a r g b */ # define NV10_TCL_PRIMITIVE_3D_RC_FINAL0 0x00000288 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ # define NV10_TCL_PRIMITIVE_3D_RC_FINAL1 0x0000028c /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ # define NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL 0x00000294 /* Parameters: local_viewer color_control */ -# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL 0x00000298 /* Parameters: specular diffuse ambient emission */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_MATERIAL_ENABLE 0x00000298 /* Parameters: specular diffuse ambient emission */ # define NV10_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c # define NV10_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 # define NV10_TCL_PRIMITIVE_3D_FOG_ENABLE 0x000002a4 @@ -363,7 +367,7 @@ Object NV11_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_BLEND_COLOR 0x0000034c /* Parameters: a r g b */ # define NV10_TCL_PRIMITIVE_3D_BLEND_EQUATION 0x00000350 # define NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x00000354 -# define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: r g b */ +# define NV10_TCL_PRIMITIVE_3D_COLOR_MASK 0x00000358 /* Parameters: a r g b */ # define NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x0000035c # define NV10_TCL_PRIMITIVE_3D_STENCIL_MASK 0x00000360 # define NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC 0x00000364 @@ -498,7 +502,7 @@ Object NV11_TCL_PRIMITIVE_3D used on: NV15 # define NV10_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00000ce0 # define NV10_TCL_PRIMITIVE_3D_VERTEX_WGH_1F 0x00000ce4 # define NV10_TCL_PRIMITIVE_3D_EDGEFLAG_ENABLE 0x00000cec -# define NV10_TCL_PRIMITIVE_3D_VERTEX_ATTR( d) (0x00000d04 + d * 0x0008) +# define NV10_TCL_PRIMITIVE_3D_VERTEX_ATTR( d) (0x00000d04 + d * 0x0008) /* Parameters: stride fields type */ # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_VALIDATE 0x00000cf0 # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_OFFSET_POS 0x00000d00 # define NV10_TCL_PRIMITIVE_3D_VERTEX_ARRAY_FORMAT_POS 0x00000d04 /* Parameters: stride fields type */ @@ -595,6 +599,7 @@ Object NV10_UNK0072 used on: NV10 NV15 NV20 NV40 G70 */ #define NV10_UNK0072 0x00000072 # define NV10_UNK0072_COUNTER 0x00000050 +# define NV40_UNK0072_SET_OBJECT 0x00000060 # define NV10_UNK0072_SET_DMA_NOTIFY 0x00000180 /****************************************** @@ -667,6 +672,8 @@ Object NV20_SWIZZLED_SURFACE used on: NV20 NV30 NV40 G70 Object NV20_TCL_PRIMITIVE_3D used on: NV20 */ #define NV20_TCL_PRIMITIVE_3D 0x00000097 +# define NV20_TCL_PRIMITIVE_3D_NOP 0x00000100 +# define NV20_TCL_PRIMITIVE_3D_NOTIFY 0x00000104 # define NV20_TCL_PRIMITIVE_3D_SET_OBJECT0 0x00000180 # define NV20_TCL_PRIMITIVE_3D_SET_OBJECT1 0x00000184 # define NV20_TCL_PRIMITIVE_3D_SET_OBJECT2 0x00000188 @@ -691,6 +698,8 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_FOG_MODE 0x0000029c # define NV20_TCL_PRIMITIVE_3D_FOG_COORD_DIST 0x000002a0 # define NV20_TCL_PRIMITIVE_3D_FOG_ENABLE 0x000002a4 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x000002c0 + d * 0x0004) /* Parameters: x2 x1 */ +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x000002e0 + d * 0x0004) /* Parameters: y2 y1 */ # define NV20_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x00000300 # define NV20_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE 0x00000304 # define NV20_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00000308 @@ -759,6 +768,10 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x000009f0 # define NV20_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x000009f4 # define NV20_TCL_PRIMITIVE_3D_POINT_SPRITE 0x00000a1c /* Parameters: coord_replace r_mode enable */ +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_OX 0x00000a20 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_OY 0x00000a24 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_DEPTH_AVG_S 0x00000a28 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_UNKNOWN_A 0x00000a2c # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_A 0x00000a30 # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_B 0x00000a34 # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_C 0x00000a38 @@ -767,6 +780,10 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x00000a44 # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00000a48 # define NV20_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00000a4c +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_PX_DIV2 0x00000af0 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_PY_DIV2 0x00000af4 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_DEPTH_HALF_S 0x00000af8 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_UNKNOWN_B 0x00000afc # define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST0 0x00000b00 # define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST1 0x00000b04 # define NV20_TCL_PRIMITIVE_3D_VP_UPLOAD_INST2 0x00000b08 @@ -781,10 +798,13 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x00000a18 # define NV20_TCL_PRIMITIVE_3D_TX_OFFSET(d) (0x00001b00 + d * 0x0040) # define NV20_TCL_PRIMITIVE_3D_TX_FORMAT(d) (0x00001b04 + d * 0x0040) /* Parameters: log2(height) log2(width) lod format cube_map */ +# define NV20_TCL_PRIMITIVE_3D_TX_WRAP(d) (0x00001b08 + d * 0x0040) /* Parameters: wrap_s wrap_t wrap_r */ # define NV20_TCL_PRIMITIVE_3D_TX_ENABLE(d) (0x00001b0c + d * 0x0040) /* Parameters: enable anisotropy */ # define NV20_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(d) (0x00001b10 + d * 0x0040) /* Parameters: pitch */ # define NV20_TCL_PRIMITIVE_3D_TX_FILTER(d) (0x00001b14 + d * 0x0040) /* Parameters: mag_filter min_filter */ # define NV20_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(d) (0x00001b1c + d * 0x0040) /* Parameters: width height */ +# define NV20_TCL_PRIMITIVE_3D_TX_PALETTE_OFFSET(d) (0x00001b20 + d * 0x0040) +# define NV20_TCL_PRIMITIVE_3D_RC_ENABLE 0x00001e60 /* Parameters: number of rc enabled */ # define NV20_TCL_PRIMITIVE_3D_TX_SHADER_OP 0x00001e70 /* Parameters: op0 op1 op2 op3 */ # define NV20_TCL_PRIMITIVE_3D_TX_SHADER_CULL_MODE 0x000017f8 /* Parameters: cull0 cull1 cull2 cull3 */ # define NV20_TCL_PRIMITIVE_3D_TX_SHADER_PREVIOUS 0x00001e78 /* Parameters: prev2 prev3 */ @@ -794,6 +814,8 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_RC_FINAL1 0x0000028c /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ # define NV20_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000260 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ # define NV20_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000ac0 + d * 0x0004) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV20_TCL_PRIMITIVE_3D_RC_CONSTANT_COLOR0(d) (0x00000a60 + d * 0x0004) /* Parameters: a r g b */ +# define NV20_TCL_PRIMITIVE_3D_RC_CONSTANT_COLOR1(d) (0x00000a80 + d * 0x0004) /* Parameters: a r g b */ # define NV20_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000aa0 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ # define NV20_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00001e40 + d * 0x0004) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ # define NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(d) (0x0000105c + d * 0x0080) @@ -943,12 +965,18 @@ Object NV20_TCL_PRIMITIVE_3D used on: NV20 # define NV20_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x000017c0 # define NV20_TCL_PRIMITIVE_3D_LIGHT_MODEL_TWO_SIDE_ENABLE 0x000017c4 # define NV20_TCL_PRIMITIVE_3D_BEGIN_END 0x000017fc +# define NV20_TCL_PRIMITIVE_3D_SCISSOR_X2_X1 0x00001c30 /* Parameters: x2 x1 */ +# define NV20_TCL_PRIMITIVE_3D_SCISSOR_Y2_Y1 0x00001c50 /* Parameters: y2 y1 */ # define NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_DEPTH 0x00001d8c # define NV20_TCL_PRIMITIVE_3D_CLEAR_VALUE_ARGB 0x00001d90 # define NV20_TCL_PRIMITIVE_3D_CLEAR_WHICH_BUFFERS 0x00001d94 /* Parameters: clear color a clear color b clear color g clear color r clear depth clear stencil */ # define NV20_TCL_PRIMITIVE_3D_INDEX_DATA 0x00001800 /* Parameters: index1 index0 */ # define NV20_TCL_PRIMITIVE_3D_VB_VERTEX_BATCH 0x00001810 /* Parameters: count_vertices offset_vertices */ # define NV20_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001818 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_X 0x00001f00 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Y 0x00001f04 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_Z 0x00001f08 +# define NV20_TCL_PRIMITIVE_3D_VIEWPORT_ORIGIN_W 0x00001f0c /****************************************** Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 @@ -965,8 +993,8 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_SET_OBJECT8 0x000001ac # define NV30_TCL_PRIMITIVE_3D_SET_OBJECT9 0x000001b4 # define NV30_TCL_PRIMITIVE_3D_SET_OBJECT10 0x000001b8 -# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT11 0x0000019c -# define NV30_TCL_PRIMITIVE_3D_SET_OBJECT12 0x000001a0 +# define NV30_TCL_PRIMITIVE_3D_SET_VB_SRC0_OBJECT 0x0000019c +# define NV30_TCL_PRIMITIVE_3D_SET_VB_SRC1_OBJECT 0x000001a0 # define NV30_TCL_PRIMITIVE_3D_BUFFER0_PITCH 0x0000020c /* Parameters: depth/stencil buffer pitch color0 buffer pitch */ # define NV30_TCL_PRIMITIVE_3D_COLOR0_OFFSET 0x00000210 # define NV30_TCL_PRIMITIVE_3D_DEPTH_OFFSET 0x00000214 @@ -1016,6 +1044,7 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_B 0x000003a8 # define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_FRONT_A 0x000003b4 # define NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH 0x000003b8 +# define NV30_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x000003bc # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(d) (0x00000400 + d * 0x0004) # define NV30_TCL_PRIMITIVE_3D_MODELVIEW_MATRIX( d) (0x00000480 + d * 0x0004) # define NV30_TCL_PRIMITIVE_3D_INVERSE_MODELVIEW_MATRIX( d) (0x00000580 + d * 0x0004) @@ -1027,12 +1056,17 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT 0x000008d0 # define NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR 0x000008d4 # define NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC 0x000008d8 +# define NV30_TCL_PRIMITIVE_3D_RC_COLOR0 0x000008ec /* Parameters: a r g b */ +# define NV30_TCL_PRIMITIVE_3D_RC_COLOR1 0x000008f0 /* Parameters: a r g b */ # define NV30_TCL_PRIMITIVE_3D_RC_FINAL0 0x000008f4 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ # define NV30_TCL_PRIMITIVE_3D_RC_FINAL1 0x000008f8 /* Parameters: vare_mapping vare_component_usage vare_input varf_mapping varf_component_usage varf_input varg_mapping varg_component_usage varg_input color_sum_clamp */ -# define NV30_TCL_PRIMITIVE_3D_RC_IN_ALPHA 0x00000900 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ -# define NV30_TCL_PRIMITIVE_3D_RC_IN_RGB 0x00000904 /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ -# define NV30_TCL_PRIMITIVE_3D_RC_OUT_ALPHA 0x00000910 /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ -# define NV30_TCL_PRIMITIVE_3D_RC_OUT_RGB 0x00000914 /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV30_TCL_PRIMITIVE_3D_RC_ENABLE 0x000008fc /* Parameters: number of rc enabled */ +# define NV30_TCL_PRIMITIVE_3D_RC_IN_ALPHA(d) (0x00000900 + d * 0x0020) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV30_TCL_PRIMITIVE_3D_RC_IN_RGB(d) (0x00000904 + d * 0x0020) /* Parameters: vara_mapping vara_component_usage vara_input varb_mapping varb_component_usage varb_input varc_mapping varc_component_usage varc_input vard_mapping vard_component_usage vard_input */ +# define NV30_TCL_PRIMITIVE_3D_RC_CONSTANT_COLOR0(d) (0x00000908 + d * 0x0020) /* Parameters: a r g b */ +# define NV30_TCL_PRIMITIVE_3D_RC_CONSTANT_COLOR1(d) (0x0000090c + d * 0x0020) /* Parameters: a r g b */ +# define NV30_TCL_PRIMITIVE_3D_RC_OUT_ALPHA(d) (0x00000910 + d * 0x0020) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ +# define NV30_TCL_PRIMITIVE_3D_RC_OUT_RGB(d) (0x00000914 + d * 0x0020) /* Parameters: scale bias mux_sum ab_dot_product cd_dot_product sum_output ab_output cd_output */ # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_DIM0 0x00000200 /* Parameters: width x_offset */ # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_DIM1 0x00000204 /* Parameters: height y_offset */ # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_COLOR_BUFFER_OFS0 0x000002c0 /* Parameters: width x_offset */ @@ -1054,6 +1088,7 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_F 0x00001ed4 # define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_G 0x00001ed8 # define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETER_H 0x00001edc +# define NV30_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE 0x00001ee4 # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_OX 0x00000a20 # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_OY 0x00000a24 # define NV30_TCL_PRIMITIVE_3D_VIEWPORT_XFRM_NPF_DIV2 0x00000a28 @@ -1074,6 +1109,10 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST1 0x00000b84 # define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST2 0x00000b88 # define NV30_TCL_PRIMITIVE_3D_VP_UPLOAD_INST3 0x00000b8c +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_R 0x000017b0 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_G 0x000017b4 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_B 0x000017b8 +# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_A 0x000017c0 # define NV30_TCL_PRIMITIVE_3D_OCC_QUERY_OR_COLOR_BUFF_ENABLE 0x000017c8 # define NV30_TCL_PRIMITIVE_3D_STORE_RESULT 0x00001800 # define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE_A(d) (0x00000e00 + d * 0x0010) @@ -1115,7 +1154,9 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_E 0x00001410 # define NV30_TCL_PRIMITIVE_3D_FRONT_MATERIAL_SHININESS_F 0x00001414 # define NV30_TCL_PRIMITIVE_3D_ENABLED_LIGHTS 0x00001420 /* Parameters: light 7 light 6 light 5 light 4 light 3 light 2 light 1 light 0 */ -# define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE 0x00001db4 +# define NV30_TCL_PRIMITIVE_3D_UNK1D6C_OFFSET 0x00001d6c +# define NV30_TCL_PRIMITIVE_3D_UNK1D70_VALUE 0x00001d70 +# define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_ENABLE 0x00001db4 # define NV30_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN 0x00001db8 /* Parameters: factor pattern */ # define NV30_TCL_PRIMITIVE_3D_BEGIN_END 0x00001808 # define NV30_TCL_PRIMITIVE_3D_CULL_FACE 0x00001830 @@ -1159,7 +1200,7 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4Y(d) (0x00001c04 + d * 0x0010) # define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4Z(d) (0x00001c08 + d * 0x0010) # define NV30_TCL_PRIMITIVE_3D_VTX_ATTR_4W(d) (0x00001c0c + d * 0x0010) -# define NV30_TCL_PRIMITIVE_3D_VB_POINTER_ATTR(d) (0x00001680 + d * 0x0004) /* Parameters: enabled? offset */ +# define NV30_TCL_PRIMITIVE_3D_VB_POINTER_ATTR(d) (0x00001680 + d * 0x0004) /* Parameters: source: offset */ # define NV30_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00000a90 /* Parameters: y x */ # define NV30_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00000a94 /* Parameters: z */ # define NV30_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x000018c0 @@ -1206,10 +1247,6 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000017a0 # define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000017a4 # define NV30_TCL_PRIMITIVE_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000017a8 -# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_R 0x000017b0 -# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_G 0x000017b4 -# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_B 0x000017b8 -# define NV30_TCL_PRIMITIVE_3D_COLOR_MATERIAL_BACK_A 0x000017c0 # define NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM 0x000008e4 # define NV30_TCL_PRIMITIVE_3D_TX_ADDRESS_UNIT(d) (0x00001a00 + d * 0x0020) # define NV30_TCL_PRIMITIVE_3D_TX_FORMAT_UNIT(d) (0x00001a04 + d * 0x0020) /* Parameters: mipmap type format ncomp cubic */ @@ -1221,6 +1258,8 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_TX_UNK07_UNIT(d) (0x00001a1c + d * 0x0020) # define NV30_TCL_PRIMITIVE_3D_TX_DEPTH_UNIT(d) (0x00001840 + d * 0x0004) /* Parameters: depth NPOT pitch */ # define NV30_TCL_PRIMITIVE_3D_VB_VERTEX_BATCH 0x00001814 /* Parameters: count_vertices offset_vertices */ +# define NV30_TCL_PRIMITIVE_3D_VB_ELEMENT_U16 0x0000180c /* Parameters: 1: 0: */ +# define NV30_TCL_PRIMITIVE_3D_VB_ELEMENT_U32 0x00001810 # define NV30_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001818 # define NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE 0x00000374 # define NV30_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP 0x00000378 @@ -1244,6 +1283,161 @@ Object NV30_CLEAR_BUFFER used on: NV30 NV40 G70 # define NV30_CLEAR_BUFFER_SET_CONTEXT_SURFACE_2D 0x00000198 # define NV30_CLEAR_BUFFER_UNK002fc 0x000002fc +/****************************************** +Object NV50_TCL_PRIMITIVE_3D used on: +*/ +#define NV50_TCL_PRIMITIVE_3D 0x00000097 +# define NV50_TCL_PRIMITIVE_3D_SET_OBJECT_0( d) (0x00000180 + d * 0x0004) +# define NV50_TCL_PRIMITIVE_3D_SET_OBJECT_1( d) (0x000001c0 + d * 0x0004) +# define NV50_TCL_PRIMITIVE_3D_VERTEX_FOG_1F 0x00000314 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_2F_X 0x00000380 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_2F_Y 0x00000384 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S 0x000003c0 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_T 0x000003c4 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S 0x000003c8 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_T 0x000003cc +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_2F_S 0x000003d0 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_2F_T 0x000003d4 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_2F_S 0x000003d8 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_2F_T 0x000003dc +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X 0x00000400 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Y 0x00000404 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_3F_Z 0x00000408 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_X 0x00000420 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Y 0x00000424 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_Z 0x00000428 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_3F_R 0x00000430 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_3F_G 0x00000434 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_3F_B 0x00000438 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_R 0x00000440 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_G 0x00000444 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_B 0x00000448 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_4F_X 0x00000500 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Y 0x00000504 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_4F_Z 0x00000508 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_4F_W 0x0000050c +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_4F_R 0x00000530 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_4F_G 0x00000534 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_4F_B 0x00000538 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_4F_A 0x0000053c +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_S 0x00000580 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_T 0x00000584 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_R 0x00000588 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_Q 0x0000058c +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_S 0x00000590 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_T 0x00000594 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_R 0x00000598 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_Q 0x0000059c +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_S 0x000005a0 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_T 0x000005a4 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_R 0x000005a8 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_4F_Q 0x000005ac +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_S 0x000005b0 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_T 0x000005b4 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_R 0x000005b8 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_4F_Q 0x000005bc +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_2I 0x000006a0 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_2I 0x000006a4 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_2I 0x000006a8 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_2I 0x000006ac /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_4I_XY 0x00000700 /* Parameters: y x */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_POS_4I_ZW 0x00000704 /* Parameters: w z */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_ST 0x00000740 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX0_4I_RQ 0x00000744 /* Parameters: q r */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_ST 0x00000748 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX1_4I_RQ 0x0000074c /* Parameters: q r */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_4I_ST 0x00000750 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX2_4I_RQ 0x00000754 /* Parameters: q r */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_4I_ST 0x00000758 /* Parameters: t s */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_TX3_4I_RQ 0x0000075c /* Parameters: q r */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_XY 0x00000790 /* Parameters: y x */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_NOR_3I_Z 0x00000794 /* Parameters: z */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL_4I 0x0000088c /* Parameters: a b g r */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_COL2_3I 0x00000890 /* Parameters: a b g r */ +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_UNK0_X 0x00000a00 +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_UNK0_Y 0x00000a04 +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_UNK0_Z 0x00000a08 +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_UNK1_X 0x00000a0c +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_UNK1_Y 0x00000a10 +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_UNK1_Z 0x00000a14 +# define NV50_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000c08 +# define NV50_TCL_PRIMITIVE_3D_DEPTH_RANGE_FAR 0x00000c0c +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(d) (0x00000d00 + d * 0x0008) /* Parameters: x2 x1 */ +# define NV50_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(d) (0x00000d04 + d * 0x0008) /* Parameters: y2 y1 */ +# define NV50_TCL_PRIMITIVE_3D_VERTEX_BUFFER_FIRST 0x00000d74 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_BUFFER_COUNT 0x00000d78 +# define NV50_TCL_PRIMITIVE_3D_CLEAR_COLOR_R 0x00000d80 +# define NV50_TCL_PRIMITIVE_3D_CLEAR_COLOR_G 0x00000d84 +# define NV50_TCL_PRIMITIVE_3D_CLEAR_COLOR_B 0x00000d88 +# define NV50_TCL_PRIMITIVE_3D_CLEAR_COLOR_A 0x00000d8c +# define NV50_TCL_PRIMITIVE_3D_CLEAR_DEPTH 0x00000d90 +# define NV50_TCL_PRIMITIVE_3D_CLEAR_STENCIL 0x00000da0 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT 0x00000dac +# define NV50_TCL_PRIMITIVE_3D_POLYGON_MODE_BACK 0x00000db0 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE 0x00000db4 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000dc0 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000dc4 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000dc8 +# define NV50_TCL_PRIMITIVE_3D_SCISSOR_WIDTH_XPOS 0x00000e04 /* Parameters: w x */ +# define NV50_TCL_PRIMITIVE_3D_SCISSOR_HEIGHT_YPOS 0x00000e08 /* Parameters: h y */ +# define NV50_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_ID 0x00000f00 +# define NV50_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_X 0x00000f04 +# define NV50_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_Y 0x00000f08 +# define NV50_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_Z 0x00000f0c +# define NV50_TCL_PRIMITIVE_3D_VP_UPLOAD_CONST_W 0x00000f10 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_REF 0x00000f54 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_MASK 0x00000f58 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_MASK 0x00000f5c +# define NV50_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE 0x000012cc +# define NV50_TCL_PRIMITIVE_3D_SHADE_MODEL 0x000012d4 +# define NV50_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE 0x000012e8 +# define NV50_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE 0x000012ec +# define NV50_TCL_PRIMITIVE_3D_DEPTH_FUNC 0x0000130c +# define NV50_TCL_PRIMITIVE_3D_ALPHA_FUNC_REF 0x00001310 +# define NV50_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC 0x00001314 +# define NV50_TCL_PRIMITIVE_3D_BLEND_COLOR_R 0x0000131c +# define NV50_TCL_PRIMITIVE_3D_BLEND_COLOR_G 0x00001320 +# define NV50_TCL_PRIMITIVE_3D_BLEND_COLOR_B 0x00001324 +# define NV50_TCL_PRIMITIVE_3D_BLEND_COLOR_A 0x00001328 +# define NV50_TCL_PRIMITIVE_3D_BLEND_EQUATION_RGB 0x00001340 +# define NV50_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC_RGB 0x00001344 +# define NV50_TCL_PRIMITIVE_3D_BLEND_FUNC_DST_RGB 0x00001348 +# define NV50_TCL_PRIMITIVE_3D_BLEND_EQUATION_ALPHA 0x0000134c +# define NV50_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC_ALPHA 0x00001350 +# define NV50_TCL_PRIMITIVE_3D_BLEND_FUNC_DST_ALPHA 0x00001358 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_ENABLE 0x00001380 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_FAIL 0x00001384 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_ZFAIL 0x00001388 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_OP_ZPASS 0x0000138c +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_FUNC 0x00001390 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_REF 0x00001394 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_MASK 0x00001398 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_BACK_FUNC_MASK 0x0000139c +# define NV50_TCL_PRIMITIVE_3D_LINE_WIDTH 0x000013b0 +# define NV50_TCL_PRIMITIVE_3D_POINT_SIZE 0x00001518 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR 0x0000156c +# define NV50_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE 0x00001570 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_ENABLE 0x00001594 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_FAIL 0x00001598 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_ZFAIL 0x0000159c +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_ZPASS 0x000015a0 +# define NV50_TCL_PRIMITIVE_3D_STENCIL_FRONT_FUNC_FUNC 0x000015a4 +# define NV50_TCL_PRIMITIVE_3D_POLYGON_OFFSET_UNITS 0x000015bc +# define NV50_TCL_PRIMITIVE_3D_VERTEX_BEGIN 0x000015dc +# define NV50_TCL_PRIMITIVE_3D_VERTEX_END 0x000015e0 +# define NV50_TCL_PRIMITIVE_3D_VERTEX_DATA 0x00001640 +# define NV50_TCL_PRIMITIVE_3D_LINE_STIPPLE_ENABLE 0x0000166c +# define NV50_TCL_PRIMITIVE_3D_LINE_STIPPLE_PATTERN 0x00001680 /* Parameters: pattern factor */ +# define NV50_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ENABLE 0x0000168c +# define NV50_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_PATTERN( d) (0x00001700 + d * 0x0004) +# define NV50_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE 0x00001918 +# define NV50_TCL_PRIMITIVE_3D_FRONT_FACE 0x0000191c +# define NV50_TCL_PRIMITIVE_3D_CULL_FACE 0x00001920 +# define NV50_TCL_PRIMITIVE_3D_LOGIC_OP_ENABLE 0x000019c4 +# define NV50_TCL_PRIMITIVE_3D_LOGIC_OP_OP 0x000019c8 +# define NV50_TCL_PRIMITIVE_3D_CLEAR_BUFFERS 0x000019d0 /* Parameters: color stencil depth */ +# define NV50_TCL_PRIMITIVE_3D_COLOR_MASK( d) (0x00001a00 + d * 0x0004) /* Parameters: a b g r */ + /****************************************** Object NV_DMA_FROM_MEMORY used on: NV03 NV04 NV10 NV15 NV20 NV30 NV40 G70 */ -- cgit v1.2.3 From 89f91d1804c0c4919c25d6b9931973733db1e664 Mon Sep 17 00:00:00 2001 From: Carlos Martín Nieto Date: Mon, 15 Jan 2007 00:00:30 +0100 Subject: nouveau: Implement much of the fog handling. --- src/mesa/drivers/dri/nouveau/nouveau_reg.h | 1 + src/mesa/drivers/dri/nouveau/nv30_state.c | 66 +++++++++++++++++++++++++++--- 2 files changed, 61 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_reg.h b/src/mesa/drivers/dri/nouveau/nouveau_reg.h index f52d381f74..8758b538c8 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_reg.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_reg.h @@ -1035,6 +1035,7 @@ Object NV30_TCL_PRIMITIVE_3D used on: NV30 NV40 G70 # define NV30_TCL_PRIMITIVE_3D_STENCIL_FRONT_OP_ZPASS 0x00000364 # define NV30_TCL_PRIMITIVE_3D_SHADE_MODEL 0x00000368 # define NV30_TCL_PRIMITIVE_3D_FOG_ENABLE 0x0000036c +# define NV30_TCL_PRIMITIVE_3D_FOG_COLOR 0x00000370 # define NV40_TCL_PRIMITIVE_3D_COLOR_MASK_BUFFER123 0x00000370 /* Parameters: buffer3 b buffer3 g buffer3 r buffer3 a buffer2 b buffer2 g buffer2 r buffer2 a buffer1 b buffer1 g buffer1 r buffer1 a */ # define NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 0x0000037c # define NV30_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR 0x00000394 diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c index 9bf5f2adea..4d79bb6127 100644 --- a/src/mesa/drivers/dri/nouveau/nv30_state.c +++ b/src/mesa/drivers/dri/nouveau/nv30_state.c @@ -348,17 +348,71 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state) static void nv30Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *params) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); + + if (NOUVEAU_CARD_USING_SHADERS) + return; + switch(pname) { - case GL_FOG_MODE: - //BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); - //OUT_RING_CACHE (params); + case GL_FOG_MODE: + { + int mode = 0; + /* The modes are different in GL and the card. */ + switch(ctx->Fog.Mode) + { + case GL_LINEAR: + mode = 0x804; break; - /* TODO: unsure about the rest.*/ - default: + case GL_EXP: + mode = 0x802; break; + case GL_EXP2: + mode = 0x803; + break; + } + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_MODE, 1); + OUT_RING_CACHE (mode); + break; + } + case GL_FOG_COLOR: + { + GLubyte c[4]; + UNCLAMPED_FLOAT_TO_RGBA_CHAN(c,params); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_COLOR, 1); + /* nvidia ignores the alpha channel */ + OUT_RING_CACHE(PACK_COLOR_8888_REV(c[0],c[1],c[2],c[3])); + break; + } + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + { + GLfloat f=0., c=0.; + switch(ctx->Fog.Mode) + { + case GL_LINEAR: + f = -1.0/(ctx->Fog.End - ctx->Fog.Start); + c = ctx->Fog.Start/(ctx->Fog.End - ctx->Fog.Start) + 2.001953; + break; + case GL_EXP: + f = -0.090168*ctx->Fog.Density; + c = 1.5; + case GL_EXP2: + f = -0.212330*ctx->Fog.Density; + c = 1.5; + } + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_LINEAR, 1); + OUT_RING_CACHE(f); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT, 1); + OUT_RING_CACHE(c); + BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_EQUATION_QUADRATIC, 1); + OUT_RING_CACHE(0); /* Is this always the same? */ + break; + } +// case GL_FOG_COORD_SRC: + default: + break; } - } static void nv30Hint(GLcontext *ctx, GLenum target, GLenum mode) -- cgit v1.2.3 From 634b4b3487dcb22e1660959b6a7ce9a42fa50fe2 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 15 Jan 2007 17:23:04 +1100 Subject: nouveau: fail CreateScreen on unknown cards instead of guessing. --- src/mesa/drivers/dri/nouveau/nouveau_card.c | 4 ++-- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card.c b/src/mesa/drivers/dri/nouveau/nouveau_card.c index ae4f4c7ae5..91f12f0d70 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_card.c @@ -10,8 +10,8 @@ nouveau_card* nouveau_card_lookup(uint32_t device_id) int i; for(i=0;icard=nouveau_card_lookup(dri_priv->device_id); + if (!screen->card) { + __driUtilMessage("%s: Unknown card type 0x%04x:0x%04x\n", + __func__, dri_priv->device_id >> 16, dri_priv->device_id & 0xFFFF); + FREE(screen); + return NULL; + } + /* parse information in __driConfigOptions */ driParseOptionInfo (&screen->optionCache,__driConfigOptions, __driNConfigOptions); @@ -82,7 +90,6 @@ static nouveauScreenPtr nouveauCreateScreen(__DRIscreenPrivate *sPriv) screen->depthOffset = dri_priv->depth_offset; screen->depthPitch = dri_priv->depth_pitch; - screen->card=nouveau_card_lookup(dri_priv->device_id); screen->driScreen = sPriv; return screen; } -- cgit v1.2.3 From 16f35a3a22fa782f6bb8a51ef32d6668a5c60e85 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 15 Jan 2007 17:28:56 +1100 Subject: nouveau: Add 0x0244 pciid manually for now.. pciids.sf.net is slow to add it so our generator picks it up, and it's *really* annoying me :) --- src/mesa/drivers/dri/nouveau/nouveau_card_list.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card_list.h b/src/mesa/drivers/dri/nouveau/nouveau_card_list.h index f8ea3c355e..14e7b69802 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card_list.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_card_list.h @@ -132,6 +132,7 @@ static nouveau_card nouveau_card_list[]={ {0x0221, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, {0x0240, "GeForce 6150", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, {0x0242, "GeForce 6100", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, +{0x0244, "GeForce 6150 Go", NV30_TCL_PRIMITIVE_3D|0x4400, NV_44, 0}, {0x0250, "GeForce4 Ti 4600", NV20_TCL_PRIMITIVE_3D|0x2500, NV_25, 0}, {0x0251, "GeForce4 Ti 4400", NV20_TCL_PRIMITIVE_3D|0x2500, NV_25, 0}, {0x0252, "GeForce4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_25, 0}, -- cgit v1.2.3 From 4c7d36b688866129a17c3f59aa9374b2f9a874de Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Mon, 15 Jan 2007 12:38:24 +0100 Subject: nouveau: Fix a bug in the nv04 swtcl. --- src/mesa/drivers/dri/nouveau/nv04_swtcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv04_swtcl.c b/src/mesa/drivers/dri/nouveau/nv04_swtcl.c index e4ace92134..f31c0d692d 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv04_swtcl.c @@ -178,7 +178,7 @@ static void nv04_render_tri_fan_verts(GLcontext *ctx,GLuint start,GLuint count,G for(i=start+1;i Date: Mon, 15 Jan 2007 18:58:24 +0100 Subject: nouveau:nv10: fix setting clip region --- src/mesa/drivers/dri/nouveau/nv10_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index dbd8bf306e..0e912e73ff 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -618,8 +618,10 @@ static void nv10WindowMoved(nouveauContextPtr nmesa) OUT_RING_CACHE(((h+y) << 16) | y | 0x800); for (i=1; i<7; i++) { BEGIN_RING_CACHE(NvSub3D, - NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 2); + NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 1); OUT_RING_CACHE(0); + BEGIN_RING_CACHE(NvSub3D, + NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(i), 1); OUT_RING_CACHE(0); } -- cgit v1.2.3 From a03fc8277180e2171519165a724849e2254ef0b7 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 15 Jan 2007 21:19:52 +0100 Subject: mesa: Update _Current along Current on fragment program bound. Same as a previously committed patch for vertex program, we update fragment program ptr _Current along the Current one so that _Current can't end up pointing to a no more valid program. --- src/mesa/shader/program.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 6db62f591c..8442ba3248 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -1953,6 +1953,8 @@ _mesa_BindProgram(GLenum target, GLuint id) } else if (target == GL_FRAGMENT_PROGRAM_NV || target == GL_FRAGMENT_PROGRAM_ARB) { + if (ctx->FragmentProgram._Current == ctx->FragmentProgram.Current) + ctx->FragmentProgram._Current = (struct gl_fragment_program *) newProg; ctx->FragmentProgram.Current = (struct gl_fragment_program *) newProg; } newProg->RefCount++; -- cgit v1.2.3