summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-12-21 19:18:41 +0000
committerKeith Whitwell <[email protected]>2009-12-21 19:18:41 +0000
commita5585cb533af3d4e5d5324d5f526447b98597402 (patch)
tree6706dbb8b4f994b919e247647c3e8853d067b45c /src/mesa/main
parentd288a30610767f87e3e7c069730d4bc255246568 (diff)
parent574715d8368f99c0a5720a9676385d58d6cfdf30 (diff)
Merge commit 'origin/master' into i965g-restart
Conflicts: SConstruct configs/default configs/linux-dri
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_arrayelt.c1
-rw-r--r--src/mesa/main/blend.c6
-rw-r--r--src/mesa/main/bufferobj.c111
-rw-r--r--src/mesa/main/buffers.c55
-rw-r--r--src/mesa/main/colormac.h20
-rw-r--r--src/mesa/main/compiler.h7
-rw-r--r--src/mesa/main/config.h2
-rw-r--r--src/mesa/main/context.c20
-rw-r--r--src/mesa/main/dd.h39
-rw-r--r--src/mesa/main/debug.c157
-rw-r--r--src/mesa/main/debug.h9
-rw-r--r--src/mesa/main/depth.c4
-rw-r--r--src/mesa/main/depthstencil.c344
-rw-r--r--src/mesa/main/dispatch.c2
-rw-r--r--src/mesa/main/enable.c21
-rw-r--r--src/mesa/main/enums.c5282
-rw-r--r--src/mesa/main/extensions.c7
-rw-r--r--src/mesa/main/fbobject.c417
-rw-r--r--src/mesa/main/ffvertex_prog.c3
-rw-r--r--src/mesa/main/formats.c1158
-rw-r--r--src/mesa/main/formats.h185
-rw-r--r--src/mesa/main/framebuffer.c70
-rw-r--r--src/mesa/main/get.c350
-rw-r--r--src/mesa/main/get_gen.py4
-rw-r--r--src/mesa/main/histogram.c7
-rw-r--r--src/mesa/main/imports.c12
-rw-r--r--src/mesa/main/mfeatures.h6
-rw-r--r--src/mesa/main/mipmap.c78
-rw-r--r--src/mesa/main/mtypes.h139
-rw-r--r--src/mesa/main/points.c7
-rw-r--r--src/mesa/main/rbadaptors.c18
-rw-r--r--src/mesa/main/remap.c216
-rw-r--r--src/mesa/main/remap.h87
-rw-r--r--src/mesa/main/remap_helper.h5891
-rw-r--r--src/mesa/main/renderbuffer.c255
-rw-r--r--src/mesa/main/shaders.c19
-rw-r--r--src/mesa/main/texcompress.c247
-rw-r--r--src/mesa/main/texcompress.h30
-rw-r--r--src/mesa/main/texcompress_fxt1.c122
-rw-r--r--src/mesa/main/texcompress_fxt1.h59
-rw-r--r--src/mesa/main/texcompress_s3tc.c297
-rw-r--r--src/mesa/main/texcompress_s3tc.h106
-rw-r--r--src/mesa/main/texenv.c5
-rw-r--r--src/mesa/main/texenvprogram.c2
-rw-r--r--src/mesa/main/texfetch.c693
-rw-r--r--src/mesa/main/texfetch.h40
-rw-r--r--src/mesa/main/texfetch_tmp.h (renamed from src/mesa/main/texformat_tmp.h)286
-rw-r--r--src/mesa/main/texformat.c1787
-rw-r--r--src/mesa/main/texformat.h264
-rw-r--r--src/mesa/main/texgen.c10
-rw-r--r--src/mesa/main/texgetimage.c808
-rw-r--r--src/mesa/main/teximage.c561
-rw-r--r--src/mesa/main/teximage.h3
-rw-r--r--src/mesa/main/texobj.c5
-rw-r--r--src/mesa/main/texparam.c111
-rw-r--r--src/mesa/main/texrender.c47
-rw-r--r--src/mesa/main/texstate.c7
-rw-r--r--src/mesa/main/texstore.c1359
-rw-r--r--src/mesa/main/texstore.h77
-rw-r--r--src/mesa/main/varray.c102
-rw-r--r--src/mesa/main/version.h6
-rw-r--r--src/mesa/main/vtxfmt_tmp.h1
62 files changed, 14296 insertions, 7748 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index a058227110d..469b4529f91 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -32,7 +32,6 @@
#include "context.h"
#include "imports.h"
#include "macros.h"
-#include "glapi/glapioffsets.h"
#include "glapi/dispatch.h"
typedef void (GLAPIENTRY *array_func)( const void * );
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 39cf6153e28..830e3b2e517 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -72,7 +72,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n",
_mesa_lookup_enum_by_nr(sfactorRGB),
_mesa_lookup_enum_by_nr(dfactorRGB),
@@ -250,7 +250,7 @@ _mesa_BlendEquation( GLenum mode )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquation %s\n",
_mesa_lookup_enum_by_nr(mode));
@@ -278,7 +278,7 @@ _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationSeparateEXT %s %s\n",
_mesa_lookup_enum_by_nr(modeRGB),
_mesa_lookup_enum_by_nr(modeA));
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 189b5e16558..52c4995b0ad 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -52,51 +52,55 @@
/**
- * Get the buffer object bound to the specified target in a GL context.
- *
- * \param ctx GL context
- * \param target Buffer object target to be retrieved. Currently this must
- * be either \c GL_ARRAY_BUFFER or \c GL_ELEMENT_ARRAY_BUFFER.
- * \return A pointer to the buffer object bound to \c target in the
+ * Return pointer to address of a buffer object target.
+ * \param ctx the GL context
+ * \param target the buffer object target to be retrieved.
+ * \return pointer to pointer to the buffer object bound to \c target in the
* specified context or \c NULL if \c target is invalid.
*/
-static INLINE struct gl_buffer_object *
-get_buffer(GLcontext *ctx, GLenum target)
+static INLINE struct gl_buffer_object **
+get_buffer_target(GLcontext *ctx, GLenum target)
{
- struct gl_buffer_object * bufObj = NULL;
-
switch (target) {
- case GL_ARRAY_BUFFER_ARB:
- bufObj = ctx->Array.ArrayBufferObj;
- break;
- case GL_ELEMENT_ARRAY_BUFFER_ARB:
- bufObj = ctx->Array.ElementArrayBufferObj;
- break;
- case GL_PIXEL_PACK_BUFFER_EXT:
- bufObj = ctx->Pack.BufferObj;
- break;
- case GL_PIXEL_UNPACK_BUFFER_EXT:
- bufObj = ctx->Unpack.BufferObj;
- break;
- case GL_COPY_READ_BUFFER:
- if (ctx->Extensions.ARB_copy_buffer) {
- bufObj = ctx->CopyReadBuffer;
- }
- break;
- case GL_COPY_WRITE_BUFFER:
- if (ctx->Extensions.ARB_copy_buffer) {
- bufObj = ctx->CopyWriteBuffer;
- }
- break;
- default:
- /* error must be recorded by caller */
- return NULL;
+ case GL_ARRAY_BUFFER_ARB:
+ return &ctx->Array.ArrayBufferObj;
+ case GL_ELEMENT_ARRAY_BUFFER_ARB:
+ return &ctx->Array.ElementArrayBufferObj;
+ case GL_PIXEL_PACK_BUFFER_EXT:
+ return &ctx->Pack.BufferObj;
+ case GL_PIXEL_UNPACK_BUFFER_EXT:
+ return &ctx->Unpack.BufferObj;
+ case GL_COPY_READ_BUFFER:
+ if (ctx->Extensions.ARB_copy_buffer) {
+ return &ctx->CopyReadBuffer;
+ }
+ break;
+ case GL_COPY_WRITE_BUFFER:
+ if (ctx->Extensions.ARB_copy_buffer) {
+ return &ctx->CopyWriteBuffer;
+ }
+ break;
+ default:
+ return NULL;
}
+ return NULL;
+}
- /* bufObj should point to NullBufferObj or a user-created buffer object */
- ASSERT(bufObj);
- return bufObj;
+/**
+ * Get the buffer object bound to the specified target in a GL context.
+ * \param ctx the GL context
+ * \param target the buffer object target to be retrieved.
+ * \return pointer to the buffer object bound to \c target in the
+ * specified context or \c NULL if \c target is invalid.
+ */
+static INLINE struct gl_buffer_object *
+get_buffer(GLcontext *ctx, GLenum target)
+{
+ struct gl_buffer_object **bufObj = get_buffer_target(ctx, target);
+ if (bufObj)
+ return *bufObj;
+ return NULL;
}
@@ -552,6 +556,7 @@ _mesa_init_buffer_objects( GLcontext *ctx )
/**
* Bind the specified target to buffer for the specified context.
+ * Called by glBindBuffer() and other functions.
*/
static void
bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
@@ -560,40 +565,14 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
struct gl_buffer_object *newBufObj = NULL;
struct gl_buffer_object **bindTarget = NULL;
- switch (target) {
- case GL_ARRAY_BUFFER_ARB:
- bindTarget = &ctx->Array.ArrayBufferObj;
- break;
- case GL_ELEMENT_ARRAY_BUFFER_ARB:
- bindTarget = &ctx->Array.ElementArrayBufferObj;
- break;
- case GL_PIXEL_PACK_BUFFER_EXT:
- bindTarget = &ctx->Pack.BufferObj;
- break;
- case GL_PIXEL_UNPACK_BUFFER_EXT:
- bindTarget = &ctx->Unpack.BufferObj;
- break;
- case GL_COPY_READ_BUFFER:
- if (ctx->Extensions.ARB_copy_buffer) {
- bindTarget = &ctx->CopyReadBuffer;
- }
- break;
- case GL_COPY_WRITE_BUFFER:
- if (ctx->Extensions.ARB_copy_buffer) {
- bindTarget = &ctx->CopyWriteBuffer;
- }
- break;
- default:
- ; /* no-op / we'll hit the follow error test next */
- }
-
+ bindTarget = get_buffer_target(ctx, target);
if (!bindTarget) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferARB(target 0x%x)");
return;
}
/* Get pointer to old buffer object (to be unbound) */
- oldBufObj = get_buffer(ctx, target);
+ oldBufObj = *bindTarget;
if (oldBufObj && oldBufObj->Name == buffer)
return; /* rebinding the same buffer object- no change */
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index d8b5f3b1f4a..97f06597581 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -338,13 +338,13 @@ _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers)
if (ctx->Driver.DrawBuffers)
ctx->Driver.DrawBuffers(ctx, n, buffers);
else if (ctx->Driver.DrawBuffer)
- ctx->Driver.DrawBuffer(ctx, n>0? buffers[0]:GL_NONE);
+ ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE);
}
/**
* Helper function to set the GL_DRAW_BUFFER state in the context and
- * current FBO.
+ * current FBO. Called via glDrawBuffer(), glDrawBuffersARB()
*
* All error checking will have been done prior to calling this function
* so nothing should go wrong at this point.
@@ -362,6 +362,7 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
GLbitfield mask[MAX_DRAW_BUFFERS];
+ GLboolean newState = GL_FALSE;
if (!destMask) {
/* compute destMask values now */
@@ -375,34 +376,54 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
destMask = mask;
}
+ /*
+ * If n==1, destMask[0] may have up to four bits set.
+ * Otherwise, destMask[x] can only have one bit set.
+ */
if (n == 1) {
- GLuint buf, count = 0;
- /* init to -1 to help catch errors */
- fb->_ColorDrawBufferIndexes[0] = -1;
- for (buf = 0; buf < BUFFER_COUNT; buf++) {
- if (destMask[0] & (1 << buf)) {
- fb->_ColorDrawBufferIndexes[count] = buf;
- count++;
+ GLuint count = 0, destMask0 = destMask[0];
+ while (destMask0) {
+ GLint bufIndex = _mesa_ffs(destMask0) - 1;
+ if (fb->_ColorDrawBufferIndexes[count] != bufIndex) {
+ fb->_ColorDrawBufferIndexes[count] = bufIndex;
+ newState = GL_TRUE;
}
+ count++;
+ destMask0 &= ~(1 << bufIndex);
}
fb->ColorDrawBuffer[0] = buffers[0];
- fb->_NumColorDrawBuffers = count;
+ if (fb->_NumColorDrawBuffers != count) {
+ fb->_NumColorDrawBuffers = count;
+ newState = GL_TRUE;
+ }
}
else {
GLuint buf, count = 0;
for (buf = 0; buf < n; buf++ ) {
if (destMask[buf]) {
- fb->_ColorDrawBufferIndexes[buf] = _mesa_ffs(destMask[buf]) - 1;
+ GLint bufIndex = _mesa_ffs(destMask[buf]) - 1;
+ /* only one bit should be set in the destMask[buf] field */
+ ASSERT(_mesa_bitcount(destMask[buf]) == 1);
+ if (fb->_ColorDrawBufferIndexes[buf] != bufIndex) {
+ fb->_ColorDrawBufferIndexes[buf] = bufIndex;
+ newState = GL_TRUE;
+ }
fb->ColorDrawBuffer[buf] = buffers[buf];
count = buf + 1;
}
else {
- fb->_ColorDrawBufferIndexes[buf] = -1;
+ if (fb->_ColorDrawBufferIndexes[buf] != -1) {
+ fb->_ColorDrawBufferIndexes[buf] = -1;
+ newState = GL_TRUE;
+ }
}
}
/* set remaining outputs to -1 (GL_NONE) */
while (buf < ctx->Const.MaxDrawBuffers) {
- fb->_ColorDrawBufferIndexes[buf] = -1;
+ if (fb->_ColorDrawBufferIndexes[buf] != -1) {
+ fb->_ColorDrawBufferIndexes[buf] = -1;
+ newState = GL_TRUE;
+ }
fb->ColorDrawBuffer[buf] = GL_NONE;
buf++;
}
@@ -413,11 +434,15 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
/* also set context drawbuffer state */
GLuint buf;
for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) {
- ctx->Color.DrawBuffer[buf] = fb->ColorDrawBuffer[buf];
+ if (ctx->Color.DrawBuffer[buf] != fb->ColorDrawBuffer[buf]) {
+ ctx->Color.DrawBuffer[buf] = fb->ColorDrawBuffer[buf];
+ newState = GL_TRUE;
+ }
}
}
- ctx->NewState |= _NEW_BUFFERS;
+ if (newState)
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
}
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 815624ee508..905f4e22837 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -140,9 +140,9 @@
*/
#define UNCLAMPED_FLOAT_TO_RGB_CHAN(dst, f) \
do { \
- UNCLAMPED_FLOAT_TO_CHAN(dst[0], f[0]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[1], f[1]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[2], f[2]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[0], (f)[0]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[1], (f)[1]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[2], (f)[2]); \
} while (0)
@@ -156,10 +156,10 @@ do { \
*/
#define UNCLAMPED_FLOAT_TO_RGBA_CHAN(dst, f) \
do { \
- UNCLAMPED_FLOAT_TO_CHAN(dst[0], f[0]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[1], f[1]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[2], f[2]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[3], f[3]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[0], (f)[0]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[1], (f)[1]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[2], (f)[2]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[3], (f)[3]); \
} while (0)
@@ -210,6 +210,12 @@ do { \
#define PACK_COLOR_88_REV( L, A ) \
(((A) << 8) | (L))
+#define PACK_COLOR_1616( L, A ) \
+ (((L) << 16) | (A))
+
+#define PACK_COLOR_1616_REV( L, A ) \
+ (((A) << 16) | (L))
+
#define PACK_COLOR_332( R, G, B ) \
(((R) & 0xe0) | (((G) & 0xe0) >> 3) | (((B) & 0xc0) >> 6))
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 380663ec971..87c3b2e5621 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -234,7 +234,12 @@ extern "C" {
#elif defined(__APPLE__)
#include <CoreFoundation/CFByteOrder.h>
#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )
-#else /*__linux__ __APPLE__*/
+#elif defined(_AIX)
+#define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \
+ ((x & 0x0000ff00) << 8) | \
+ ((x & 0x00ff0000) >> 8) | \
+ ((x & 0xff000000) >> 24);
+#else /*__linux__ */
#include <sys/endian.h>
#define CPU_TO_LE32( x ) bswap32( x )
#endif /*__linux__*/
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 8a09efdb539..c5048970cca 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -205,7 +205,7 @@
#define MAX_VARYING 16 /**< number of float[4] vectors */
#define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS
#define MAX_PROGRAM_INPUTS 32
-#define MAX_PROGRAM_OUTPUTS 32
+#define MAX_PROGRAM_OUTPUTS 64
/*@}*/
/** For GL_ARB_vertex_program */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 490b8f0f333..03fc57e6654 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -117,12 +117,13 @@
#include "syncobj.h"
#endif
#include "rastpos.h"
+#include "remap.h"
#include "scissor.h"
#include "shared.h"
#include "simple_list.h"
#include "state.h"
#include "stencil.h"
-#include "texcompress.h"
+#include "texcompress_s3tc.h"
#include "teximage.h"
#include "texobj.h"
#include "texstate.h"
@@ -132,7 +133,6 @@
#include "viewport.h"
#include "vtxfmt.h"
#include "glapi/glthread.h"
-#include "glapi/glapioffsets.h"
#include "glapi/glapitable.h"
#include "shader/program.h"
#include "shader/prog_print.h"
@@ -407,6 +407,8 @@ one_time_init( GLcontext *ctx )
_mesa_get_cpu_features();
+ _mesa_init_remap_table();
+
_mesa_init_sqrt_table();
for (i = 0; i < 256; i++) {
@@ -573,6 +575,7 @@ _mesa_init_constants(GLcontext *ctx)
#if FEATURE_ARB_vertex_shader
ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVarying = MAX_VARYING;
#endif
@@ -599,9 +602,11 @@ _mesa_init_constants(GLcontext *ctx)
ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX);
ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX);
- /* check that we don't exceed various 32-bit bitfields */
- ASSERT(VERT_RESULT_MAX <= 32);
- ASSERT(FRAG_ATTRIB_MAX <= 32);
+ /* check that we don't exceed the size of various bitfields */
+ ASSERT(VERT_RESULT_MAX <=
+ (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten)));
+ ASSERT(FRAG_ATTRIB_MAX <=
+ (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead)));
}
@@ -701,12 +706,7 @@ init_attrib_groups(GLcontext *ctx)
if (!_mesa_init_texture( ctx ))
return GL_FALSE;
-#if FEATURE_texture_s3tc
_mesa_init_texture_s3tc( ctx );
-#endif
-#if FEATURE_texture_fxt1
- _mesa_init_texture_fxt1( ctx );
-#endif
/* Miscellaneous */
ctx->NewState = _NEW_ALL;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 25aaddea81f..27ed921761c 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -184,8 +184,8 @@ struct dd_function_table {
* functions. The driver should examine \p internalFormat and return a
* pointer to an appropriate gl_texture_format.
*/
- const struct gl_texture_format *(*ChooseTextureFormat)( GLcontext *ctx,
- GLint internalFormat, GLenum srcFormat, GLenum srcType );
+ GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
+ GLenum srcFormat, GLenum srcType );
/**
* Called by glTexImage1D().
@@ -475,13 +475,6 @@ struct dd_function_table {
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
- /**
- * Called to query number of bytes of storage needed to store the
- * specified compressed texture.
- */
- GLuint (*CompressedTextureSize)( GLcontext *ctx, GLsizei width,
- GLsizei height, GLsizei depth,
- GLenum format );
/*@}*/
/**
@@ -716,34 +709,6 @@ struct dd_function_table {
/*@}*/
- /**
- * \name Vertex array functions
- *
- * Called by the corresponding OpenGL functions.
- */
- /*@{*/
- void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*NormalPointer)(GLcontext *ctx, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*FogCoordPointer)(GLcontext *ctx, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*IndexPointer)(GLcontext *ctx, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr);
- void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size,
- GLenum type, GLsizei stride, const GLvoid *ptr);
- void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count );
- void (*UnlockArraysEXT)( GLcontext *ctx );
- /*@}*/
-
-
/**
* \name State-query functions
*
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 0e35617575e..a42113edcac 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -28,6 +28,7 @@
#include "colormac.h"
#include "context.h"
#include "enums.h"
+#include "formats.h"
#include "hash.h"
#include "imports.h"
#include "debug.h"
@@ -36,7 +37,6 @@
#include "readpix.h"
#include "texgetimage.h"
#include "texobj.h"
-#include "texformat.h"
/**
@@ -58,6 +58,31 @@ const char *_mesa_prim_name[GL_POLYGON+4] = {
"unknown state"
};
+
+static const char *
+tex_target_name(GLenum tgt)
+{
+ static const struct {
+ GLenum target;
+ const char *name;
+ } tex_targets[] = {
+ { GL_TEXTURE_1D, "GL_TEXTURE_1D" },
+ { GL_TEXTURE_2D, "GL_TEXTURE_2D" },
+ { GL_TEXTURE_3D, "GL_TEXTURE_3D" },
+ { GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP" },
+ { GL_TEXTURE_RECTANGLE, "GL_TEXTURE_RECTANGLE" },
+ { GL_TEXTURE_1D_ARRAY_EXT, "GL_TEXTURE_1D_ARRAY" },
+ { GL_TEXTURE_2D_ARRAY_EXT, "GL_TEXTURE_2D_ARRAY" }
+ };
+ GLuint i;
+ for (i = 0; i < Elements(tex_targets); i++) {
+ if (tex_targets[i].target == tgt)
+ return tex_targets[i].name;
+ }
+ return "UNKNOWN TEX TARGET";
+}
+
+
void
_mesa_print_state( const char *msg, GLuint state )
{
@@ -291,7 +316,7 @@ write_texture_image(struct gl_texture_object *texObj,
buffer, texObj, img);
/* make filename */
- _mesa_sprintf(s, "/tmp/teximage%u.ppm", texObj->Name);
+ _mesa_sprintf(s, "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face);
_mesa_printf(" Writing image level %u to %s\n", level, s);
write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE);
@@ -342,27 +367,37 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb)
}
-static GLboolean DumpImages;
+/** How many texture images (mipmap levels, faces) to write to files */
+#define WRITE_NONE 0
+#define WRITE_ONE 1
+#define WRITE_ALL 2
+
+static GLuint WriteImages;
static void
-dump_texture(struct gl_texture_object *texObj)
+dump_texture(struct gl_texture_object *texObj, GLuint writeImages)
{
- int i;
+ const GLuint numFaces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
GLboolean written = GL_FALSE;
+ GLuint i, j;
_mesa_printf("Texture %u\n", texObj->Name);
- _mesa_printf(" Target 0x%x\n", texObj->Target);
+ _mesa_printf(" Target %s\n", tex_target_name(texObj->Target));
for (i = 0; i < MAX_TEXTURE_LEVELS; i++) {
- struct gl_texture_image *texImg = texObj->Image[0][i];
- if (texImg) {
- _mesa_printf(" Image %u: %d x %d x %d, format %u at %p\n", i,
- texImg->Width, texImg->Height, texImg->Depth,
- texImg->TexFormat->MesaFormat, texImg->Data);
- if (DumpImages && !written) {
- GLuint face = 0;
- write_texture_image(texObj, face, i);
- written = GL_TRUE;
+ for (j = 0; j < numFaces; j++) {
+ struct gl_texture_image *texImg = texObj->Image[j][i];
+ if (texImg) {
+ _mesa_printf(" Face %u level %u: %d x %d x %d, format %s at %p\n",
+ j, i,
+ texImg->Width, texImg->Height, texImg->Depth,
+ _mesa_get_format_name(texImg->TexFormat),
+ texImg->Data);
+ if (writeImages == WRITE_ALL ||
+ (writeImages == WRITE_ONE && !written)) {
+ write_texture_image(texObj, j, i);
+ written = GL_TRUE;
+ }
}
}
}
@@ -373,13 +408,12 @@ dump_texture(struct gl_texture_object *texObj)
* Dump a single texture.
*/
void
-_mesa_dump_texture(GLuint texture, GLboolean dumpImages)
+_mesa_dump_texture(GLuint texture, GLuint writeImages)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture);
if (texObj) {
- DumpImages = dumpImages;
- dump_texture(texObj);
+ dump_texture(texObj, writeImages);
}
}
@@ -389,7 +423,7 @@ dump_texture_cb(GLuint id, void *data, void *userData)
{
struct gl_texture_object *texObj = (struct gl_texture_object *) data;
(void) userData;
- dump_texture(texObj);
+ dump_texture(texObj, WriteImages);
}
@@ -398,38 +432,44 @@ dump_texture_cb(GLuint id, void *data, void *userData)
* If dumpImages is true, write PPM of level[0] image to a file.
*/
void
-_mesa_dump_textures(GLboolean dumpImages)
+_mesa_dump_textures(GLuint writeImages)
{
GET_CURRENT_CONTEXT(ctx);
- DumpImages = dumpImages;
+ WriteImages = writeImages;
_mesa_HashWalk(ctx->Shared->TexObjects, dump_texture_cb, ctx);
}
static void
-dump_renderbuffer_cb(GLuint id, void *data, void *userData)
+dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage)
{
- const struct gl_renderbuffer *rb = (const struct gl_renderbuffer *) data;
- (void) userData;
-
_mesa_printf("Renderbuffer %u: %u x %u IntFormat = %s\n",
rb->Name, rb->Width, rb->Height,
_mesa_lookup_enum_by_nr(rb->InternalFormat));
- if (DumpImages) {
+ if (writeImage) {
write_renderbuffer_image(rb);
}
}
+static void
+dump_renderbuffer_cb(GLuint id, void *data, void *userData)
+{
+ const struct gl_renderbuffer *rb = (const struct gl_renderbuffer *) data;
+ (void) userData;
+ dump_renderbuffer(rb, WriteImages);
+}
+
+
/**
* Print basic info about all renderbuffers to stdout.
* If dumpImages is true, write PPM of level[0] image to a file.
*/
void
-_mesa_dump_renderbuffers(GLboolean dumpImages)
+_mesa_dump_renderbuffers(GLboolean writeImages)
{
GET_CURRENT_CONTEXT(ctx);
- DumpImages = dumpImages;
+ WriteImages = writeImages;
_mesa_HashWalk(ctx->Shared->RenderBuffers, dump_renderbuffer_cb, ctx);
}
@@ -534,3 +574,64 @@ _mesa_dump_stencil_buffer(const char *filename)
_mesa_free(buf);
_mesa_free(buf2);
}
+
+
+/**
+ * Quick and dirty function to "print" a texture to stdout.
+ */
+void
+_mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img)
+{
+#if CHAN_TYPE != GL_UNSIGNED_BYTE
+ _mesa_problem(NULL, "PrintTexture not supported");
+#else
+ GLuint i, j, c;
+ const GLubyte *data = (const GLubyte *) img->Data;
+
+ if (!data) {
+ _mesa_printf("No texture data\n");
+ return;
+ }
+
+ /* XXX add more formats or make into a new format utility function */
+ switch (img->TexFormat) {
+ case MESA_FORMAT_A8:
+ case MESA_FORMAT_L8:
+ case MESA_FORMAT_I8:
+ case MESA_FORMAT_CI8:
+ c = 1;
+ break;
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_REV:
+ c = 2;
+ break;
+ case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR888:
+ c = 3;
+ break;
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_ARGB8888:
+ c = 4;
+ break;
+ default:
+ _mesa_problem(NULL, "error in PrintTexture\n");
+ return;
+ }
+
+ for (i = 0; i < img->Height; i++) {
+ for (j = 0; j < img->Width; j++) {
+ if (c==1)
+ _mesa_printf("%02x ", data[0]);
+ else if (c==2)
+ _mesa_printf("%02x%02x ", data[0], data[1]);
+ else if (c==3)
+ _mesa_printf("%02x%02x%02x ", data[0], data[1], data[2]);
+ else if (c==4)
+ _mesa_printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
+ data += (img->RowStride - img->Width) * c;
+ }
+ /* XXX use img->ImageStride here */
+ _mesa_printf("\n");
+ }
+#endif
+}
diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
index f66f774a45d..0449cb1798a 100644
--- a/src/mesa/main/debug.h
+++ b/src/mesa/main/debug.h
@@ -58,13 +58,13 @@ extern void _mesa_init_debug( GLcontext *ctx );
#endif
extern void
-_mesa_dump_texture(GLuint texture, GLboolean dumpImages);
+_mesa_dump_texture(GLuint texture, GLuint writeImages);
extern void
-_mesa_dump_textures(GLboolean dumpImages);
+_mesa_dump_textures(GLuint writeImages);
extern void
-_mesa_dump_renderbuffers(GLboolean dumpImages);
+_mesa_dump_renderbuffers(GLboolean writeImages);
extern void
_mesa_dump_color_buffer(const char *filename);
@@ -75,4 +75,7 @@ _mesa_dump_depth_buffer(const char *filename);
extern void
_mesa_dump_stencil_buffer(const char *filename);
+extern void
+_mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img);
+
#endif
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 91c036ef968..f187205b978 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -63,7 +63,7 @@ _mesa_DepthFunc( GLenum func )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func));
switch (func) {
@@ -99,7 +99,7 @@ _mesa_DepthMask( GLboolean flag )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDepthMask %d\n", flag);
/*
diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c
index 7be2aacaf2c..193c7f8255f 100644
--- a/src/mesa/main/depthstencil.c
+++ b/src/mesa/main/depthstencil.c
@@ -26,6 +26,7 @@
#include "imports.h"
#include "context.h"
#include "fbobject.h"
+#include "formats.h"
#include "mtypes.h"
#include "depthstencil.h"
#include "renderbuffer.h"
@@ -40,8 +41,8 @@
* a combined Z+stencil buffer! That implies we need three different sets
* of Get/Put functions.
*
- * We solve this by wrapping the Z24_S8 renderbuffer with depth and stencil
- * adaptors, each with the right kind of depth/stencil Get/Put functions.
+ * We solve this by wrapping the Z24_S8 or S8_Z24 renderbuffer with depth and
+ * stencil adaptors, each with the right kind of depth/stencil Get/Put functions.
*/
@@ -62,8 +63,8 @@ nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
static void
delete_wrapper(struct gl_renderbuffer *rb)
{
- ASSERT(rb->_ActualFormat == GL_DEPTH_COMPONENT24 ||
- rb->_ActualFormat == GL_STENCIL_INDEX8_EXT);
+ ASSERT(rb->Format == MESA_FORMAT_Z24_S8 ||
+ rb->Format == MESA_FORMAT_S8_Z24);
_mesa_reference_renderbuffer(&rb->Wrapped, NULL);
_mesa_free(rb);
}
@@ -82,7 +83,8 @@ alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
(void) internalFormat;
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(dsrb->Format == MESA_FORMAT_Z24_S8 ||
+ dsrb->Format == MESA_FORMAT_S8_Z24);
retVal = dsrb->AllocStorage(ctx, dsrb, dsrb->InternalFormat, width, height);
if (retVal) {
@@ -108,14 +110,21 @@ get_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
GLuint *dst = (GLuint *) values;
const GLuint *src = (const GLuint *) dsrb->GetPointer(ctx, dsrb, x, y);
ASSERT(z24rb->DataType == GL_UNSIGNED_INT);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (!src) {
dsrb->GetRow(ctx, dsrb, count, x, y, temp);
src = temp;
}
- for (i = 0; i < count; i++) {
- dst[i] = src[i] >> 8;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ dst[i] = src[i] >> 8;
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ dst[i] = src[i] & 0xffffff;
+ }
}
}
@@ -127,13 +136,20 @@ get_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
GLuint temp[MAX_WIDTH], i;
GLuint *dst = (GLuint *) values;
ASSERT(z24rb->DataType == GL_UNSIGNED_INT);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
ASSERT(count <= MAX_WIDTH);
/* don't bother trying direct access */
dsrb->GetValues(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- dst[i] = temp[i] >> 8;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ dst[i] = temp[i] >> 8;
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ dst[i] = temp[i] & 0xffffff;
+ }
}
}
@@ -145,14 +161,23 @@ put_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
const GLuint *src = (const GLuint *) values;
GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x, y);
ASSERT(z24rb->DataType == GL_UNSIGNED_INT);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (dst) {
/* direct access */
GLuint i;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- dst[i] = (src[i] << 8) | (dst[i] & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = (src[i] << 8) | (dst[i] & 0xff);
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = (src[i] & 0xffffff) | (dst[i] & 0xff000000);
+ }
}
}
}
@@ -160,9 +185,19 @@ put_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
/* get, modify, put */
GLuint temp[MAX_WIDTH], i;
dsrb->GetRow(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = (src[i] << 8) | (temp[i] & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (src[i] << 8) | (temp[i] & 0xff);
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (src[i] & 0xffffff) | (temp[i] & 0xff000000);
+ }
}
}
dsrb->PutRow(ctx, dsrb, count, x, y, temp, mask);
@@ -174,17 +209,27 @@ put_mono_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
- const GLuint shiftedVal = *((GLuint *) value) << 8;
GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x, y);
ASSERT(z24rb->DataType == GL_UNSIGNED_INT);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (dst) {
/* direct access */
GLuint i;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- dst[i] = shiftedVal | (dst[i] & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ const GLuint shiftedVal = *((GLuint *) value) << 8;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = shiftedVal | (dst[i] & 0xff);
+ }
+ }
+ }
+ else {
+ const GLuint shiftedVal = *((GLuint *) value);
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = shiftedVal | (dst[i] & 0xff000000);
+ }
}
}
}
@@ -192,9 +237,21 @@ put_mono_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
/* get, modify, put */
GLuint temp[MAX_WIDTH], i;
dsrb->GetRow(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = shiftedVal | (temp[i] & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ const GLuint shiftedVal = *((GLuint *) value) << 8;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = shiftedVal | (temp[i] & 0xff);
+ }
+ }
+ }
+ else {
+ const GLuint shiftedVal = *((GLuint *) value);
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = shiftedVal | (temp[i] & 0xff000000);
+ }
}
}
dsrb->PutRow(ctx, dsrb, count, x, y, temp, mask);
@@ -209,15 +266,25 @@ put_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
const GLuint *src = (const GLuint *) values;
ASSERT(z24rb->DataType == GL_UNSIGNED_INT);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (dsrb->GetPointer(ctx, dsrb, 0, 0)) {
/* direct access */
GLuint i;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x[i], y[i]);
- *dst = (src[i] << 8) | (*dst & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x[i], y[i]);
+ *dst = (src[i] << 8) | (*dst & 0xff);
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x[i], y[i]);
+ *dst = (src[i] & 0xffffff) | (*dst & 0xff000000);
+ }
}
}
}
@@ -225,9 +292,19 @@ put_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
/* get, modify, put */
GLuint temp[MAX_WIDTH], i;
dsrb->GetValues(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = (src[i] << 8) | (temp[i] & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (src[i] << 8) | (temp[i] & 0xff);
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (src[i] & 0xffffff) | (temp[i] & 0xff000000);
+ }
}
}
dsrb->PutValues(ctx, dsrb, count, x, y, temp, mask);
@@ -241,12 +318,23 @@ put_mono_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb,
{
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
GLuint temp[MAX_WIDTH], i;
- const GLuint shiftedVal = *((GLuint *) value) << 8;
/* get, modify, put */
dsrb->GetValues(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = shiftedVal | (temp[i] & 0xff);
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ const GLuint shiftedVal = *((GLuint *) value) << 8;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = shiftedVal | (temp[i] & 0xff);
+ }
+ }
+ }
+ else {
+ const GLuint shiftedVal = *((GLuint *) value);
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = shiftedVal | (temp[i] & 0xff000000);
+ }
}
}
dsrb->PutValues(ctx, dsrb, count, x, y, temp, mask);
@@ -264,7 +352,8 @@ _mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
{
struct gl_renderbuffer *z24rb;
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(dsrb->Format == MESA_FORMAT_Z24_S8 ||
+ dsrb->Format == MESA_FORMAT_S8_Z24);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
z24rb = _mesa_new_renderbuffer(ctx, 0);
@@ -277,10 +366,9 @@ _mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
z24rb->Width = dsrb->Width;
z24rb->Height = dsrb->Height;
z24rb->InternalFormat = GL_DEPTH_COMPONENT24;
- z24rb->_ActualFormat = GL_DEPTH_COMPONENT24;
+ z24rb->Format = MESA_FORMAT_X8_Z24;
z24rb->_BaseFormat = GL_DEPTH_COMPONENT;
z24rb->DataType = GL_UNSIGNED_INT;
- z24rb->DepthBits = 24;
z24rb->Data = NULL;
z24rb->Delete = delete_wrapper;
z24rb->AllocStorage = alloc_wrapper_storage;
@@ -310,14 +398,21 @@ get_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
GLubyte *dst = (GLubyte *) values;
const GLuint *src = (const GLuint *) dsrb->GetPointer(ctx, dsrb, x, y);
ASSERT(s8rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (!src) {
dsrb->GetRow(ctx, dsrb, count, x, y, temp);
src = temp;
}
- for (i = 0; i < count; i++) {
- dst[i] = src[i] & 0xff;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ dst[i] = src[i] & 0xff;
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ dst[i] = src[i] >> 24;
+ }
}
}
@@ -329,13 +424,20 @@ get_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
GLuint temp[MAX_WIDTH], i;
GLubyte *dst = (GLubyte *) values;
ASSERT(s8rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
ASSERT(count <= MAX_WIDTH);
/* don't bother trying direct access */
dsrb->GetValues(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- dst[i] = temp[i] & 0xff;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ dst[i] = temp[i] & 0xff;
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ dst[i] = temp[i] >> 24;
+ }
}
}
@@ -347,14 +449,23 @@ put_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
const GLubyte *src = (const GLubyte *) values;
GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x, y);
ASSERT(s8rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (dst) {
/* direct access */
GLuint i;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- dst[i] = (dst[i] & 0xffffff00) | src[i];
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = (dst[i] & 0xffffff00) | src[i];
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = (dst[i] & 0xffffff) | (src[i] << 24);
+ }
}
}
}
@@ -362,9 +473,19 @@ put_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
/* get, modify, put */
GLuint temp[MAX_WIDTH], i;
dsrb->GetRow(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = (temp[i] & 0xffffff00) | src[i];
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff00) | src[i];
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff) | (src[i] << 24);
+ }
}
}
dsrb->PutRow(ctx, dsrb, count, x, y, temp, mask);
@@ -379,14 +500,23 @@ put_mono_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
const GLubyte val = *((GLubyte *) value);
GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x, y);
ASSERT(s8rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (dst) {
/* direct access */
GLuint i;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- dst[i] = (dst[i] & 0xffffff00) | val;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = (dst[i] & 0xffffff00) | val;
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ dst[i] = (dst[i] & 0xffffff) | (val << 24);
+ }
}
}
}
@@ -394,9 +524,19 @@ put_mono_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
/* get, modify, put */
GLuint temp[MAX_WIDTH], i;
dsrb->GetRow(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = (temp[i] & 0xffffff00) | val;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff00) | val;
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff) | (val << 24);
+ }
}
}
dsrb->PutRow(ctx, dsrb, count, x, y, temp, mask);
@@ -411,15 +551,25 @@ put_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
struct gl_renderbuffer *dsrb = s8rb->Wrapped;
const GLubyte *src = (const GLubyte *) values;
ASSERT(s8rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
if (dsrb->GetPointer(ctx, dsrb, 0, 0)) {
/* direct access */
GLuint i;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x[i], y[i]);
- *dst = (*dst & 0xffffff00) | src[i];
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x[i], y[i]);
+ *dst = (*dst & 0xffffff00) | src[i];
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLuint *dst = (GLuint *) dsrb->GetPointer(ctx, dsrb, x[i], y[i]);
+ *dst = (*dst & 0xffffff) | (src[i] << 24);
+ }
}
}
}
@@ -427,9 +577,19 @@ put_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
/* get, modify, put */
GLuint temp[MAX_WIDTH], i;
dsrb->GetValues(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = (temp[i] & 0xffffff00) | src[i];
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff00) | src[i];
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff) | (src[i] << 24);
+ }
}
}
dsrb->PutValues(ctx, dsrb, count, x, y, temp, mask);
@@ -446,9 +606,19 @@ put_mono_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
const GLubyte val = *((GLubyte *) value);
/* get, modify, put */
dsrb->GetValues(ctx, dsrb, count, x, y, temp);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- temp[i] = (temp[i] & 0xffffff) | val;
+ if (dsrb->Format == MESA_FORMAT_Z24_S8) {
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff00) | val;
+ }
+ }
+ }
+ else {
+ assert(dsrb->Format == MESA_FORMAT_S8_Z24);
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ temp[i] = (temp[i] & 0xffffff) | (val << 24);
+ }
}
}
dsrb->PutValues(ctx, dsrb, count, x, y, temp, mask);
@@ -465,7 +635,8 @@ _mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb)
{
struct gl_renderbuffer *s8rb;
- ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(dsrb->Format == MESA_FORMAT_Z24_S8 ||
+ dsrb->Format == MESA_FORMAT_S8_Z24);
ASSERT(dsrb->DataType == GL_UNSIGNED_INT_24_8_EXT);
s8rb = _mesa_new_renderbuffer(ctx, 0);
@@ -478,10 +649,9 @@ _mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb)
s8rb->Width = dsrb->Width;
s8rb->Height = dsrb->Height;
s8rb->InternalFormat = GL_STENCIL_INDEX8_EXT;
- s8rb->_ActualFormat = GL_STENCIL_INDEX8_EXT;
+ s8rb->Format = MESA_FORMAT_S8;
s8rb->_BaseFormat = GL_STENCIL_INDEX;
s8rb->DataType = GL_UNSIGNED_BYTE;
- s8rb->StencilBits = 8;
s8rb->Data = NULL;
s8rb->Delete = delete_wrapper;
s8rb->AllocStorage = alloc_wrapper_storage;
@@ -528,10 +698,10 @@ _mesa_extract_stencil(GLcontext *ctx,
ASSERT(dsRb);
ASSERT(stencilRb);
- ASSERT(dsRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(dsRb->Format == MESA_FORMAT_Z24_S8);
ASSERT(dsRb->DataType == GL_UNSIGNED_INT_24_8_EXT);
- ASSERT(stencilRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT ||
- stencilRb->_ActualFormat == GL_STENCIL_INDEX8_EXT);
+ ASSERT(stencilRb->Format == MESA_FORMAT_Z24_S8 ||
+ stencilRb->Format == MESA_FORMAT_S8);
ASSERT(dsRb->Width == stencilRb->Width);
ASSERT(dsRb->Height == stencilRb->Height);
@@ -541,7 +711,7 @@ _mesa_extract_stencil(GLcontext *ctx,
for (row = 0; row < height; row++) {
GLuint depthStencil[MAX_WIDTH];
dsRb->GetRow(ctx, dsRb, width, 0, row, depthStencil);
- if (stencilRb->_ActualFormat == GL_STENCIL_INDEX8_EXT) {
+ if (stencilRb->Format == MESA_FORMAT_S8) {
/* 8bpp stencil */
GLubyte stencil[MAX_WIDTH];
GLuint i;
@@ -553,7 +723,7 @@ _mesa_extract_stencil(GLcontext *ctx,
else {
/* 32bpp stencil */
/* the 24 depth bits will be ignored */
- ASSERT(stencilRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(stencilRb->Format == MESA_FORMAT_Z24_S8);
ASSERT(stencilRb->DataType == GL_UNSIGNED_INT_24_8_EXT);
stencilRb->PutRow(ctx, stencilRb, width, 0, row, depthStencil, NULL);
}
@@ -577,10 +747,10 @@ _mesa_insert_stencil(GLcontext *ctx,
ASSERT(dsRb);
ASSERT(stencilRb);
- ASSERT(dsRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(dsRb->Format == MESA_FORMAT_Z24_S8);
ASSERT(dsRb->DataType == GL_UNSIGNED_INT_24_8_EXT);
- ASSERT(stencilRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT ||
- stencilRb->_ActualFormat == GL_STENCIL_INDEX8_EXT);
+ ASSERT(stencilRb->Format == MESA_FORMAT_Z24_S8 ||
+ stencilRb->Format == MESA_FORMAT_S8);
ASSERT(dsRb->Width == stencilRb->Width);
ASSERT(dsRb->Height == stencilRb->Height);
@@ -593,7 +763,7 @@ _mesa_insert_stencil(GLcontext *ctx,
dsRb->GetRow(ctx, dsRb, width, 0, row, depthStencil);
- if (stencilRb->_ActualFormat == GL_STENCIL_INDEX8_EXT) {
+ if (stencilRb->Format == MESA_FORMAT_S8) {
/* 8bpp stencil */
GLubyte stencil[MAX_WIDTH];
GLuint i;
@@ -605,7 +775,7 @@ _mesa_insert_stencil(GLcontext *ctx,
else {
/* 32bpp stencil buffer */
GLuint stencil[MAX_WIDTH], i;
- ASSERT(stencilRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
+ ASSERT(stencilRb->Format == MESA_FORMAT_Z24_S8);
ASSERT(stencilRb->DataType == GL_UNSIGNED_INT_24_8_EXT);
stencilRb->GetRow(ctx, stencilRb, width, 0, row, stencil);
for (i = 0; i < width; i++) {
@@ -631,7 +801,7 @@ _mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb)
GLubyte *data;
GLint i, j, k;
- ASSERT(stencilRb->_ActualFormat == GL_STENCIL_INDEX8_EXT);
+ ASSERT(stencilRb->Format == MESA_FORMAT_S8);
ASSERT(stencilRb->Data);
data = (GLubyte *) stencilRb->Data;
@@ -650,6 +820,4 @@ _mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb)
stencilRb->PutRow(ctx, stencilRb, width, 0, i, depthStencil, NULL);
}
_mesa_free(data);
-
- stencilRb->_BaseFormat = GL_DEPTH_STENCIL_EXT;
}
diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c
index bf1a0137896..97d213e8e1f 100644
--- a/src/mesa/main/dispatch.c
+++ b/src/mesa/main/dispatch.c
@@ -43,6 +43,7 @@
#include "main/compiler.h"
#include "glapi/glapi.h"
#include "glapi/glapitable.h"
+#include "glapi/glapidispatch.h"
#include "glapi/glthread.h"
@@ -88,7 +89,6 @@
#define GLAPIENTRY
#endif
-#include "glapi/dispatch.h"
#include "glapi/glapitemp.h"
#endif /* USE_X86_ASM */
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 4383aed6692..12ce14c5d04 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -55,46 +55,47 @@
static void
client_state(GLcontext *ctx, GLenum cap, GLboolean state)
{
+ struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLuint flag;
GLboolean *var;
switch (cap) {
case GL_VERTEX_ARRAY:
- var = &ctx->Array.ArrayObj->Vertex.Enabled;
+ var = &arrayObj->Vertex.Enabled;
flag = _NEW_ARRAY_VERTEX;
break;
case GL_NORMAL_ARRAY:
- var = &ctx->Array.ArrayObj->Normal.Enabled;
+ var = &arrayObj->Normal.Enabled;
flag = _NEW_ARRAY_NORMAL;
break;
case GL_COLOR_ARRAY:
- var = &ctx->Array.ArrayObj->Color.Enabled;
+ var = &arrayObj->Color.Enabled;
flag = _NEW_ARRAY_COLOR0;
break;
case GL_INDEX_ARRAY:
- var = &ctx->Array.ArrayObj->Index.Enabled;
+ var = &arrayObj->Index.Enabled;
flag = _NEW_ARRAY_INDEX;
break;
case GL_TEXTURE_COORD_ARRAY:
- var = &ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
+ var = &arrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
flag = _NEW_ARRAY_TEXCOORD(ctx->Array.ActiveTexture);
break;
case GL_EDGE_FLAG_ARRAY:
- var = &ctx->Array.ArrayObj->EdgeFlag.Enabled;
+ var = &arrayObj->EdgeFlag.Enabled;
flag = _NEW_ARRAY_EDGEFLAG;
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
- var = &ctx->Array.ArrayObj->FogCoord.Enabled;
+ var = &arrayObj->FogCoord.Enabled;
flag = _NEW_ARRAY_FOGCOORD;
break;
case GL_SECONDARY_COLOR_ARRAY_EXT:
- var = &ctx->Array.ArrayObj->SecondaryColor.Enabled;
+ var = &arrayObj->SecondaryColor.Enabled;
flag = _NEW_ARRAY_COLOR1;
break;
#if FEATURE_point_size_array
case GL_POINT_SIZE_ARRAY_OES:
- var = &ctx->Array.ArrayObj->PointSize.Enabled;
+ var = &arrayObj->PointSize.Enabled;
flag = _NEW_ARRAY_POINT_SIZE;
break;
#endif
@@ -120,7 +121,7 @@ client_state(GLcontext *ctx, GLenum cap, GLboolean state)
{
GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV;
ASSERT(n < Elements(ctx->Array.ArrayObj->VertexAttrib));
- var = &ctx->Array.ArrayObj->VertexAttrib[n].Enabled;
+ var = &arrayObj->VertexAttrib[n].Enabled;
flag = _NEW_ARRAY_ATTRIB(n);
}
break;
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 606d50c59ad..f9f4bc78535 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -384,6 +384,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DELETE_STATUS\0"
"GL_DEPTH\0"
"GL_DEPTH24_STENCIL8\0"
+ "GL_DEPTH24_STENCIL8_EXT\0"
"GL_DEPTH_ATTACHMENT\0"
"GL_DEPTH_ATTACHMENT_EXT\0"
"GL_DEPTH_BIAS\0"
@@ -409,6 +410,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH_SCALE\0"
"GL_DEPTH_STENCIL\0"
"GL_DEPTH_STENCIL_ATTACHMENT\0"
+ "GL_DEPTH_STENCIL_EXT\0"
"GL_DEPTH_STENCIL_NV\0"
"GL_DEPTH_STENCIL_TO_BGRA_NV\0"
"GL_DEPTH_STENCIL_TO_RGBA_NV\0"
@@ -478,6 +480,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DRAW_BUFFER9_ARB\0"
"GL_DRAW_BUFFER9_ATI\0"
"GL_DRAW_FRAMEBUFFER\0"
+ "GL_DRAW_FRAMEBUFFER_BINDING\0"
"GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
"GL_DRAW_FRAMEBUFFER_EXT\0"
"GL_DRAW_PIXEL_TOKEN\0"
@@ -593,6 +596,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
+ "GL_FRAMEBUFFER_BINDING\0"
"GL_FRAMEBUFFER_BINDING_EXT\0"
"GL_FRAMEBUFFER_COMPLETE\0"
"GL_FRAMEBUFFER_COMPLETE_EXT\0"
@@ -601,12 +605,15 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER\0"
"GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER\0"
"GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
"GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
"GL_FRAMEBUFFER_UNDEFINED\0"
@@ -892,6 +899,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_CLIPMAP_DEPTH_SGIX\0"
"GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
"GL_MAX_CLIP_PLANES\0"
+ "GL_MAX_COLOR_ATTACHMENTS\0"
"GL_MAX_COLOR_ATTACHMENTS_EXT\0"
"GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
"GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
@@ -947,8 +955,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_PROJECTION_STACK_DEPTH\0"
"GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
"GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
+ "GL_MAX_RENDERBUFFER_SIZE\0"
"GL_MAX_RENDERBUFFER_SIZE_EXT\0"
"GL_MAX_SAMPLES\0"
+ "GL_MAX_SAMPLES_EXT\0"
"GL_MAX_SERVER_WAIT_TIMEOUT\0"
"GL_MAX_SHININESS_NV\0"
"GL_MAX_SPOT_EXPONENT_NV\0"
@@ -1327,6 +1337,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_RASTER_POSITION_UNCLIPPED_IBM\0"
"GL_READ_BUFFER\0"
"GL_READ_FRAMEBUFFER\0"
+ "GL_READ_FRAMEBUFFER_BINDING\0"
"GL_READ_FRAMEBUFFER_BINDING_EXT\0"
"GL_READ_FRAMEBUFFER_EXT\0"
"GL_READ_ONLY\0"
@@ -1345,6 +1356,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_RENDER\0"
"GL_RENDERBUFFER\0"
"GL_RENDERBUFFER_ALPHA_SIZE\0"
+ "GL_RENDERBUFFER_BINDING\0"
"GL_RENDERBUFFER_BINDING_EXT\0"
"GL_RENDERBUFFER_BLUE_SIZE\0"
"GL_RENDERBUFFER_DEPTH_SIZE\0"
@@ -1356,6 +1368,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
"GL_RENDERBUFFER_RED_SIZE\0"
"GL_RENDERBUFFER_SAMPLES\0"
+ "GL_RENDERBUFFER_SAMPLES_EXT\0"
"GL_RENDERBUFFER_STENCIL_SIZE\0"
"GL_RENDERBUFFER_WIDTH\0"
"GL_RENDERBUFFER_WIDTH_EXT\0"
@@ -1541,9 +1554,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_STENCIL_FAIL\0"
"GL_STENCIL_FUNC\0"
"GL_STENCIL_INDEX\0"
+ "GL_STENCIL_INDEX1\0"
+ "GL_STENCIL_INDEX16\0"
"GL_STENCIL_INDEX16_EXT\0"
"GL_STENCIL_INDEX1_EXT\0"
+ "GL_STENCIL_INDEX4\0"
"GL_STENCIL_INDEX4_EXT\0"
+ "GL_STENCIL_INDEX8\0"
"GL_STENCIL_INDEX8_EXT\0"
"GL_STENCIL_INDEX_EXT\0"
"GL_STENCIL_PASS_DEPTH_FAIL\0"
@@ -1761,6 +1778,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_RESIDENT\0"
"GL_TEXTURE_STACK_DEPTH\0"
"GL_TEXTURE_STENCIL_SIZE\0"
+ "GL_TEXTURE_STENCIL_SIZE_EXT\0"
"GL_TEXTURE_STORAGE_HINT_APPLE\0"
"GL_TEXTURE_TOO_LARGE_EXT\0"
"GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
@@ -1804,6 +1822,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_UNSIGNED_INT\0"
"GL_UNSIGNED_INT_10_10_10_2\0"
"GL_UNSIGNED_INT_24_8\0"
+ "GL_UNSIGNED_INT_24_8_EXT\0"
"GL_UNSIGNED_INT_24_8_NV\0"
"GL_UNSIGNED_INT_2_10_10_10_REV\0"
"GL_UNSIGNED_INT_8_8_8_8\0"
@@ -1900,7 +1919,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1862] =
+static const enum_elt all_enums[1881] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2250,1600 +2269,1619 @@ static const enum_elt all_enums[1862] =
{ 7144, 0x00008B80 }, /* GL_DELETE_STATUS */
{ 7161, 0x00001801 }, /* GL_DEPTH */
{ 7170, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
- { 7190, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
- { 7210, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 7234, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 7248, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 7262, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 7282, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 7307, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7327, 0x0000864F }, /* GL_DEPTH_CLAMP */
- { 7342, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7360, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7381, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7400, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7421, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7446, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7472, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7493, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7518, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 7544, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 7565, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 7590, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 7616, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 7630, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 7645, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 7660, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 7677, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 7705, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 7725, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 7753, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 7781, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 7795, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 7817, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 7843, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 7862, 0x00001201 }, /* GL_DIFFUSE */
- { 7873, 0x00000BD0 }, /* GL_DITHER */
- { 7883, 0x00000A02 }, /* GL_DOMAIN */
- { 7893, 0x00001100 }, /* GL_DONT_CARE */
- { 7906, 0x000086AE }, /* GL_DOT3_RGB */
- { 7918, 0x000086AF }, /* GL_DOT3_RGBA */
- { 7931, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 7948, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 7965, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 7981, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 7997, 0x0000140A }, /* GL_DOUBLE */
- { 8007, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8023, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8038, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8054, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8074, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8094, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8110, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8127, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8148, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8169, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8186, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8207, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8228, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8245, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8266, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8287, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8304, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8325, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8346, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8363, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8384, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8405, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8422, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8443, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8464, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 8484, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 8504, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 8520, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 8540, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 8560, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 8576, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 8596, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 8616, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 8632, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 8652, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 8672, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 8688, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 8708, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 8728, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 8744, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 8764, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 8784, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 8800, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 8820, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 8840, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 8856, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 8876, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 8896, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 8912, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 8932, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 8952, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 8972, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 9004, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9028, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9048, 0x00000304 }, /* GL_DST_ALPHA */
- { 9061, 0x00000306 }, /* GL_DST_COLOR */
- { 9074, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9088, 0x00008779 }, /* GL_DUDV_ATI */
- { 9100, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9116, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9136, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9152, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9172, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9188, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9208, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9221, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9240, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9274, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9312, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9339, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9365, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9389, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9421, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 9457, 0x00001600 }, /* GL_EMISSION */
- { 9469, 0x00002000 }, /* GL_ENABLE_BIT */
- { 9483, 0x00000202 }, /* GL_EQUAL */
- { 9492, 0x00001509 }, /* GL_EQUIV */
- { 9501, 0x00010000 }, /* GL_EVAL_BIT */
- { 9513, 0x00000800 }, /* GL_EXP */
- { 9520, 0x00000801 }, /* GL_EXP2 */
- { 9528, 0x00001F03 }, /* GL_EXTENSIONS */
- { 9542, 0x00002400 }, /* GL_EYE_LINEAR */
- { 9556, 0x00002502 }, /* GL_EYE_PLANE */
- { 9569, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 9594, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 9611, 0x00000000 }, /* GL_FALSE */
- { 9620, 0x00001101 }, /* GL_FASTEST */
- { 9631, 0x00001C01 }, /* GL_FEEDBACK */
- { 9643, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 9670, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 9694, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 9718, 0x00001B02 }, /* GL_FILL */
- { 9726, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
- { 9753, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 9784, 0x00001D00 }, /* GL_FLAT */
- { 9792, 0x00001406 }, /* GL_FLOAT */
- { 9801, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 9815, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 9833, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 9849, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 9865, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 9879, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 9897, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 9913, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 9929, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 9943, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 9961, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 9977, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 9993, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 10007, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 10025, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 10039, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10057, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10071, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10089, 0x00000B60 }, /* GL_FOG */
- { 10096, 0x00000080 }, /* GL_FOG_BIT */
- { 10107, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10120, 0x00008451 }, /* GL_FOG_COORD */
- { 10133, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10151, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10175, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10214, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10257, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10289, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10320, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10349, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10374, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10393, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 10427, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 10454, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 10480, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 10504, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 10521, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 10536, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 10560, 0x00000B64 }, /* GL_FOG_END */
- { 10571, 0x00000C54 }, /* GL_FOG_HINT */
- { 10583, 0x00000B61 }, /* GL_FOG_INDEX */
- { 10596, 0x00000B65 }, /* GL_FOG_MODE */
- { 10608, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 10627, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 10652, 0x00000B63 }, /* GL_FOG_START */
- { 10665, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 10683, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 10707, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 10726, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 10749, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 10784, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 10799, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 10836, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 10872, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 10913, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 10954, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 10991, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 11028, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11066, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11108, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11146, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11188, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11223, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 11262, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 11311, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 11359, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 11411, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 11451, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 11495, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 11535, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 11579, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 11606, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 11630, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 11658, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 11681, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 11700, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 11737, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 11778, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 11819, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 11861, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 11912, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 11950, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 11995, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 12044, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 12082, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 12124, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 12156, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 12181, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 12208, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 12239, 0x00000404 }, /* GL_FRONT */
- { 12248, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 12266, 0x00000B46 }, /* GL_FRONT_FACE */
- { 12280, 0x00000400 }, /* GL_FRONT_LEFT */
- { 12294, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 12309, 0x00008006 }, /* GL_FUNC_ADD */
- { 12321, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 12337, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 12362, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 12391, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 12408, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 12429, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 12448, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 12472, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 12501, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 12525, 0x00000206 }, /* GL_GEQUAL */
- { 12535, 0x00000204 }, /* GL_GREATER */
- { 12546, 0x00001904 }, /* GL_GREEN */
- { 12555, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 12569, 0x00000D53 }, /* GL_GREEN_BITS */
- { 12583, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 12598, 0x00008000 }, /* GL_HINT_BIT */
- { 12610, 0x00008024 }, /* GL_HISTOGRAM */
- { 12623, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 12647, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 12675, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 12698, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 12725, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 12742, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 12762, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 12786, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 12810, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 12838, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 12866, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 12898, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 12920, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 12946, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 12964, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 12986, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 13005, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 13028, 0x0000862A }, /* GL_IDENTITY_NV */
- { 13043, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 13063, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 13103, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 13141, 0x00001E02 }, /* GL_INCR */
- { 13149, 0x00008507 }, /* GL_INCR_WRAP */
- { 13162, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 13179, 0x00008222 }, /* GL_INDEX */
- { 13188, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 13203, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 13233, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 13267, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 13290, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 13312, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 13332, 0x00000D51 }, /* GL_INDEX_BITS */
- { 13346, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 13367, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 13385, 0x00000C30 }, /* GL_INDEX_MODE */
- { 13399, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 13415, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 13430, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 13449, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 13468, 0x00001404 }, /* GL_INT */
- { 13475, 0x00008049 }, /* GL_INTENSITY */
- { 13488, 0x0000804C }, /* GL_INTENSITY12 */
- { 13503, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 13522, 0x0000804D }, /* GL_INTENSITY16 */
- { 13537, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 13556, 0x0000804A }, /* GL_INTENSITY4 */
- { 13570, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 13588, 0x0000804B }, /* GL_INTENSITY8 */
- { 13602, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 13620, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 13637, 0x00008575 }, /* GL_INTERPOLATE */
- { 13652, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 13671, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 13690, 0x00008B53 }, /* GL_INT_VEC2 */
- { 13702, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 13718, 0x00008B54 }, /* GL_INT_VEC3 */
- { 13730, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 13746, 0x00008B55 }, /* GL_INT_VEC4 */
- { 13758, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 13774, 0x00000500 }, /* GL_INVALID_ENUM */
- { 13790, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 13823, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 13860, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 13881, 0x00000501 }, /* GL_INVALID_VALUE */
- { 13898, 0x0000862B }, /* GL_INVERSE_NV */
- { 13912, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 13936, 0x0000150A }, /* GL_INVERT */
- { 13946, 0x00001E00 }, /* GL_KEEP */
- { 13954, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
- { 13980, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 14010, 0x00000406 }, /* GL_LEFT */
- { 14018, 0x00000203 }, /* GL_LEQUAL */
- { 14028, 0x00000201 }, /* GL_LESS */
- { 14036, 0x00004000 }, /* GL_LIGHT0 */
- { 14046, 0x00004001 }, /* GL_LIGHT1 */
- { 14056, 0x00004002 }, /* GL_LIGHT2 */
- { 14066, 0x00004003 }, /* GL_LIGHT3 */
- { 14076, 0x00004004 }, /* GL_LIGHT4 */
- { 14086, 0x00004005 }, /* GL_LIGHT5 */
- { 14096, 0x00004006 }, /* GL_LIGHT6 */
- { 14106, 0x00004007 }, /* GL_LIGHT7 */
- { 14116, 0x00000B50 }, /* GL_LIGHTING */
- { 14128, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 14144, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 14167, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 14196, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 14229, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 14257, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 14281, 0x00001B01 }, /* GL_LINE */
- { 14289, 0x00002601 }, /* GL_LINEAR */
- { 14299, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 14321, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 14351, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 14382, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 14406, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 14431, 0x00000001 }, /* GL_LINES */
- { 14440, 0x00000004 }, /* GL_LINE_BIT */
- { 14452, 0x00000002 }, /* GL_LINE_LOOP */
- { 14465, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 14485, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 14500, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 14520, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 14536, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 14560, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 14583, 0x00000003 }, /* GL_LINE_STRIP */
- { 14597, 0x00000702 }, /* GL_LINE_TOKEN */
- { 14611, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 14625, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 14651, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 14671, 0x00008B82 }, /* GL_LINK_STATUS */
- { 14686, 0x00000B32 }, /* GL_LIST_BASE */
- { 14699, 0x00020000 }, /* GL_LIST_BIT */
- { 14711, 0x00000B33 }, /* GL_LIST_INDEX */
- { 14725, 0x00000B30 }, /* GL_LIST_MODE */
- { 14738, 0x00000101 }, /* GL_LOAD */
- { 14746, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 14758, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 14775, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 14789, 0x00001909 }, /* GL_LUMINANCE */
- { 14802, 0x00008041 }, /* GL_LUMINANCE12 */
- { 14817, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 14840, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 14867, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 14889, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 14915, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 14934, 0x00008042 }, /* GL_LUMINANCE16 */
- { 14949, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 14972, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 14999, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 15018, 0x0000803F }, /* GL_LUMINANCE4 */
- { 15032, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 15053, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 15078, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 15096, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 15117, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 15142, 0x00008040 }, /* GL_LUMINANCE8 */
- { 15156, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 15177, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 15202, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 15220, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 15239, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 15255, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 15275, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 15297, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 15311, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 15326, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 15350, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 15374, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 15398, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 15422, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 15439, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 15456, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 15484, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 15513, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 15542, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 15571, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 15600, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 15629, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 15658, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 15686, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 15714, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 15742, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 15770, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 15798, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 15826, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 15854, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 15882, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 15910, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 15926, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 15946, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 15968, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 15982, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 15997, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 16021, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 16045, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 16069, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 16093, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 16110, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 16127, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 16155, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 16184, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 16213, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 16242, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 16271, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 16300, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 16329, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 16357, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 16385, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 16413, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 16441, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 16469, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 16497, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 16525, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 16553, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 16581, 0x00000D10 }, /* GL_MAP_COLOR */
- { 16594, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 16620, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 16649, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 16677, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 16693, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 16708, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 16734, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 16751, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 16766, 0x00008630 }, /* GL_MATRIX0_NV */
- { 16780, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 16796, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 16812, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 16828, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 16844, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 16860, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 16876, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 16892, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 16908, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 16924, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 16940, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 16955, 0x00008631 }, /* GL_MATRIX1_NV */
- { 16969, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 16985, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 17001, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 17017, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 17033, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 17049, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 17065, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 17081, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 17097, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 17113, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 17129, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 17144, 0x00008632 }, /* GL_MATRIX2_NV */
- { 17158, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 17174, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 17190, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 17205, 0x00008633 }, /* GL_MATRIX3_NV */
- { 17219, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 17234, 0x00008634 }, /* GL_MATRIX4_NV */
- { 17248, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 17263, 0x00008635 }, /* GL_MATRIX5_NV */
- { 17277, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 17292, 0x00008636 }, /* GL_MATRIX6_NV */
- { 17306, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 17321, 0x00008637 }, /* GL_MATRIX7_NV */
- { 17335, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 17350, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 17365, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 17391, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 17425, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 17456, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 17489, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 17520, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 17535, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 17557, 0x00008008 }, /* GL_MAX */
- { 17564, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 17587, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 17619, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 17645, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 17678, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 17704, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 17738, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 17757, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 17786, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 17818, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 17854, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 17890, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 17930, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 17956, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 17986, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 18011, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 18040, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 18069, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 18102, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 18122, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 18146, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 18170, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 18194, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 18219, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 18237, 0x00008008 }, /* GL_MAX_EXT */
- { 18248, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 18283, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 18322, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 18336, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 18356, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 18394, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 18423, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 18447, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 18475, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 18498, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 18535, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 18571, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 18598, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 18627, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 18661, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 18697, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 18724, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 18756, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 18792, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 18821, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 18850, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 18878, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 18916, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 18960, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 19003, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 19037, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 19076, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 19113, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 19151, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 19194, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 19237, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 19267, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 19298, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 19334, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 19370, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 19400, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 19434, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 19467, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 19496, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 19511, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 19538, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 19558, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 19582, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 19604, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 19630, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 19657, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 19688, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 19712, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 19746, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 19766, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 19793, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 19814, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 19839, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 19864, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 19899, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 19921, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 19947, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 19969, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 19995, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 20029, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 20067, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 20100, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 20137, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 20161, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 20182, 0x00008007 }, /* GL_MIN */
- { 20189, 0x0000802E }, /* GL_MINMAX */
- { 20199, 0x0000802E }, /* GL_MINMAX_EXT */
- { 20213, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 20230, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 20251, 0x00008030 }, /* GL_MINMAX_SINK */
- { 20266, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 20285, 0x00008007 }, /* GL_MIN_EXT */
- { 20296, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 20315, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 20338, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 20361, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 20381, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 20401, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 20431, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 20459, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 20487, 0x00001700 }, /* GL_MODELVIEW */
- { 20500, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 20518, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 20537, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 20556, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 20575, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 20594, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 20613, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 20632, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 20651, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 20670, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 20689, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 20708, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 20726, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 20745, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 20764, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 20783, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 20802, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 20821, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 20840, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 20859, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 20878, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 20897, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 20916, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 20934, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 20953, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 20972, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 20990, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 21008, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 21026, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 21044, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 21062, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 21080, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 21098, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 21118, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 21145, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 21170, 0x00002100 }, /* GL_MODULATE */
- { 21182, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 21202, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 21229, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 21254, 0x00000103 }, /* GL_MULT */
- { 21262, 0x0000809D }, /* GL_MULTISAMPLE */
- { 21277, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 21297, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 21316, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 21335, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 21359, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 21382, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 21412, 0x00002A25 }, /* GL_N3F_V3F */
- { 21423, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 21443, 0x0000150E }, /* GL_NAND */
- { 21451, 0x00002600 }, /* GL_NEAREST */
- { 21462, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 21493, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 21525, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 21550, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 21576, 0x00000200 }, /* GL_NEVER */
- { 21585, 0x00001102 }, /* GL_NICEST */
- { 21595, 0x00000000 }, /* GL_NONE */
- { 21603, 0x00001505 }, /* GL_NOOP */
- { 21611, 0x00001508 }, /* GL_NOR */
- { 21618, 0x00000BA1 }, /* GL_NORMALIZE */
- { 21631, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 21647, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 21678, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 21713, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 21737, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 21760, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 21781, 0x00008511 }, /* GL_NORMAL_MAP */
- { 21795, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 21813, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 21830, 0x00000205 }, /* GL_NOTEQUAL */
- { 21842, 0x00000000 }, /* GL_NO_ERROR */
- { 21854, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 21888, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 21926, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 21958, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 22000, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 22030, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 22070, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 22101, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 22130, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 22158, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 22188, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 22205, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 22231, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 22247, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 22282, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 22304, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 22319, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 22338, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 22368, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 22389, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 22417, 0x00000001 }, /* GL_ONE */
- { 22424, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 22452, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 22484, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 22512, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 22544, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 22567, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 22590, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 22613, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 22636, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 22654, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 22676, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 22698, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 22714, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 22734, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 22754, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 22772, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 22794, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 22816, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 22832, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 22852, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 22872, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 22890, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 22912, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 22934, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 22950, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 22970, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 22990, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 23011, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 23030, 0x00001507 }, /* GL_OR */
- { 23036, 0x00000A01 }, /* GL_ORDER */
- { 23045, 0x0000150D }, /* GL_OR_INVERTED */
- { 23060, 0x0000150B }, /* GL_OR_REVERSE */
- { 23074, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 23091, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 23109, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 23130, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 23150, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 23168, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 23187, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 23207, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 23227, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 23245, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 23264, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 23289, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 23313, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 23334, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 23356, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 23378, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 23403, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 23427, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 23448, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 23470, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 23492, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 23514, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 23545, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 23565, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 23590, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 23610, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 23635, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 23655, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 23680, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 23700, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 23725, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 23745, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 23770, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 23790, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 23815, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 23835, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 23860, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 23880, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 23905, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 23925, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 23950, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 23970, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 23995, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 24013, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 24034, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 24063, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 24096, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 24121, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 24144, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 24175, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 24210, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 24237, 0x00001B00 }, /* GL_POINT */
- { 24246, 0x00000000 }, /* GL_POINTS */
- { 24256, 0x00000002 }, /* GL_POINT_BIT */
- { 24269, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 24299, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 24333, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 24367, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 24402, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 24431, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 24464, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 24497, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 24531, 0x00000B11 }, /* GL_POINT_SIZE */
- { 24545, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 24571, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 24589, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 24611, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 24633, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 24656, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 24674, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 24696, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 24718, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 24741, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 24761, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 24777, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 24798, 0x00008861 }, /* GL_POINT_SPRITE */
- { 24814, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 24834, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 24863, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 24882, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 24908, 0x00000701 }, /* GL_POINT_TOKEN */
- { 24923, 0x00000009 }, /* GL_POLYGON */
- { 24934, 0x00000008 }, /* GL_POLYGON_BIT */
- { 24949, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 24965, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 24988, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 25013, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 25036, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 25059, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 25083, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 25107, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 25125, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 25148, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 25167, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 25190, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 25207, 0x00001203 }, /* GL_POSITION */
- { 25219, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 25251, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 25287, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 25320, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 25357, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 25388, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 25423, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 25455, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 25491, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 25524, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 25556, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 25592, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 25625, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 25662, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 25692, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 25726, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 25757, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 25792, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 25823, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 25858, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 25890, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 25926, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 25956, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 25990, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 26021, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 26056, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 26088, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 26119, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 26154, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 26186, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 26222, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 26251, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 26284, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 26314, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 26348, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 26387, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 26420, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 26460, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 26494, 0x00008578 }, /* GL_PREVIOUS */
- { 26506, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 26522, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 26538, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 26555, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 26576, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 26597, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 26630, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 26662, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 26685, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 26708, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 26738, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 26767, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 26795, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 26817, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 26845, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 26873, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 26895, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 26916, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 26956, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 26995, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 27025, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 27060, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 27093, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 27127, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 27166, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 27205, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 27227, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 27253, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 27277, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 27300, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 27322, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 27343, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 27364, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 27391, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 27423, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 27455, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 27490, 0x00001701 }, /* GL_PROJECTION */
- { 27504, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 27525, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 27551, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
- { 27571, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 27595, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 27616, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 27635, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 27658, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 27697, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 27735, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 27755, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 27785, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 27809, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 27829, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 27859, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 27883, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 27903, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 27936, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 27962, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 27992, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 28023, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 28053, 0x00002003 }, /* GL_Q */
- { 28058, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 28083, 0x00000007 }, /* GL_QUADS */
- { 28092, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- { 28136, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 28184, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 28201, 0x00000008 }, /* GL_QUAD_STRIP */
- { 28215, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 28237, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 28263, 0x00008866 }, /* GL_QUERY_RESULT */
- { 28279, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 28299, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 28325, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 28355, 0x00002002 }, /* GL_R */
- { 28360, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 28372, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 28405, 0x00000C02 }, /* GL_READ_BUFFER */
- { 28420, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 28440, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 28472, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 28496, 0x000088B8 }, /* GL_READ_ONLY */
- { 28509, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 28526, 0x000088BA }, /* GL_READ_WRITE */
- { 28540, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 28558, 0x00001903 }, /* GL_RED */
- { 28565, 0x00008016 }, /* GL_REDUCE */
- { 28575, 0x00008016 }, /* GL_REDUCE_EXT */
- { 28589, 0x00000D15 }, /* GL_RED_BIAS */
- { 28601, 0x00000D52 }, /* GL_RED_BITS */
- { 28613, 0x00000D14 }, /* GL_RED_SCALE */
- { 28626, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 28644, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 28666, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 28687, 0x00001C00 }, /* GL_RENDER */
- { 28697, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 28713, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 28740, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 28768, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 28794, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 28821, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 28841, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 28868, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 28891, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 28918, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 28950, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 28986, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 29011, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 29035, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 29064, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 29086, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 29112, 0x00001F01 }, /* GL_RENDERER */
- { 29124, 0x00000C40 }, /* GL_RENDER_MODE */
- { 29139, 0x00002901 }, /* GL_REPEAT */
- { 29149, 0x00001E01 }, /* GL_REPLACE */
- { 29160, 0x00008062 }, /* GL_REPLACE_EXT */
- { 29175, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 29198, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 29216, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 29238, 0x00000102 }, /* GL_RETURN */
- { 29248, 0x00001907 }, /* GL_RGB */
- { 29255, 0x00008052 }, /* GL_RGB10 */
- { 29264, 0x00008059 }, /* GL_RGB10_A2 */
- { 29276, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 29292, 0x00008052 }, /* GL_RGB10_EXT */
- { 29305, 0x00008053 }, /* GL_RGB12 */
- { 29314, 0x00008053 }, /* GL_RGB12_EXT */
- { 29327, 0x00008054 }, /* GL_RGB16 */
- { 29336, 0x00008054 }, /* GL_RGB16_EXT */
- { 29349, 0x0000804E }, /* GL_RGB2_EXT */
- { 29361, 0x0000804F }, /* GL_RGB4 */
- { 29369, 0x0000804F }, /* GL_RGB4_EXT */
- { 29381, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 29394, 0x00008050 }, /* GL_RGB5 */
- { 29402, 0x00008057 }, /* GL_RGB5_A1 */
- { 29413, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 29428, 0x00008050 }, /* GL_RGB5_EXT */
- { 29440, 0x00008051 }, /* GL_RGB8 */
- { 29448, 0x00008051 }, /* GL_RGB8_EXT */
- { 29460, 0x00001908 }, /* GL_RGBA */
- { 29468, 0x0000805A }, /* GL_RGBA12 */
- { 29478, 0x0000805A }, /* GL_RGBA12_EXT */
- { 29492, 0x0000805B }, /* GL_RGBA16 */
- { 29502, 0x0000805B }, /* GL_RGBA16_EXT */
- { 29516, 0x00008055 }, /* GL_RGBA2 */
- { 29525, 0x00008055 }, /* GL_RGBA2_EXT */
- { 29538, 0x00008056 }, /* GL_RGBA4 */
- { 29547, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 29566, 0x00008056 }, /* GL_RGBA4_EXT */
- { 29579, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 29593, 0x00008058 }, /* GL_RGBA8 */
- { 29602, 0x00008058 }, /* GL_RGBA8_EXT */
- { 29615, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 29630, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 29648, 0x00000C31 }, /* GL_RGBA_MODE */
- { 29661, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 29674, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 29688, 0x000083A0 }, /* GL_RGB_S3TC */
- { 29700, 0x00008573 }, /* GL_RGB_SCALE */
- { 29713, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 29730, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 29747, 0x00000407 }, /* GL_RIGHT */
- { 29756, 0x00002000 }, /* GL_S */
- { 29761, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 29775, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 29796, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 29810, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 29831, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 29845, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 29861, 0x000080A9 }, /* GL_SAMPLES */
- { 29872, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 29888, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 29903, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 29921, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 29943, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 29971, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 30003, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 30026, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 30053, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 30071, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 30094, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 30116, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 30135, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 30158, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 30184, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 30214, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 30239, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 30268, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 30283, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 30298, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 30314, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 30339, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 30379, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 30423, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 30456, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 30486, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 30518, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 30548, 0x00001C02 }, /* GL_SELECT */
- { 30558, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 30586, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 30611, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 30627, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 30654, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 30685, 0x0000150F }, /* GL_SET */
- { 30692, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 30713, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 30737, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 30752, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 30767, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 30795, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 30818, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 30848, 0x00001601 }, /* GL_SHININESS */
- { 30861, 0x00001402 }, /* GL_SHORT */
- { 30870, 0x00009119 }, /* GL_SIGNALED */
- { 30882, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 30903, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 30919, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 30939, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 30958, 0x00008C46 }, /* GL_SLUMINANCE */
- { 30972, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 30987, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 31009, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 31029, 0x00001D01 }, /* GL_SMOOTH */
- { 31039, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 31072, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 31099, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 31132, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 31159, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 31176, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 31197, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 31218, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 31233, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 31252, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 31271, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 31288, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 31309, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 31330, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 31345, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 31364, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 31383, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 31400, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 31421, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 31442, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 31457, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 31476, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 31495, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 31515, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 31533, 0x00001202 }, /* GL_SPECULAR */
- { 31545, 0x00002402 }, /* GL_SPHERE_MAP */
- { 31559, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 31574, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 31592, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 31609, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 31623, 0x00008580 }, /* GL_SRC0_RGB */
- { 31635, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 31649, 0x00008581 }, /* GL_SRC1_RGB */
- { 31661, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 31675, 0x00008582 }, /* GL_SRC2_RGB */
- { 31687, 0x00000302 }, /* GL_SRC_ALPHA */
- { 31700, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 31722, 0x00000300 }, /* GL_SRC_COLOR */
- { 31735, 0x00008C40 }, /* GL_SRGB */
- { 31743, 0x00008C41 }, /* GL_SRGB8 */
- { 31752, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 31768, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 31782, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 31800, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 31819, 0x000088E6 }, /* GL_STATIC_COPY */
- { 31834, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 31853, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 31868, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 31887, 0x000088E5 }, /* GL_STATIC_READ */
- { 31902, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 31921, 0x00001802 }, /* GL_STENCIL */
- { 31932, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 31954, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 31980, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 32001, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 32026, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 32047, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 32072, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 32104, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 32140, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 32172, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 32208, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 32228, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 32255, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 32281, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 32297, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 32319, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 32342, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 32358, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 32374, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 32391, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 32414, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 32436, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 32458, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 32480, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 32501, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 32528, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 32555, 0x00000B97 }, /* GL_STENCIL_REF */
- { 32570, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 32586, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 32615, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 32637, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 32658, 0x00000C33 }, /* GL_STEREO */
- { 32668, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 32692, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 32717, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 32741, 0x000088E2 }, /* GL_STREAM_COPY */
- { 32756, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 32775, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 32790, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 32809, 0x000088E1 }, /* GL_STREAM_READ */
- { 32824, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 32843, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 32860, 0x000084E7 }, /* GL_SUBTRACT */
- { 32872, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 32888, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 32906, 0x00009116 }, /* GL_SYNC_FENCE */
- { 32920, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 32934, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 32961, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 32991, 0x00009114 }, /* GL_SYNC_STATUS */
- { 33006, 0x00002001 }, /* GL_T */
- { 33011, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 33026, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 33045, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 33061, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 33076, 0x00002A27 }, /* GL_T2F_V3F */
- { 33087, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 33106, 0x00002A28 }, /* GL_T4F_V4F */
- { 33117, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 33140, 0x00001702 }, /* GL_TEXTURE */
- { 33151, 0x000084C0 }, /* GL_TEXTURE0 */
- { 33163, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 33179, 0x000084C1 }, /* GL_TEXTURE1 */
- { 33191, 0x000084CA }, /* GL_TEXTURE10 */
- { 33204, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 33221, 0x000084CB }, /* GL_TEXTURE11 */
- { 33234, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 33251, 0x000084CC }, /* GL_TEXTURE12 */
- { 33264, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 33281, 0x000084CD }, /* GL_TEXTURE13 */
- { 33294, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 33311, 0x000084CE }, /* GL_TEXTURE14 */
- { 33324, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 33341, 0x000084CF }, /* GL_TEXTURE15 */
- { 33354, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 33371, 0x000084D0 }, /* GL_TEXTURE16 */
- { 33384, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 33401, 0x000084D1 }, /* GL_TEXTURE17 */
- { 33414, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 33431, 0x000084D2 }, /* GL_TEXTURE18 */
- { 33444, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 33461, 0x000084D3 }, /* GL_TEXTURE19 */
- { 33474, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 33491, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 33507, 0x000084C2 }, /* GL_TEXTURE2 */
- { 33519, 0x000084D4 }, /* GL_TEXTURE20 */
- { 33532, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 33549, 0x000084D5 }, /* GL_TEXTURE21 */
- { 33562, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 33579, 0x000084D6 }, /* GL_TEXTURE22 */
- { 33592, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 33609, 0x000084D7 }, /* GL_TEXTURE23 */
- { 33622, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 33639, 0x000084D8 }, /* GL_TEXTURE24 */
- { 33652, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 33669, 0x000084D9 }, /* GL_TEXTURE25 */
- { 33682, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 33699, 0x000084DA }, /* GL_TEXTURE26 */
- { 33712, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 33729, 0x000084DB }, /* GL_TEXTURE27 */
- { 33742, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 33759, 0x000084DC }, /* GL_TEXTURE28 */
- { 33772, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 33789, 0x000084DD }, /* GL_TEXTURE29 */
- { 33802, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 33819, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 33835, 0x000084C3 }, /* GL_TEXTURE3 */
- { 33847, 0x000084DE }, /* GL_TEXTURE30 */
- { 33860, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 33877, 0x000084DF }, /* GL_TEXTURE31 */
- { 33890, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 33907, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 33923, 0x000084C4 }, /* GL_TEXTURE4 */
- { 33935, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 33951, 0x000084C5 }, /* GL_TEXTURE5 */
- { 33963, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 33979, 0x000084C6 }, /* GL_TEXTURE6 */
- { 33991, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 34007, 0x000084C7 }, /* GL_TEXTURE7 */
- { 34019, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 34035, 0x000084C8 }, /* GL_TEXTURE8 */
- { 34047, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 34063, 0x000084C9 }, /* GL_TEXTURE9 */
- { 34075, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 34091, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 34105, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 34129, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 34143, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 34167, 0x0000806F }, /* GL_TEXTURE_3D */
- { 34181, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 34203, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 34229, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 34251, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 34273, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 34305, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 34327, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 34359, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 34381, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 34409, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 34441, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 34474, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 34506, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 34521, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 34542, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 34567, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 34585, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 34609, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 34640, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 34670, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 34700, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 34735, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 34766, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 34804, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 34831, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 34863, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 34897, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 34921, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 34949, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 34973, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 35001, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 35034, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 35058, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 35080, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 35102, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 35128, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 35162, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 35195, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 35232, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 35260, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 35292, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 35315, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 35353, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 35395, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 35426, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 35454, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 35484, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 35512, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 35532, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 35556, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 35587, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 35622, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 35653, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 35688, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 35719, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 35754, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 35785, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 35820, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 35851, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 35886, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 35917, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 35952, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 35981, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 35998, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 36020, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 36046, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 36061, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 36082, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 36102, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 36128, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 36148, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 36165, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 36182, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 36199, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 36216, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 36241, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 36263, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 36289, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 36307, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 36333, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 36359, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 36389, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 36416, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 36441, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 36461, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 36485, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 36512, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 36539, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 36566, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 36592, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 36622, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 36644, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 36662, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 36692, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 36720, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 36748, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 36776, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 36797, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 36816, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 36838, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 36857, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 36877, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 36907, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 36938, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 36963, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 36987, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 37007, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 37031, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 37051, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 37074, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 37098, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 37128, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 37153, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 37187, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 37204, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 37222, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 37240, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 37258, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 37277, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */
- { 37296, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37316, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37335, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37364, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 37381, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 37407, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 37437, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 37469, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 37499, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 37533, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 37549, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 37580, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 37615, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 37643, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 37675, 0x00000004 }, /* GL_TRIANGLES */
- { 37688, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 37704, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 37725, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 37743, 0x00000001 }, /* GL_TRUE */
- { 37751, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 37771, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 37794, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 37814, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 37835, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 37857, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 37879, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 37899, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 37920, 0x00009118 }, /* GL_UNSIGNALED */
- { 37934, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 37951, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 37978, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 38001, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 38017, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 38044, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 38065, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 38089, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 38120, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38144, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38172, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38195, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38213, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38243, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38269, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38299, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 38325, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 38349, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 38377, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 38405, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 38432, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 38464, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 38495, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 38509, 0x00002A20 }, /* GL_V2F */
- { 38516, 0x00002A21 }, /* GL_V3F */
- { 38523, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 38542, 0x00001F00 }, /* GL_VENDOR */
- { 38552, 0x00001F02 }, /* GL_VERSION */
- { 38563, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 38579, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 38603, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 38633, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 38664, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 38699, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 38723, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 38744, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 38767, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 38788, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 38815, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 38843, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 38871, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 38899, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 38927, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 38955, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 38983, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 39010, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 39037, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 39064, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 39091, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 39118, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39145, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39172, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39199, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39226, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39264, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39306, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 39337, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 39372, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 39406, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 39444, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 39475, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 39510, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 39538, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 39570, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 39600, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 39634, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 39662, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 39694, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 39714, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 39736, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 39765, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 39786, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 39815, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 39848, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 39880, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 39907, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 39938, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 39968, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 39985, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 40006, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 40033, 0x00000BA2 }, /* GL_VIEWPORT */
- { 40045, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 40061, 0x0000911D }, /* GL_WAIT_FAILED */
- { 40076, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 40096, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 40127, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40162, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40190, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40215, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40242, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40267, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40291, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 40310, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 40324, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 40342, 0x00001506 }, /* GL_XOR */
- { 40349, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 40368, 0x00008757 }, /* GL_YCBCR_MESA */
- { 40382, 0x00000000 }, /* GL_ZERO */
- { 40390, 0x00000D16 }, /* GL_ZOOM_X */
- { 40400, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 7190, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 7214, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 7234, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 7258, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 7272, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 7286, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 7306, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 7331, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 7351, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 7366, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 7384, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 7405, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 7424, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 7445, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 7470, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 7496, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 7517, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 7542, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 7568, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 7589, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 7614, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 7640, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 7654, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 7669, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 7684, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 7701, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 7729, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 7750, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 7770, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 7798, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 7826, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 7840, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 7862, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 7888, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 7907, 0x00001201 }, /* GL_DIFFUSE */
+ { 7918, 0x00000BD0 }, /* GL_DITHER */
+ { 7928, 0x00000A02 }, /* GL_DOMAIN */
+ { 7938, 0x00001100 }, /* GL_DONT_CARE */
+ { 7951, 0x000086AE }, /* GL_DOT3_RGB */
+ { 7963, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 7976, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 7993, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 8010, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 8026, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 8042, 0x0000140A }, /* GL_DOUBLE */
+ { 8052, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 8068, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 8083, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 8099, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 8119, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 8139, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 8155, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 8172, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 8193, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 8214, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 8231, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 8252, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 8273, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 8290, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 8311, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 8332, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 8349, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 8370, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 8391, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 8408, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 8429, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 8450, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 8467, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 8488, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 8509, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 8529, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 8549, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 8565, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 8585, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 8605, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 8621, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 8641, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 8661, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 8677, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 8697, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 8717, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 8733, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 8753, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 8773, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 8789, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 8809, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 8829, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 8845, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 8865, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 8885, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 8901, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 8921, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 8941, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 8957, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 8977, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 8997, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 9017, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 9045, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 9077, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 9101, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 9121, 0x00000304 }, /* GL_DST_ALPHA */
+ { 9134, 0x00000306 }, /* GL_DST_COLOR */
+ { 9147, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 9161, 0x00008779 }, /* GL_DUDV_ATI */
+ { 9173, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 9189, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 9209, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 9225, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 9245, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 9261, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 9281, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 9294, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 9313, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 9347, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 9385, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 9412, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 9438, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 9462, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 9494, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 9530, 0x00001600 }, /* GL_EMISSION */
+ { 9542, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 9556, 0x00000202 }, /* GL_EQUAL */
+ { 9565, 0x00001509 }, /* GL_EQUIV */
+ { 9574, 0x00010000 }, /* GL_EVAL_BIT */
+ { 9586, 0x00000800 }, /* GL_EXP */
+ { 9593, 0x00000801 }, /* GL_EXP2 */
+ { 9601, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 9615, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 9629, 0x00002502 }, /* GL_EYE_PLANE */
+ { 9642, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 9667, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 9684, 0x00000000 }, /* GL_FALSE */
+ { 9693, 0x00001101 }, /* GL_FASTEST */
+ { 9704, 0x00001C01 }, /* GL_FEEDBACK */
+ { 9716, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 9743, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 9767, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 9791, 0x00001B02 }, /* GL_FILL */
+ { 9799, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 9826, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 9857, 0x00001D00 }, /* GL_FLAT */
+ { 9865, 0x00001406 }, /* GL_FLOAT */
+ { 9874, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 9888, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 9906, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 9922, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 9938, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 9952, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 9970, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 9986, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 10002, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 10016, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 10034, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 10050, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 10066, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 10080, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 10098, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 10112, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 10130, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 10144, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 10162, 0x00000B60 }, /* GL_FOG */
+ { 10169, 0x00000080 }, /* GL_FOG_BIT */
+ { 10180, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 10193, 0x00008451 }, /* GL_FOG_COORD */
+ { 10206, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 10224, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 10248, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 10287, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 10330, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 10362, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 10393, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 10422, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 10447, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 10466, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 10500, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 10527, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 10553, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 10577, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 10594, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 10609, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 10633, 0x00000B64 }, /* GL_FOG_END */
+ { 10644, 0x00000C54 }, /* GL_FOG_HINT */
+ { 10656, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 10669, 0x00000B65 }, /* GL_FOG_MODE */
+ { 10681, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 10700, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 10725, 0x00000B63 }, /* GL_FOG_START */
+ { 10738, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 10756, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 10780, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 10799, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 10822, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 10857, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 10872, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 10909, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 10945, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 10986, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 11027, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 11064, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 11101, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 11139, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 11181, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 11219, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 11261, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 11296, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 11335, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 11384, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 11432, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 11484, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 11524, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 11568, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 11608, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 11652, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 11702, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 11726, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 11754, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 11777, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 11796, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 11833, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 11874, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 11915, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 11953, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 11995, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 12046, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 12084, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 12129, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 12178, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 12216, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 12258, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 12296, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 12338, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 12370, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 12395, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 12422, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 12453, 0x00000404 }, /* GL_FRONT */
+ { 12462, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 12480, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 12494, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 12508, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 12523, 0x00008006 }, /* GL_FUNC_ADD */
+ { 12535, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 12551, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 12576, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 12605, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 12622, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 12643, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 12662, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 12686, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 12715, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 12739, 0x00000206 }, /* GL_GEQUAL */
+ { 12749, 0x00000204 }, /* GL_GREATER */
+ { 12760, 0x00001904 }, /* GL_GREEN */
+ { 12769, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 12783, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 12797, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 12812, 0x00008000 }, /* GL_HINT_BIT */
+ { 12824, 0x00008024 }, /* GL_HISTOGRAM */
+ { 12837, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 12861, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 12889, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 12912, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 12939, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 12956, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 12976, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 13000, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 13024, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 13052, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 13080, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 13112, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 13134, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 13160, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 13178, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 13200, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 13219, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 13242, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 13257, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 13277, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 13317, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 13355, 0x00001E02 }, /* GL_INCR */
+ { 13363, 0x00008507 }, /* GL_INCR_WRAP */
+ { 13376, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 13393, 0x00008222 }, /* GL_INDEX */
+ { 13402, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 13417, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 13447, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 13481, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 13504, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 13526, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 13546, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 13560, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 13581, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 13599, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 13613, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 13629, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 13644, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 13663, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 13682, 0x00001404 }, /* GL_INT */
+ { 13689, 0x00008049 }, /* GL_INTENSITY */
+ { 13702, 0x0000804C }, /* GL_INTENSITY12 */
+ { 13717, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 13736, 0x0000804D }, /* GL_INTENSITY16 */
+ { 13751, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 13770, 0x0000804A }, /* GL_INTENSITY4 */
+ { 13784, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 13802, 0x0000804B }, /* GL_INTENSITY8 */
+ { 13816, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 13834, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 13851, 0x00008575 }, /* GL_INTERPOLATE */
+ { 13866, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 13885, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 13904, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 13916, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 13932, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 13944, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 13960, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 13972, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 13988, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 14004, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 14037, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 14074, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 14095, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 14112, 0x0000862B }, /* GL_INVERSE_NV */
+ { 14126, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 14150, 0x0000150A }, /* GL_INVERT */
+ { 14160, 0x00001E00 }, /* GL_KEEP */
+ { 14168, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 14194, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 14224, 0x00000406 }, /* GL_LEFT */
+ { 14232, 0x00000203 }, /* GL_LEQUAL */
+ { 14242, 0x00000201 }, /* GL_LESS */
+ { 14250, 0x00004000 }, /* GL_LIGHT0 */
+ { 14260, 0x00004001 }, /* GL_LIGHT1 */
+ { 14270, 0x00004002 }, /* GL_LIGHT2 */
+ { 14280, 0x00004003 }, /* GL_LIGHT3 */
+ { 14290, 0x00004004 }, /* GL_LIGHT4 */
+ { 14300, 0x00004005 }, /* GL_LIGHT5 */
+ { 14310, 0x00004006 }, /* GL_LIGHT6 */
+ { 14320, 0x00004007 }, /* GL_LIGHT7 */
+ { 14330, 0x00000B50 }, /* GL_LIGHTING */
+ { 14342, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 14358, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 14381, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 14410, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 14443, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 14471, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 14495, 0x00001B01 }, /* GL_LINE */
+ { 14503, 0x00002601 }, /* GL_LINEAR */
+ { 14513, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 14535, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 14565, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 14596, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 14620, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 14645, 0x00000001 }, /* GL_LINES */
+ { 14654, 0x00000004 }, /* GL_LINE_BIT */
+ { 14666, 0x00000002 }, /* GL_LINE_LOOP */
+ { 14679, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 14699, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 14714, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 14734, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 14750, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 14774, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 14797, 0x00000003 }, /* GL_LINE_STRIP */
+ { 14811, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 14825, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 14839, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 14865, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 14885, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 14900, 0x00000B32 }, /* GL_LIST_BASE */
+ { 14913, 0x00020000 }, /* GL_LIST_BIT */
+ { 14925, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 14939, 0x00000B30 }, /* GL_LIST_MODE */
+ { 14952, 0x00000101 }, /* GL_LOAD */
+ { 14960, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 14972, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 14989, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 15003, 0x00001909 }, /* GL_LUMINANCE */
+ { 15016, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 15031, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 15054, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 15081, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 15103, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 15129, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 15148, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 15163, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 15186, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 15213, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 15232, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 15246, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 15267, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 15292, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 15310, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 15331, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 15356, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 15370, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 15391, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 15416, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 15434, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 15453, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 15469, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 15489, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 15511, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 15525, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 15540, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 15564, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 15588, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 15612, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 15636, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 15653, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 15670, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 15698, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 15727, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 15756, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 15785, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 15814, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 15843, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 15872, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 15900, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 15928, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 15956, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 15984, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 16012, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 16040, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 16068, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 16096, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 16124, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 16140, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 16160, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 16182, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 16196, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 16211, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 16235, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 16259, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 16283, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 16307, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 16324, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 16341, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 16369, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 16398, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 16427, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 16456, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 16485, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 16514, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 16543, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 16571, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 16599, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 16627, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 16655, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 16683, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 16711, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 16739, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 16767, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 16795, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 16808, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 16834, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 16863, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 16891, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 16907, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 16922, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 16948, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 16965, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 16980, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 16994, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 17010, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 17026, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 17042, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 17058, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 17074, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 17090, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 17106, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 17122, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 17138, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 17154, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 17169, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 17183, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 17199, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 17215, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 17231, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 17247, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 17263, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 17279, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 17295, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 17311, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 17327, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 17343, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 17358, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 17372, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 17388, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 17404, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 17419, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 17433, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 17448, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 17462, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 17477, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 17491, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 17506, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 17520, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 17535, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 17549, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 17564, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 17579, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 17605, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 17639, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 17670, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 17703, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 17734, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 17749, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 17771, 0x00008008 }, /* GL_MAX */
+ { 17778, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 17801, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 17833, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 17859, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 17892, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 17918, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 17952, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 17971, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 17996, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 18025, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 18057, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 18093, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 18129, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 18169, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 18195, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 18225, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 18250, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 18279, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 18308, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 18341, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 18361, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 18385, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 18409, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 18433, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 18458, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 18476, 0x00008008 }, /* GL_MAX_EXT */
+ { 18487, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 18522, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 18561, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 18575, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 18595, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 18633, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 18662, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 18686, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 18714, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 18737, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 18774, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 18810, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 18837, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 18866, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 18900, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 18936, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 18963, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 18995, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 19031, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 19060, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 19089, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 19117, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 19155, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 19199, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 19242, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 19276, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 19315, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 19352, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 19390, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 19433, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 19476, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 19506, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 19537, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 19573, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 19609, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 19639, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 19673, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 19706, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 19731, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 19760, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 19775, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 19794, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 19821, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 19841, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 19865, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 19887, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 19913, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 19940, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 19971, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 19995, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 20029, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 20049, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 20076, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 20097, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 20122, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 20147, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 20182, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 20204, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 20230, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 20252, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 20278, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 20312, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 20350, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 20383, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 20420, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 20444, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 20465, 0x00008007 }, /* GL_MIN */
+ { 20472, 0x0000802E }, /* GL_MINMAX */
+ { 20482, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 20496, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 20513, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 20534, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 20549, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 20568, 0x00008007 }, /* GL_MIN_EXT */
+ { 20579, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 20598, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 20621, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 20644, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 20664, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 20684, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 20714, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 20742, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 20770, 0x00001700 }, /* GL_MODELVIEW */
+ { 20783, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 20801, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 20820, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 20839, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 20858, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 20877, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 20896, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 20915, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 20934, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 20953, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 20972, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 20991, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 21009, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 21028, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 21047, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 21066, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 21085, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 21104, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 21123, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 21142, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 21161, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 21180, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 21199, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 21217, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 21236, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 21255, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 21273, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 21291, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 21309, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 21327, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 21345, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 21363, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 21381, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 21401, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 21428, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 21453, 0x00002100 }, /* GL_MODULATE */
+ { 21465, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 21485, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 21512, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 21537, 0x00000103 }, /* GL_MULT */
+ { 21545, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 21560, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 21580, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 21599, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 21618, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 21642, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 21665, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 21695, 0x00002A25 }, /* GL_N3F_V3F */
+ { 21706, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 21726, 0x0000150E }, /* GL_NAND */
+ { 21734, 0x00002600 }, /* GL_NEAREST */
+ { 21745, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 21776, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 21808, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 21833, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 21859, 0x00000200 }, /* GL_NEVER */
+ { 21868, 0x00001102 }, /* GL_NICEST */
+ { 21878, 0x00000000 }, /* GL_NONE */
+ { 21886, 0x00001505 }, /* GL_NOOP */
+ { 21894, 0x00001508 }, /* GL_NOR */
+ { 21901, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 21914, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 21930, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 21961, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 21996, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 22020, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 22043, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 22064, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 22078, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 22096, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 22113, 0x00000205 }, /* GL_NOTEQUAL */
+ { 22125, 0x00000000 }, /* GL_NO_ERROR */
+ { 22137, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 22171, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 22209, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 22241, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 22283, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 22313, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 22353, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 22384, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 22413, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 22441, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 22471, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 22488, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 22514, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 22530, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 22565, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 22587, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 22602, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 22621, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 22651, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 22672, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 22700, 0x00000001 }, /* GL_ONE */
+ { 22707, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 22735, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 22767, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 22795, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 22827, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 22850, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 22873, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 22896, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 22919, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 22937, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 22959, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 22981, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 22997, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 23017, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 23037, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 23055, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 23077, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 23099, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 23115, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 23135, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 23155, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 23173, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 23195, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 23217, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 23233, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 23253, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 23273, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 23294, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 23313, 0x00001507 }, /* GL_OR */
+ { 23319, 0x00000A01 }, /* GL_ORDER */
+ { 23328, 0x0000150D }, /* GL_OR_INVERTED */
+ { 23343, 0x0000150B }, /* GL_OR_REVERSE */
+ { 23357, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 23374, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 23392, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 23413, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 23433, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 23451, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 23470, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 23490, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 23510, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 23528, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 23547, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 23572, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 23596, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 23617, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 23639, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 23661, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 23686, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 23710, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 23731, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 23753, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 23775, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 23797, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 23828, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 23848, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 23873, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 23893, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 23918, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 23938, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 23963, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 23983, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 24008, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 24028, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 24053, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 24073, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 24098, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 24118, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 24143, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 24163, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 24188, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 24208, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 24233, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 24253, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 24278, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 24296, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 24317, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 24346, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 24379, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 24404, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 24427, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 24458, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 24493, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 24520, 0x00001B00 }, /* GL_POINT */
+ { 24529, 0x00000000 }, /* GL_POINTS */
+ { 24539, 0x00000002 }, /* GL_POINT_BIT */
+ { 24552, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 24582, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 24616, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 24650, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 24685, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 24714, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 24747, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 24780, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 24814, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 24828, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 24854, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 24872, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 24894, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 24916, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 24939, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 24957, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 24979, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 25001, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 25024, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 25044, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 25060, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 25081, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 25097, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 25117, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 25146, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 25165, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 25191, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 25206, 0x00000009 }, /* GL_POLYGON */
+ { 25217, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 25232, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 25248, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 25271, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 25296, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 25319, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 25342, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 25366, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 25390, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 25408, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 25431, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 25450, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 25473, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 25490, 0x00001203 }, /* GL_POSITION */
+ { 25502, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 25534, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 25570, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 25603, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 25640, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 25671, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 25706, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 25738, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 25774, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 25807, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 25839, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 25875, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 25908, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 25945, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 25975, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 26009, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 26040, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 26075, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 26106, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 26141, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 26173, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 26209, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 26239, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 26273, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 26304, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 26339, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 26371, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 26402, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 26437, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 26469, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 26505, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 26534, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 26567, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 26597, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 26631, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 26670, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 26703, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 26743, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 26777, 0x00008578 }, /* GL_PREVIOUS */
+ { 26789, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 26805, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 26821, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 26838, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 26859, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 26880, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 26913, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 26945, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 26968, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 26991, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 27021, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 27050, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 27078, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 27100, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 27128, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 27156, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 27178, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 27199, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 27239, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 27278, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 27308, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 27343, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 27376, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 27410, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 27449, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 27488, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 27510, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 27536, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 27560, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 27583, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 27605, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 27626, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 27647, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 27674, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 27706, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 27738, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 27773, 0x00001701 }, /* GL_PROJECTION */
+ { 27787, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 27808, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 27834, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 27854, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 27878, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 27899, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 27918, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 27941, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 27980, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 28018, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 28038, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 28068, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 28092, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 28112, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 28142, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 28166, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 28186, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 28219, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 28245, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 28275, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 28306, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 28336, 0x00002003 }, /* GL_Q */
+ { 28341, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 28366, 0x00000007 }, /* GL_QUADS */
+ { 28375, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 28419, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 28467, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 28484, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 28498, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 28520, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 28546, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 28562, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 28582, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 28608, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 28638, 0x00002002 }, /* GL_R */
+ { 28643, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 28655, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 28688, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 28703, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 28723, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 28751, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 28783, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 28807, 0x000088B8 }, /* GL_READ_ONLY */
+ { 28820, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 28837, 0x000088BA }, /* GL_READ_WRITE */
+ { 28851, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 28869, 0x00001903 }, /* GL_RED */
+ { 28876, 0x00008016 }, /* GL_REDUCE */
+ { 28886, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 28900, 0x00000D15 }, /* GL_RED_BIAS */
+ { 28912, 0x00000D52 }, /* GL_RED_BITS */
+ { 28924, 0x00000D14 }, /* GL_RED_SCALE */
+ { 28937, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 28955, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 28977, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 28998, 0x00001C00 }, /* GL_RENDER */
+ { 29008, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 29024, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 29051, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 29075, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 29103, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 29129, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 29156, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 29176, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 29203, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 29226, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 29253, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 29285, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 29321, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 29346, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 29370, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 29398, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 29427, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 29449, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 29475, 0x00001F01 }, /* GL_RENDERER */
+ { 29487, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 29502, 0x00002901 }, /* GL_REPEAT */
+ { 29512, 0x00001E01 }, /* GL_REPLACE */
+ { 29523, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 29538, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 29561, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 29579, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 29601, 0x00000102 }, /* GL_RETURN */
+ { 29611, 0x00001907 }, /* GL_RGB */
+ { 29618, 0x00008052 }, /* GL_RGB10 */
+ { 29627, 0x00008059 }, /* GL_RGB10_A2 */
+ { 29639, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 29655, 0x00008052 }, /* GL_RGB10_EXT */
+ { 29668, 0x00008053 }, /* GL_RGB12 */
+ { 29677, 0x00008053 }, /* GL_RGB12_EXT */
+ { 29690, 0x00008054 }, /* GL_RGB16 */
+ { 29699, 0x00008054 }, /* GL_RGB16_EXT */
+ { 29712, 0x0000804E }, /* GL_RGB2_EXT */
+ { 29724, 0x0000804F }, /* GL_RGB4 */
+ { 29732, 0x0000804F }, /* GL_RGB4_EXT */
+ { 29744, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 29757, 0x00008050 }, /* GL_RGB5 */
+ { 29765, 0x00008057 }, /* GL_RGB5_A1 */
+ { 29776, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 29791, 0x00008050 }, /* GL_RGB5_EXT */
+ { 29803, 0x00008051 }, /* GL_RGB8 */
+ { 29811, 0x00008051 }, /* GL_RGB8_EXT */
+ { 29823, 0x00001908 }, /* GL_RGBA */
+ { 29831, 0x0000805A }, /* GL_RGBA12 */
+ { 29841, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 29855, 0x0000805B }, /* GL_RGBA16 */
+ { 29865, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 29879, 0x00008055 }, /* GL_RGBA2 */
+ { 29888, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 29901, 0x00008056 }, /* GL_RGBA4 */
+ { 29910, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 29929, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 29942, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 29956, 0x00008058 }, /* GL_RGBA8 */
+ { 29965, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 29978, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 29993, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 30011, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 30024, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 30037, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 30051, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 30063, 0x00008573 }, /* GL_RGB_SCALE */
+ { 30076, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 30093, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 30110, 0x00000407 }, /* GL_RIGHT */
+ { 30119, 0x00002000 }, /* GL_S */
+ { 30124, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 30138, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 30159, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 30173, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 30194, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 30208, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 30224, 0x000080A9 }, /* GL_SAMPLES */
+ { 30235, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 30251, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 30266, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 30284, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 30306, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 30334, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 30366, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 30389, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 30416, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 30434, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 30457, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 30479, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 30498, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 30521, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 30547, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 30577, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 30602, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 30631, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 30646, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 30661, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 30677, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 30702, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 30742, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 30786, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 30819, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 30849, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 30881, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 30911, 0x00001C02 }, /* GL_SELECT */
+ { 30921, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 30949, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 30974, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 30990, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 31017, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 31048, 0x0000150F }, /* GL_SET */
+ { 31055, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 31076, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 31100, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 31115, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 31130, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 31158, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 31181, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 31211, 0x00001601 }, /* GL_SHININESS */
+ { 31224, 0x00001402 }, /* GL_SHORT */
+ { 31233, 0x00009119 }, /* GL_SIGNALED */
+ { 31245, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 31266, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 31282, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 31302, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 31321, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 31335, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 31350, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 31372, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 31392, 0x00001D01 }, /* GL_SMOOTH */
+ { 31402, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 31435, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 31462, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 31495, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 31522, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 31539, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 31560, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 31581, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 31596, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 31615, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 31634, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 31651, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 31672, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 31693, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 31708, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 31727, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 31746, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 31763, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 31784, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 31805, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 31820, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 31839, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 31858, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 31878, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 31896, 0x00001202 }, /* GL_SPECULAR */
+ { 31908, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 31922, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 31937, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 31955, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 31972, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 31986, 0x00008580 }, /* GL_SRC0_RGB */
+ { 31998, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 32012, 0x00008581 }, /* GL_SRC1_RGB */
+ { 32024, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 32038, 0x00008582 }, /* GL_SRC2_RGB */
+ { 32050, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 32063, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 32085, 0x00000300 }, /* GL_SRC_COLOR */
+ { 32098, 0x00008C40 }, /* GL_SRGB */
+ { 32106, 0x00008C41 }, /* GL_SRGB8 */
+ { 32115, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 32131, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 32145, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 32163, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 32182, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 32197, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 32216, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 32231, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 32250, 0x000088E5 }, /* GL_STATIC_READ */
+ { 32265, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 32284, 0x00001802 }, /* GL_STENCIL */
+ { 32295, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 32317, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 32343, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 32364, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 32389, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 32410, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 32435, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 32467, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 32503, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 32535, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 32571, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 32591, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 32618, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 32644, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 32660, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 32682, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 32705, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 32721, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 32737, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 32754, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 32772, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 32791, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 32814, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 32836, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 32854, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 32876, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 32894, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 32916, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 32937, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 32964, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 32991, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 33006, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 33022, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 33051, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 33073, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 33094, 0x00000C33 }, /* GL_STEREO */
+ { 33104, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 33128, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 33153, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 33177, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 33192, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 33211, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 33226, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 33245, 0x000088E1 }, /* GL_STREAM_READ */
+ { 33260, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 33279, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 33296, 0x000084E7 }, /* GL_SUBTRACT */
+ { 33308, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 33324, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 33342, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 33356, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 33370, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 33397, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 33427, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 33442, 0x00002001 }, /* GL_T */
+ { 33447, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 33462, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 33481, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 33497, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 33512, 0x00002A27 }, /* GL_T2F_V3F */
+ { 33523, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 33542, 0x00002A28 }, /* GL_T4F_V4F */
+ { 33553, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 33576, 0x00001702 }, /* GL_TEXTURE */
+ { 33587, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 33599, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 33615, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 33627, 0x000084CA }, /* GL_TEXTURE10 */
+ { 33640, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 33657, 0x000084CB }, /* GL_TEXTURE11 */
+ { 33670, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 33687, 0x000084CC }, /* GL_TEXTURE12 */
+ { 33700, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 33717, 0x000084CD }, /* GL_TEXTURE13 */
+ { 33730, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 33747, 0x000084CE }, /* GL_TEXTURE14 */
+ { 33760, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 33777, 0x000084CF }, /* GL_TEXTURE15 */
+ { 33790, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 33807, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 33820, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 33837, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 33850, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 33867, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 33880, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 33897, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 33910, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 33927, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 33943, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 33955, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 33968, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 33985, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 33998, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 34015, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 34028, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 34045, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 34058, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 34075, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 34088, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 34105, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 34118, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 34135, 0x000084DA }, /* GL_TEXTURE26 */
+ { 34148, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 34165, 0x000084DB }, /* GL_TEXTURE27 */
+ { 34178, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 34195, 0x000084DC }, /* GL_TEXTURE28 */
+ { 34208, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 34225, 0x000084DD }, /* GL_TEXTURE29 */
+ { 34238, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 34255, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 34271, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 34283, 0x000084DE }, /* GL_TEXTURE30 */
+ { 34296, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 34313, 0x000084DF }, /* GL_TEXTURE31 */
+ { 34326, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 34343, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 34359, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 34371, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 34387, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 34399, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 34415, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 34427, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 34443, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 34455, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 34471, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 34483, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 34499, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 34511, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 34527, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 34541, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 34565, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 34579, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 34603, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 34617, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 34639, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 34665, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 34687, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 34709, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 34741, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 34763, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 34795, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 34817, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 34845, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 34877, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 34910, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 34942, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 34957, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 34978, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 35003, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 35021, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 35045, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 35076, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 35106, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 35136, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 35171, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 35202, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 35240, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 35267, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 35299, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 35333, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 35357, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 35385, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 35409, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 35437, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 35470, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 35494, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 35516, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 35538, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 35564, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 35598, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 35631, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 35668, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 35696, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 35728, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 35751, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 35789, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 35831, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 35862, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 35890, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 35920, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 35948, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 35968, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 35992, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 36023, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 36058, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 36089, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 36124, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 36155, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 36190, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 36221, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 36256, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 36287, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 36322, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 36353, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 36388, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 36417, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 36434, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 36456, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 36482, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 36497, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 36518, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 36538, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 36564, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 36584, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 36601, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 36618, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 36635, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 36652, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 36677, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 36699, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 36725, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 36743, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 36769, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 36795, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 36825, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 36852, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 36877, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 36897, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 36921, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 36948, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 36975, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 37002, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 37028, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 37058, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 37080, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 37098, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 37128, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 37156, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 37184, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 37212, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 37233, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 37252, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 37274, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 37293, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 37313, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 37343, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 37374, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 37399, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 37423, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 37443, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 37467, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 37487, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 37510, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 37534, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 37562, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 37592, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 37617, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 37651, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 37668, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 37686, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 37704, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 37722, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 37741, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */
+ { 37760, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 37780, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 37799, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 37828, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 37845, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 37871, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 37901, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 37933, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 37963, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 37997, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 38013, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 38044, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 38079, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 38107, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 38139, 0x00000004 }, /* GL_TRIANGLES */
+ { 38152, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 38168, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 38189, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 38207, 0x00000001 }, /* GL_TRUE */
+ { 38215, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 38235, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 38258, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 38278, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 38299, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 38321, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 38343, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 38363, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 38384, 0x00009118 }, /* GL_UNSIGNALED */
+ { 38398, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 38415, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 38442, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 38465, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 38481, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 38508, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 38529, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 38554, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 38578, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 38609, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 38633, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 38661, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 38684, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 38702, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 38732, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 38758, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 38788, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 38814, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 38838, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 38866, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 38894, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 38921, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 38953, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 38984, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 38998, 0x00002A20 }, /* GL_V2F */
+ { 39005, 0x00002A21 }, /* GL_V3F */
+ { 39012, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 39031, 0x00001F00 }, /* GL_VENDOR */
+ { 39041, 0x00001F02 }, /* GL_VERSION */
+ { 39052, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 39068, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 39092, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 39122, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 39153, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 39188, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 39212, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 39233, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 39256, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 39277, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 39304, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 39332, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 39360, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 39388, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 39416, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 39444, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 39472, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 39499, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 39526, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 39553, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 39580, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 39607, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 39634, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 39661, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 39688, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 39715, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 39753, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 39795, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 39826, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 39861, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 39895, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 39933, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 39964, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 39999, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 40027, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 40059, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 40089, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 40123, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 40151, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 40183, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 40203, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 40225, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 40254, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 40275, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 40304, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 40337, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 40369, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 40396, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 40427, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 40457, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 40474, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 40495, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 40522, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 40534, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 40550, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 40565, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 40585, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 40616, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 40651, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 40679, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 40704, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 40731, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 40756, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 40780, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 40799, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 40813, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 40831, 0x00001506 }, /* GL_XOR */
+ { 40838, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 40857, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 40871, 0x00000000 }, /* GL_ZERO */
+ { 40879, 0x00000D16 }, /* GL_ZOOM_X */
+ { 40889, 0x00000D17 }, /* GL_ZOOM_Y */
};
static const unsigned reduced_enums[1347] =
{
- 476, /* GL_FALSE */
- 694, /* GL_LINES */
- 696, /* GL_LINE_LOOP */
- 703, /* GL_LINE_STRIP */
- 1748, /* GL_TRIANGLES */
- 1751, /* GL_TRIANGLE_STRIP */
- 1749, /* GL_TRIANGLE_FAN */
- 1275, /* GL_QUADS */
- 1279, /* GL_QUAD_STRIP */
- 1161, /* GL_POLYGON */
- 1173, /* GL_POLYGON_STIPPLE_BIT */
- 1122, /* GL_PIXEL_MODE_BIT */
- 681, /* GL_LIGHTING_BIT */
- 506, /* GL_FOG_BIT */
+ 479, /* GL_FALSE */
+ 701, /* GL_LINES */
+ 703, /* GL_LINE_LOOP */
+ 710, /* GL_LINE_STRIP */
+ 1766, /* GL_TRIANGLES */
+ 1769, /* GL_TRIANGLE_STRIP */
+ 1767, /* GL_TRIANGLE_FAN */
+ 1285, /* GL_QUADS */
+ 1289, /* GL_QUAD_STRIP */
+ 1171, /* GL_POLYGON */
+ 1183, /* GL_POLYGON_STIPPLE_BIT */
+ 1132, /* GL_PIXEL_MODE_BIT */
+ 688, /* GL_LIGHTING_BIT */
+ 509, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 713, /* GL_LOAD */
- 1331, /* GL_RETURN */
- 994, /* GL_MULT */
+ 720, /* GL_LOAD */
+ 1344, /* GL_RETURN */
+ 1004, /* GL_MULT */
23, /* GL_ADD */
- 1010, /* GL_NEVER */
- 671, /* GL_LESS */
- 466, /* GL_EQUAL */
- 670, /* GL_LEQUAL */
- 592, /* GL_GREATER */
- 1025, /* GL_NOTEQUAL */
- 591, /* GL_GEQUAL */
+ 1020, /* GL_NEVER */
+ 678, /* GL_LESS */
+ 469, /* GL_EQUAL */
+ 677, /* GL_LEQUAL */
+ 599, /* GL_GREATER */
+ 1035, /* GL_NOTEQUAL */
+ 598, /* GL_GEQUAL */
47, /* GL_ALWAYS */
- 1472, /* GL_SRC_COLOR */
- 1055, /* GL_ONE_MINUS_SRC_COLOR */
- 1470, /* GL_SRC_ALPHA */
- 1054, /* GL_ONE_MINUS_SRC_ALPHA */
- 445, /* GL_DST_ALPHA */
- 1052, /* GL_ONE_MINUS_DST_ALPHA */
- 446, /* GL_DST_COLOR */
- 1053, /* GL_ONE_MINUS_DST_COLOR */
- 1471, /* GL_SRC_ALPHA_SATURATE */
- 579, /* GL_FRONT_LEFT */
- 580, /* GL_FRONT_RIGHT */
+ 1485, /* GL_SRC_COLOR */
+ 1065, /* GL_ONE_MINUS_SRC_COLOR */
+ 1483, /* GL_SRC_ALPHA */
+ 1064, /* GL_ONE_MINUS_SRC_ALPHA */
+ 448, /* GL_DST_ALPHA */
+ 1062, /* GL_ONE_MINUS_DST_ALPHA */
+ 449, /* GL_DST_COLOR */
+ 1063, /* GL_ONE_MINUS_DST_COLOR */
+ 1484, /* GL_SRC_ALPHA_SATURATE */
+ 586, /* GL_FRONT_LEFT */
+ 587, /* GL_FRONT_RIGHT */
69, /* GL_BACK_LEFT */
70, /* GL_BACK_RIGHT */
- 576, /* GL_FRONT */
+ 583, /* GL_FRONT */
68, /* GL_BACK */
- 669, /* GL_LEFT */
- 1373, /* GL_RIGHT */
- 577, /* GL_FRONT_AND_BACK */
+ 676, /* GL_LEFT */
+ 1386, /* GL_RIGHT */
+ 584, /* GL_FRONT_AND_BACK */
63, /* GL_AUX0 */
64, /* GL_AUX1 */
65, /* GL_AUX2 */
66, /* GL_AUX3 */
- 658, /* GL_INVALID_ENUM */
- 662, /* GL_INVALID_VALUE */
- 661, /* GL_INVALID_OPERATION */
- 1477, /* GL_STACK_OVERFLOW */
- 1478, /* GL_STACK_UNDERFLOW */
- 1080, /* GL_OUT_OF_MEMORY */
- 659, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 665, /* GL_INVALID_ENUM */
+ 669, /* GL_INVALID_VALUE */
+ 668, /* GL_INVALID_OPERATION */
+ 1490, /* GL_STACK_OVERFLOW */
+ 1491, /* GL_STACK_UNDERFLOW */
+ 1090, /* GL_OUT_OF_MEMORY */
+ 666, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1100, /* GL_PASS_THROUGH_TOKEN */
- 1160, /* GL_POINT_TOKEN */
- 704, /* GL_LINE_TOKEN */
- 1174, /* GL_POLYGON_TOKEN */
+ 1110, /* GL_PASS_THROUGH_TOKEN */
+ 1170, /* GL_POINT_TOKEN */
+ 711, /* GL_LINE_TOKEN */
+ 1184, /* GL_POLYGON_TOKEN */
74, /* GL_BITMAP_TOKEN */
- 444, /* GL_DRAW_PIXEL_TOKEN */
+ 447, /* GL_DRAW_PIXEL_TOKEN */
301, /* GL_COPY_PIXEL_TOKEN */
- 697, /* GL_LINE_RESET_TOKEN */
- 469, /* GL_EXP */
- 470, /* GL_EXP2 */
+ 704, /* GL_LINE_RESET_TOKEN */
+ 472, /* GL_EXP */
+ 473, /* GL_EXP2 */
337, /* GL_CW */
125, /* GL_CCW */
146, /* GL_COEFF */
- 1077, /* GL_ORDER */
- 382, /* GL_DOMAIN */
+ 1087, /* GL_ORDER */
+ 384, /* GL_DOMAIN */
311, /* GL_CURRENT_COLOR */
314, /* GL_CURRENT_INDEX */
320, /* GL_CURRENT_NORMAL */
@@ -3854,519 +3892,519 @@ static const unsigned reduced_enums[1347] =
328, /* GL_CURRENT_RASTER_POSITION */
329, /* GL_CURRENT_RASTER_POSITION_VALID */
326, /* GL_CURRENT_RASTER_DISTANCE */
- 1153, /* GL_POINT_SMOOTH */
- 1142, /* GL_POINT_SIZE */
- 1152, /* GL_POINT_SIZE_RANGE */
- 1143, /* GL_POINT_SIZE_GRANULARITY */
- 698, /* GL_LINE_SMOOTH */
- 705, /* GL_LINE_WIDTH */
- 707, /* GL_LINE_WIDTH_RANGE */
- 706, /* GL_LINE_WIDTH_GRANULARITY */
- 700, /* GL_LINE_STIPPLE */
- 701, /* GL_LINE_STIPPLE_PATTERN */
- 702, /* GL_LINE_STIPPLE_REPEAT */
- 712, /* GL_LIST_MODE */
- 877, /* GL_MAX_LIST_NESTING */
- 709, /* GL_LIST_BASE */
- 711, /* GL_LIST_INDEX */
- 1163, /* GL_POLYGON_MODE */
- 1170, /* GL_POLYGON_SMOOTH */
- 1172, /* GL_POLYGON_STIPPLE */
- 455, /* GL_EDGE_FLAG */
+ 1163, /* GL_POINT_SMOOTH */
+ 1152, /* GL_POINT_SIZE */
+ 1162, /* GL_POINT_SIZE_RANGE */
+ 1153, /* GL_POINT_SIZE_GRANULARITY */
+ 705, /* GL_LINE_SMOOTH */
+ 712, /* GL_LINE_WIDTH */
+ 714, /* GL_LINE_WIDTH_RANGE */
+ 713, /* GL_LINE_WIDTH_GRANULARITY */
+ 707, /* GL_LINE_STIPPLE */
+ 708, /* GL_LINE_STIPPLE_PATTERN */
+ 709, /* GL_LINE_STIPPLE_REPEAT */
+ 719, /* GL_LIST_MODE */
+ 885, /* GL_MAX_LIST_NESTING */
+ 716, /* GL_LIST_BASE */
+ 718, /* GL_LIST_INDEX */
+ 1173, /* GL_POLYGON_MODE */
+ 1180, /* GL_POLYGON_SMOOTH */
+ 1182, /* GL_POLYGON_STIPPLE */
+ 458, /* GL_EDGE_FLAG */
304, /* GL_CULL_FACE */
305, /* GL_CULL_FACE_MODE */
- 578, /* GL_FRONT_FACE */
- 680, /* GL_LIGHTING */
- 685, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 686, /* GL_LIGHT_MODEL_TWO_SIDE */
- 682, /* GL_LIGHT_MODEL_AMBIENT */
- 1419, /* GL_SHADE_MODEL */
+ 585, /* GL_FRONT_FACE */
+ 687, /* GL_LIGHTING */
+ 692, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 693, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 689, /* GL_LIGHT_MODEL_AMBIENT */
+ 1432, /* GL_SHADE_MODEL */
193, /* GL_COLOR_MATERIAL_FACE */
194, /* GL_COLOR_MATERIAL_PARAMETER */
192, /* GL_COLOR_MATERIAL */
- 505, /* GL_FOG */
- 527, /* GL_FOG_INDEX */
- 523, /* GL_FOG_DENSITY */
- 531, /* GL_FOG_START */
- 525, /* GL_FOG_END */
- 528, /* GL_FOG_MODE */
- 507, /* GL_FOG_COLOR */
- 369, /* GL_DEPTH_RANGE */
- 376, /* GL_DEPTH_TEST */
- 379, /* GL_DEPTH_WRITEMASK */
- 357, /* GL_DEPTH_CLEAR_VALUE */
- 368, /* GL_DEPTH_FUNC */
+ 508, /* GL_FOG */
+ 530, /* GL_FOG_INDEX */
+ 526, /* GL_FOG_DENSITY */
+ 534, /* GL_FOG_START */
+ 528, /* GL_FOG_END */
+ 531, /* GL_FOG_MODE */
+ 510, /* GL_FOG_COLOR */
+ 370, /* GL_DEPTH_RANGE */
+ 378, /* GL_DEPTH_TEST */
+ 381, /* GL_DEPTH_WRITEMASK */
+ 358, /* GL_DEPTH_CLEAR_VALUE */
+ 369, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1513, /* GL_STENCIL_TEST */
- 1501, /* GL_STENCIL_CLEAR_VALUE */
- 1503, /* GL_STENCIL_FUNC */
- 1515, /* GL_STENCIL_VALUE_MASK */
- 1502, /* GL_STENCIL_FAIL */
- 1510, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1511, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1512, /* GL_STENCIL_REF */
- 1516, /* GL_STENCIL_WRITEMASK */
- 846, /* GL_MATRIX_MODE */
- 1015, /* GL_NORMALIZE */
- 1842, /* GL_VIEWPORT */
- 989, /* GL_MODELVIEW_STACK_DEPTH */
- 1253, /* GL_PROJECTION_STACK_DEPTH */
- 1723, /* GL_TEXTURE_STACK_DEPTH */
- 987, /* GL_MODELVIEW_MATRIX */
- 1252, /* GL_PROJECTION_MATRIX */
- 1706, /* GL_TEXTURE_MATRIX */
+ 1530, /* GL_STENCIL_TEST */
+ 1514, /* GL_STENCIL_CLEAR_VALUE */
+ 1516, /* GL_STENCIL_FUNC */
+ 1532, /* GL_STENCIL_VALUE_MASK */
+ 1515, /* GL_STENCIL_FAIL */
+ 1527, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1528, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1529, /* GL_STENCIL_REF */
+ 1533, /* GL_STENCIL_WRITEMASK */
+ 853, /* GL_MATRIX_MODE */
+ 1025, /* GL_NORMALIZE */
+ 1861, /* GL_VIEWPORT */
+ 999, /* GL_MODELVIEW_STACK_DEPTH */
+ 1263, /* GL_PROJECTION_STACK_DEPTH */
+ 1740, /* GL_TEXTURE_STACK_DEPTH */
+ 997, /* GL_MODELVIEW_MATRIX */
+ 1262, /* GL_PROJECTION_MATRIX */
+ 1723, /* GL_TEXTURE_MATRIX */
61, /* GL_ATTRIB_STACK_DEPTH */
136, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
43, /* GL_ALPHA_TEST */
44, /* GL_ALPHA_TEST_FUNC */
45, /* GL_ALPHA_TEST_REF */
- 381, /* GL_DITHER */
+ 383, /* GL_DITHER */
78, /* GL_BLEND_DST */
87, /* GL_BLEND_SRC */
75, /* GL_BLEND */
- 715, /* GL_LOGIC_OP_MODE */
- 632, /* GL_INDEX_LOGIC_OP */
+ 722, /* GL_LOGIC_OP_MODE */
+ 639, /* GL_INDEX_LOGIC_OP */
191, /* GL_COLOR_LOGIC_OP */
67, /* GL_AUX_BUFFERS */
- 392, /* GL_DRAW_BUFFER */
- 1289, /* GL_READ_BUFFER */
- 1400, /* GL_SCISSOR_BOX */
- 1401, /* GL_SCISSOR_TEST */
- 631, /* GL_INDEX_CLEAR_VALUE */
- 636, /* GL_INDEX_WRITEMASK */
+ 394, /* GL_DRAW_BUFFER */
+ 1299, /* GL_READ_BUFFER */
+ 1413, /* GL_SCISSOR_BOX */
+ 1414, /* GL_SCISSOR_TEST */
+ 638, /* GL_INDEX_CLEAR_VALUE */
+ 643, /* GL_INDEX_WRITEMASK */
188, /* GL_COLOR_CLEAR_VALUE */
230, /* GL_COLOR_WRITEMASK */
- 633, /* GL_INDEX_MODE */
- 1366, /* GL_RGBA_MODE */
- 391, /* GL_DOUBLEBUFFER */
- 1517, /* GL_STEREO */
- 1324, /* GL_RENDER_MODE */
- 1101, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1154, /* GL_POINT_SMOOTH_HINT */
- 699, /* GL_LINE_SMOOTH_HINT */
- 1171, /* GL_POLYGON_SMOOTH_HINT */
- 526, /* GL_FOG_HINT */
- 1687, /* GL_TEXTURE_GEN_S */
- 1688, /* GL_TEXTURE_GEN_T */
- 1686, /* GL_TEXTURE_GEN_R */
- 1685, /* GL_TEXTURE_GEN_Q */
- 1114, /* GL_PIXEL_MAP_I_TO_I */
- 1120, /* GL_PIXEL_MAP_S_TO_S */
- 1116, /* GL_PIXEL_MAP_I_TO_R */
- 1112, /* GL_PIXEL_MAP_I_TO_G */
- 1110, /* GL_PIXEL_MAP_I_TO_B */
- 1108, /* GL_PIXEL_MAP_I_TO_A */
- 1118, /* GL_PIXEL_MAP_R_TO_R */
- 1106, /* GL_PIXEL_MAP_G_TO_G */
- 1104, /* GL_PIXEL_MAP_B_TO_B */
- 1102, /* GL_PIXEL_MAP_A_TO_A */
- 1115, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1121, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1117, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1113, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1111, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1109, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1119, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1107, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1105, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1103, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1760, /* GL_UNPACK_SWAP_BYTES */
- 1755, /* GL_UNPACK_LSB_FIRST */
- 1756, /* GL_UNPACK_ROW_LENGTH */
- 1759, /* GL_UNPACK_SKIP_ROWS */
- 1758, /* GL_UNPACK_SKIP_PIXELS */
- 1753, /* GL_UNPACK_ALIGNMENT */
- 1089, /* GL_PACK_SWAP_BYTES */
- 1084, /* GL_PACK_LSB_FIRST */
- 1085, /* GL_PACK_ROW_LENGTH */
- 1088, /* GL_PACK_SKIP_ROWS */
- 1087, /* GL_PACK_SKIP_PIXELS */
- 1081, /* GL_PACK_ALIGNMENT */
- 793, /* GL_MAP_COLOR */
- 798, /* GL_MAP_STENCIL */
- 635, /* GL_INDEX_SHIFT */
- 634, /* GL_INDEX_OFFSET */
- 1302, /* GL_RED_SCALE */
- 1300, /* GL_RED_BIAS */
- 1860, /* GL_ZOOM_X */
- 1861, /* GL_ZOOM_Y */
- 596, /* GL_GREEN_SCALE */
- 594, /* GL_GREEN_BIAS */
+ 640, /* GL_INDEX_MODE */
+ 1379, /* GL_RGBA_MODE */
+ 393, /* GL_DOUBLEBUFFER */
+ 1534, /* GL_STEREO */
+ 1337, /* GL_RENDER_MODE */
+ 1111, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1164, /* GL_POINT_SMOOTH_HINT */
+ 706, /* GL_LINE_SMOOTH_HINT */
+ 1181, /* GL_POLYGON_SMOOTH_HINT */
+ 529, /* GL_FOG_HINT */
+ 1704, /* GL_TEXTURE_GEN_S */
+ 1705, /* GL_TEXTURE_GEN_T */
+ 1703, /* GL_TEXTURE_GEN_R */
+ 1702, /* GL_TEXTURE_GEN_Q */
+ 1124, /* GL_PIXEL_MAP_I_TO_I */
+ 1130, /* GL_PIXEL_MAP_S_TO_S */
+ 1126, /* GL_PIXEL_MAP_I_TO_R */
+ 1122, /* GL_PIXEL_MAP_I_TO_G */
+ 1120, /* GL_PIXEL_MAP_I_TO_B */
+ 1118, /* GL_PIXEL_MAP_I_TO_A */
+ 1128, /* GL_PIXEL_MAP_R_TO_R */
+ 1116, /* GL_PIXEL_MAP_G_TO_G */
+ 1114, /* GL_PIXEL_MAP_B_TO_B */
+ 1112, /* GL_PIXEL_MAP_A_TO_A */
+ 1125, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1131, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1127, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1123, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1121, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1119, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1129, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1117, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1115, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1113, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1778, /* GL_UNPACK_SWAP_BYTES */
+ 1773, /* GL_UNPACK_LSB_FIRST */
+ 1774, /* GL_UNPACK_ROW_LENGTH */
+ 1777, /* GL_UNPACK_SKIP_ROWS */
+ 1776, /* GL_UNPACK_SKIP_PIXELS */
+ 1771, /* GL_UNPACK_ALIGNMENT */
+ 1099, /* GL_PACK_SWAP_BYTES */
+ 1094, /* GL_PACK_LSB_FIRST */
+ 1095, /* GL_PACK_ROW_LENGTH */
+ 1098, /* GL_PACK_SKIP_ROWS */
+ 1097, /* GL_PACK_SKIP_PIXELS */
+ 1091, /* GL_PACK_ALIGNMENT */
+ 800, /* GL_MAP_COLOR */
+ 805, /* GL_MAP_STENCIL */
+ 642, /* GL_INDEX_SHIFT */
+ 641, /* GL_INDEX_OFFSET */
+ 1313, /* GL_RED_SCALE */
+ 1311, /* GL_RED_BIAS */
+ 1879, /* GL_ZOOM_X */
+ 1880, /* GL_ZOOM_Y */
+ 603, /* GL_GREEN_SCALE */
+ 601, /* GL_GREEN_BIAS */
93, /* GL_BLUE_SCALE */
91, /* GL_BLUE_BIAS */
42, /* GL_ALPHA_SCALE */
40, /* GL_ALPHA_BIAS */
- 370, /* GL_DEPTH_SCALE */
- 350, /* GL_DEPTH_BIAS */
- 872, /* GL_MAX_EVAL_ORDER */
- 876, /* GL_MAX_LIGHTS */
- 855, /* GL_MAX_CLIP_PLANES */
- 922, /* GL_MAX_TEXTURE_SIZE */
- 882, /* GL_MAX_PIXEL_MAP_TABLE */
- 851, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 879, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 880, /* GL_MAX_NAME_STACK_DEPTH */
- 908, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 923, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 937, /* GL_MAX_VIEWPORT_DIMS */
- 852, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1527, /* GL_SUBPIXEL_BITS */
- 630, /* GL_INDEX_BITS */
- 1301, /* GL_RED_BITS */
- 595, /* GL_GREEN_BITS */
+ 371, /* GL_DEPTH_SCALE */
+ 351, /* GL_DEPTH_BIAS */
+ 880, /* GL_MAX_EVAL_ORDER */
+ 884, /* GL_MAX_LIGHTS */
+ 862, /* GL_MAX_CLIP_PLANES */
+ 932, /* GL_MAX_TEXTURE_SIZE */
+ 890, /* GL_MAX_PIXEL_MAP_TABLE */
+ 858, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 887, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 888, /* GL_MAX_NAME_STACK_DEPTH */
+ 916, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 933, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 947, /* GL_MAX_VIEWPORT_DIMS */
+ 859, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1544, /* GL_SUBPIXEL_BITS */
+ 637, /* GL_INDEX_BITS */
+ 1312, /* GL_RED_BITS */
+ 602, /* GL_GREEN_BITS */
92, /* GL_BLUE_BITS */
41, /* GL_ALPHA_BITS */
- 351, /* GL_DEPTH_BITS */
- 1499, /* GL_STENCIL_BITS */
+ 352, /* GL_DEPTH_BITS */
+ 1512, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1003, /* GL_NAME_STACK_DEPTH */
+ 1013, /* GL_NAME_STACK_DEPTH */
62, /* GL_AUTO_NORMAL */
- 739, /* GL_MAP1_COLOR_4 */
- 742, /* GL_MAP1_INDEX */
- 743, /* GL_MAP1_NORMAL */
- 744, /* GL_MAP1_TEXTURE_COORD_1 */
- 745, /* GL_MAP1_TEXTURE_COORD_2 */
- 746, /* GL_MAP1_TEXTURE_COORD_3 */
- 747, /* GL_MAP1_TEXTURE_COORD_4 */
- 748, /* GL_MAP1_VERTEX_3 */
- 749, /* GL_MAP1_VERTEX_4 */
- 766, /* GL_MAP2_COLOR_4 */
- 769, /* GL_MAP2_INDEX */
- 770, /* GL_MAP2_NORMAL */
- 771, /* GL_MAP2_TEXTURE_COORD_1 */
- 772, /* GL_MAP2_TEXTURE_COORD_2 */
- 773, /* GL_MAP2_TEXTURE_COORD_3 */
- 774, /* GL_MAP2_TEXTURE_COORD_4 */
- 775, /* GL_MAP2_VERTEX_3 */
- 776, /* GL_MAP2_VERTEX_4 */
- 740, /* GL_MAP1_GRID_DOMAIN */
- 741, /* GL_MAP1_GRID_SEGMENTS */
- 767, /* GL_MAP2_GRID_DOMAIN */
- 768, /* GL_MAP2_GRID_SEGMENTS */
- 1610, /* GL_TEXTURE_1D */
- 1612, /* GL_TEXTURE_2D */
- 479, /* GL_FEEDBACK_BUFFER_POINTER */
- 480, /* GL_FEEDBACK_BUFFER_SIZE */
- 481, /* GL_FEEDBACK_BUFFER_TYPE */
- 1410, /* GL_SELECTION_BUFFER_POINTER */
- 1411, /* GL_SELECTION_BUFFER_SIZE */
- 1728, /* GL_TEXTURE_WIDTH */
- 1692, /* GL_TEXTURE_HEIGHT */
- 1647, /* GL_TEXTURE_COMPONENTS */
- 1631, /* GL_TEXTURE_BORDER_COLOR */
- 1630, /* GL_TEXTURE_BORDER */
- 383, /* GL_DONT_CARE */
- 477, /* GL_FASTEST */
- 1011, /* GL_NICEST */
+ 746, /* GL_MAP1_COLOR_4 */
+ 749, /* GL_MAP1_INDEX */
+ 750, /* GL_MAP1_NORMAL */
+ 751, /* GL_MAP1_TEXTURE_COORD_1 */
+ 752, /* GL_MAP1_TEXTURE_COORD_2 */
+ 753, /* GL_MAP1_TEXTURE_COORD_3 */
+ 754, /* GL_MAP1_TEXTURE_COORD_4 */
+ 755, /* GL_MAP1_VERTEX_3 */
+ 756, /* GL_MAP1_VERTEX_4 */
+ 773, /* GL_MAP2_COLOR_4 */
+ 776, /* GL_MAP2_INDEX */
+ 777, /* GL_MAP2_NORMAL */
+ 778, /* GL_MAP2_TEXTURE_COORD_1 */
+ 779, /* GL_MAP2_TEXTURE_COORD_2 */
+ 780, /* GL_MAP2_TEXTURE_COORD_3 */
+ 781, /* GL_MAP2_TEXTURE_COORD_4 */
+ 782, /* GL_MAP2_VERTEX_3 */
+ 783, /* GL_MAP2_VERTEX_4 */
+ 747, /* GL_MAP1_GRID_DOMAIN */
+ 748, /* GL_MAP1_GRID_SEGMENTS */
+ 774, /* GL_MAP2_GRID_DOMAIN */
+ 775, /* GL_MAP2_GRID_SEGMENTS */
+ 1627, /* GL_TEXTURE_1D */
+ 1629, /* GL_TEXTURE_2D */
+ 482, /* GL_FEEDBACK_BUFFER_POINTER */
+ 483, /* GL_FEEDBACK_BUFFER_SIZE */
+ 484, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1423, /* GL_SELECTION_BUFFER_POINTER */
+ 1424, /* GL_SELECTION_BUFFER_SIZE */
+ 1746, /* GL_TEXTURE_WIDTH */
+ 1709, /* GL_TEXTURE_HEIGHT */
+ 1664, /* GL_TEXTURE_COMPONENTS */
+ 1648, /* GL_TEXTURE_BORDER_COLOR */
+ 1647, /* GL_TEXTURE_BORDER */
+ 385, /* GL_DONT_CARE */
+ 480, /* GL_FASTEST */
+ 1021, /* GL_NICEST */
48, /* GL_AMBIENT */
- 380, /* GL_DIFFUSE */
- 1459, /* GL_SPECULAR */
- 1175, /* GL_POSITION */
- 1462, /* GL_SPOT_DIRECTION */
- 1463, /* GL_SPOT_EXPONENT */
- 1461, /* GL_SPOT_CUTOFF */
+ 382, /* GL_DIFFUSE */
+ 1472, /* GL_SPECULAR */
+ 1185, /* GL_POSITION */
+ 1475, /* GL_SPOT_DIRECTION */
+ 1476, /* GL_SPOT_EXPONENT */
+ 1474, /* GL_SPOT_CUTOFF */
275, /* GL_CONSTANT_ATTENUATION */
- 689, /* GL_LINEAR_ATTENUATION */
- 1274, /* GL_QUADRATIC_ATTENUATION */
+ 696, /* GL_LINEAR_ATTENUATION */
+ 1284, /* GL_QUADRATIC_ATTENUATION */
244, /* GL_COMPILE */
245, /* GL_COMPILE_AND_EXECUTE */
120, /* GL_BYTE */
- 1762, /* GL_UNSIGNED_BYTE */
- 1424, /* GL_SHORT */
- 1773, /* GL_UNSIGNED_SHORT */
- 638, /* GL_INT */
- 1765, /* GL_UNSIGNED_INT */
- 486, /* GL_FLOAT */
+ 1780, /* GL_UNSIGNED_BYTE */
+ 1437, /* GL_SHORT */
+ 1792, /* GL_UNSIGNED_SHORT */
+ 645, /* GL_INT */
+ 1783, /* GL_UNSIGNED_INT */
+ 489, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 390, /* GL_DOUBLE */
+ 392, /* GL_DOUBLE */
132, /* GL_CLEAR */
50, /* GL_AND */
52, /* GL_AND_REVERSE */
299, /* GL_COPY */
51, /* GL_AND_INVERTED */
- 1013, /* GL_NOOP */
- 1856, /* GL_XOR */
- 1076, /* GL_OR */
- 1014, /* GL_NOR */
- 467, /* GL_EQUIV */
- 665, /* GL_INVERT */
- 1079, /* GL_OR_REVERSE */
+ 1023, /* GL_NOOP */
+ 1875, /* GL_XOR */
+ 1086, /* GL_OR */
+ 1024, /* GL_NOR */
+ 470, /* GL_EQUIV */
+ 672, /* GL_INVERT */
+ 1089, /* GL_OR_REVERSE */
300, /* GL_COPY_INVERTED */
- 1078, /* GL_OR_INVERTED */
- 1004, /* GL_NAND */
- 1415, /* GL_SET */
- 464, /* GL_EMISSION */
- 1423, /* GL_SHININESS */
+ 1088, /* GL_OR_INVERTED */
+ 1014, /* GL_NAND */
+ 1428, /* GL_SET */
+ 467, /* GL_EMISSION */
+ 1436, /* GL_SHININESS */
49, /* GL_AMBIENT_AND_DIFFUSE */
190, /* GL_COLOR_INDEXES */
- 954, /* GL_MODELVIEW */
- 1251, /* GL_PROJECTION */
- 1545, /* GL_TEXTURE */
+ 964, /* GL_MODELVIEW */
+ 1261, /* GL_PROJECTION */
+ 1562, /* GL_TEXTURE */
147, /* GL_COLOR */
346, /* GL_DEPTH */
- 1485, /* GL_STENCIL */
+ 1498, /* GL_STENCIL */
189, /* GL_COLOR_INDEX */
- 1504, /* GL_STENCIL_INDEX */
- 358, /* GL_DEPTH_COMPONENT */
- 1297, /* GL_RED */
- 593, /* GL_GREEN */
+ 1517, /* GL_STENCIL_INDEX */
+ 359, /* GL_DEPTH_COMPONENT */
+ 1308, /* GL_RED */
+ 600, /* GL_GREEN */
90, /* GL_BLUE */
31, /* GL_ALPHA */
- 1332, /* GL_RGB */
- 1351, /* GL_RGBA */
- 717, /* GL_LUMINANCE */
- 738, /* GL_LUMINANCE_ALPHA */
+ 1345, /* GL_RGB */
+ 1364, /* GL_RGBA */
+ 724, /* GL_LUMINANCE */
+ 745, /* GL_LUMINANCE_ALPHA */
73, /* GL_BITMAP */
- 1131, /* GL_POINT */
- 687, /* GL_LINE */
- 482, /* GL_FILL */
- 1306, /* GL_RENDER */
- 478, /* GL_FEEDBACK */
- 1409, /* GL_SELECT */
- 485, /* GL_FLAT */
- 1434, /* GL_SMOOTH */
- 666, /* GL_KEEP */
- 1326, /* GL_REPLACE */
- 620, /* GL_INCR */
+ 1141, /* GL_POINT */
+ 694, /* GL_LINE */
+ 485, /* GL_FILL */
+ 1317, /* GL_RENDER */
+ 481, /* GL_FEEDBACK */
+ 1422, /* GL_SELECT */
+ 488, /* GL_FLAT */
+ 1447, /* GL_SMOOTH */
+ 673, /* GL_KEEP */
+ 1339, /* GL_REPLACE */
+ 627, /* GL_INCR */
342, /* GL_DECR */
- 1788, /* GL_VENDOR */
- 1323, /* GL_RENDERER */
- 1789, /* GL_VERSION */
- 471, /* GL_EXTENSIONS */
- 1374, /* GL_S */
- 1536, /* GL_T */
- 1286, /* GL_R */
- 1273, /* GL_Q */
- 990, /* GL_MODULATE */
+ 1807, /* GL_VENDOR */
+ 1336, /* GL_RENDERER */
+ 1808, /* GL_VERSION */
+ 474, /* GL_EXTENSIONS */
+ 1387, /* GL_S */
+ 1553, /* GL_T */
+ 1296, /* GL_R */
+ 1283, /* GL_Q */
+ 1000, /* GL_MODULATE */
341, /* GL_DECAL */
- 1682, /* GL_TEXTURE_ENV_MODE */
- 1681, /* GL_TEXTURE_ENV_COLOR */
- 1680, /* GL_TEXTURE_ENV */
- 472, /* GL_EYE_LINEAR */
- 1037, /* GL_OBJECT_LINEAR */
- 1460, /* GL_SPHERE_MAP */
- 1684, /* GL_TEXTURE_GEN_MODE */
- 1039, /* GL_OBJECT_PLANE */
- 473, /* GL_EYE_PLANE */
- 1005, /* GL_NEAREST */
- 688, /* GL_LINEAR */
- 1009, /* GL_NEAREST_MIPMAP_NEAREST */
- 693, /* GL_LINEAR_MIPMAP_NEAREST */
- 1008, /* GL_NEAREST_MIPMAP_LINEAR */
- 692, /* GL_LINEAR_MIPMAP_LINEAR */
- 1705, /* GL_TEXTURE_MAG_FILTER */
- 1713, /* GL_TEXTURE_MIN_FILTER */
- 1730, /* GL_TEXTURE_WRAP_S */
- 1731, /* GL_TEXTURE_WRAP_T */
+ 1699, /* GL_TEXTURE_ENV_MODE */
+ 1698, /* GL_TEXTURE_ENV_COLOR */
+ 1697, /* GL_TEXTURE_ENV */
+ 475, /* GL_EYE_LINEAR */
+ 1047, /* GL_OBJECT_LINEAR */
+ 1473, /* GL_SPHERE_MAP */
+ 1701, /* GL_TEXTURE_GEN_MODE */
+ 1049, /* GL_OBJECT_PLANE */
+ 476, /* GL_EYE_PLANE */
+ 1015, /* GL_NEAREST */
+ 695, /* GL_LINEAR */
+ 1019, /* GL_NEAREST_MIPMAP_NEAREST */
+ 700, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1018, /* GL_NEAREST_MIPMAP_LINEAR */
+ 699, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1722, /* GL_TEXTURE_MAG_FILTER */
+ 1730, /* GL_TEXTURE_MIN_FILTER */
+ 1748, /* GL_TEXTURE_WRAP_S */
+ 1749, /* GL_TEXTURE_WRAP_T */
126, /* GL_CLAMP */
- 1325, /* GL_REPEAT */
- 1169, /* GL_POLYGON_OFFSET_UNITS */
- 1168, /* GL_POLYGON_OFFSET_POINT */
- 1167, /* GL_POLYGON_OFFSET_LINE */
- 1287, /* GL_R3_G3_B2 */
- 1785, /* GL_V2F */
- 1786, /* GL_V3F */
+ 1338, /* GL_REPEAT */
+ 1179, /* GL_POLYGON_OFFSET_UNITS */
+ 1178, /* GL_POLYGON_OFFSET_POINT */
+ 1177, /* GL_POLYGON_OFFSET_LINE */
+ 1297, /* GL_R3_G3_B2 */
+ 1804, /* GL_V2F */
+ 1805, /* GL_V3F */
123, /* GL_C4UB_V2F */
124, /* GL_C4UB_V3F */
121, /* GL_C3F_V3F */
- 1002, /* GL_N3F_V3F */
+ 1012, /* GL_N3F_V3F */
122, /* GL_C4F_N3F_V3F */
- 1541, /* GL_T2F_V3F */
- 1543, /* GL_T4F_V4F */
- 1539, /* GL_T2F_C4UB_V3F */
- 1537, /* GL_T2F_C3F_V3F */
- 1540, /* GL_T2F_N3F_V3F */
- 1538, /* GL_T2F_C4F_N3F_V3F */
- 1542, /* GL_T4F_C4F_N3F_V4F */
+ 1558, /* GL_T2F_V3F */
+ 1560, /* GL_T4F_V4F */
+ 1556, /* GL_T2F_C4UB_V3F */
+ 1554, /* GL_T2F_C3F_V3F */
+ 1557, /* GL_T2F_N3F_V3F */
+ 1555, /* GL_T2F_C4F_N3F_V3F */
+ 1559, /* GL_T4F_C4F_N3F_V4F */
139, /* GL_CLIP_PLANE0 */
140, /* GL_CLIP_PLANE1 */
141, /* GL_CLIP_PLANE2 */
142, /* GL_CLIP_PLANE3 */
143, /* GL_CLIP_PLANE4 */
144, /* GL_CLIP_PLANE5 */
- 672, /* GL_LIGHT0 */
- 673, /* GL_LIGHT1 */
- 674, /* GL_LIGHT2 */
- 675, /* GL_LIGHT3 */
- 676, /* GL_LIGHT4 */
- 677, /* GL_LIGHT5 */
- 678, /* GL_LIGHT6 */
- 679, /* GL_LIGHT7 */
- 597, /* GL_HINT_BIT */
+ 679, /* GL_LIGHT0 */
+ 680, /* GL_LIGHT1 */
+ 681, /* GL_LIGHT2 */
+ 682, /* GL_LIGHT3 */
+ 683, /* GL_LIGHT4 */
+ 684, /* GL_LIGHT5 */
+ 685, /* GL_LIGHT6 */
+ 686, /* GL_LIGHT7 */
+ 604, /* GL_HINT_BIT */
277, /* GL_CONSTANT_COLOR */
- 1050, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 1060, /* GL_ONE_MINUS_CONSTANT_COLOR */
272, /* GL_CONSTANT_ALPHA */
- 1048, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 1058, /* GL_ONE_MINUS_CONSTANT_ALPHA */
76, /* GL_BLEND_COLOR */
- 581, /* GL_FUNC_ADD */
- 938, /* GL_MIN */
- 848, /* GL_MAX */
+ 588, /* GL_FUNC_ADD */
+ 948, /* GL_MIN */
+ 855, /* GL_MAX */
81, /* GL_BLEND_EQUATION */
- 585, /* GL_FUNC_SUBTRACT */
- 583, /* GL_FUNC_REVERSE_SUBTRACT */
+ 592, /* GL_FUNC_SUBTRACT */
+ 590, /* GL_FUNC_REVERSE_SUBTRACT */
280, /* GL_CONVOLUTION_1D */
281, /* GL_CONVOLUTION_2D */
- 1412, /* GL_SEPARABLE_2D */
+ 1425, /* GL_SEPARABLE_2D */
284, /* GL_CONVOLUTION_BORDER_MODE */
288, /* GL_CONVOLUTION_FILTER_SCALE */
286, /* GL_CONVOLUTION_FILTER_BIAS */
- 1298, /* GL_REDUCE */
+ 1309, /* GL_REDUCE */
290, /* GL_CONVOLUTION_FORMAT */
294, /* GL_CONVOLUTION_WIDTH */
292, /* GL_CONVOLUTION_HEIGHT */
- 863, /* GL_MAX_CONVOLUTION_WIDTH */
- 861, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1208, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1204, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1199, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1195, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1206, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1202, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1197, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1193, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 598, /* GL_HISTOGRAM */
- 1257, /* GL_PROXY_HISTOGRAM */
- 614, /* GL_HISTOGRAM_WIDTH */
- 604, /* GL_HISTOGRAM_FORMAT */
- 610, /* GL_HISTOGRAM_RED_SIZE */
- 606, /* GL_HISTOGRAM_GREEN_SIZE */
- 601, /* GL_HISTOGRAM_BLUE_SIZE */
- 599, /* GL_HISTOGRAM_ALPHA_SIZE */
- 608, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 612, /* GL_HISTOGRAM_SINK */
- 939, /* GL_MINMAX */
- 941, /* GL_MINMAX_FORMAT */
- 943, /* GL_MINMAX_SINK */
- 1544, /* GL_TABLE_TOO_LARGE_EXT */
- 1764, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1775, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1777, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1770, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1766, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1166, /* GL_POLYGON_OFFSET_FILL */
- 1165, /* GL_POLYGON_OFFSET_FACTOR */
- 1164, /* GL_POLYGON_OFFSET_BIAS */
- 1329, /* GL_RESCALE_NORMAL */
+ 871, /* GL_MAX_CONVOLUTION_WIDTH */
+ 869, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1218, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1214, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1209, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1205, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1216, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1212, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1207, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1203, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 605, /* GL_HISTOGRAM */
+ 1267, /* GL_PROXY_HISTOGRAM */
+ 621, /* GL_HISTOGRAM_WIDTH */
+ 611, /* GL_HISTOGRAM_FORMAT */
+ 617, /* GL_HISTOGRAM_RED_SIZE */
+ 613, /* GL_HISTOGRAM_GREEN_SIZE */
+ 608, /* GL_HISTOGRAM_BLUE_SIZE */
+ 606, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 615, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 619, /* GL_HISTOGRAM_SINK */
+ 949, /* GL_MINMAX */
+ 951, /* GL_MINMAX_FORMAT */
+ 953, /* GL_MINMAX_SINK */
+ 1561, /* GL_TABLE_TOO_LARGE_EXT */
+ 1782, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1794, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1796, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1789, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1784, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1176, /* GL_POLYGON_OFFSET_FILL */
+ 1175, /* GL_POLYGON_OFFSET_FACTOR */
+ 1174, /* GL_POLYGON_OFFSET_BIAS */
+ 1342, /* GL_RESCALE_NORMAL */
36, /* GL_ALPHA4 */
38, /* GL_ALPHA8 */
32, /* GL_ALPHA12 */
34, /* GL_ALPHA16 */
- 728, /* GL_LUMINANCE4 */
- 734, /* GL_LUMINANCE8 */
- 718, /* GL_LUMINANCE12 */
- 724, /* GL_LUMINANCE16 */
- 729, /* GL_LUMINANCE4_ALPHA4 */
- 732, /* GL_LUMINANCE6_ALPHA2 */
- 735, /* GL_LUMINANCE8_ALPHA8 */
- 721, /* GL_LUMINANCE12_ALPHA4 */
- 719, /* GL_LUMINANCE12_ALPHA12 */
- 725, /* GL_LUMINANCE16_ALPHA16 */
- 639, /* GL_INTENSITY */
- 644, /* GL_INTENSITY4 */
- 646, /* GL_INTENSITY8 */
- 640, /* GL_INTENSITY12 */
- 642, /* GL_INTENSITY16 */
- 1341, /* GL_RGB2_EXT */
- 1342, /* GL_RGB4 */
- 1345, /* GL_RGB5 */
- 1349, /* GL_RGB8 */
- 1333, /* GL_RGB10 */
- 1337, /* GL_RGB12 */
- 1339, /* GL_RGB16 */
- 1356, /* GL_RGBA2 */
- 1358, /* GL_RGBA4 */
- 1346, /* GL_RGB5_A1 */
- 1362, /* GL_RGBA8 */
- 1334, /* GL_RGB10_A2 */
- 1352, /* GL_RGBA12 */
- 1354, /* GL_RGBA16 */
- 1720, /* GL_TEXTURE_RED_SIZE */
- 1690, /* GL_TEXTURE_GREEN_SIZE */
- 1628, /* GL_TEXTURE_BLUE_SIZE */
- 1615, /* GL_TEXTURE_ALPHA_SIZE */
- 1703, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1694, /* GL_TEXTURE_INTENSITY_SIZE */
- 1327, /* GL_REPLACE_EXT */
- 1261, /* GL_PROXY_TEXTURE_1D */
- 1264, /* GL_PROXY_TEXTURE_2D */
- 1726, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1715, /* GL_TEXTURE_PRIORITY */
- 1722, /* GL_TEXTURE_RESIDENT */
- 1618, /* GL_TEXTURE_BINDING_1D */
- 1620, /* GL_TEXTURE_BINDING_2D */
- 1622, /* GL_TEXTURE_BINDING_3D */
- 1086, /* GL_PACK_SKIP_IMAGES */
- 1082, /* GL_PACK_IMAGE_HEIGHT */
- 1757, /* GL_UNPACK_SKIP_IMAGES */
- 1754, /* GL_UNPACK_IMAGE_HEIGHT */
- 1614, /* GL_TEXTURE_3D */
- 1267, /* GL_PROXY_TEXTURE_3D */
- 1677, /* GL_TEXTURE_DEPTH */
- 1729, /* GL_TEXTURE_WRAP_R */
- 849, /* GL_MAX_3D_TEXTURE_SIZE */
- 1790, /* GL_VERTEX_ARRAY */
- 1016, /* GL_NORMAL_ARRAY */
+ 735, /* GL_LUMINANCE4 */
+ 741, /* GL_LUMINANCE8 */
+ 725, /* GL_LUMINANCE12 */
+ 731, /* GL_LUMINANCE16 */
+ 736, /* GL_LUMINANCE4_ALPHA4 */
+ 739, /* GL_LUMINANCE6_ALPHA2 */
+ 742, /* GL_LUMINANCE8_ALPHA8 */
+ 728, /* GL_LUMINANCE12_ALPHA4 */
+ 726, /* GL_LUMINANCE12_ALPHA12 */
+ 732, /* GL_LUMINANCE16_ALPHA16 */
+ 646, /* GL_INTENSITY */
+ 651, /* GL_INTENSITY4 */
+ 653, /* GL_INTENSITY8 */
+ 647, /* GL_INTENSITY12 */
+ 649, /* GL_INTENSITY16 */
+ 1354, /* GL_RGB2_EXT */
+ 1355, /* GL_RGB4 */
+ 1358, /* GL_RGB5 */
+ 1362, /* GL_RGB8 */
+ 1346, /* GL_RGB10 */
+ 1350, /* GL_RGB12 */
+ 1352, /* GL_RGB16 */
+ 1369, /* GL_RGBA2 */
+ 1371, /* GL_RGBA4 */
+ 1359, /* GL_RGB5_A1 */
+ 1375, /* GL_RGBA8 */
+ 1347, /* GL_RGB10_A2 */
+ 1365, /* GL_RGBA12 */
+ 1367, /* GL_RGBA16 */
+ 1737, /* GL_TEXTURE_RED_SIZE */
+ 1707, /* GL_TEXTURE_GREEN_SIZE */
+ 1645, /* GL_TEXTURE_BLUE_SIZE */
+ 1632, /* GL_TEXTURE_ALPHA_SIZE */
+ 1720, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1711, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1340, /* GL_REPLACE_EXT */
+ 1271, /* GL_PROXY_TEXTURE_1D */
+ 1274, /* GL_PROXY_TEXTURE_2D */
+ 1744, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1732, /* GL_TEXTURE_PRIORITY */
+ 1739, /* GL_TEXTURE_RESIDENT */
+ 1635, /* GL_TEXTURE_BINDING_1D */
+ 1637, /* GL_TEXTURE_BINDING_2D */
+ 1639, /* GL_TEXTURE_BINDING_3D */
+ 1096, /* GL_PACK_SKIP_IMAGES */
+ 1092, /* GL_PACK_IMAGE_HEIGHT */
+ 1775, /* GL_UNPACK_SKIP_IMAGES */
+ 1772, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1631, /* GL_TEXTURE_3D */
+ 1277, /* GL_PROXY_TEXTURE_3D */
+ 1694, /* GL_TEXTURE_DEPTH */
+ 1747, /* GL_TEXTURE_WRAP_R */
+ 856, /* GL_MAX_3D_TEXTURE_SIZE */
+ 1809, /* GL_VERTEX_ARRAY */
+ 1026, /* GL_NORMAL_ARRAY */
148, /* GL_COLOR_ARRAY */
- 624, /* GL_INDEX_ARRAY */
- 1655, /* GL_TEXTURE_COORD_ARRAY */
- 456, /* GL_EDGE_FLAG_ARRAY */
- 1796, /* GL_VERTEX_ARRAY_SIZE */
- 1798, /* GL_VERTEX_ARRAY_TYPE */
- 1797, /* GL_VERTEX_ARRAY_STRIDE */
- 1021, /* GL_NORMAL_ARRAY_TYPE */
- 1020, /* GL_NORMAL_ARRAY_STRIDE */
+ 631, /* GL_INDEX_ARRAY */
+ 1672, /* GL_TEXTURE_COORD_ARRAY */
+ 459, /* GL_EDGE_FLAG_ARRAY */
+ 1815, /* GL_VERTEX_ARRAY_SIZE */
+ 1817, /* GL_VERTEX_ARRAY_TYPE */
+ 1816, /* GL_VERTEX_ARRAY_STRIDE */
+ 1031, /* GL_NORMAL_ARRAY_TYPE */
+ 1030, /* GL_NORMAL_ARRAY_STRIDE */
152, /* GL_COLOR_ARRAY_SIZE */
154, /* GL_COLOR_ARRAY_TYPE */
153, /* GL_COLOR_ARRAY_STRIDE */
- 629, /* GL_INDEX_ARRAY_TYPE */
- 628, /* GL_INDEX_ARRAY_STRIDE */
- 1659, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1661, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1660, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 460, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1795, /* GL_VERTEX_ARRAY_POINTER */
- 1019, /* GL_NORMAL_ARRAY_POINTER */
+ 636, /* GL_INDEX_ARRAY_TYPE */
+ 635, /* GL_INDEX_ARRAY_STRIDE */
+ 1676, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1678, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1677, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 463, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 1814, /* GL_VERTEX_ARRAY_POINTER */
+ 1029, /* GL_NORMAL_ARRAY_POINTER */
151, /* GL_COLOR_ARRAY_POINTER */
- 627, /* GL_INDEX_ARRAY_POINTER */
- 1658, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 459, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 995, /* GL_MULTISAMPLE */
- 1386, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1388, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1393, /* GL_SAMPLE_COVERAGE */
- 1390, /* GL_SAMPLE_BUFFERS */
- 1381, /* GL_SAMPLES */
- 1397, /* GL_SAMPLE_COVERAGE_VALUE */
- 1395, /* GL_SAMPLE_COVERAGE_INVERT */
+ 634, /* GL_INDEX_ARRAY_POINTER */
+ 1675, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 462, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1005, /* GL_MULTISAMPLE */
+ 1399, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1401, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1406, /* GL_SAMPLE_COVERAGE */
+ 1403, /* GL_SAMPLE_BUFFERS */
+ 1394, /* GL_SAMPLES */
+ 1410, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1408, /* GL_SAMPLE_COVERAGE_INVERT */
195, /* GL_COLOR_MATRIX */
197, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 857, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1191, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1187, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1182, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1178, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1189, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1185, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1180, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1176, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1638, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1268, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1640, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 865, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1201, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1197, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1192, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1188, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1199, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1195, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1190, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1186, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1655, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1278, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1657, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
80, /* GL_BLEND_DST_RGB */
89, /* GL_BLEND_SRC_RGB */
79, /* GL_BLEND_DST_ALPHA */
88, /* GL_BLEND_SRC_ALPHA */
201, /* GL_COLOR_TABLE */
- 1201, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1184, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1256, /* GL_PROXY_COLOR_TABLE */
- 1260, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1259, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1211, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1194, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1266, /* GL_PROXY_COLOR_TABLE */
+ 1270, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1269, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
225, /* GL_COLOR_TABLE_SCALE */
205, /* GL_COLOR_TABLE_BIAS */
210, /* GL_COLOR_TABLE_FORMAT */
@@ -4379,380 +4417,380 @@ static const unsigned reduced_enums[1347] =
216, /* GL_COLOR_TABLE_INTENSITY_SIZE */
71, /* GL_BGR */
72, /* GL_BGRA */
- 871, /* GL_MAX_ELEMENTS_VERTICES */
- 870, /* GL_MAX_ELEMENTS_INDICES */
- 1693, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 879, /* GL_MAX_ELEMENTS_VERTICES */
+ 878, /* GL_MAX_ELEMENTS_INDICES */
+ 1710, /* GL_TEXTURE_INDEX_SIZE_EXT */
145, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1148, /* GL_POINT_SIZE_MIN */
- 1144, /* GL_POINT_SIZE_MAX */
- 1138, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1134, /* GL_POINT_DISTANCE_ATTENUATION */
+ 1158, /* GL_POINT_SIZE_MIN */
+ 1154, /* GL_POINT_SIZE_MAX */
+ 1148, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1144, /* GL_POINT_DISTANCE_ATTENUATION */
127, /* GL_CLAMP_TO_BORDER */
130, /* GL_CLAMP_TO_EDGE */
- 1714, /* GL_TEXTURE_MIN_LOD */
- 1712, /* GL_TEXTURE_MAX_LOD */
- 1617, /* GL_TEXTURE_BASE_LEVEL */
- 1711, /* GL_TEXTURE_MAX_LEVEL */
- 617, /* GL_IGNORE_BORDER_HP */
+ 1731, /* GL_TEXTURE_MIN_LOD */
+ 1729, /* GL_TEXTURE_MAX_LOD */
+ 1634, /* GL_TEXTURE_BASE_LEVEL */
+ 1728, /* GL_TEXTURE_MAX_LEVEL */
+ 624, /* GL_IGNORE_BORDER_HP */
276, /* GL_CONSTANT_BORDER_HP */
- 1328, /* GL_REPLICATE_BORDER_HP */
+ 1341, /* GL_REPLICATE_BORDER_HP */
282, /* GL_CONVOLUTION_BORDER_COLOR */
- 1045, /* GL_OCCLUSION_TEST_HP */
- 1046, /* GL_OCCLUSION_TEST_RESULT_HP */
- 690, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1632, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1634, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1636, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1637, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1635, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1633, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 853, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 854, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1211, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1213, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1210, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1212, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1701, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1702, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1700, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 587, /* GL_GENERATE_MIPMAP */
- 588, /* GL_GENERATE_MIPMAP_HINT */
- 529, /* GL_FOG_OFFSET_SGIX */
- 530, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1646, /* GL_TEXTURE_COMPARE_SGIX */
- 1645, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1697, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1689, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 359, /* GL_DEPTH_COMPONENT16 */
- 362, /* GL_DEPTH_COMPONENT24 */
- 365, /* GL_DEPTH_COMPONENT32 */
+ 1055, /* GL_OCCLUSION_TEST_HP */
+ 1056, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 697, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1649, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1651, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1653, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1654, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1652, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1650, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 860, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 861, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1221, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1223, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1220, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1222, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1718, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1719, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1717, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 594, /* GL_GENERATE_MIPMAP */
+ 595, /* GL_GENERATE_MIPMAP_HINT */
+ 532, /* GL_FOG_OFFSET_SGIX */
+ 533, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1663, /* GL_TEXTURE_COMPARE_SGIX */
+ 1662, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1714, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1706, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 360, /* GL_DEPTH_COMPONENT16 */
+ 363, /* GL_DEPTH_COMPONENT24 */
+ 366, /* GL_DEPTH_COMPONENT32 */
306, /* GL_CULL_VERTEX_EXT */
308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1853, /* GL_WRAP_BORDER_SUN */
- 1639, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 683, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1427, /* GL_SINGLE_COLOR */
- 1413, /* GL_SEPARATE_SPECULAR_COLOR */
- 1422, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 540, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 541, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 548, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 543, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 539, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 538, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 542, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 549, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 560, /* GL_FRAMEBUFFER_DEFAULT */
- 573, /* GL_FRAMEBUFFER_UNDEFINED */
- 372, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 623, /* GL_INDEX */
- 1763, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1778, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1779, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1776, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1774, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1771, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1769, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1709, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1710, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1708, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 946, /* GL_MIRRORED_REPEAT */
- 1369, /* GL_RGB_S3TC */
- 1344, /* GL_RGB4_S3TC */
- 1367, /* GL_RGBA_S3TC */
- 1361, /* GL_RGBA4_S3TC */
- 1365, /* GL_RGBA_DXT5_S3TC */
- 1359, /* GL_RGBA4_DXT5_S3TC */
+ 1872, /* GL_WRAP_BORDER_SUN */
+ 1656, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 690, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1440, /* GL_SINGLE_COLOR */
+ 1426, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1435, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 543, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 544, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 551, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 546, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 542, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 541, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 545, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 552, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 564, /* GL_FRAMEBUFFER_DEFAULT */
+ 580, /* GL_FRAMEBUFFER_UNDEFINED */
+ 373, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 630, /* GL_INDEX */
+ 1781, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1797, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1798, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1795, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1793, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1790, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1788, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1726, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1727, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1725, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 956, /* GL_MIRRORED_REPEAT */
+ 1382, /* GL_RGB_S3TC */
+ 1357, /* GL_RGB4_S3TC */
+ 1380, /* GL_RGBA_S3TC */
+ 1374, /* GL_RGBA4_S3TC */
+ 1378, /* GL_RGBA_DXT5_S3TC */
+ 1372, /* GL_RGBA4_DXT5_S3TC */
264, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
259, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
260, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
261, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1007, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1006, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 691, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 516, /* GL_FOG_COORDINATE_SOURCE */
- 508, /* GL_FOG_COORD */
- 532, /* GL_FRAGMENT_DEPTH */
+ 1017, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1016, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 698, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 519, /* GL_FOG_COORDINATE_SOURCE */
+ 511, /* GL_FOG_COORD */
+ 535, /* GL_FRAGMENT_DEPTH */
312, /* GL_CURRENT_FOG_COORD */
- 515, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 514, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 513, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 510, /* GL_FOG_COORDINATE_ARRAY */
+ 518, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 517, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 516, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 513, /* GL_FOG_COORDINATE_ARRAY */
199, /* GL_COLOR_SUM */
332, /* GL_CURRENT_SECONDARY_COLOR */
- 1406, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1408, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1407, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1405, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1402, /* GL_SECONDARY_COLOR_ARRAY */
+ 1419, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1421, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1420, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1418, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1415, /* GL_SECONDARY_COLOR_ARRAY */
330, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
28, /* GL_ALIASED_POINT_SIZE_RANGE */
27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1546, /* GL_TEXTURE0 */
- 1548, /* GL_TEXTURE1 */
- 1570, /* GL_TEXTURE2 */
- 1592, /* GL_TEXTURE3 */
- 1598, /* GL_TEXTURE4 */
- 1600, /* GL_TEXTURE5 */
- 1602, /* GL_TEXTURE6 */
- 1604, /* GL_TEXTURE7 */
- 1606, /* GL_TEXTURE8 */
- 1608, /* GL_TEXTURE9 */
- 1549, /* GL_TEXTURE10 */
- 1551, /* GL_TEXTURE11 */
- 1553, /* GL_TEXTURE12 */
- 1555, /* GL_TEXTURE13 */
- 1557, /* GL_TEXTURE14 */
- 1559, /* GL_TEXTURE15 */
- 1561, /* GL_TEXTURE16 */
- 1563, /* GL_TEXTURE17 */
- 1565, /* GL_TEXTURE18 */
- 1567, /* GL_TEXTURE19 */
- 1571, /* GL_TEXTURE20 */
- 1573, /* GL_TEXTURE21 */
- 1575, /* GL_TEXTURE22 */
- 1577, /* GL_TEXTURE23 */
- 1579, /* GL_TEXTURE24 */
- 1581, /* GL_TEXTURE25 */
- 1583, /* GL_TEXTURE26 */
- 1585, /* GL_TEXTURE27 */
- 1587, /* GL_TEXTURE28 */
- 1589, /* GL_TEXTURE29 */
- 1593, /* GL_TEXTURE30 */
- 1595, /* GL_TEXTURE31 */
+ 1563, /* GL_TEXTURE0 */
+ 1565, /* GL_TEXTURE1 */
+ 1587, /* GL_TEXTURE2 */
+ 1609, /* GL_TEXTURE3 */
+ 1615, /* GL_TEXTURE4 */
+ 1617, /* GL_TEXTURE5 */
+ 1619, /* GL_TEXTURE6 */
+ 1621, /* GL_TEXTURE7 */
+ 1623, /* GL_TEXTURE8 */
+ 1625, /* GL_TEXTURE9 */
+ 1566, /* GL_TEXTURE10 */
+ 1568, /* GL_TEXTURE11 */
+ 1570, /* GL_TEXTURE12 */
+ 1572, /* GL_TEXTURE13 */
+ 1574, /* GL_TEXTURE14 */
+ 1576, /* GL_TEXTURE15 */
+ 1578, /* GL_TEXTURE16 */
+ 1580, /* GL_TEXTURE17 */
+ 1582, /* GL_TEXTURE18 */
+ 1584, /* GL_TEXTURE19 */
+ 1588, /* GL_TEXTURE20 */
+ 1590, /* GL_TEXTURE21 */
+ 1592, /* GL_TEXTURE22 */
+ 1594, /* GL_TEXTURE23 */
+ 1596, /* GL_TEXTURE24 */
+ 1598, /* GL_TEXTURE25 */
+ 1600, /* GL_TEXTURE26 */
+ 1602, /* GL_TEXTURE27 */
+ 1604, /* GL_TEXTURE28 */
+ 1606, /* GL_TEXTURE29 */
+ 1610, /* GL_TEXTURE30 */
+ 1612, /* GL_TEXTURE31 */
18, /* GL_ACTIVE_TEXTURE */
133, /* GL_CLIENT_ACTIVE_TEXTURE */
- 924, /* GL_MAX_TEXTURE_UNITS */
- 1741, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1744, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1746, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1738, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1528, /* GL_SUBTRACT */
- 911, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ 934, /* GL_MAX_TEXTURE_UNITS */
+ 1759, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1762, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1764, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1756, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1545, /* GL_SUBTRACT */
+ 919, /* GL_MAX_RENDERBUFFER_SIZE */
247, /* GL_COMPRESSED_ALPHA */
251, /* GL_COMPRESSED_LUMINANCE */
252, /* GL_COMPRESSED_LUMINANCE_ALPHA */
249, /* GL_COMPRESSED_INTENSITY */
255, /* GL_COMPRESSED_RGB */
256, /* GL_COMPRESSED_RGBA */
- 1653, /* GL_TEXTURE_COMPRESSION_HINT */
- 1718, /* GL_TEXTURE_RECTANGLE_ARB */
- 1625, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1271, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 909, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 371, /* GL_DEPTH_STENCIL */
- 1767, /* GL_UNSIGNED_INT_24_8 */
- 920, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1707, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 921, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1683, /* GL_TEXTURE_FILTER_CONTROL */
- 1698, /* GL_TEXTURE_LOD_BIAS */
+ 1670, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1735, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1642, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1281, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 917, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ 372, /* GL_DEPTH_STENCIL */
+ 1785, /* GL_UNSIGNED_INT_24_8 */
+ 930, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1724, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 931, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1700, /* GL_TEXTURE_FILTER_CONTROL */
+ 1715, /* GL_TEXTURE_LOD_BIAS */
232, /* GL_COMBINE4 */
- 914, /* GL_MAX_SHININESS_NV */
- 915, /* GL_MAX_SPOT_EXPONENT_NV */
- 621, /* GL_INCR_WRAP */
+ 924, /* GL_MAX_SHININESS_NV */
+ 925, /* GL_MAX_SPOT_EXPONENT_NV */
+ 628, /* GL_INCR_WRAP */
343, /* GL_DECR_WRAP */
- 966, /* GL_MODELVIEW1_ARB */
- 1022, /* GL_NORMAL_MAP */
- 1303, /* GL_REFLECTION_MAP */
- 1662, /* GL_TEXTURE_CUBE_MAP */
- 1623, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1670, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1664, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1672, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1666, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1674, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1668, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1269, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 865, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 1001, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 524, /* GL_FOG_DISTANCE_MODE_NV */
- 475, /* GL_EYE_RADIAL_NV */
- 474, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 976, /* GL_MODELVIEW1_ARB */
+ 1032, /* GL_NORMAL_MAP */
+ 1314, /* GL_REFLECTION_MAP */
+ 1679, /* GL_TEXTURE_CUBE_MAP */
+ 1640, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1687, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1681, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1689, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1683, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1691, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1685, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1279, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 873, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1011, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 527, /* GL_FOG_DISTANCE_MODE_NV */
+ 478, /* GL_EYE_RADIAL_NV */
+ 477, /* GL_EYE_PLANE_ABSOLUTE_NV */
231, /* GL_COMBINE */
238, /* GL_COMBINE_RGB */
233, /* GL_COMBINE_ALPHA */
- 1370, /* GL_RGB_SCALE */
+ 1383, /* GL_RGB_SCALE */
24, /* GL_ADD_SIGNED */
- 649, /* GL_INTERPOLATE */
+ 656, /* GL_INTERPOLATE */
271, /* GL_CONSTANT */
- 1217, /* GL_PRIMARY_COLOR */
- 1214, /* GL_PREVIOUS */
- 1442, /* GL_SOURCE0_RGB */
- 1448, /* GL_SOURCE1_RGB */
- 1454, /* GL_SOURCE2_RGB */
- 1458, /* GL_SOURCE3_RGB_NV */
- 1439, /* GL_SOURCE0_ALPHA */
- 1445, /* GL_SOURCE1_ALPHA */
- 1451, /* GL_SOURCE2_ALPHA */
- 1457, /* GL_SOURCE3_ALPHA_NV */
- 1059, /* GL_OPERAND0_RGB */
- 1065, /* GL_OPERAND1_RGB */
- 1071, /* GL_OPERAND2_RGB */
- 1075, /* GL_OPERAND3_RGB_NV */
- 1056, /* GL_OPERAND0_ALPHA */
- 1062, /* GL_OPERAND1_ALPHA */
- 1068, /* GL_OPERAND2_ALPHA */
- 1074, /* GL_OPERAND3_ALPHA_NV */
- 1791, /* GL_VERTEX_ARRAY_BINDING */
- 1716, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1717, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1857, /* GL_YCBCR_422_APPLE */
- 1780, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1782, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1725, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1519, /* GL_STORAGE_PRIVATE_APPLE */
- 1518, /* GL_STORAGE_CACHED_APPLE */
- 1520, /* GL_STORAGE_SHARED_APPLE */
- 1429, /* GL_SLICE_ACCUM_SUN */
- 1278, /* GL_QUAD_MESH_SUN */
- 1750, /* GL_TRIANGLE_MESH_SUN */
- 1830, /* GL_VERTEX_PROGRAM_ARB */
- 1841, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1817, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1823, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1825, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1827, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 1227, /* GL_PRIMARY_COLOR */
+ 1224, /* GL_PREVIOUS */
+ 1455, /* GL_SOURCE0_RGB */
+ 1461, /* GL_SOURCE1_RGB */
+ 1467, /* GL_SOURCE2_RGB */
+ 1471, /* GL_SOURCE3_RGB_NV */
+ 1452, /* GL_SOURCE0_ALPHA */
+ 1458, /* GL_SOURCE1_ALPHA */
+ 1464, /* GL_SOURCE2_ALPHA */
+ 1470, /* GL_SOURCE3_ALPHA_NV */
+ 1069, /* GL_OPERAND0_RGB */
+ 1075, /* GL_OPERAND1_RGB */
+ 1081, /* GL_OPERAND2_RGB */
+ 1085, /* GL_OPERAND3_RGB_NV */
+ 1066, /* GL_OPERAND0_ALPHA */
+ 1072, /* GL_OPERAND1_ALPHA */
+ 1078, /* GL_OPERAND2_ALPHA */
+ 1084, /* GL_OPERAND3_ALPHA_NV */
+ 1810, /* GL_VERTEX_ARRAY_BINDING */
+ 1733, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 1734, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 1876, /* GL_YCBCR_422_APPLE */
+ 1799, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1801, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1743, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1536, /* GL_STORAGE_PRIVATE_APPLE */
+ 1535, /* GL_STORAGE_CACHED_APPLE */
+ 1537, /* GL_STORAGE_SHARED_APPLE */
+ 1442, /* GL_SLICE_ACCUM_SUN */
+ 1288, /* GL_QUAD_MESH_SUN */
+ 1768, /* GL_TRIANGLE_MESH_SUN */
+ 1849, /* GL_VERTEX_PROGRAM_ARB */
+ 1860, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1836, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 1842, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 1844, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 1846, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
334, /* GL_CURRENT_VERTEX_ATTRIB */
- 1230, /* GL_PROGRAM_LENGTH_ARB */
- 1244, /* GL_PROGRAM_STRING_ARB */
- 988, /* GL_MODELVIEW_PROJECTION_NV */
- 616, /* GL_IDENTITY_NV */
- 663, /* GL_INVERSE_NV */
- 1743, /* GL_TRANSPOSE_NV */
- 664, /* GL_INVERSE_TRANSPOSE_NV */
- 895, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 894, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 802, /* GL_MATRIX0_NV */
- 814, /* GL_MATRIX1_NV */
- 826, /* GL_MATRIX2_NV */
- 830, /* GL_MATRIX3_NV */
- 832, /* GL_MATRIX4_NV */
- 834, /* GL_MATRIX5_NV */
- 836, /* GL_MATRIX6_NV */
- 838, /* GL_MATRIX7_NV */
+ 1240, /* GL_PROGRAM_LENGTH_ARB */
+ 1254, /* GL_PROGRAM_STRING_ARB */
+ 998, /* GL_MODELVIEW_PROJECTION_NV */
+ 623, /* GL_IDENTITY_NV */
+ 670, /* GL_INVERSE_NV */
+ 1761, /* GL_TRANSPOSE_NV */
+ 671, /* GL_INVERSE_TRANSPOSE_NV */
+ 903, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 902, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 809, /* GL_MATRIX0_NV */
+ 821, /* GL_MATRIX1_NV */
+ 833, /* GL_MATRIX2_NV */
+ 837, /* GL_MATRIX3_NV */
+ 839, /* GL_MATRIX4_NV */
+ 841, /* GL_MATRIX5_NV */
+ 843, /* GL_MATRIX6_NV */
+ 845, /* GL_MATRIX7_NV */
318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
315, /* GL_CURRENT_MATRIX_ARB */
- 1833, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1836, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1242, /* GL_PROGRAM_PARAMETER_NV */
- 1821, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1246, /* GL_PROGRAM_TARGET_NV */
- 1243, /* GL_PROGRAM_RESIDENT_NV */
- 1735, /* GL_TRACK_MATRIX_NV */
- 1736, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1831, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1224, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 355, /* GL_DEPTH_CLAMP */
- 1799, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1806, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1807, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1808, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1809, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1810, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1811, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1812, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1813, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1814, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1800, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1801, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1802, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1803, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1804, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1805, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 750, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 757, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 758, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 759, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 760, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 761, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 762, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 763, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 764, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 765, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 751, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 752, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 753, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 754, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 755, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 756, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 777, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 784, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 785, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 786, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 787, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 788, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 789, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1223, /* GL_PROGRAM_BINDING_ARB */
- 791, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 792, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 778, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 779, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 780, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 781, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 782, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 783, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1651, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1648, /* GL_TEXTURE_COMPRESSED */
- 1027, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 1852, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 1855, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1252, /* GL_PROGRAM_PARAMETER_NV */
+ 1840, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1256, /* GL_PROGRAM_TARGET_NV */
+ 1253, /* GL_PROGRAM_RESIDENT_NV */
+ 1753, /* GL_TRACK_MATRIX_NV */
+ 1754, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 1850, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1234, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 356, /* GL_DEPTH_CLAMP */
+ 1818, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1825, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1826, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1827, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1828, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1829, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1830, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1831, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1832, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1833, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1819, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1820, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1821, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1822, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1823, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1824, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 757, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 764, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 765, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 766, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 767, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 768, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 769, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 770, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 771, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 772, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 758, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 759, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 760, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 761, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 762, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 763, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 784, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 791, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 792, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 793, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 794, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 795, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 796, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1233, /* GL_PROGRAM_BINDING_ARB */
+ 798, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 799, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 785, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 786, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 787, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 788, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 789, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 790, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1668, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1665, /* GL_TEXTURE_COMPRESSED */
+ 1037, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
269, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 936, /* GL_MAX_VERTEX_UNITS_ARB */
+ 946, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1852, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1829, /* GL_VERTEX_BLEND_ARB */
+ 1871, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1848, /* GL_VERTEX_BLEND_ARB */
336, /* GL_CURRENT_WEIGHT_ARB */
- 1851, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1850, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1849, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1848, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1845, /* GL_WEIGHT_ARRAY_ARB */
- 384, /* GL_DOT3_RGB */
- 385, /* GL_DOT3_RGBA */
+ 1870, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1869, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1868, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1867, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1864, /* GL_WEIGHT_ARRAY_ARB */
+ 386, /* GL_DOT3_RGB */
+ 387, /* GL_DOT3_RGBA */
263, /* GL_COMPRESSED_RGB_FXT1_3DFX */
258, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 996, /* GL_MULTISAMPLE_3DFX */
- 1391, /* GL_SAMPLE_BUFFERS_3DFX */
- 1382, /* GL_SAMPLES_3DFX */
- 977, /* GL_MODELVIEW2_ARB */
- 980, /* GL_MODELVIEW3_ARB */
- 981, /* GL_MODELVIEW4_ARB */
- 982, /* GL_MODELVIEW5_ARB */
- 983, /* GL_MODELVIEW6_ARB */
- 984, /* GL_MODELVIEW7_ARB */
- 985, /* GL_MODELVIEW8_ARB */
- 986, /* GL_MODELVIEW9_ARB */
- 956, /* GL_MODELVIEW10_ARB */
- 957, /* GL_MODELVIEW11_ARB */
- 958, /* GL_MODELVIEW12_ARB */
- 959, /* GL_MODELVIEW13_ARB */
- 960, /* GL_MODELVIEW14_ARB */
- 961, /* GL_MODELVIEW15_ARB */
- 962, /* GL_MODELVIEW16_ARB */
- 963, /* GL_MODELVIEW17_ARB */
- 964, /* GL_MODELVIEW18_ARB */
- 965, /* GL_MODELVIEW19_ARB */
- 967, /* GL_MODELVIEW20_ARB */
- 968, /* GL_MODELVIEW21_ARB */
- 969, /* GL_MODELVIEW22_ARB */
- 970, /* GL_MODELVIEW23_ARB */
- 971, /* GL_MODELVIEW24_ARB */
- 972, /* GL_MODELVIEW25_ARB */
- 973, /* GL_MODELVIEW26_ARB */
- 974, /* GL_MODELVIEW27_ARB */
- 975, /* GL_MODELVIEW28_ARB */
- 976, /* GL_MODELVIEW29_ARB */
- 978, /* GL_MODELVIEW30_ARB */
- 979, /* GL_MODELVIEW31_ARB */
- 389, /* GL_DOT3_RGB_EXT */
- 387, /* GL_DOT3_RGBA_EXT */
- 950, /* GL_MIRROR_CLAMP_EXT */
- 953, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 991, /* GL_MODULATE_ADD_ATI */
- 992, /* GL_MODULATE_SIGNED_ADD_ATI */
- 993, /* GL_MODULATE_SUBTRACT_ATI */
- 1858, /* GL_YCBCR_MESA */
- 1083, /* GL_PACK_INVERT_MESA */
+ 1006, /* GL_MULTISAMPLE_3DFX */
+ 1404, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1395, /* GL_SAMPLES_3DFX */
+ 987, /* GL_MODELVIEW2_ARB */
+ 990, /* GL_MODELVIEW3_ARB */
+ 991, /* GL_MODELVIEW4_ARB */
+ 992, /* GL_MODELVIEW5_ARB */
+ 993, /* GL_MODELVIEW6_ARB */
+ 994, /* GL_MODELVIEW7_ARB */
+ 995, /* GL_MODELVIEW8_ARB */
+ 996, /* GL_MODELVIEW9_ARB */
+ 966, /* GL_MODELVIEW10_ARB */
+ 967, /* GL_MODELVIEW11_ARB */
+ 968, /* GL_MODELVIEW12_ARB */
+ 969, /* GL_MODELVIEW13_ARB */
+ 970, /* GL_MODELVIEW14_ARB */
+ 971, /* GL_MODELVIEW15_ARB */
+ 972, /* GL_MODELVIEW16_ARB */
+ 973, /* GL_MODELVIEW17_ARB */
+ 974, /* GL_MODELVIEW18_ARB */
+ 975, /* GL_MODELVIEW19_ARB */
+ 977, /* GL_MODELVIEW20_ARB */
+ 978, /* GL_MODELVIEW21_ARB */
+ 979, /* GL_MODELVIEW22_ARB */
+ 980, /* GL_MODELVIEW23_ARB */
+ 981, /* GL_MODELVIEW24_ARB */
+ 982, /* GL_MODELVIEW25_ARB */
+ 983, /* GL_MODELVIEW26_ARB */
+ 984, /* GL_MODELVIEW27_ARB */
+ 985, /* GL_MODELVIEW28_ARB */
+ 986, /* GL_MODELVIEW29_ARB */
+ 988, /* GL_MODELVIEW30_ARB */
+ 989, /* GL_MODELVIEW31_ARB */
+ 391, /* GL_DOT3_RGB_EXT */
+ 389, /* GL_DOT3_RGBA_EXT */
+ 960, /* GL_MIRROR_CLAMP_EXT */
+ 963, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1001, /* GL_MODULATE_ADD_ATI */
+ 1002, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1003, /* GL_MODULATE_SUBTRACT_ATI */
+ 1877, /* GL_YCBCR_MESA */
+ 1093, /* GL_PACK_INVERT_MESA */
339, /* GL_DEBUG_OBJECT_MESA */
340, /* GL_DEBUG_PRINT_MESA */
338, /* GL_DEBUG_ASSERT_MESA */
@@ -4762,292 +4800,292 @@ static const unsigned reduced_enums[1347] =
117, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
115, /* GL_BUMP_NUM_TEX_UNITS_ATI */
119, /* GL_BUMP_TEX_UNITS_ATI */
- 448, /* GL_DUDV_ATI */
- 447, /* GL_DU8DV8_ATI */
+ 451, /* GL_DUDV_ATI */
+ 450, /* GL_DU8DV8_ATI */
114, /* GL_BUMP_ENVMAP_ATI */
118, /* GL_BUMP_TARGET_ATI */
- 1490, /* GL_STENCIL_BACK_FUNC */
- 1488, /* GL_STENCIL_BACK_FAIL */
- 1492, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1494, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 533, /* GL_FRAGMENT_PROGRAM_ARB */
- 1221, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1249, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1248, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1233, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1239, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1238, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 884, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 907, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 906, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 897, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 903, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 902, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 867, /* GL_MAX_DRAW_BUFFERS */
- 393, /* GL_DRAW_BUFFER0 */
- 396, /* GL_DRAW_BUFFER1 */
- 417, /* GL_DRAW_BUFFER2 */
- 420, /* GL_DRAW_BUFFER3 */
- 423, /* GL_DRAW_BUFFER4 */
- 426, /* GL_DRAW_BUFFER5 */
- 429, /* GL_DRAW_BUFFER6 */
- 432, /* GL_DRAW_BUFFER7 */
- 435, /* GL_DRAW_BUFFER8 */
- 438, /* GL_DRAW_BUFFER9 */
- 397, /* GL_DRAW_BUFFER10 */
- 400, /* GL_DRAW_BUFFER11 */
- 403, /* GL_DRAW_BUFFER12 */
- 406, /* GL_DRAW_BUFFER13 */
- 409, /* GL_DRAW_BUFFER14 */
- 412, /* GL_DRAW_BUFFER15 */
+ 1503, /* GL_STENCIL_BACK_FUNC */
+ 1501, /* GL_STENCIL_BACK_FAIL */
+ 1505, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1507, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 536, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1231, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1259, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1258, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1243, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1249, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1248, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 892, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 915, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 914, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 905, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 911, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 910, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 875, /* GL_MAX_DRAW_BUFFERS */
+ 395, /* GL_DRAW_BUFFER0 */
+ 398, /* GL_DRAW_BUFFER1 */
+ 419, /* GL_DRAW_BUFFER2 */
+ 422, /* GL_DRAW_BUFFER3 */
+ 425, /* GL_DRAW_BUFFER4 */
+ 428, /* GL_DRAW_BUFFER5 */
+ 431, /* GL_DRAW_BUFFER6 */
+ 434, /* GL_DRAW_BUFFER7 */
+ 437, /* GL_DRAW_BUFFER8 */
+ 440, /* GL_DRAW_BUFFER9 */
+ 399, /* GL_DRAW_BUFFER10 */
+ 402, /* GL_DRAW_BUFFER11 */
+ 405, /* GL_DRAW_BUFFER12 */
+ 408, /* GL_DRAW_BUFFER13 */
+ 411, /* GL_DRAW_BUFFER14 */
+ 414, /* GL_DRAW_BUFFER15 */
82, /* GL_BLEND_EQUATION_ALPHA */
- 847, /* GL_MATRIX_PALETTE_ARB */
- 878, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 881, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 854, /* GL_MATRIX_PALETTE_ARB */
+ 886, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 889, /* GL_MAX_PALETTE_MATRICES_ARB */
321, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 841, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 848, /* GL_MATRIX_INDEX_ARRAY_ARB */
316, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 843, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 845, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 844, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 842, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1678, /* GL_TEXTURE_DEPTH_SIZE */
- 377, /* GL_DEPTH_TEXTURE_MODE */
- 1643, /* GL_TEXTURE_COMPARE_MODE */
- 1641, /* GL_TEXTURE_COMPARE_FUNC */
+ 850, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 852, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 851, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 849, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1695, /* GL_TEXTURE_DEPTH_SIZE */
+ 379, /* GL_DEPTH_TEXTURE_MODE */
+ 1660, /* GL_TEXTURE_COMPARE_MODE */
+ 1658, /* GL_TEXTURE_COMPARE_FUNC */
242, /* GL_COMPARE_R_TO_TEXTURE */
- 1155, /* GL_POINT_SPRITE */
+ 1165, /* GL_POINT_SPRITE */
296, /* GL_COORD_REPLACE */
- 1159, /* GL_POINT_SPRITE_R_MODE_NV */
- 1280, /* GL_QUERY_COUNTER_BITS */
+ 1169, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1290, /* GL_QUERY_COUNTER_BITS */
323, /* GL_CURRENT_QUERY */
- 1282, /* GL_QUERY_RESULT */
- 1284, /* GL_QUERY_RESULT_AVAILABLE */
- 930, /* GL_MAX_VERTEX_ATTRIBS */
- 1819, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 375, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 374, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 916, /* GL_MAX_TEXTURE_COORDS */
- 918, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1226, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1228, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1227, /* GL_PROGRAM_FORMAT_ARB */
- 1727, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 353, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 352, /* GL_DEPTH_BOUNDS_EXT */
+ 1292, /* GL_QUERY_RESULT */
+ 1294, /* GL_QUERY_RESULT_AVAILABLE */
+ 940, /* GL_MAX_VERTEX_ATTRIBS */
+ 1838, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 926, /* GL_MAX_TEXTURE_COORDS */
+ 928, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1236, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1238, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1237, /* GL_PROGRAM_FORMAT_ARB */
+ 1745, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 354, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 353, /* GL_DEPTH_BOUNDS_EXT */
53, /* GL_ARRAY_BUFFER */
- 461, /* GL_ELEMENT_ARRAY_BUFFER */
+ 464, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
- 462, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1793, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1017, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 1812, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1027, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
149, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 625, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1656, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 457, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1403, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 511, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1846, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1815, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1229, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 890, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1235, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 899, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1247, /* GL_PROGRAM_TEMPORARIES_ARB */
- 905, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1237, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 901, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1241, /* GL_PROGRAM_PARAMETERS_ARB */
- 904, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1236, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 900, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1222, /* GL_PROGRAM_ATTRIBS_ARB */
- 885, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1234, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 898, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1220, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 883, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1232, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 896, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 891, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 887, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1250, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1740, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1293, /* GL_READ_ONLY */
- 1854, /* GL_WRITE_ONLY */
- 1295, /* GL_READ_WRITE */
+ 632, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1673, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1416, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 1865, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1834, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1239, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 898, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1245, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 907, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1257, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 913, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1247, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 909, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1251, /* GL_PROGRAM_PARAMETERS_ARB */
+ 912, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1246, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 908, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1232, /* GL_PROGRAM_ATTRIBS_ARB */
+ 893, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1244, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 906, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1230, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 891, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1242, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 904, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 899, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 895, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1260, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1758, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1304, /* GL_READ_ONLY */
+ 1873, /* GL_WRITE_ONLY */
+ 1306, /* GL_READ_WRITE */
102, /* GL_BUFFER_ACCESS */
105, /* GL_BUFFER_MAPPED */
107, /* GL_BUFFER_MAP_POINTER */
- 1734, /* GL_TIME_ELAPSED_EXT */
- 801, /* GL_MATRIX0_ARB */
- 813, /* GL_MATRIX1_ARB */
- 825, /* GL_MATRIX2_ARB */
- 829, /* GL_MATRIX3_ARB */
- 831, /* GL_MATRIX4_ARB */
- 833, /* GL_MATRIX5_ARB */
- 835, /* GL_MATRIX6_ARB */
- 837, /* GL_MATRIX7_ARB */
- 839, /* GL_MATRIX8_ARB */
- 840, /* GL_MATRIX9_ARB */
- 803, /* GL_MATRIX10_ARB */
- 804, /* GL_MATRIX11_ARB */
- 805, /* GL_MATRIX12_ARB */
- 806, /* GL_MATRIX13_ARB */
- 807, /* GL_MATRIX14_ARB */
- 808, /* GL_MATRIX15_ARB */
- 809, /* GL_MATRIX16_ARB */
- 810, /* GL_MATRIX17_ARB */
- 811, /* GL_MATRIX18_ARB */
- 812, /* GL_MATRIX19_ARB */
- 815, /* GL_MATRIX20_ARB */
- 816, /* GL_MATRIX21_ARB */
- 817, /* GL_MATRIX22_ARB */
- 818, /* GL_MATRIX23_ARB */
- 819, /* GL_MATRIX24_ARB */
- 820, /* GL_MATRIX25_ARB */
- 821, /* GL_MATRIX26_ARB */
- 822, /* GL_MATRIX27_ARB */
- 823, /* GL_MATRIX28_ARB */
- 824, /* GL_MATRIX29_ARB */
- 827, /* GL_MATRIX30_ARB */
- 828, /* GL_MATRIX31_ARB */
- 1523, /* GL_STREAM_DRAW */
- 1525, /* GL_STREAM_READ */
- 1521, /* GL_STREAM_COPY */
- 1481, /* GL_STATIC_DRAW */
- 1483, /* GL_STATIC_READ */
- 1479, /* GL_STATIC_COPY */
- 451, /* GL_DYNAMIC_DRAW */
- 453, /* GL_DYNAMIC_READ */
- 449, /* GL_DYNAMIC_COPY */
- 1123, /* GL_PIXEL_PACK_BUFFER */
- 1127, /* GL_PIXEL_UNPACK_BUFFER */
- 1124, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1128, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 1752, /* GL_TIME_ELAPSED_EXT */
+ 808, /* GL_MATRIX0_ARB */
+ 820, /* GL_MATRIX1_ARB */
+ 832, /* GL_MATRIX2_ARB */
+ 836, /* GL_MATRIX3_ARB */
+ 838, /* GL_MATRIX4_ARB */
+ 840, /* GL_MATRIX5_ARB */
+ 842, /* GL_MATRIX6_ARB */
+ 844, /* GL_MATRIX7_ARB */
+ 846, /* GL_MATRIX8_ARB */
+ 847, /* GL_MATRIX9_ARB */
+ 810, /* GL_MATRIX10_ARB */
+ 811, /* GL_MATRIX11_ARB */
+ 812, /* GL_MATRIX12_ARB */
+ 813, /* GL_MATRIX13_ARB */
+ 814, /* GL_MATRIX14_ARB */
+ 815, /* GL_MATRIX15_ARB */
+ 816, /* GL_MATRIX16_ARB */
+ 817, /* GL_MATRIX17_ARB */
+ 818, /* GL_MATRIX18_ARB */
+ 819, /* GL_MATRIX19_ARB */
+ 822, /* GL_MATRIX20_ARB */
+ 823, /* GL_MATRIX21_ARB */
+ 824, /* GL_MATRIX22_ARB */
+ 825, /* GL_MATRIX23_ARB */
+ 826, /* GL_MATRIX24_ARB */
+ 827, /* GL_MATRIX25_ARB */
+ 828, /* GL_MATRIX26_ARB */
+ 829, /* GL_MATRIX27_ARB */
+ 830, /* GL_MATRIX28_ARB */
+ 831, /* GL_MATRIX29_ARB */
+ 834, /* GL_MATRIX30_ARB */
+ 835, /* GL_MATRIX31_ARB */
+ 1540, /* GL_STREAM_DRAW */
+ 1542, /* GL_STREAM_READ */
+ 1538, /* GL_STREAM_COPY */
+ 1494, /* GL_STATIC_DRAW */
+ 1496, /* GL_STATIC_READ */
+ 1492, /* GL_STATIC_COPY */
+ 454, /* GL_DYNAMIC_DRAW */
+ 456, /* GL_DYNAMIC_READ */
+ 452, /* GL_DYNAMIC_COPY */
+ 1133, /* GL_PIXEL_PACK_BUFFER */
+ 1137, /* GL_PIXEL_UNPACK_BUFFER */
+ 1134, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1138, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
347, /* GL_DEPTH24_STENCIL8 */
- 1724, /* GL_TEXTURE_STENCIL_SIZE */
- 1676, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 886, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 889, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 893, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 892, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 850, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1514, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 1741, /* GL_TEXTURE_STENCIL_SIZE */
+ 1693, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 894, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 897, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 901, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 900, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 857, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ 1531, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 951, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1384, /* GL_SAMPLES_PASSED */
+ 961, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1397, /* GL_SAMPLES_PASSED */
109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 534, /* GL_FRAGMENT_SHADER */
- 1839, /* GL_VERTEX_SHADER */
- 1240, /* GL_PROGRAM_OBJECT_ARB */
- 1416, /* GL_SHADER_OBJECT_ARB */
- 874, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 934, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 928, /* GL_MAX_VARYING_FLOATS */
- 932, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 859, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1043, /* GL_OBJECT_TYPE_ARB */
- 1418, /* GL_SHADER_TYPE */
- 499, /* GL_FLOAT_VEC2 */
- 501, /* GL_FLOAT_VEC3 */
- 503, /* GL_FLOAT_VEC4 */
- 652, /* GL_INT_VEC2 */
- 654, /* GL_INT_VEC3 */
- 656, /* GL_INT_VEC4 */
+ 537, /* GL_FRAGMENT_SHADER */
+ 1858, /* GL_VERTEX_SHADER */
+ 1250, /* GL_PROGRAM_OBJECT_ARB */
+ 1429, /* GL_SHADER_OBJECT_ARB */
+ 882, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 944, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 938, /* GL_MAX_VARYING_FLOATS */
+ 942, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 867, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1053, /* GL_OBJECT_TYPE_ARB */
+ 1431, /* GL_SHADER_TYPE */
+ 502, /* GL_FLOAT_VEC2 */
+ 504, /* GL_FLOAT_VEC3 */
+ 506, /* GL_FLOAT_VEC4 */
+ 659, /* GL_INT_VEC2 */
+ 661, /* GL_INT_VEC3 */
+ 663, /* GL_INT_VEC4 */
94, /* GL_BOOL */
96, /* GL_BOOL_VEC2 */
98, /* GL_BOOL_VEC3 */
100, /* GL_BOOL_VEC4 */
- 487, /* GL_FLOAT_MAT2 */
- 491, /* GL_FLOAT_MAT3 */
- 495, /* GL_FLOAT_MAT4 */
- 1375, /* GL_SAMPLER_1D */
- 1377, /* GL_SAMPLER_2D */
- 1379, /* GL_SAMPLER_3D */
- 1380, /* GL_SAMPLER_CUBE */
- 1376, /* GL_SAMPLER_1D_SHADOW */
- 1378, /* GL_SAMPLER_2D_SHADOW */
- 489, /* GL_FLOAT_MAT2x3 */
- 490, /* GL_FLOAT_MAT2x4 */
- 493, /* GL_FLOAT_MAT3x2 */
- 494, /* GL_FLOAT_MAT3x4 */
- 497, /* GL_FLOAT_MAT4x2 */
- 498, /* GL_FLOAT_MAT4x3 */
+ 490, /* GL_FLOAT_MAT2 */
+ 494, /* GL_FLOAT_MAT3 */
+ 498, /* GL_FLOAT_MAT4 */
+ 1388, /* GL_SAMPLER_1D */
+ 1390, /* GL_SAMPLER_2D */
+ 1392, /* GL_SAMPLER_3D */
+ 1393, /* GL_SAMPLER_CUBE */
+ 1389, /* GL_SAMPLER_1D_SHADOW */
+ 1391, /* GL_SAMPLER_2D_SHADOW */
+ 492, /* GL_FLOAT_MAT2x3 */
+ 493, /* GL_FLOAT_MAT2x4 */
+ 496, /* GL_FLOAT_MAT3x2 */
+ 497, /* GL_FLOAT_MAT3x4 */
+ 500, /* GL_FLOAT_MAT4x2 */
+ 501, /* GL_FLOAT_MAT4x3 */
345, /* GL_DELETE_STATUS */
246, /* GL_COMPILE_STATUS */
- 708, /* GL_LINK_STATUS */
- 1787, /* GL_VALIDATE_STATUS */
- 637, /* GL_INFO_LOG_LENGTH */
+ 715, /* GL_LINK_STATUS */
+ 1806, /* GL_VALIDATE_STATUS */
+ 644, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1417, /* GL_SHADER_SOURCE_LENGTH */
+ 1430, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 536, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1420, /* GL_SHADING_LANGUAGE_VERSION */
+ 539, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1433, /* GL_SHADING_LANGUAGE_VERSION */
322, /* GL_CURRENT_PROGRAM */
- 1092, /* GL_PALETTE4_RGB8_OES */
- 1094, /* GL_PALETTE4_RGBA8_OES */
- 1090, /* GL_PALETTE4_R5_G6_B5_OES */
- 1093, /* GL_PALETTE4_RGBA4_OES */
- 1091, /* GL_PALETTE4_RGB5_A1_OES */
- 1097, /* GL_PALETTE8_RGB8_OES */
- 1099, /* GL_PALETTE8_RGBA8_OES */
- 1095, /* GL_PALETTE8_R5_G6_B5_OES */
- 1098, /* GL_PALETTE8_RGBA4_OES */
- 1096, /* GL_PALETTE8_RGB5_A1_OES */
- 619, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 618, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1772, /* GL_UNSIGNED_NORMALIZED */
- 1611, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1262, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1613, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1265, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1619, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1621, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 1473, /* GL_SRGB */
- 1474, /* GL_SRGB8 */
- 1476, /* GL_SRGB_ALPHA */
- 1475, /* GL_SRGB8_ALPHA8 */
- 1433, /* GL_SLUMINANCE_ALPHA */
- 1432, /* GL_SLUMINANCE8_ALPHA8 */
- 1430, /* GL_SLUMINANCE */
- 1431, /* GL_SLUMINANCE8 */
+ 1102, /* GL_PALETTE4_RGB8_OES */
+ 1104, /* GL_PALETTE4_RGBA8_OES */
+ 1100, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1103, /* GL_PALETTE4_RGBA4_OES */
+ 1101, /* GL_PALETTE4_RGB5_A1_OES */
+ 1107, /* GL_PALETTE8_RGB8_OES */
+ 1109, /* GL_PALETTE8_RGBA8_OES */
+ 1105, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1108, /* GL_PALETTE8_RGBA4_OES */
+ 1106, /* GL_PALETTE8_RGB5_A1_OES */
+ 626, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 625, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1791, /* GL_UNSIGNED_NORMALIZED */
+ 1628, /* GL_TEXTURE_1D_ARRAY_EXT */
+ 1272, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ 1630, /* GL_TEXTURE_2D_ARRAY_EXT */
+ 1275, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ 1636, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ 1638, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ 1486, /* GL_SRGB */
+ 1487, /* GL_SRGB8 */
+ 1489, /* GL_SRGB_ALPHA */
+ 1488, /* GL_SRGB8_ALPHA8 */
+ 1446, /* GL_SLUMINANCE_ALPHA */
+ 1445, /* GL_SLUMINANCE8_ALPHA8 */
+ 1443, /* GL_SLUMINANCE */
+ 1444, /* GL_SLUMINANCE8 */
267, /* GL_COMPRESSED_SRGB */
268, /* GL_COMPRESSED_SRGB_ALPHA */
265, /* GL_COMPRESSED_SLUMINANCE */
266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1157, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 716, /* GL_LOWER_LEFT */
- 1784, /* GL_UPPER_LEFT */
- 1496, /* GL_STENCIL_BACK_REF */
- 1497, /* GL_STENCIL_BACK_VALUE_MASK */
- 1498, /* GL_STENCIL_BACK_WRITEMASK */
- 442, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- 1309, /* GL_RENDERBUFFER_BINDING_EXT */
- 1290, /* GL_READ_FRAMEBUFFER */
- 441, /* GL_DRAW_FRAMEBUFFER */
- 1291, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- 1319, /* GL_RENDERBUFFER_SAMPLES */
- 546, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 544, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 555, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 551, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 553, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 558, /* GL_FRAMEBUFFER_COMPLETE */
- 562, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 568, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 566, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 564, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 567, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 565, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- 571, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- 574, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 572, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 856, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ 1167, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 723, /* GL_LOWER_LEFT */
+ 1803, /* GL_UPPER_LEFT */
+ 1509, /* GL_STENCIL_BACK_REF */
+ 1510, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1511, /* GL_STENCIL_BACK_WRITEMASK */
+ 444, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1320, /* GL_RENDERBUFFER_BINDING */
+ 1300, /* GL_READ_FRAMEBUFFER */
+ 443, /* GL_DRAW_FRAMEBUFFER */
+ 1301, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1331, /* GL_RENDERBUFFER_SAMPLES */
+ 549, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 547, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 558, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 554, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 556, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 562, /* GL_FRAMEBUFFER_COMPLETE */
+ 566, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 573, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 571, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 568, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 572, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 569, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 577, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 581, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 579, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 863, /* GL_MAX_COLOR_ATTACHMENTS */
155, /* GL_COLOR_ATTACHMENT0 */
157, /* GL_COLOR_ATTACHMENT1 */
171, /* GL_COLOR_ATTACHMENT2 */
@@ -5064,57 +5102,57 @@ static const unsigned reduced_enums[1347] =
164, /* GL_COLOR_ATTACHMENT13 */
166, /* GL_COLOR_ATTACHMENT14 */
168, /* GL_COLOR_ATTACHMENT15 */
- 348, /* GL_DEPTH_ATTACHMENT */
- 1486, /* GL_STENCIL_ATTACHMENT */
- 537, /* GL_FRAMEBUFFER */
- 1307, /* GL_RENDERBUFFER */
- 1321, /* GL_RENDERBUFFER_WIDTH */
- 1314, /* GL_RENDERBUFFER_HEIGHT */
- 1316, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1509, /* GL_STENCIL_INDEX_EXT */
- 1506, /* GL_STENCIL_INDEX1_EXT */
- 1507, /* GL_STENCIL_INDEX4_EXT */
- 1508, /* GL_STENCIL_INDEX8_EXT */
- 1505, /* GL_STENCIL_INDEX16_EXT */
- 1318, /* GL_RENDERBUFFER_RED_SIZE */
- 1313, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1310, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1308, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1311, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1320, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 570, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 912, /* GL_MAX_SAMPLES */
- 1276, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- 483, /* GL_FIRST_VERTEX_CONVENTION */
- 667, /* GL_LAST_VERTEX_CONVENTION */
- 1254, /* GL_PROVOKING_VERTEX */
+ 349, /* GL_DEPTH_ATTACHMENT */
+ 1499, /* GL_STENCIL_ATTACHMENT */
+ 540, /* GL_FRAMEBUFFER */
+ 1318, /* GL_RENDERBUFFER */
+ 1334, /* GL_RENDERBUFFER_WIDTH */
+ 1326, /* GL_RENDERBUFFER_HEIGHT */
+ 1328, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1526, /* GL_STENCIL_INDEX_EXT */
+ 1518, /* GL_STENCIL_INDEX1 */
+ 1522, /* GL_STENCIL_INDEX4 */
+ 1524, /* GL_STENCIL_INDEX8 */
+ 1519, /* GL_STENCIL_INDEX16 */
+ 1330, /* GL_RENDERBUFFER_RED_SIZE */
+ 1325, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1322, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1319, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1323, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1333, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 575, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 921, /* GL_MAX_SAMPLES */
+ 1286, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 486, /* GL_FIRST_VERTEX_CONVENTION */
+ 674, /* GL_LAST_VERTEX_CONVENTION */
+ 1264, /* GL_PROVOKING_VERTEX */
302, /* GL_COPY_READ_BUFFER */
303, /* GL_COPY_WRITE_BUFFER */
- 1368, /* GL_RGBA_SNORM */
- 1364, /* GL_RGBA8_SNORM */
- 1426, /* GL_SIGNED_NORMALIZED */
- 913, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1042, /* GL_OBJECT_TYPE */
- 1530, /* GL_SYNC_CONDITION */
- 1535, /* GL_SYNC_STATUS */
- 1532, /* GL_SYNC_FLAGS */
- 1531, /* GL_SYNC_FENCE */
- 1534, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1761, /* GL_UNSIGNALED */
- 1425, /* GL_SIGNALED */
+ 1381, /* GL_RGBA_SNORM */
+ 1377, /* GL_RGBA8_SNORM */
+ 1439, /* GL_SIGNED_NORMALIZED */
+ 923, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1052, /* GL_OBJECT_TYPE */
+ 1547, /* GL_SYNC_CONDITION */
+ 1552, /* GL_SYNC_STATUS */
+ 1549, /* GL_SYNC_FLAGS */
+ 1548, /* GL_SYNC_FENCE */
+ 1551, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 1779, /* GL_UNSIGNALED */
+ 1438, /* GL_SIGNALED */
46, /* GL_ALREADY_SIGNALED */
- 1732, /* GL_TIMEOUT_EXPIRED */
+ 1750, /* GL_TIMEOUT_EXPIRED */
270, /* GL_CONDITION_SATISFIED */
- 1844, /* GL_WAIT_FAILED */
- 468, /* GL_EVAL_BIT */
- 1288, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 710, /* GL_LIST_BIT */
- 1627, /* GL_TEXTURE_BIT */
- 1399, /* GL_SCISSOR_BIT */
+ 1863, /* GL_WAIT_FAILED */
+ 471, /* GL_EVAL_BIT */
+ 1298, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 717, /* GL_LIST_BIT */
+ 1644, /* GL_TEXTURE_BIT */
+ 1412, /* GL_SCISSOR_BIT */
29, /* GL_ALL_ATTRIB_BITS */
- 998, /* GL_MULTISAMPLE_BIT */
+ 1008, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
- 1733, /* GL_TIMEOUT_IGNORED */
+ 1751, /* GL_TIMEOUT_IGNORED */
};
typedef int (*cfunc)(const void *, const void *);
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 54cf37c5f48..2138bfe40ef 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -104,8 +104,9 @@ static const struct {
{ ON, "GL_EXT_copy_texture", F(EXT_copy_texture) },
{ OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) },
{ ON, "GL_EXT_draw_range_elements", F(EXT_draw_range_elements) },
- { OFF, "GL_EXT_framebuffer_object", F(EXT_framebuffer_object) },
{ OFF, "GL_EXT_framebuffer_blit", F(EXT_framebuffer_blit) },
+ { OFF, "GL_EXT_framebuffer_multisample", F(EXT_framebuffer_multisample) },
+ { OFF, "GL_EXT_framebuffer_object", F(EXT_framebuffer_object) },
{ OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
{ OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) },
{ OFF, "GL_EXT_histogram", F(EXT_histogram) },
@@ -169,6 +170,7 @@ static const struct {
{ OFF, "GL_NV_fragment_program", F(NV_fragment_program) },
{ OFF, "GL_NV_fragment_program_option", F(NV_fragment_program_option) },
{ ON, "GL_NV_light_max_exponent", F(NV_light_max_exponent) },
+ { OFF, "GL_NV_packed_depth_stencil", F(EXT_packed_depth_stencil) },
{ OFF, "GL_NV_point_sprite", F(NV_point_sprite) },
{ OFF, "GL_NV_texture_env_combine4", F(NV_texture_env_combine4) },
{ OFF, "GL_NV_texture_rectangle", F(NV_texture_rectangle) },
@@ -274,6 +276,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_EXT_framebuffer_blit
ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
#endif
+#if FEATURE_ARB_framebuffer_object
+ ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
+#endif
ctx->Extensions.EXT_histogram = GL_TRUE;
/*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 87061aeb0d1..7b3599f9322 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -34,7 +34,9 @@
#include "buffers.h"
#include "context.h"
+#include "enums.h"
#include "fbobject.h"
+#include "formats.h"
#include "framebuffer.h"
#include "hash.h"
#include "macros.h"
@@ -50,6 +52,9 @@
/** Set this to 1 to help debug FBO incompleteness problems */
#define DEBUG_FBO 0
+/** Set this to 1 to debug/log glBlitFramebuffer() calls */
+#define DEBUG_BLIT 0
+
/**
* Notes:
@@ -228,9 +233,13 @@ _mesa_set_texture_attachment(GLcontext *ctx,
if (att->Texture == texObj) {
/* re-attaching same texture */
ASSERT(att->Type == GL_TEXTURE);
+ if (ctx->Driver.FinishRenderTexture)
+ ctx->Driver.FinishRenderTexture(ctx, att);
}
else {
/* new attachment */
+ if (ctx->Driver.FinishRenderTexture && att->Texture)
+ ctx->Driver.FinishRenderTexture(ctx, att);
_mesa_remove_attachment(ctx, att);
att->Type = GL_TEXTURE;
assert(!att->Texture);
@@ -239,12 +248,7 @@ _mesa_set_texture_attachment(GLcontext *ctx,
/* always update these fields */
att->TextureLevel = level;
- if (IS_CUBE_FACE(texTarget)) {
- att->CubeMapFace = texTarget - GL_TEXTURE_CUBE_MAP_POSITIVE_X;
- }
- else {
- att->CubeMapFace = 0;
- }
+ att->CubeMapFace = _mesa_tex_target_to_face(texTarget);
att->Zoffset = zoffset;
att->Complete = GL_FALSE;
@@ -357,6 +361,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
if (att->Type == GL_TEXTURE) {
const struct gl_texture_object *texObj = att->Texture;
struct gl_texture_image *texImage;
+ GLenum baseFormat;
if (!texObj) {
att_incomplete("no texobj");
@@ -383,26 +388,28 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
return;
}
+ baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
+
if (format == GL_COLOR) {
- if (texImage->TexFormat->BaseFormat != GL_RGB &&
- texImage->TexFormat->BaseFormat != GL_RGBA) {
+ if (baseFormat != GL_RGB &&
+ baseFormat != GL_RGBA) {
att_incomplete("bad format");
att->Complete = GL_FALSE;
return;
}
- if (texImage->TexFormat->TexelBytes == 0) {
+ if (_mesa_is_format_compressed(texImage->TexFormat)) {
att_incomplete("compressed internalformat");
att->Complete = GL_FALSE;
return;
}
}
else if (format == GL_DEPTH) {
- if (texImage->TexFormat->BaseFormat == GL_DEPTH_COMPONENT) {
+ if (baseFormat == GL_DEPTH_COMPONENT) {
/* OK */
}
else if (ctx->Extensions.EXT_packed_depth_stencil &&
ctx->Extensions.ARB_depth_texture &&
- texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
/* OK */
}
else {
@@ -413,10 +420,9 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
}
else {
ASSERT(format == GL_STENCIL);
- ASSERT(att->Renderbuffer->StencilBits);
if (ctx->Extensions.EXT_packed_depth_stencil &&
ctx->Extensions.ARB_depth_texture &&
- att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
/* OK */
}
else {
@@ -428,6 +434,9 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
}
}
else if (att->Type == GL_RENDERBUFFER_EXT) {
+ const GLenum baseFormat =
+ _mesa_get_format_base_format(att->Renderbuffer->Format);
+
ASSERT(att->Renderbuffer);
if (!att->Renderbuffer->InternalFormat ||
att->Renderbuffer->Width < 1 ||
@@ -437,24 +446,19 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
return;
}
if (format == GL_COLOR) {
- if (att->Renderbuffer->_BaseFormat != GL_RGB &&
- att->Renderbuffer->_BaseFormat != GL_RGBA) {
+ if (baseFormat != GL_RGB &&
+ baseFormat != GL_RGBA) {
att_incomplete("bad renderbuffer color format");
att->Complete = GL_FALSE;
return;
}
- ASSERT(att->Renderbuffer->RedBits);
- ASSERT(att->Renderbuffer->GreenBits);
- ASSERT(att->Renderbuffer->BlueBits);
}
else if (format == GL_DEPTH) {
- if (att->Renderbuffer->_BaseFormat == GL_DEPTH_COMPONENT) {
- ASSERT(att->Renderbuffer->DepthBits);
+ if (baseFormat == GL_DEPTH_COMPONENT) {
/* OK */
}
else if (ctx->Extensions.EXT_packed_depth_stencil &&
- att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
- ASSERT(att->Renderbuffer->DepthBits);
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
/* OK */
}
else {
@@ -465,13 +469,11 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
}
else {
assert(format == GL_STENCIL);
- if (att->Renderbuffer->_BaseFormat == GL_STENCIL_INDEX) {
- ASSERT(att->Renderbuffer->StencilBits);
+ if (baseFormat == GL_STENCIL_INDEX) {
/* OK */
}
else if (ctx->Extensions.EXT_packed_depth_stencil &&
- att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
- ASSERT(att->Renderbuffer->StencilBits);
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
/* OK */
}
else {
@@ -652,6 +654,8 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
return;
}
}
+#else
+ (void) j;
#endif
if (numImages == 0) {
@@ -712,12 +716,13 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target != GL_RENDERBUFFER_EXT) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glBindRenderbufferEXT(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindRenderbufferEXT(target)");
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ /* No need to flush here since the render buffer binding has no
+ * effect on rendering state.
+ */
if (renderbuffer) {
newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
@@ -971,42 +976,27 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
}
/* These MUST get set by the AllocStorage func */
- rb->_ActualFormat = 0;
- rb->RedBits =
- rb->GreenBits =
- rb->BlueBits =
- rb->AlphaBits =
- rb->IndexBits =
- rb->DepthBits =
- rb->StencilBits = 0;
+ rb->Format = MESA_FORMAT_NONE;
rb->NumSamples = samples;
/* Now allocate the storage */
ASSERT(rb->AllocStorage);
if (rb->AllocStorage(ctx, rb, internalFormat, width, height)) {
/* No error - check/set fields now */
- assert(rb->_ActualFormat);
+ assert(rb->Format != MESA_FORMAT_NONE);
assert(rb->Width == (GLuint) width);
assert(rb->Height == (GLuint) height);
- assert(rb->RedBits || rb->GreenBits || rb->BlueBits || rb->AlphaBits ||
- rb->DepthBits || rb->StencilBits || rb->IndexBits);
rb->InternalFormat = internalFormat;
- rb->_BaseFormat = baseFormat;
+ rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
+ assert(rb->_BaseFormat != 0);
}
else {
/* Probably ran out of memory - clear the fields */
rb->Width = 0;
rb->Height = 0;
+ rb->Format = MESA_FORMAT_NONE;
rb->InternalFormat = GL_NONE;
- rb->_ActualFormat = GL_NONE;
rb->_BaseFormat = GL_NONE;
- rb->RedBits =
- rb->GreenBits =
- rb->BlueBits =
- rb->AlphaBits =
- rb->IndexBits =
- rb->DepthBits =
- rb->StencilBits =
rb->NumSamples = 0;
}
@@ -1019,6 +1009,53 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
}
+/**
+ * Helper function for _mesa_GetRenderbufferParameterivEXT() and
+ * _mesa_GetFramebufferAttachmentParameterivEXT()
+ * We have to be careful to respect the base format. For example, if a
+ * renderbuffer/texture was created with internalFormat=GL_RGB but the
+ * driver actually chose a GL_RGBA format, when the user queries ALPHA_SIZE
+ * we need to return zero.
+ */
+static GLint
+get_component_bits(GLenum pname, GLenum baseFormat, gl_format format)
+{
+ switch (pname) {
+ case GL_RENDERBUFFER_RED_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+ case GL_RENDERBUFFER_GREEN_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+ case GL_RENDERBUFFER_BLUE_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
+ if (baseFormat == GL_RGB || baseFormat == GL_RGBA)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
+ if (baseFormat == GL_RGBA || baseFormat == GL_ALPHA)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+ if (baseFormat == GL_DEPTH_COMPONENT || baseFormat == GL_DEPTH_STENCIL)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
+ if (baseFormat == GL_STENCIL_INDEX || baseFormat == GL_DEPTH_STENCIL)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ default:
+ return 0;
+ }
+}
+
+
+
void GLAPIENTRY
_mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
GLsizei width, GLsizei height)
@@ -1062,7 +1099,9 @@ _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
return;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* No need to flush here since we're just quering state which is
+ * not effected by rendering.
+ */
switch (pname) {
case GL_RENDERBUFFER_WIDTH_EXT:
@@ -1075,22 +1114,12 @@ _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
*params = rb->InternalFormat;
return;
case GL_RENDERBUFFER_RED_SIZE_EXT:
- *params = rb->RedBits;
- break;
case GL_RENDERBUFFER_GREEN_SIZE_EXT:
- *params = rb->GreenBits;
- break;
case GL_RENDERBUFFER_BLUE_SIZE_EXT:
- *params = rb->BlueBits;
- break;
case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
- *params = rb->AlphaBits;
- break;
case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
- *params = rb->DepthBits;
- break;
case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
- *params = rb->StencilBits;
+ *params = get_component_bits(pname, rb->_BaseFormat, rb->Format);
break;
case GL_RENDERBUFFER_SAMPLES:
if (ctx->Extensions.ARB_framebuffer_object) {
@@ -1120,11 +1149,20 @@ _mesa_IsFramebufferEXT(GLuint framebuffer)
}
+/**
+ * Check if any of the attachments of the given framebuffer are textures
+ * (render to texture). Call ctx->Driver.RenderTexture() for such
+ * attachments.
+ */
static void
check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
{
GLuint i;
ASSERT(ctx->Driver.RenderTexture);
+
+ if (fb->Name == 0)
+ return; /* can't render to texture with winsys framebuffers */
+
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
struct gl_texture_object *texObj = att->Texture;
@@ -1144,6 +1182,9 @@ check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
static void
check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
{
+ if (fb->Name == 0)
+ return; /* can't render to texture with winsys framebuffers */
+
if (ctx->Driver.FinishRenderTexture) {
GLuint i;
for (i = 0; i < BUFFER_COUNT; i++) {
@@ -1159,7 +1200,8 @@ check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
void GLAPIENTRY
_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
{
- struct gl_framebuffer *newFb, *newFbread;
+ struct gl_framebuffer *newDrawFb, *newReadFb;
+ struct gl_framebuffer *oldDrawFb, *oldReadFb;
GLboolean bindReadBuf, bindDrawBuf;
GET_CURRENT_CONTEXT(ctx);
@@ -1206,73 +1248,90 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
-
if (framebuffer) {
/* Binding a user-created framebuffer object */
- newFb = _mesa_lookup_framebuffer(ctx, framebuffer);
- if (newFb == &DummyFramebuffer) {
+ newDrawFb = _mesa_lookup_framebuffer(ctx, framebuffer);
+ if (newDrawFb == &DummyFramebuffer) {
/* ID was reserved, but no real framebuffer object made yet */
- newFb = NULL;
+ newDrawFb = NULL;
}
- else if (!newFb && ctx->Extensions.ARB_framebuffer_object) {
+ else if (!newDrawFb && ctx->Extensions.ARB_framebuffer_object) {
/* All FBO IDs must be Gen'd */
_mesa_error(ctx, GL_INVALID_OPERATION, "glBindFramebuffer(buffer)");
return;
}
- if (!newFb) {
+ if (!newDrawFb) {
/* create new framebuffer object */
- newFb = ctx->Driver.NewFramebuffer(ctx, framebuffer);
- if (!newFb) {
+ newDrawFb = ctx->Driver.NewFramebuffer(ctx, framebuffer);
+ if (!newDrawFb) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindFramebufferEXT");
return;
}
- _mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newFb);
+ _mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newDrawFb);
}
- newFbread = newFb;
+ newReadFb = newDrawFb;
}
else {
/* Binding the window system framebuffer (which was originally set
* with MakeCurrent).
*/
- newFb = ctx->WinSysDrawBuffer;
- newFbread = ctx->WinSysReadBuffer;
+ newDrawFb = ctx->WinSysDrawBuffer;
+ newReadFb = ctx->WinSysReadBuffer;
}
- ASSERT(newFb);
- ASSERT(newFb != &DummyFramebuffer);
+ ASSERT(newDrawFb);
+ ASSERT(newDrawFb != &DummyFramebuffer);
+
+ /* save pointers to current/old framebuffers */
+ oldDrawFb = ctx->DrawBuffer;
+ oldReadFb = ctx->ReadBuffer;
+
+ /* check if really changing bindings */
+ if (oldDrawFb == newDrawFb)
+ bindDrawBuf = GL_FALSE;
+ if (oldReadFb == newReadFb)
+ bindReadBuf = GL_FALSE;
/*
* OK, now bind the new Draw/Read framebuffers, if they're changing.
+ *
+ * We also check if we're beginning and/or ending render-to-texture.
+ * When a framebuffer with texture attachments is unbound, call
+ * ctx->Driver.FinishRenderTexture().
+ * When a framebuffer with texture attachments is bound, call
+ * ctx->Driver.RenderTexture().
+ *
+ * Note that if the ReadBuffer has texture attachments we don't consider
+ * that a render-to-texture case.
*/
-
if (bindReadBuf) {
- if (ctx->ReadBuffer == newFbread)
- bindReadBuf = GL_FALSE; /* no change */
- else
- _mesa_reference_framebuffer(&ctx->ReadBuffer, newFbread);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ /* check if old readbuffer was render-to-texture */
+ check_end_texture_render(ctx, oldReadFb);
+
+ _mesa_reference_framebuffer(&ctx->ReadBuffer, newReadFb);
}
if (bindDrawBuf) {
- /* check if old FB had any texture attachments */
- if (ctx->DrawBuffer->Name != 0) {
- check_end_texture_render(ctx, ctx->DrawBuffer);
- }
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
- if (ctx->DrawBuffer == newFb)
- bindDrawBuf = GL_FALSE; /* no change */
- else
- _mesa_reference_framebuffer(&ctx->DrawBuffer, newFb);
+ /* check if old read/draw buffers were render-to-texture */
+ if (!bindReadBuf)
+ check_end_texture_render(ctx, oldReadFb);
- if (newFb->Name != 0) {
- /* check if newly bound framebuffer has any texture attachments */
- check_begin_texture_render(ctx, newFb);
- }
+ if (oldDrawFb != oldReadFb)
+ check_end_texture_render(ctx, oldDrawFb);
+
+ /* check if newly bound framebuffer has any texture attachments */
+ check_begin_texture_render(ctx, newDrawFb);
+
+ _mesa_reference_framebuffer(&ctx->DrawBuffer, newDrawFb);
}
if ((bindDrawBuf || bindReadBuf) && ctx->Driver.BindFramebuffer) {
- ctx->Driver.BindFramebuffer(ctx, target, newFb, newFbread);
+ ctx->Driver.BindFramebuffer(ctx, target, newDrawFb, newReadFb);
}
}
@@ -1284,7 +1343,7 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
if (framebuffers[i] > 0) {
@@ -1389,7 +1448,7 @@ _mesa_CheckFramebufferStatusEXT(GLenum target)
return GL_FRAMEBUFFER_COMPLETE_EXT;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* No need to flush here */
if (buffer->_Status != GL_FRAMEBUFFER_COMPLETE) {
_mesa_test_framebuffer_completeness(ctx, buffer);
@@ -1505,19 +1564,7 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
return;
}
- if (texObj && attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
- /* the texture format must be depth+stencil */
- const struct gl_texture_image *texImg;
- texImg = texObj->Image[0][texObj->BaseLevel];
- if (!texImg || texImg->_BaseFormat != GL_DEPTH_STENCIL) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glFramebufferTexture%sEXT(texture is not"
- " DEPTH_STENCIL format)", caller);
- return;
- }
- }
-
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
_glthread_LOCK_MUTEX(fb->Mutex);
if (texObj) {
@@ -1665,7 +1712,8 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
att = _mesa_get_attachment(ctx, fb, attachment);
if (att == NULL) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glFramebufferRenderbufferEXT(attachment)");
+ "glFramebufferRenderbufferEXT(invalid attachment %s)",
+ _mesa_lookup_enum_by_nr(attachment));
return;
}
@@ -1673,7 +1721,8 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
rb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
if (!rb) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glFramebufferRenderbufferEXT(renderbuffer)");
+ "glFramebufferRenderbufferEXT(non-existant"
+ " renderbuffer %u)", renderbuffer);
return;
}
}
@@ -1684,7 +1733,9 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
/* make sure the renderbuffer is a depth/stencil format */
- if (rb->_BaseFormat != GL_DEPTH_STENCIL) {
+ const GLenum baseFormat =
+ _mesa_get_format_base_format(att->Renderbuffer->Format);
+ if (baseFormat != GL_DEPTH_STENCIL) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glFramebufferRenderbufferEXT(renderbuffer"
" is not DEPTH_STENCIL format)");
@@ -1693,7 +1744,7 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
assert(ctx->Driver.FramebufferRenderbuffer);
ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
@@ -1769,7 +1820,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
}
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ /* No need to flush here */
switch (pname) {
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
@@ -1830,7 +1881,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- *params = att->Renderbuffer->ColorEncoding;
+ *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
@@ -1840,61 +1891,44 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
return;
}
else {
- *params = att->Renderbuffer->ComponentType;
+ gl_format format = att->Renderbuffer->Format;
+ if (format == MESA_FORMAT_CI8 || format == MESA_FORMAT_S8) {
+ /* special cases */
+ *params = GL_INDEX;
+ }
+ else {
+ *params = _mesa_get_format_datatype(format);
+ }
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- }
- else {
- *params = att->Renderbuffer->RedBits;
- }
- return;
case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- }
- else {
- *params = att->Renderbuffer->GreenBits;
- }
- return;
case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- }
- else {
- *params = att->Renderbuffer->BlueBits;
- }
- return;
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- }
- else {
- *params = att->Renderbuffer->AlphaBits;
- }
- return;
case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+ case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
if (!ctx->Extensions.ARB_framebuffer_object) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
- else {
- *params = att->Renderbuffer->DepthBits;
+ else if (att->Texture) {
+ const struct gl_texture_image *texImage =
+ _mesa_select_tex_image(ctx, att->Texture, att->Texture->Target,
+ att->TextureLevel);
+ if (texImage) {
+ *params = get_component_bits(pname, texImage->_BaseFormat,
+ texImage->TexFormat);
+ }
+ else {
+ *params = 0;
+ }
}
- return;
- case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ else if (att->Renderbuffer) {
+ *params = get_component_bits(pname, att->Renderbuffer->_BaseFormat,
+ att->Renderbuffer->Format);
}
else {
- *params = att->Renderbuffer->StencilBits;
+ *params = 0;
}
return;
default:
@@ -1908,7 +1942,6 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_GenerateMipmapEXT(GLenum target)
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
@@ -1927,8 +1960,12 @@ _mesa_GenerateMipmapEXT(GLenum target)
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ if (texObj->BaseLevel >= texObj->MaxLevel) {
+ /* nothing to do */
+ return;
+ }
_mesa_lock_texture(ctx, texObj);
if (target == GL_TEXTURE_CUBE_MAP) {
@@ -1946,6 +1983,20 @@ _mesa_GenerateMipmapEXT(GLenum target)
#if FEATURE_EXT_framebuffer_blit
+
+static const struct gl_renderbuffer_attachment *
+find_attachment(const struct gl_framebuffer *fb, const struct gl_renderbuffer *rb)
+{
+ GLuint i;
+ for (i = 0; i < Elements(fb->Attachment); i++) {
+ if (fb->Attachment[i].Renderbuffer == rb)
+ return &fb->Attachment[i];
+ }
+ return NULL;
+}
+
+
+
/**
* Blit rectangular region, optionally from one framebuffer to another.
*
@@ -2021,7 +2072,8 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
struct gl_renderbuffer *drawRb = drawFb->_StencilBuffer;
if (!readRb ||
!drawRb ||
- readRb->StencilBits != drawRb->StencilBits) {
+ _mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(stencil buffer size mismatch");
return;
@@ -2033,7 +2085,8 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
struct gl_renderbuffer *drawRb = drawFb->_DepthBuffer;
if (!readRb ||
!drawRb ||
- readRb->DepthBits != drawRb->DepthBits) {
+ _mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(depth buffer size mismatch");
return;
@@ -2061,7 +2114,7 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
/* color formats must match */
if (colorReadRb &&
colorDrawRb &&
- colorReadRb->_ActualFormat != colorDrawRb->_ActualFormat) {
+ colorReadRb->Format != colorDrawRb->Format) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(bad src/dst multisample pixel formats");
return;
@@ -2073,6 +2126,44 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
return;
}
+ /* Debug code */
+ if (DEBUG_BLIT) {
+ _mesa_printf("glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d,"
+ " 0x%x, 0x%x)\n",
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+ if (colorReadRb) {
+ const struct gl_renderbuffer_attachment *att;
+
+ att = find_attachment(readFb, colorReadRb);
+ _mesa_printf(" Src FBO %u RB %u (%dx%d) ",
+ readFb->Name, colorReadRb->Name,
+ colorReadRb->Width, colorReadRb->Height);
+ if (att && att->Texture) {
+ _mesa_printf("Tex %u tgt 0x%x level %u face %u",
+ att->Texture->Name,
+ att->Texture->Target,
+ att->TextureLevel,
+ att->CubeMapFace);
+ }
+ _mesa_printf("\n");
+
+ att = find_attachment(drawFb, colorDrawRb);
+ _mesa_printf(" Dst FBO %u RB %u (%dx%d) ",
+ drawFb->Name, colorDrawRb->Name,
+ colorDrawRb->Width, colorDrawRb->Height);
+ if (att && att->Texture) {
+ _mesa_printf("Tex %u tgt 0x%x level %u face %u",
+ att->Texture->Name,
+ att->Texture->Target,
+ att->TextureLevel,
+ att->CubeMapFace);
+ }
+ _mesa_printf("\n");
+ }
+ }
+
ASSERT(ctx->Driver.BlitFramebuffer);
ctx->Driver.BlitFramebuffer(ctx,
srcX0, srcY0, srcX1, srcY1,
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 356476e35a5..5cfa898031e 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -438,7 +438,7 @@ static struct ureg register_input( struct tnl_program *p, GLuint input )
*/
static struct ureg register_output( struct tnl_program *p, GLuint output )
{
- p->program->Base.OutputsWritten |= (1<<output);
+ p->program->Base.OutputsWritten |= BITFIELD64_BIT(output);
return make_ureg(PROGRAM_OUTPUT, output);
}
@@ -523,7 +523,6 @@ static void emit_dst( struct prog_dst_register *dst,
dst->CondMask = COND_TR; /* always pass cond test */
dst->CondSwizzle = SWIZZLE_NOOP;
dst->CondSrc = 0;
- dst->pad = 0;
/* Check that bitfield sizes aren't exceeded */
ASSERT(dst->Index == reg.idx);
}
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
new file mode 100644
index 00000000000..329b7950745
--- /dev/null
+++ b/src/mesa/main/formats.c
@@ -0,0 +1,1158 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008-2009 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "imports.h"
+#include "formats.h"
+#include "config.h"
+#include "texstore.h"
+
+
+/**
+ * Information about texture formats.
+ */
+struct gl_format_info
+{
+ gl_format Name;
+
+ /** text name for debugging */
+ const char *StrName;
+
+ /**
+ * Base format is one of GL_RGB, GL_RGBA, GL_ALPHA, GL_LUMINANCE,
+ * GL_LUMINANCE_ALPHA, GL_INTENSITY, GL_YCBCR_MESA, GL_COLOR_INDEX,
+ * GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL.
+ */
+ GLenum BaseFormat;
+
+ /**
+ * Logical data type: one of GL_UNSIGNED_NORMALIZED, GL_SIGNED_NORMALED,
+ * GL_UNSIGNED_INT, GL_SIGNED_INT, GL_FLOAT.
+ */
+ GLenum DataType;
+
+ GLubyte RedBits;
+ GLubyte GreenBits;
+ GLubyte BlueBits;
+ GLubyte AlphaBits;
+ GLubyte LuminanceBits;
+ GLubyte IntensityBits;
+ GLubyte IndexBits;
+ GLubyte DepthBits;
+ GLubyte StencilBits;
+
+ /**
+ * To describe compressed formats. If not compressed, Width=Height=1.
+ */
+ GLubyte BlockWidth, BlockHeight;
+ GLubyte BytesPerBlock;
+};
+
+
+/**
+ * Info about each format.
+ * These must be in the same order as the MESA_FORMAT_* enums so that
+ * we can do lookups without searching.
+ */
+static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
+{
+ {
+ MESA_FORMAT_NONE, /* Name */
+ "MESA_FORMAT_NONE", /* StrName */
+ GL_NONE, /* BaseFormat */
+ GL_NONE, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 0, 0, 0 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGBA8888, /* Name */
+ "MESA_FORMAT_RGBA8888", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGBA8888_REV, /* Name */
+ "MESA_FORMAT_RGBA8888_REV", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_ARGB8888, /* Name */
+ "MESA_FORMAT_ARGB8888", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_ARGB8888_REV, /* Name */
+ "MESA_FORMAT_ARGB8888_REV", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_XRGB8888, /* Name */
+ "MESA_FORMAT_XRGB8888", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_XRGB8888_REV, /* Name */
+ "MESA_FORMAT_XRGB8888_REV", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGB888, /* Name */
+ "MESA_FORMAT_RGB888", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 3 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_BGR888, /* Name */
+ "MESA_FORMAT_BGR888", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 3 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGB565, /* Name */
+ "MESA_FORMAT_RGB565", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 5, 6, 5, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGB565_REV, /* Name */
+ "MESA_FORMAT_RGB565_REV", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 5, 6, 5, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_ARGB4444, /* Name */
+ "MESA_FORMAT_ARGB4444", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_ARGB4444_REV, /* Name */
+ "MESA_FORMAT_ARGB4444_REV", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGBA5551, /* Name */
+ "MESA_FORMAT_RGBA5551", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_ARGB1555, /* Name */
+ "MESA_FORMAT_ARGB1555", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_ARGB1555_REV, /* Name */
+ "MESA_FORMAT_ARGB1555_REV", /* StrName */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_AL88, /* Name */
+ "MESA_FORMAT_AL88", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
+ 8, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_AL88_REV, /* Name */
+ "MESA_FORMAT_AL88_REV", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
+ 8, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_AL1616, /* Name */
+ "MESA_FORMAT_AL1616", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_AL1616_REV, /* Name */
+ "MESA_FORMAT_AL1616_REV", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_RGB332, /* Name */
+ "MESA_FORMAT_RGB332", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 3, 3, 2, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_A8, /* Name */
+ "MESA_FORMAT_A8", /* StrName */
+ GL_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_L8, /* Name */
+ "MESA_FORMAT_L8", /* StrName */
+ GL_LUMINANCE, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 8, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_I8, /* Name */
+ "MESA_FORMAT_I8", /* StrName */
+ GL_INTENSITY, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 8, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_CI8, /* Name */
+ "MESA_FORMAT_CI8", /* StrName */
+ GL_COLOR_INDEX, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 8, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_YCBCR, /* Name */
+ "MESA_FORMAT_YCBCR", /* StrName */
+ GL_YCBCR_MESA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_YCBCR_REV, /* Name */
+ "MESA_FORMAT_YCBCR_REV", /* StrName */
+ GL_YCBCR_MESA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_Z24_S8, /* Name */
+ "MESA_FORMAT_Z24_S8", /* StrName */
+ GL_DEPTH_STENCIL, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 24, 8, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_S8_Z24, /* Name */
+ "MESA_FORMAT_S8_Z24", /* StrName */
+ GL_DEPTH_STENCIL, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 24, 8, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_Z16, /* Name */
+ "MESA_FORMAT_Z16", /* StrName */
+ GL_DEPTH_COMPONENT, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 16, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_X8_Z24, /* Name */
+ "MESA_FORMAT_X8_Z24", /* StrName */
+ GL_DEPTH_COMPONENT, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 24, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_Z24_X8, /* Name */
+ "MESA_FORMAT_Z24_X8", /* StrName */
+ GL_DEPTH_COMPONENT, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 24, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_Z32, /* Name */
+ "MESA_FORMAT_Z32", /* StrName */
+ GL_DEPTH_COMPONENT, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 32, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_S8, /* Name */
+ "MESA_FORMAT_S8", /* StrName */
+ GL_STENCIL_INDEX, /* BaseFormat */
+ GL_UNSIGNED_INT, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 8, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_SRGB8,
+ "MESA_FORMAT_SRGB8",
+ GL_RGB,
+ GL_UNSIGNED_NORMALIZED,
+ 8, 8, 8, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 3
+ },
+ {
+ MESA_FORMAT_SRGBA8,
+ "MESA_FORMAT_SRGBA8",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 8, 8, 8, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_SARGB8,
+ "MESA_FORMAT_SARGB8",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 8, 8, 8, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_SL8,
+ "MESA_FORMAT_SL8",
+ GL_LUMINANCE,
+ GL_UNSIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 8, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_SLA8,
+ "MESA_FORMAT_SLA8",
+ GL_LUMINANCE_ALPHA,
+ GL_UNSIGNED_NORMALIZED,
+ 0, 0, 0, 8,
+ 8, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SRGB_DXT1, /* Name */
+ "MESA_FORMAT_SRGB_DXT1", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 4, 4, 4, 0, /* approx Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT1,
+ "MESA_FORMAT_SRGBA_DXT1",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 4,
+ 0, 0, 0, 0, 0,
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT3,
+ "MESA_FORMAT_SRGBA_DXT3",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 4,
+ 0, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT5,
+ "MESA_FORMAT_SRGBA_DXT5",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 4,
+ 0, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+
+ {
+ MESA_FORMAT_RGB_FXT1,
+ "MESA_FORMAT_RGB_FXT1",
+ GL_RGB,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 0, /* approx Red/Green/BlueBits */
+ 0, 0, 0, 0, 0,
+ 8, 4, 16 /* 16 bytes per 8x4 block */
+ },
+ {
+ MESA_FORMAT_RGBA_FXT1,
+ "MESA_FORMAT_RGBA_FXT1",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 1, /* approx Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0,
+ 8, 4, 16 /* 16 bytes per 8x4 block */
+ },
+
+ {
+ MESA_FORMAT_RGB_DXT1, /* Name */
+ "MESA_FORMAT_RGB_DXT1", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 4, 4, 4, 0, /* approx Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_RGBA_DXT1,
+ "MESA_FORMAT_RGBA_DXT1",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 4,
+ 0, 0, 0, 0, 0,
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_RGBA_DXT3,
+ "MESA_FORMAT_RGBA_DXT3",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 4,
+ 0, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_RGBA_DXT5,
+ "MESA_FORMAT_RGBA_DXT5",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 4, 4,
+ 0, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_RGBA_FLOAT32,
+ "MESA_FORMAT_RGBA_FLOAT32",
+ GL_RGBA,
+ GL_FLOAT,
+ 32, 32, 32, 32,
+ 0, 0, 0, 0, 0,
+ 1, 1, 16
+ },
+ {
+ MESA_FORMAT_RGBA_FLOAT16,
+ "MESA_FORMAT_RGBA_FLOAT16",
+ GL_RGBA,
+ GL_FLOAT,
+ 16, 16, 16, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_RGB_FLOAT32,
+ "MESA_FORMAT_RGB_FLOAT32",
+ GL_RGB,
+ GL_FLOAT,
+ 32, 32, 32, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 12
+ },
+ {
+ MESA_FORMAT_RGB_FLOAT16,
+ "MESA_FORMAT_RGB_FLOAT16",
+ GL_RGB,
+ GL_FLOAT,
+ 16, 16, 16, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 6
+ },
+ {
+ MESA_FORMAT_ALPHA_FLOAT32,
+ "MESA_FORMAT_ALPHA_FLOAT32",
+ GL_ALPHA,
+ GL_FLOAT,
+ 0, 0, 0, 32,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_ALPHA_FLOAT16,
+ "MESA_FORMAT_ALPHA_FLOAT16",
+ GL_ALPHA,
+ GL_FLOAT,
+ 0, 0, 0, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_LUMINANCE_FLOAT32,
+ "MESA_FORMAT_LUMINANCE_FLOAT32",
+ GL_ALPHA,
+ GL_FLOAT,
+ 0, 0, 0, 0,
+ 32, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_LUMINANCE_FLOAT16,
+ "MESA_FORMAT_LUMINANCE_FLOAT16",
+ GL_ALPHA,
+ GL_FLOAT,
+ 0, 0, 0, 0,
+ 16, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
+ "MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32",
+ GL_LUMINANCE_ALPHA,
+ GL_FLOAT,
+ 0, 0, 0, 32,
+ 32, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
+ "MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16",
+ GL_LUMINANCE_ALPHA,
+ GL_FLOAT,
+ 0, 0, 0, 16,
+ 16, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_INTENSITY_FLOAT32,
+ "MESA_FORMAT_INTENSITY_FLOAT32",
+ GL_INTENSITY,
+ GL_FLOAT,
+ 0, 0, 0, 0,
+ 0, 32, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_INTENSITY_FLOAT16,
+ "MESA_FORMAT_INTENSITY_FLOAT16",
+ GL_INTENSITY,
+ GL_FLOAT,
+ 0, 0, 0, 0,
+ 0, 16, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_DUDV8,
+ "MESA_FORMAT_DUDV8",
+ GL_DUDV_ATI,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA8888,
+ "MESA_FORMAT_SIGNED_RGBA8888",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 8, 8, 8, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA8888_REV,
+ "MESA_FORMAT_SIGNED_RGBA8888_REV",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 8, 8, 8, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA_16,
+ "MESA_FORMAT_SIGNED_RGBA_16",
+ GL_RGBA,
+ GL_SIGNED_NORMALIZED,
+ 16, 16, 16, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ }
+};
+
+
+
+static const struct gl_format_info *
+_mesa_get_format_info(gl_format format)
+{
+ const struct gl_format_info *info = &format_info[format];
+ assert(info->Name == format);
+ return info;
+}
+
+
+/** Return string name of format (for debugging) */
+const char *
+_mesa_get_format_name(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ ASSERT(info->BytesPerBlock);
+ return info->StrName;
+}
+
+
+
+/**
+ * Return bytes needed to store a block of pixels in the given format.
+ * Normally, a block is 1x1 (a single pixel). But for compressed formats
+ * a block may be 4x4 or 8x4, etc.
+ */
+GLuint
+_mesa_get_format_bytes(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ ASSERT(info->BytesPerBlock);
+ return info->BytesPerBlock;
+}
+
+
+/**
+ * Return bits per component for the given format.
+ * \param format one of MESA_FORMAT_x
+ * \param pname the component, such as GL_RED_BITS, GL_TEXTURE_BLUE_BITS, etc.
+ */
+GLint
+_mesa_get_format_bits(gl_format format, GLenum pname)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+
+ switch (pname) {
+ case GL_RED_BITS:
+ case GL_TEXTURE_RED_SIZE:
+ case GL_RENDERBUFFER_RED_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+ return info->RedBits;
+ case GL_GREEN_BITS:
+ case GL_TEXTURE_GREEN_SIZE:
+ case GL_RENDERBUFFER_GREEN_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+ return info->GreenBits;
+ case GL_BLUE_BITS:
+ case GL_TEXTURE_BLUE_SIZE:
+ case GL_RENDERBUFFER_BLUE_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
+ return info->BlueBits;
+ case GL_ALPHA_BITS:
+ case GL_TEXTURE_ALPHA_SIZE:
+ case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
+ return info->AlphaBits;
+ case GL_TEXTURE_INTENSITY_SIZE:
+ return info->IntensityBits;
+ case GL_TEXTURE_LUMINANCE_SIZE:
+ return info->LuminanceBits;
+ case GL_INDEX_BITS:
+ case GL_TEXTURE_INDEX_SIZE_EXT:
+ return info->IndexBits;
+ case GL_DEPTH_BITS:
+ case GL_TEXTURE_DEPTH_SIZE_ARB:
+ case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+ return info->DepthBits;
+ case GL_STENCIL_BITS:
+ case GL_TEXTURE_STENCIL_SIZE_EXT:
+ case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
+ return info->StencilBits;
+ default:
+ _mesa_problem(NULL, "bad pname in _mesa_get_format_bits()");
+ return 0;
+ }
+}
+
+
+/**
+ * Return the data type (or more specifically, the data representation)
+ * for the given format.
+ * The return value will be one of:
+ * GL_UNSIGNED_NORMALIZED = unsigned int representing [0,1]
+ * GL_SIGNED_NORMALIZED = signed int representing [-1, 1]
+ * GL_UNSIGNED_INT = an ordinary unsigned integer
+ * GL_FLOAT = an ordinary float
+ */
+GLenum
+_mesa_get_format_datatype(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ return info->DataType;
+}
+
+
+/**
+ * Return the basic format for the given type. The result will be
+ * one of GL_RGB, GL_RGBA, GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA,
+ * GL_INTENSITY, GL_YCBCR_MESA, GL_COLOR_INDEX, GL_DEPTH_COMPONENT,
+ * GL_STENCIL_INDEX, GL_DEPTH_STENCIL.
+ */
+GLenum
+_mesa_get_format_base_format(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ return info->BaseFormat;
+}
+
+
+/**
+ * Return the block size (in pixels) for the given format. Normally
+ * the block size is 1x1. But compressed formats will have block sizes
+ * of 4x4 or 8x4 pixels, etc.
+ * \param bw returns block width in pixels
+ * \param bh returns block height in pixels
+ */
+void
+_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ *bw = info->BlockWidth;
+ *bh = info->BlockHeight;
+}
+
+
+/** Is the given format a compressed format? */
+GLboolean
+_mesa_is_format_compressed(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ return info->BlockWidth > 1 || info->BlockHeight > 1;
+}
+
+
+/**
+ * Return color encoding for given format.
+ * \return GL_LINEAR or GL_SRGB
+ */
+GLenum
+_mesa_get_format_color_encoding(gl_format format)
+{
+ /* XXX this info should be encoded in gl_format_info */
+ switch (format) {
+ case MESA_FORMAT_SRGB8:
+ case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_SL8:
+ case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_SRGB_DXT1:
+ case MESA_FORMAT_SRGBA_DXT1:
+ case MESA_FORMAT_SRGBA_DXT3:
+ case MESA_FORMAT_SRGBA_DXT5:
+ return GL_SRGB;
+ default:
+ return GL_LINEAR;
+ }
+}
+
+
+/**
+ * Return number of bytes needed to store an image of the given size
+ * in the given format.
+ */
+GLuint
+_mesa_format_image_size(gl_format format, GLsizei width,
+ GLsizei height, GLsizei depth)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ /* Strictly speaking, a conditional isn't needed here */
+ if (info->BlockWidth > 1 || info->BlockHeight > 1) {
+ /* compressed format */
+ const GLuint bw = info->BlockWidth, bh = info->BlockHeight;
+ const GLuint wblocks = (width + bw - 1) / bw;
+ const GLuint hblocks = (height + bh - 1) / bh;
+ const GLuint sz = wblocks * hblocks * info->BytesPerBlock;
+ return sz;
+ }
+ else {
+ /* non-compressed */
+ const GLuint sz = width * height * depth * info->BytesPerBlock;
+ return sz;
+ }
+}
+
+
+
+GLint
+_mesa_format_row_stride(gl_format format, GLsizei width)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ /* Strictly speaking, a conditional isn't needed here */
+ if (info->BlockWidth > 1 || info->BlockHeight > 1) {
+ /* compressed format */
+ const GLuint bw = info->BlockWidth;
+ const GLuint wblocks = (width + bw - 1) / bw;
+ const GLint stride = wblocks * info->BytesPerBlock;
+ return stride;
+ }
+ else {
+ const GLint stride = width * info->BytesPerBlock;
+ return stride;
+ }
+}
+
+
+
+/**
+ * Do sanity checking of the format info table.
+ */
+void
+_mesa_test_formats(void)
+{
+ GLuint i;
+
+ assert(Elements(format_info) == MESA_FORMAT_COUNT);
+
+ for (i = 0; i < MESA_FORMAT_COUNT; i++) {
+ const struct gl_format_info *info = _mesa_get_format_info(i);
+ assert(info);
+
+ assert(info->Name == i);
+
+ if (info->Name == MESA_FORMAT_NONE)
+ continue;
+
+ if (info->BlockWidth == 1 && info->BlockHeight == 1) {
+ if (info->RedBits > 0) {
+ GLuint t = info->RedBits + info->GreenBits
+ + info->BlueBits + info->AlphaBits;
+ assert(t / 8 == info->BytesPerBlock);
+ }
+ }
+
+ assert(info->DataType == GL_UNSIGNED_NORMALIZED ||
+ info->DataType == GL_SIGNED_NORMALIZED ||
+ info->DataType == GL_UNSIGNED_INT ||
+ info->DataType == GL_FLOAT);
+
+ if (info->BaseFormat == GL_RGB) {
+ assert(info->RedBits > 0);
+ assert(info->GreenBits > 0);
+ assert(info->BlueBits > 0);
+ assert(info->AlphaBits == 0);
+ assert(info->LuminanceBits == 0);
+ assert(info->IntensityBits == 0);
+ }
+ else if (info->BaseFormat == GL_RGBA) {
+ assert(info->RedBits > 0);
+ assert(info->GreenBits > 0);
+ assert(info->BlueBits > 0);
+ assert(info->AlphaBits > 0);
+ assert(info->LuminanceBits == 0);
+ assert(info->IntensityBits == 0);
+ }
+ else if (info->BaseFormat == GL_LUMINANCE) {
+ assert(info->RedBits == 0);
+ assert(info->GreenBits == 0);
+ assert(info->BlueBits == 0);
+ assert(info->AlphaBits == 0);
+ assert(info->LuminanceBits > 0);
+ assert(info->IntensityBits == 0);
+ }
+ else if (info->BaseFormat == GL_INTENSITY) {
+ assert(info->RedBits == 0);
+ assert(info->GreenBits == 0);
+ assert(info->BlueBits == 0);
+ assert(info->AlphaBits == 0);
+ assert(info->LuminanceBits == 0);
+ assert(info->IntensityBits > 0);
+ }
+
+ }
+}
+
+
+
+/**
+ * Return datatype and number of components per texel for the given gl_format.
+ * Only used for mipmap generation code.
+ */
+void
+_mesa_format_to_type_and_comps(gl_format format,
+ GLenum *datatype, GLuint *comps)
+{
+ switch (format) {
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_XRGB8888:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR888:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 3;
+ return;
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_REV:
+ *datatype = GL_UNSIGNED_SHORT_5_6_5;
+ *comps = 3;
+ return;
+
+ case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_REV:
+ *datatype = GL_UNSIGNED_SHORT_4_4_4_4;
+ *comps = 4;
+ return;
+
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_REV:
+ *datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
+ *comps = 4;
+ return;
+
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_REV:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_AL1616_REV:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_RGB332:
+ *datatype = GL_UNSIGNED_BYTE_3_3_2;
+ *comps = 3;
+ return;
+
+ case MESA_FORMAT_A8:
+ case MESA_FORMAT_L8:
+ case MESA_FORMAT_I8:
+ case MESA_FORMAT_CI8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 1;
+ return;
+
+ case MESA_FORMAT_YCBCR:
+ case MESA_FORMAT_YCBCR_REV:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_Z24_S8:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1; /* XXX OK? */
+ return;
+
+ case MESA_FORMAT_S8_Z24:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1; /* XXX OK? */
+ return;
+
+ case MESA_FORMAT_Z16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 1;
+ return;
+
+ case MESA_FORMAT_X8_Z24:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1;
+ return;
+
+ case MESA_FORMAT_Z24_X8:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1;
+ return;
+
+ case MESA_FORMAT_Z32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1;
+ return;
+
+ case MESA_FORMAT_DUDV8:
+ *datatype = GL_BYTE;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_SIGNED_RGBA8888:
+ case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ *datatype = GL_BYTE;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_SIGNED_RGBA_16:
+ *datatype = GL_SHORT;
+ *comps = 4;
+ return;
+
+#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SRGB8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 3;
+ return;
+ case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_SARGB8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_SL8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_SLA8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 2;
+ return;
+#endif
+
+#if FEATURE_texture_fxt1
+ case MESA_FORMAT_RGB_FXT1:
+ case MESA_FORMAT_RGBA_FXT1:
+#endif
+#if FEATURE_texture_s3tc
+ case MESA_FORMAT_RGB_DXT1:
+ case MESA_FORMAT_RGBA_DXT1:
+ case MESA_FORMAT_RGBA_DXT3:
+ case MESA_FORMAT_RGBA_DXT5:
+#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SRGB_DXT1:
+ case MESA_FORMAT_SRGBA_DXT1:
+ case MESA_FORMAT_SRGBA_DXT3:
+ case MESA_FORMAT_SRGBA_DXT5:
+#endif
+ /* XXX generate error instead? */
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 0;
+ return;
+#endif
+
+ case MESA_FORMAT_RGBA_FLOAT32:
+ *datatype = GL_FLOAT;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGBA_FLOAT16:
+ *datatype = GL_HALF_FLOAT_ARB;
+ *comps = 4;
+ return;
+ case MESA_FORMAT_RGB_FLOAT32:
+ *datatype = GL_FLOAT;
+ *comps = 3;
+ return;
+ case MESA_FORMAT_RGB_FLOAT16:
+ *datatype = GL_HALF_FLOAT_ARB;
+ *comps = 3;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ *datatype = GL_FLOAT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ *datatype = GL_HALF_FLOAT_ARB;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_ALPHA_FLOAT32:
+ case MESA_FORMAT_LUMINANCE_FLOAT32:
+ case MESA_FORMAT_INTENSITY_FLOAT32:
+ *datatype = GL_FLOAT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_ALPHA_FLOAT16:
+ case MESA_FORMAT_LUMINANCE_FLOAT16:
+ case MESA_FORMAT_INTENSITY_FLOAT16:
+ *datatype = GL_HALF_FLOAT_ARB;
+ *comps = 1;
+ return;
+
+ default:
+ _mesa_problem(NULL, "bad format in _mesa_format_to_type_and_comps");
+ *datatype = 0;
+ *comps = 1;
+ }
+}
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
new file mode 100644
index 00000000000..0eeeb8b2bac
--- /dev/null
+++ b/src/mesa/main/formats.h
@@ -0,0 +1,185 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008-2009 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Brian Paul
+ */
+
+
+#ifndef FORMATS_H
+#define FORMATS_H
+
+
+#include "main/mtypes.h"
+
+
+
+/**
+ * Mesa texture/renderbuffer image formats.
+ */
+typedef enum
+{
+ MESA_FORMAT_NONE = 0,
+
+ /**
+ * \name Basic hardware formats
+ */
+ /*@{*/
+ /* msb <------ TEXEL BITS -----------> lsb */
+ /* ---- ---- ---- ---- ---- ---- ---- ---- */
+ MESA_FORMAT_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_RGBA8888_REV, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_ARGB8888, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_ARGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
+ MESA_FORMAT_XRGB8888, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_XRGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
+ MESA_FORMAT_RGB888, /* RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */
+ MESA_FORMAT_RGB565_REV, /* GGGB BBBB RRRR RGGG */
+ MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */
+ MESA_FORMAT_ARGB4444_REV, /* GGGG BBBB AAAA RRRR */
+ MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */
+ MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
+ MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_AL1616_REV, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_RGB332, /* RRRG GGBB */
+ MESA_FORMAT_A8, /* AAAA AAAA */
+ MESA_FORMAT_L8, /* LLLL LLLL */
+ MESA_FORMAT_I8, /* IIII IIII */
+ MESA_FORMAT_CI8, /* CCCC CCCC */
+ MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
+ MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
+ MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
+ MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z16, /* ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_X8_Z24, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z24_X8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
+ MESA_FORMAT_Z32, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_S8, /* SSSS SSSS */
+ /*@}*/
+
+ /**
+ * \name 8-bit/channel sRGB formats
+ */
+ /*@{*/
+ MESA_FORMAT_SRGB8,
+ MESA_FORMAT_SRGBA8,
+ MESA_FORMAT_SARGB8,
+ MESA_FORMAT_SL8,
+ MESA_FORMAT_SLA8,
+ MESA_FORMAT_SRGB_DXT1,
+ MESA_FORMAT_SRGBA_DXT1,
+ MESA_FORMAT_SRGBA_DXT3,
+ MESA_FORMAT_SRGBA_DXT5,
+ /*@}*/
+
+ /**
+ * \name Compressed texture formats.
+ */
+ /*@{*/
+ MESA_FORMAT_RGB_FXT1,
+ MESA_FORMAT_RGBA_FXT1,
+ MESA_FORMAT_RGB_DXT1,
+ MESA_FORMAT_RGBA_DXT1,
+ MESA_FORMAT_RGBA_DXT3,
+ MESA_FORMAT_RGBA_DXT5,
+ /*@}*/
+
+ /**
+ * \name Floating point texture formats.
+ */
+ /*@{*/
+ MESA_FORMAT_RGBA_FLOAT32,
+ MESA_FORMAT_RGBA_FLOAT16,
+ MESA_FORMAT_RGB_FLOAT32,
+ MESA_FORMAT_RGB_FLOAT16,
+ MESA_FORMAT_ALPHA_FLOAT32,
+ MESA_FORMAT_ALPHA_FLOAT16,
+ MESA_FORMAT_LUMINANCE_FLOAT32,
+ MESA_FORMAT_LUMINANCE_FLOAT16,
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
+ MESA_FORMAT_INTENSITY_FLOAT32,
+ MESA_FORMAT_INTENSITY_FLOAT16,
+ /*@}*/
+
+ /**
+ * \name Signed fixed point texture formats.
+ */
+ /*@{*/
+ MESA_FORMAT_DUDV8,
+ MESA_FORMAT_SIGNED_RGBA8888,
+ MESA_FORMAT_SIGNED_RGBA8888_REV,
+ MESA_FORMAT_SIGNED_RGBA_16,
+ /*@}*/
+
+ MESA_FORMAT_COUNT
+} gl_format;
+
+
+extern const char *
+_mesa_get_format_name(gl_format format);
+
+extern GLuint
+_mesa_get_format_bytes(gl_format format);
+
+extern GLint
+_mesa_get_format_bits(gl_format format, GLenum pname);
+
+extern GLenum
+_mesa_get_format_datatype(gl_format format);
+
+extern GLenum
+_mesa_get_format_base_format(gl_format format);
+
+extern void
+_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh);
+
+extern GLboolean
+_mesa_is_format_compressed(gl_format format);
+
+extern GLenum
+_mesa_get_format_color_encoding(gl_format format);
+
+extern GLuint
+_mesa_format_image_size(gl_format format, GLsizei width,
+ GLsizei height, GLsizei depth);
+
+extern GLint
+_mesa_format_row_stride(gl_format format, GLsizei width);
+
+extern void
+_mesa_format_to_type_and_comps(gl_format format,
+ GLenum *datatype, GLuint *comps);
+
+extern void
+_mesa_test_formats(void);
+
+#endif /* FORMATS_H */
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index dc79b8ca61a..154dedacd50 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -35,6 +35,7 @@
#include "buffers.h"
#include "context.h"
#include "depthstencil.h"
+#include "formats.h"
#include "macros.h"
#include "mtypes.h"
#include "fbobject.h"
@@ -281,7 +282,6 @@ _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
struct gl_renderbuffer *rb = att->Renderbuffer;
/* only resize if size is changing */
if (rb->Width != width || rb->Height != height) {
- /* could just as well pass rb->_ActualFormat here */
if (rb->AllocStorage(ctx, rb, rb->InternalFormat, width, height)) {
ASSERT(rb->Width == width);
ASSERT(rb->Height == height);
@@ -523,19 +523,22 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
for (i = 0; i < BUFFER_COUNT; i++) {
if (fb->Attachment[i].Renderbuffer) {
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
- if (rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB) {
- fb->Visual.redBits = rb->RedBits;
- fb->Visual.greenBits = rb->GreenBits;
- fb->Visual.blueBits = rb->BlueBits;
- fb->Visual.alphaBits = rb->AlphaBits;
+ const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
+ const gl_format fmt = rb->Format;
+
+ if (baseFormat == GL_RGBA || baseFormat == GL_RGB) {
+ fb->Visual.redBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
+ fb->Visual.greenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
+ fb->Visual.blueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS);
+ fb->Visual.alphaBits = _mesa_get_format_bits(fmt, GL_ALPHA_BITS);
fb->Visual.rgbBits = fb->Visual.redBits
+ fb->Visual.greenBits + fb->Visual.blueBits;
fb->Visual.floatMode = GL_FALSE;
fb->Visual.samples = rb->NumSamples;
break;
}
- else if (rb->_BaseFormat == GL_COLOR_INDEX) {
- fb->Visual.indexBits = rb->IndexBits;
+ else if (baseFormat == GL_COLOR_INDEX) {
+ fb->Visual.indexBits = _mesa_get_format_bits(fmt, GL_INDEX_BITS);
fb->Visual.rgbMode = GL_FALSE;
break;
}
@@ -543,27 +546,30 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
}
if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
+ const struct gl_renderbuffer *rb =
+ fb->Attachment[BUFFER_DEPTH].Renderbuffer;
+ const gl_format fmt = rb->Format;
fb->Visual.haveDepthBuffer = GL_TRUE;
- fb->Visual.depthBits
- = fb->Attachment[BUFFER_DEPTH].Renderbuffer->DepthBits;
+ fb->Visual.depthBits = _mesa_get_format_bits(fmt, GL_DEPTH_BITS);
}
if (fb->Attachment[BUFFER_STENCIL].Renderbuffer) {
+ const struct gl_renderbuffer *rb =
+ fb->Attachment[BUFFER_STENCIL].Renderbuffer;
+ const gl_format fmt = rb->Format;
fb->Visual.haveStencilBuffer = GL_TRUE;
- fb->Visual.stencilBits
- = fb->Attachment[BUFFER_STENCIL].Renderbuffer->StencilBits;
+ fb->Visual.stencilBits = _mesa_get_format_bits(fmt, GL_STENCIL_BITS);
}
if (fb->Attachment[BUFFER_ACCUM].Renderbuffer) {
+ const struct gl_renderbuffer *rb =
+ fb->Attachment[BUFFER_ACCUM].Renderbuffer;
+ const gl_format fmt = rb->Format;
fb->Visual.haveAccumBuffer = GL_TRUE;
- fb->Visual.accumRedBits
- = fb->Attachment[BUFFER_ACCUM].Renderbuffer->RedBits;
- fb->Visual.accumGreenBits
- = fb->Attachment[BUFFER_ACCUM].Renderbuffer->GreenBits;
- fb->Visual.accumBlueBits
- = fb->Attachment[BUFFER_ACCUM].Renderbuffer->BlueBits;
- fb->Visual.accumAlphaBits
- = fb->Attachment[BUFFER_ACCUM].Renderbuffer->AlphaBits;
+ fb->Visual.accumRedBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
+ fb->Visual.accumGreenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
+ fb->Visual.accumBlueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS);
+ fb->Visual.accumAlphaBits = _mesa_get_format_bits(fmt, GL_ALPHA_BITS);
}
compute_depth_max(fb);
@@ -592,11 +598,11 @@ _mesa_update_depth_buffer(GLcontext *ctx,
depthRb = fb->Attachment[attIndex].Renderbuffer;
- if (depthRb && depthRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT) {
+ if (depthRb && depthRb->_BaseFormat == GL_DEPTH_STENCIL) {
/* The attached depth buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_DepthBuffer
|| fb->_DepthBuffer->Wrapped != depthRb
- || fb->_DepthBuffer->_BaseFormat != GL_DEPTH_COMPONENT) {
+ || _mesa_get_format_base_format(fb->_DepthBuffer->Format) != GL_DEPTH_COMPONENT) {
/* need to update wrapper */
struct gl_renderbuffer *wrapper
= _mesa_new_z24_renderbuffer_wrapper(ctx, depthRb);
@@ -633,11 +639,11 @@ _mesa_update_stencil_buffer(GLcontext *ctx,
stencilRb = fb->Attachment[attIndex].Renderbuffer;
- if (stencilRb && stencilRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT) {
+ if (stencilRb && stencilRb->_BaseFormat == GL_DEPTH_STENCIL) {
/* The attached stencil buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_StencilBuffer
|| fb->_StencilBuffer->Wrapped != stencilRb
- || fb->_StencilBuffer->_BaseFormat != GL_STENCIL_INDEX) {
+ || _mesa_get_format_base_format(fb->_StencilBuffer->Format) != GL_STENCIL_INDEX) {
/* need to update wrapper */
struct gl_renderbuffer *wrapper
= _mesa_new_s8_renderbuffer_wrapper(ctx, stencilRb);
@@ -854,30 +860,32 @@ _mesa_source_buffer_exists(GLcontext *ctx, GLenum format)
if (ctx->ReadBuffer->_ColorReadBuffer == NULL) {
return GL_FALSE;
}
- ASSERT(ctx->ReadBuffer->_ColorReadBuffer->RedBits > 0 ||
- ctx->ReadBuffer->_ColorReadBuffer->IndexBits > 0);
+ ASSERT(_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_RED_BITS) > 0 ||
+ _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_INDEX_BITS) > 0);
break;
case GL_DEPTH:
case GL_DEPTH_COMPONENT:
if (!att[BUFFER_DEPTH].Renderbuffer) {
return GL_FALSE;
}
- ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);
+ /*ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);*/
break;
case GL_STENCIL:
case GL_STENCIL_INDEX:
if (!att[BUFFER_STENCIL].Renderbuffer) {
return GL_FALSE;
}
- ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);
+ /*ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);*/
break;
case GL_DEPTH_STENCIL_EXT:
if (!att[BUFFER_DEPTH].Renderbuffer ||
!att[BUFFER_STENCIL].Renderbuffer) {
return GL_FALSE;
}
+ /*
ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);
ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);
+ */
break;
default:
_mesa_problem(ctx,
@@ -932,22 +940,24 @@ _mesa_dest_buffer_exists(GLcontext *ctx, GLenum format)
if (!att[BUFFER_DEPTH].Renderbuffer) {
return GL_FALSE;
}
- ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);
+ /*ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);*/
break;
case GL_STENCIL:
case GL_STENCIL_INDEX:
if (!att[BUFFER_STENCIL].Renderbuffer) {
return GL_FALSE;
}
- ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);
+ /*ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);*/
break;
case GL_DEPTH_STENCIL_EXT:
if (!att[BUFFER_DEPTH].Renderbuffer ||
!att[BUFFER_STENCIL].Renderbuffer) {
return GL_FALSE;
}
+ /*
ASSERT(att[BUFFER_DEPTH].Renderbuffer->DepthBits > 0);
ASSERT(att[BUFFER_STENCIL].Renderbuffer->StencilBits > 0);
+ */
break;
default:
_mesa_problem(ctx,
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a6e004a8166..e8932f83b6a 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1876,7 +1876,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetBooleanv");
@@ -3711,7 +3711,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+ params[0] = (GLfloat)(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetFloatv");
@@ -5546,7 +5546,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
+ params[0] = ctx->Const.MaxCombinedTextureImageUnits;
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetIntegerv");
@@ -5592,16 +5592,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumRedBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumRedBits);
break;
case GL_ACCUM_GREEN_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumGreenBits);
break;
case GL_ACCUM_BLUE_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumBlueBits);
break;
case GL_ACCUM_ALPHA_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumAlphaBits);
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = FLOAT_TO_INT64(ctx->Accum.ClearColor[0]);
@@ -5613,7 +5613,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.AlphaBias);
break;
case GL_ALPHA_BITS:
- params[0] = ctx->DrawBuffer->Visual.alphaBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.alphaBits);
break;
case GL_ALPHA_SCALE:
params[0] = IROUND64(ctx->Pixel.AlphaScale);
@@ -5628,13 +5628,13 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = FLOAT_TO_INT64(ctx->Color.AlphaRef);
break;
case GL_ATTRIB_STACK_DEPTH:
- params[0] = ctx->AttribStackDepth;
+ params[0] = (GLint64)(ctx->AttribStackDepth);
break;
case GL_AUTO_NORMAL:
params[0] = BOOLEAN_TO_INT64(ctx->Eval.AutoNormal);
break;
case GL_AUX_BUFFERS:
- params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.numAuxBuffers);
break;
case GL_BLEND:
params[0] = BOOLEAN_TO_INT64(ctx->Color.BlendEnabled);
@@ -5673,13 +5673,13 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.BlueBias);
break;
case GL_BLUE_BITS:
- params[0] = ctx->DrawBuffer->Visual.blueBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.blueBits);
break;
case GL_BLUE_SCALE:
params[0] = IROUND64(ctx->Pixel.BlueScale);
break;
case GL_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = ctx->ClientAttribStackDepth;
+ params[0] = (GLint64)(ctx->ClientAttribStackDepth);
break;
case GL_CLIP_PLANE0:
params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
@@ -5715,10 +5715,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Light.ColorMaterialMode);
break;
case GL_COLOR_WRITEMASK:
- params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
- params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
- params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
- params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
+ params[0] = (GLint64)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
+ params[1] = (GLint64)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
+ params[2] = (GLint64)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
+ params[3] = (GLint64)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
break;
case GL_CULL_FACE:
params[0] = BOOLEAN_TO_INT64(ctx->Polygon.CullFlag);
@@ -5799,7 +5799,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.DepthBias);
break;
case GL_DEPTH_BITS:
- params[0] = ctx->DrawBuffer->Visual.depthBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.depthBits);
break;
case GL_DEPTH_CLEAR_VALUE:
params[0] = FLOAT_TO_INT64(((GLfloat) ctx->Depth.Clear));
@@ -5836,7 +5836,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_FEEDBACK_BUFFER_SIZE:
- params[0] = ctx->Feedback.BufferSize;
+ params[0] = (GLint64)(ctx->Feedback.BufferSize);
break;
case GL_FEEDBACK_BUFFER_TYPE:
params[0] = ENUM_TO_INT64(ctx->Feedback.Type);
@@ -5875,28 +5875,28 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.GreenBias);
break;
case GL_GREEN_BITS:
- params[0] = ctx->DrawBuffer->Visual.greenBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.greenBits);
break;
case GL_GREEN_SCALE:
params[0] = IROUND64(ctx->Pixel.GreenScale);
break;
case GL_INDEX_BITS:
- params[0] = ctx->DrawBuffer->Visual.indexBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.indexBits);
break;
case GL_INDEX_CLEAR_VALUE:
- params[0] = ctx->Color.ClearIndex;
+ params[0] = (GLint64)(ctx->Color.ClearIndex);
break;
case GL_INDEX_MODE:
params[0] = BOOLEAN_TO_INT64(!ctx->DrawBuffer->Visual.rgbMode);
break;
case GL_INDEX_OFFSET:
- params[0] = ctx->Pixel.IndexOffset;
+ params[0] = (GLint64)(ctx->Pixel.IndexOffset);
break;
case GL_INDEX_SHIFT:
- params[0] = ctx->Pixel.IndexShift;
+ params[0] = (GLint64)(ctx->Pixel.IndexShift);
break;
case GL_INDEX_WRITEMASK:
- params[0] = ctx->Color.IndexMask;
+ params[0] = (GLint64)(ctx->Color.IndexMask);
break;
case GL_LIGHT0:
params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[0].Enabled);
@@ -5950,10 +5950,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Line.StippleFlag);
break;
case GL_LINE_STIPPLE_PATTERN:
- params[0] = ctx->Line.StipplePattern;
+ params[0] = (GLint64)(ctx->Line.StipplePattern);
break;
case GL_LINE_STIPPLE_REPEAT:
- params[0] = ctx->Line.StippleFactor;
+ params[0] = (GLint64)(ctx->Line.StippleFactor);
break;
case GL_LINE_WIDTH:
params[0] = IROUND64(ctx->Line.Width);
@@ -5970,10 +5970,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[1] = IROUND64(ctx->Const.MaxLineWidth);
break;
case GL_LIST_BASE:
- params[0] = ctx->List.ListBase;
+ params[0] = (GLint64)(ctx->List.ListBase);
break;
case GL_LIST_INDEX:
- params[0] = (ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0);
+ params[0] = (GLint64)((ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0));
break;
case GL_LIST_MODE:
{
@@ -6004,7 +6004,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[1] = IROUND64(ctx->Eval.MapGrid1u2);
break;
case GL_MAP1_GRID_SEGMENTS:
- params[0] = ctx->Eval.MapGrid1un;
+ params[0] = (GLint64)(ctx->Eval.MapGrid1un);
break;
case GL_MAP1_INDEX:
params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Index);
@@ -6040,8 +6040,8 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[3] = IROUND64(ctx->Eval.MapGrid2v2);
break;
case GL_MAP2_GRID_SEGMENTS:
- params[0] = ctx->Eval.MapGrid2un;
- params[1] = ctx->Eval.MapGrid2vn;
+ params[0] = (GLint64)(ctx->Eval.MapGrid2un);
+ params[1] = (GLint64)(ctx->Eval.MapGrid2vn);
break;
case GL_MAP2_INDEX:
params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Index);
@@ -6077,53 +6077,53 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Transform.MatrixMode);
break;
case GL_MAX_ATTRIB_STACK_DEPTH:
- params[0] = MAX_ATTRIB_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_ATTRIB_STACK_DEPTH);
break;
case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
break;
case GL_MAX_CLIP_PLANES:
- params[0] = ctx->Const.MaxClipPlanes;
+ params[0] = (GLint64)(ctx->Const.MaxClipPlanes);
break;
case GL_MAX_ELEMENTS_VERTICES:
- params[0] = ctx->Const.MaxArrayLockSize;
+ params[0] = (GLint64)(ctx->Const.MaxArrayLockSize);
break;
case GL_MAX_ELEMENTS_INDICES:
- params[0] = ctx->Const.MaxArrayLockSize;
+ params[0] = (GLint64)(ctx->Const.MaxArrayLockSize);
break;
case GL_MAX_EVAL_ORDER:
- params[0] = MAX_EVAL_ORDER;
+ params[0] = (GLint64)(MAX_EVAL_ORDER);
break;
case GL_MAX_LIGHTS:
- params[0] = ctx->Const.MaxLights;
+ params[0] = (GLint64)(ctx->Const.MaxLights);
break;
case GL_MAX_LIST_NESTING:
- params[0] = MAX_LIST_NESTING;
+ params[0] = (GLint64)(MAX_LIST_NESTING);
break;
case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = MAX_MODELVIEW_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_MODELVIEW_STACK_DEPTH);
break;
case GL_MAX_NAME_STACK_DEPTH:
- params[0] = MAX_NAME_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_NAME_STACK_DEPTH);
break;
case GL_MAX_PIXEL_MAP_TABLE:
- params[0] = MAX_PIXEL_MAP_TABLE;
+ params[0] = (GLint64)(MAX_PIXEL_MAP_TABLE);
break;
case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = MAX_PROJECTION_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_PROJECTION_STACK_DEPTH);
break;
case GL_MAX_TEXTURE_SIZE:
- params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
+ params[0] = (GLint64)(1 << (ctx->Const.MaxTextureLevels - 1));
break;
case GL_MAX_3D_TEXTURE_SIZE:
- params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
+ params[0] = (GLint64)(1 << (ctx->Const.Max3DTextureLevels - 1));
break;
case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = MAX_TEXTURE_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_TEXTURE_STACK_DEPTH);
break;
case GL_MAX_VIEWPORT_DIMS:
- params[0] = ctx->Const.MaxViewportWidth;
- params[1] = ctx->Const.MaxViewportHeight;
+ params[0] = (GLint64)(ctx->Const.MaxViewportWidth);
+ params[1] = (GLint64)(ctx->Const.MaxViewportHeight);
break;
case GL_MODELVIEW_MATRIX:
{
@@ -6147,37 +6147,37 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_MODELVIEW_STACK_DEPTH:
- params[0] = ctx->ModelviewMatrixStack.Depth + 1;
+ params[0] = (GLint64)(ctx->ModelviewMatrixStack.Depth + 1);
break;
case GL_NAME_STACK_DEPTH:
- params[0] = ctx->Select.NameStackDepth;
+ params[0] = (GLint64)(ctx->Select.NameStackDepth);
break;
case GL_NORMALIZE:
params[0] = BOOLEAN_TO_INT64(ctx->Transform.Normalize);
break;
case GL_PACK_ALIGNMENT:
- params[0] = ctx->Pack.Alignment;
+ params[0] = (GLint64)(ctx->Pack.Alignment);
break;
case GL_PACK_LSB_FIRST:
params[0] = BOOLEAN_TO_INT64(ctx->Pack.LsbFirst);
break;
case GL_PACK_ROW_LENGTH:
- params[0] = ctx->Pack.RowLength;
+ params[0] = (GLint64)(ctx->Pack.RowLength);
break;
case GL_PACK_SKIP_PIXELS:
- params[0] = ctx->Pack.SkipPixels;
+ params[0] = (GLint64)(ctx->Pack.SkipPixels);
break;
case GL_PACK_SKIP_ROWS:
- params[0] = ctx->Pack.SkipRows;
+ params[0] = (GLint64)(ctx->Pack.SkipRows);
break;
case GL_PACK_SWAP_BYTES:
params[0] = BOOLEAN_TO_INT64(ctx->Pack.SwapBytes);
break;
case GL_PACK_SKIP_IMAGES_EXT:
- params[0] = ctx->Pack.SkipImages;
+ params[0] = (GLint64)(ctx->Pack.SkipImages);
break;
case GL_PACK_IMAGE_HEIGHT_EXT:
- params[0] = ctx->Pack.ImageHeight;
+ params[0] = (GLint64)(ctx->Pack.ImageHeight);
break;
case GL_PACK_INVERT_MESA:
params[0] = BOOLEAN_TO_INT64(ctx->Pack.Invert);
@@ -6186,34 +6186,34 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Hint.PerspectiveCorrection);
break;
case GL_PIXEL_MAP_A_TO_A_SIZE:
- params[0] = ctx->PixelMaps.AtoA.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.AtoA.Size);
break;
case GL_PIXEL_MAP_B_TO_B_SIZE:
- params[0] = ctx->PixelMaps.BtoB.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.BtoB.Size);
break;
case GL_PIXEL_MAP_G_TO_G_SIZE:
- params[0] = ctx->PixelMaps.GtoG.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.GtoG.Size);
break;
case GL_PIXEL_MAP_I_TO_A_SIZE:
- params[0] = ctx->PixelMaps.ItoA.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoA.Size);
break;
case GL_PIXEL_MAP_I_TO_B_SIZE:
- params[0] = ctx->PixelMaps.ItoB.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoB.Size);
break;
case GL_PIXEL_MAP_I_TO_G_SIZE:
- params[0] = ctx->PixelMaps.ItoG.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoG.Size);
break;
case GL_PIXEL_MAP_I_TO_I_SIZE:
- params[0] = ctx->PixelMaps.ItoI.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoI.Size);
break;
case GL_PIXEL_MAP_I_TO_R_SIZE:
- params[0] = ctx->PixelMaps.ItoR.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoR.Size);
break;
case GL_PIXEL_MAP_R_TO_R_SIZE:
- params[0] = ctx->PixelMaps.RtoR.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.RtoR.Size);
break;
case GL_PIXEL_MAP_S_TO_S_SIZE:
- params[0] = ctx->PixelMaps.StoS.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.StoS.Size);
break;
case GL_POINT_SIZE:
params[0] = IROUND64(ctx->Point.Size);
@@ -6302,7 +6302,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_PROJECTION_STACK_DEPTH:
- params[0] = ctx->ProjectionMatrixStack.Depth + 1;
+ params[0] = (GLint64)(ctx->ProjectionMatrixStack.Depth + 1);
break;
case GL_READ_BUFFER:
params[0] = ENUM_TO_INT64(ctx->ReadBuffer->ColorReadBuffer);
@@ -6311,7 +6311,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.RedBias);
break;
case GL_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.redBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.redBits);
break;
case GL_RED_SCALE:
params[0] = IROUND64(ctx->Pixel.RedScale);
@@ -6326,16 +6326,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.rgbMode);
break;
case GL_SCISSOR_BOX:
- params[0] = ctx->Scissor.X;
- params[1] = ctx->Scissor.Y;
- params[2] = ctx->Scissor.Width;
- params[3] = ctx->Scissor.Height;
+ params[0] = (GLint64)(ctx->Scissor.X);
+ params[1] = (GLint64)(ctx->Scissor.Y);
+ params[2] = (GLint64)(ctx->Scissor.Width);
+ params[3] = (GLint64)(ctx->Scissor.Height);
break;
case GL_SCISSOR_TEST:
params[0] = BOOLEAN_TO_INT64(ctx->Scissor.Enabled);
break;
case GL_SELECTION_BUFFER_SIZE:
- params[0] = ctx->Select.BufferSize;
+ params[0] = (GLint64)(ctx->Select.BufferSize);
break;
case GL_SHADE_MODEL:
params[0] = ENUM_TO_INT64(ctx->Light.ShadeModel);
@@ -6344,10 +6344,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Texture.SharedPalette);
break;
case GL_STENCIL_BITS:
- params[0] = ctx->DrawBuffer->Visual.stencilBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.stencilBits);
break;
case GL_STENCIL_CLEAR_VALUE:
- params[0] = ctx->Stencil.Clear;
+ params[0] = (GLint64)(ctx->Stencil.Clear);
break;
case GL_STENCIL_FAIL:
params[0] = ENUM_TO_INT64(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
@@ -6362,22 +6362,22 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
break;
case GL_STENCIL_REF:
- params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+ params[0] = (GLint64)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
break;
case GL_STENCIL_TEST:
params[0] = BOOLEAN_TO_INT64(ctx->Stencil.Enabled);
break;
case GL_STENCIL_VALUE_MASK:
- params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
+ params[0] = (GLint64)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
break;
case GL_STENCIL_WRITEMASK:
- params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
+ params[0] = (GLint64)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
break;
case GL_STEREO:
params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.stereoMode);
break;
case GL_SUBPIXEL_BITS:
- params[0] = ctx->Const.SubPixelBits;
+ params[0] = (GLint64)(ctx->Const.SubPixelBits);
break;
case GL_TEXTURE_1D:
params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_1D));
@@ -6397,21 +6397,21 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
break;
case GL_TEXTURE_BINDING_1D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_2D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_3D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
break;
case GL_TEXTURE_GEN_S:
params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
@@ -6447,40 +6447,40 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_TEXTURE_STACK_DEPTH:
- params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
+ params[0] = (GLint64)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
break;
case GL_UNPACK_ALIGNMENT:
- params[0] = ctx->Unpack.Alignment;
+ params[0] = (GLint64)(ctx->Unpack.Alignment);
break;
case GL_UNPACK_LSB_FIRST:
params[0] = BOOLEAN_TO_INT64(ctx->Unpack.LsbFirst);
break;
case GL_UNPACK_ROW_LENGTH:
- params[0] = ctx->Unpack.RowLength;
+ params[0] = (GLint64)(ctx->Unpack.RowLength);
break;
case GL_UNPACK_SKIP_PIXELS:
- params[0] = ctx->Unpack.SkipPixels;
+ params[0] = (GLint64)(ctx->Unpack.SkipPixels);
break;
case GL_UNPACK_SKIP_ROWS:
- params[0] = ctx->Unpack.SkipRows;
+ params[0] = (GLint64)(ctx->Unpack.SkipRows);
break;
case GL_UNPACK_SWAP_BYTES:
params[0] = BOOLEAN_TO_INT64(ctx->Unpack.SwapBytes);
break;
case GL_UNPACK_SKIP_IMAGES_EXT:
- params[0] = ctx->Unpack.SkipImages;
+ params[0] = (GLint64)(ctx->Unpack.SkipImages);
break;
case GL_UNPACK_IMAGE_HEIGHT_EXT:
- params[0] = ctx->Unpack.ImageHeight;
+ params[0] = (GLint64)(ctx->Unpack.ImageHeight);
break;
case GL_UNPACK_CLIENT_STORAGE_APPLE:
params[0] = BOOLEAN_TO_INT64(ctx->Unpack.ClientStorage);
break;
case GL_VIEWPORT:
- params[0] = ctx->Viewport.X;
- params[1] = ctx->Viewport.Y;
- params[2] = ctx->Viewport.Width;
- params[3] = ctx->Viewport.Height;
+ params[0] = (GLint64)(ctx->Viewport.X);
+ params[1] = (GLint64)(ctx->Viewport.Y);
+ params[2] = (GLint64)(ctx->Viewport.Width);
+ params[3] = (GLint64)(ctx->Viewport.Height);
break;
case GL_ZOOM_X:
params[0] = IROUND64(ctx->Pixel.ZoomX);
@@ -6492,16 +6492,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Vertex.Enabled);
break;
case GL_VERTEX_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->Vertex.Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.Size);
break;
case GL_VERTEX_ARRAY_TYPE:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Vertex.Type);
break;
case GL_VERTEX_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Vertex.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.Stride);
break;
case GL_VERTEX_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_NORMAL_ARRAY:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Normal.Enabled);
@@ -6510,25 +6510,25 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Normal.Type);
break;
case GL_NORMAL_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Normal.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Normal.Stride);
break;
case GL_NORMAL_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_COLOR_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Color.Enabled);
break;
case GL_COLOR_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->Color.Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Color.Size);
break;
case GL_COLOR_ARRAY_TYPE:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Color.Type);
break;
case GL_COLOR_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Color.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Color.Stride);
break;
case GL_COLOR_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_INDEX_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Index.Enabled);
@@ -6537,46 +6537,46 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Index.Type);
break;
case GL_INDEX_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Index.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Index.Stride);
break;
case GL_INDEX_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_TEXTURE_COORD_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
break;
case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
break;
case GL_TEXTURE_COORD_ARRAY_TYPE:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
break;
case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
break;
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_EDGE_FLAG_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->EdgeFlag.Enabled);
break;
case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->EdgeFlag.Stride);
break;
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_MAX_TEXTURE_UNITS_ARB:
CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureUnits;
+ params[0] = (GLint64)(ctx->Const.MaxTextureUnits);
break;
case GL_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
+ params[0] = (GLint64)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
break;
case GL_CLIENT_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
+ params[0] = (GLint64)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
break;
case GL_TEXTURE_CUBE_MAP_ARB:
CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
@@ -6584,17 +6584,17 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
break;
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
+ params[0] = (GLint64)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
break;
case GL_TEXTURE_COMPRESSION_HINT_ARB:
- params[0] = ctx->Hint.TextureCompression;
+ params[0] = (GLint64)(ctx->Hint.TextureCompression);
break;
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
- params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
+ params[0] = (GLint64)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
break;
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
{
@@ -6607,11 +6607,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
CHECK_EXT1(EXT_compiled_vertex_array, "GetInteger64v");
- params[0] = ctx->Array.LockFirst;
+ params[0] = (GLint64)(ctx->Array.LockFirst);
break;
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
CHECK_EXT1(EXT_compiled_vertex_array, "GetInteger64v");
- params[0] = ctx->Array.LockCount;
+ params[0] = (GLint64)(ctx->Array.LockCount);
break;
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
{
@@ -6719,10 +6719,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = ctx->ColorMatrixStack.Depth + 1;
+ params[0] = (GLint64)(ctx->ColorMatrixStack.Depth + 1);
break;
case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = MAX_COLOR_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_COLOR_STACK_DEPTH);
break;
case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
params[0] = IROUND64(ctx->Pixel.PostColorMatrixScale[0]);
@@ -6840,11 +6840,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.Stride);
break;
case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.Size);
break;
case GL_CURRENT_FOG_COORDINATE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
@@ -6863,7 +6863,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->FogCoord.Stride);
break;
case GL_FOG_COORDINATE_SOURCE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
@@ -6896,10 +6896,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Multisample.SampleCoverageInvert);
break;
case GL_SAMPLE_BUFFERS_ARB:
- params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.sampleBuffers);
break;
case GL_SAMPLES_ARB:
- params[0] = ctx->DrawBuffer->Visual.samples;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.samples);
break;
case GL_RASTER_POSITION_UNCLIPPED_IBM:
CHECK_EXT1(IBM_rasterpos_clip, "GetInteger64v");
@@ -6923,7 +6923,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_VERTEX_PROGRAM_BINDING_NV:
CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
+ params[0] = (GLint64)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
break;
case GL_VERTEX_ATTRIB_ARRAY0_NV:
CHECK_EXT1(NV_vertex_program, "GetInteger64v");
@@ -7059,11 +7059,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_FRAGMENT_PROGRAM_BINDING_NV:
CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
+ params[0] = (GLint64)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
break;
case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
+ params[0] = (GLint64)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
break;
case GL_TEXTURE_RECTANGLE_NV:
CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
@@ -7071,11 +7071,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_TEXTURE_BINDING_RECTANGLE_NV:
CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
break;
case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureRectSize;
+ params[0] = (GLint64)(ctx->Const.MaxTextureRectSize);
break;
case GL_STENCIL_TEST_TWO_SIDE_EXT:
CHECK_EXT1(EXT_stencil_two_side, "GetInteger64v");
@@ -7094,42 +7094,42 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Const.MaxSpotExponent);
break;
case GL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayBufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayBufferObj->Name);
break;
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
break;
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
break;
case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Color.BufferObj->Name);
break;
case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Index.BufferObj->Name);
break;
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
break;
case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
break;
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
break;
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ElementArrayBufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ElementArrayBufferObj->Name);
break;
case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
CHECK_EXT1(EXT_pixel_buffer_object, "GetInteger64v");
- params[0] = ctx->Pack.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Pack.BufferObj->Name);
break;
case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
CHECK_EXT1(EXT_pixel_buffer_object, "GetInteger64v");
- params[0] = ctx->Unpack.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Unpack.BufferObj->Name);
break;
case GL_VERTEX_PROGRAM_ARB:
CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetInteger64v");
@@ -7145,11 +7145,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = ctx->Const.MaxProgramMatrixStackDepth;
+ params[0] = (GLint64)(ctx->Const.MaxProgramMatrixStackDepth);
break;
case GL_MAX_PROGRAM_MATRICES_ARB:
CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = ctx->Const.MaxProgramMatrices;
+ params[0] = (GLint64)(ctx->Const.MaxProgramMatrices);
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
@@ -7201,11 +7201,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_VERTEX_ATTRIBS_ARB:
CHECK_EXT1(ARB_vertex_program, "GetInteger64v");
- params[0] = ctx->Const.VertexProgram.MaxAttribs;
+ params[0] = (GLint64)(ctx->Const.VertexProgram.MaxAttribs);
break;
case GL_PROGRAM_ERROR_POSITION_ARB:
CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetInteger64v");
- params[0] = ctx->Program.ErrorPos;
+ params[0] = (GLint64)(ctx->Program.ErrorPos);
break;
case GL_FRAGMENT_PROGRAM_ARB:
CHECK_EXT1(ARB_fragment_program, "GetInteger64v");
@@ -7213,11 +7213,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_TEXTURE_COORDS_ARB:
CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureCoordUnits;
+ params[0] = (GLint64)(ctx->Const.MaxTextureCoordUnits);
break;
case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureImageUnits;
+ params[0] = (GLint64)(ctx->Const.MaxTextureImageUnits);
break;
case GL_DEPTH_BOUNDS_TEST_EXT:
CHECK_EXT1(EXT_depth_bounds_test, "GetInteger64v");
@@ -7233,7 +7233,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Transform.DepthClamp);
break;
case GL_MAX_DRAW_BUFFERS_ARB:
- params[0] = ctx->Const.MaxDrawBuffers;
+ params[0] = (GLint64)(ctx->Const.MaxDrawBuffers);
break;
case GL_DRAW_BUFFER0_ARB:
params[0] = ENUM_TO_INT64(ctx->DrawBuffer->ColorDrawBuffer[0]);
@@ -7273,31 +7273,31 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
CHECK_EXT1(OES_read_format, "GetInteger64v");
- params[0] = ctx->Const.ColorReadType;
+ params[0] = (GLint64)(ctx->Const.ColorReadType);
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
CHECK_EXT1(OES_read_format, "GetInteger64v");
- params[0] = ctx->Const.ColorReadFormat;
+ params[0] = (GLint64)(ctx->Const.ColorReadFormat);
break;
case GL_NUM_FRAGMENT_REGISTERS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 6;
+ params[0] = (GLint64)(6);
break;
case GL_NUM_FRAGMENT_CONSTANTS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 8;
+ params[0] = (GLint64)(8);
break;
case GL_NUM_PASSES_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 2;
+ params[0] = (GLint64)(2);
break;
case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 8;
+ params[0] = (GLint64)(8);
break;
case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 16;
+ params[0] = (GLint64)(16);
break;
case GL_COLOR_ALPHA_PAIRING_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
@@ -7305,23 +7305,23 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_NUM_LOOPBACK_COMPONENTS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 3;
+ params[0] = (GLint64)(3);
break;
case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 3;
+ params[0] = (GLint64)(3);
break;
case GL_STENCIL_BACK_FUNC:
params[0] = ENUM_TO_INT64(ctx->Stencil.Function[1]);
break;
case GL_STENCIL_BACK_VALUE_MASK:
- params[0] = ctx->Stencil.ValueMask[1];
+ params[0] = (GLint64)(ctx->Stencil.ValueMask[1]);
break;
case GL_STENCIL_BACK_WRITEMASK:
- params[0] = ctx->Stencil.WriteMask[1];
+ params[0] = (GLint64)(ctx->Stencil.WriteMask[1]);
break;
case GL_STENCIL_BACK_REF:
- params[0] = ctx->Stencil.Ref[1];
+ params[0] = (GLint64)(ctx->Stencil.Ref[1]);
break;
case GL_STENCIL_BACK_FAIL:
params[0] = ENUM_TO_INT64(ctx->Stencil.FailFunc[1]);
@@ -7334,23 +7334,23 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_FRAMEBUFFER_BINDING_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->DrawBuffer->Name;
+ params[0] = (GLint64)(ctx->DrawBuffer->Name);
break;
case GL_RENDERBUFFER_BINDING_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
+ params[0] = (GLint64)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
break;
case GL_MAX_COLOR_ATTACHMENTS_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->Const.MaxColorAttachments;
+ params[0] = (GLint64)(ctx->Const.MaxColorAttachments);
break;
case GL_MAX_RENDERBUFFER_SIZE_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->Const.MaxRenderbufferSize;
+ params[0] = (GLint64)(ctx->Const.MaxRenderbufferSize);
break;
case GL_READ_FRAMEBUFFER_BINDING_EXT:
CHECK_EXT1(EXT_framebuffer_blit, "GetInteger64v");
- params[0] = ctx->ReadBuffer->Name;
+ params[0] = (GLint64)(ctx->ReadBuffer->Name);
break;
case GL_PROVOKING_VERTEX_EXT:
CHECK_EXT1(EXT_provoking_vertex, "GetInteger64v");
@@ -7362,7 +7362,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetInteger64v");
- params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
+ params[0] = (GLint64)(ctx->Const.FragmentProgram.MaxUniformComponents);
break;
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetInteger64v");
@@ -7370,31 +7370,31 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = ctx->Const.VertexProgram.MaxUniformComponents;
+ params[0] = (GLint64)(ctx->Const.VertexProgram.MaxUniformComponents);
break;
case GL_MAX_VARYING_FLOATS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = ctx->Const.MaxVarying * 4;
+ params[0] = (GLint64)(ctx->Const.MaxVarying * 4);
break;
case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = ctx->Const.MaxVertexTextureImageUnits;
+ params[0] = (GLint64)(ctx->Const.MaxVertexTextureImageUnits);
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
+ params[0] = (GLint64)(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetInteger64v");
- params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
+ params[0] = (GLint64)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
break;
case GL_MAX_SAMPLES:
CHECK_EXT1(ARB_framebuffer_object, "GetInteger64v");
- params[0] = ctx->Const.MaxSamples;
+ params[0] = (GLint64)(ctx->Const.MaxSamples);
break;
case GL_VERTEX_ARRAY_BINDING_APPLE:
CHECK_EXT1(APPLE_vertex_array_object, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Name);
break;
case GL_TEXTURE_CUBE_MAP_SEAMLESS:
CHECK_EXT1(ARB_seamless_cube_map, "GetInteger64v");
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 364d8c55c45..a29962d3348 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -1006,7 +1006,7 @@ StateVars = [
( "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", GLint,
["ctx->Const.MaxVertexTextureImageUnits"], "", ["ARB_vertex_shader"] ),
( "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB", GLint,
- ["MAX_COMBINED_TEXTURE_IMAGE_UNITS"], "", ["ARB_vertex_shader"] ),
+ ["ctx->Const.MaxCombinedTextureImageUnits"], "", ["ARB_vertex_shader"] ),
# GL_ARB_shader_objects
# Actually, this token isn't part of GL_ARB_shader_objects, but is
@@ -1046,7 +1046,7 @@ def ConversionFunc(fromType, toType):
elif fromType == GLint and toType == GLfloat: # but not GLfloatN!
return "(GLfloat)"
elif fromType == GLint and toType == GLint64:
- return ""
+ return "(GLint64)"
elif fromType == GLint64 and toType == GLfloat: # but not GLfloatN!
return "(GLfloat)"
else:
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index 87816d31329..c7304e8dd75 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -189,16 +189,17 @@ pack_histogram( GLcontext *ctx,
{
/* temporarily store as GLuints */
GLuint temp[4*HISTOGRAM_TABLE_SIZE];
- GLhalfARB *dst = (GLhalfARB *) destination;
+ GLuint *dst = temp;
+ GLhalfARB *half = (GLhalfARB *) destination;
GLuint i;
/* get GLuint values */
PACK_MACRO(GLuint);
/* convert to GLhalf */
for (i = 0; i < n * comps; i++) {
- dst[i] = _mesa_float_to_half((GLfloat) temp[i]);
+ half[i] = _mesa_float_to_half((GLfloat) temp[i]);
}
if (packing->SwapBytes) {
- _mesa_swap2((GLushort *) dst, n * comps);
+ _mesa_swap2((GLushort *) half, n * comps);
}
}
break;
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 30fa55997ef..c9e00cf7528 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -108,8 +108,8 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment)
{
#if defined(HAVE_POSIX_MEMALIGN)
void *mem;
-
- (void) posix_memalign(& mem, alignment, bytes);
+ int err = posix_memalign(& mem, alignment, bytes);
+ (void) err;
return mem;
#elif defined(_WIN32) && defined(_MSC_VER)
return _aligned_malloc(bytes, alignment);
@@ -629,11 +629,15 @@ _mesa_ffsll(int64_t val)
unsigned int
_mesa_bitcount(unsigned int n)
{
+#if defined(__GNUC__)
+ return __builtin_popcount(n);
+#else
unsigned int bits;
for (bits = 0; n > 0; n = n >> 1) {
bits += (n & 1);
}
return bits;
+#endif
}
@@ -934,9 +938,9 @@ _mesa_str_checksum(const char *str)
unsigned int sum, i;
const char *c;
sum = i = 1;
- for (c = str; *c; c++)
+ for (c = str; *c; c++, i++)
sum += *c * (i % 100);
- return sum;
+ return sum + i;
}
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index c2fb8404b16..4e68bc15d8a 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -68,6 +68,12 @@
* enabled or not.
*/
+#ifdef IN_DRI_DRIVER
+#define FEATURE_remap_table 1
+#else
+#define FEATURE_remap_table 0
+#endif
+
#define FEATURE_accum _HAVE_FULL_GL
#define FEATURE_arrayelt _HAVE_FULL_GL
#define FEATURE_attrib_stack _HAVE_FULL_GL
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index c3928fa513f..7350c7a3d2c 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -28,10 +28,11 @@
*/
#include "imports.h"
+#include "formats.h"
#include "mipmap.h"
#include "texcompress.h"
-#include "texformat.h"
#include "teximage.h"
+#include "texstore.h"
#include "image.h"
@@ -1493,7 +1494,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj)
{
const struct gl_texture_image *srcImage;
- const struct gl_texture_format *convertFormat;
+ gl_format convertFormat;
const GLubyte *srcData = NULL;
GLubyte *dstData = NULL;
GLint level, maxLevels;
@@ -1508,7 +1509,8 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
ASSERT(maxLevels > 0); /* bad target */
/* Find convertFormat - the format that do_row() will process */
- if (srcImage->IsCompressed) {
+
+ if (_mesa_is_format_compressed(srcImage->TexFormat)) {
/* setup for compressed textures - need to allocate temporary
* image buffers to hold uncompressed images.
*/
@@ -1520,11 +1522,11 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
texObj->Target == GL_TEXTURE_CUBE_MAP_ARB);
if (srcImage->_BaseFormat == GL_RGB) {
- convertFormat = &_mesa_texformat_rgb;
+ convertFormat = MESA_FORMAT_RGB888;
components = 3;
}
else if (srcImage->_BaseFormat == GL_RGBA) {
- convertFormat = &_mesa_texformat_rgba;
+ convertFormat = MESA_FORMAT_RGBA8888;
components = 4;
}
else {
@@ -1588,7 +1590,11 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
&dstWidth, &dstHeight, &dstDepth);
if (!nextLevel) {
/* all done */
- break;
+ if (_mesa_is_format_compressed(srcImage->TexFormat)) {
+ _mesa_free((void *) srcData);
+ _mesa_free(dstData);
+ }
+ return;
}
/* get dest gl_texture_image */
@@ -1609,25 +1615,17 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
dstImage->TexFormat = srcImage->TexFormat;
dstImage->FetchTexelc = srcImage->FetchTexelc;
dstImage->FetchTexelf = srcImage->FetchTexelf;
- dstImage->IsCompressed = srcImage->IsCompressed;
- if (dstImage->IsCompressed) {
- dstImage->CompressedSize
- = ctx->Driver.CompressedTextureSize(ctx, dstImage->Width,
- dstImage->Height,
- dstImage->Depth,
- dstImage->TexFormat->MesaFormat);
- ASSERT(dstImage->CompressedSize > 0);
- }
-
- ASSERT(dstImage->TexFormat);
- ASSERT(dstImage->FetchTexelc);
- ASSERT(dstImage->FetchTexelf);
/* Alloc new teximage data buffer.
* Setup src and dest data pointers.
*/
- if (dstImage->IsCompressed) {
- dstImage->Data = _mesa_alloc_texmemory(dstImage->CompressedSize);
+ if (_mesa_is_format_compressed(dstImage->TexFormat)) {
+ GLuint dstCompressedSize =
+ _mesa_format_image_size(dstImage->TexFormat, dstImage->Width,
+ dstImage->Height, dstImage->Depth);
+ ASSERT(dstCompressedSize > 0);
+
+ dstImage->Data = _mesa_alloc_texmemory(dstCompressedSize);
if (!dstImage->Data) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
return;
@@ -1637,7 +1635,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
ASSERT(dstData);
}
else {
- bytesPerTexel = dstImage->TexFormat->TexelBytes;
+ bytesPerTexel = _mesa_get_format_bytes(dstImage->TexFormat);
ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0);
dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight
* dstDepth * bytesPerTexel);
@@ -1649,6 +1647,10 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
dstData = (GLubyte *) dstImage->Data;
}
+ ASSERT(dstImage->TexFormat);
+ ASSERT(dstImage->FetchTexelc);
+ ASSERT(dstImage->FetchTexelf);
+
_mesa_generate_mipmap_level(target, datatype, comps, border,
srcWidth, srcHeight, srcDepth,
srcData, srcImage->RowStride,
@@ -1656,22 +1658,24 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
dstData, dstImage->RowStride);
- if (dstImage->IsCompressed) {
+ if (_mesa_is_format_compressed(dstImage->TexFormat)) {
GLubyte *temp;
/* compress image from dstData into dstImage->Data */
- const GLenum srcFormat = convertFormat->BaseFormat;
+ const GLenum srcFormat = _mesa_get_format_base_format(convertFormat);
GLint dstRowStride
- = _mesa_compressed_row_stride(dstImage->TexFormat->MesaFormat, dstWidth);
+ = _mesa_format_row_stride(dstImage->TexFormat, dstWidth);
ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA);
- dstImage->TexFormat->StoreImage(ctx, 2, dstImage->_BaseFormat,
- dstImage->TexFormat,
- dstImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride, 0, /* strides */
- dstWidth, dstHeight, 1, /* size */
- srcFormat, CHAN_TYPE,
- dstData, /* src data, actually */
- &ctx->DefaultPacking);
+
+ _mesa_texstore(ctx, 2, dstImage->_BaseFormat,
+ dstImage->TexFormat,
+ dstImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride, 0, /* strides */
+ dstWidth, dstHeight, 1, /* size */
+ srcFormat, CHAN_TYPE,
+ dstData, /* src data, actually */
+ &ctx->DefaultPacking);
+
/* swap src and dest pointers */
temp = (GLubyte *) srcData;
srcData = dstData;
@@ -1679,12 +1683,6 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
}
} /* loop over mipmap levels */
-
- if (srcImage->IsCompressed) {
- /* free uncompressed image buffers */
- _mesa_free((void *) srcData);
- _mesa_free(dstData);
- }
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 052fbaaaeab..5f012448275 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -79,6 +79,31 @@
/**
+ * \name 64-bit extension of GLbitfield.
+ */
+/*@{*/
+typedef GLuint64 GLbitfield64;
+
+#define BITFIELD64_ONE 1ULL
+#define BITFIELD64_ALLONES ~0ULL
+
+/** Set a single bit */
+#define BITFIELD64_BIT(b) (BITFIELD64_ONE << (b))
+
+/** Set a mask of the least significant \c b bits */
+#define BITFIELD64_MASK(b) (((b) >= 64) ? BITFIELD64_ALLONES : \
+ (BITFIELD64_BIT(b) - 1))
+
+/**
+ * Set all bits from l (low bit) to h (high bit), inclusive.
+ *
+ * \note \C BITFIELD_64_RANGE(0, 63) return 64 set bits.
+ */
+#define BITFIELD64_RANGE(l, h) (BITFIELD64_MASK((h) + 1) & ~BITFIELD64_MASK(l))
+/*@}*/
+
+
+/**
* \name Some forward type declarations
*/
/*@{*/
@@ -1115,103 +1140,20 @@ typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage,
/**
- * This macro defines the (many) parameters to the texstore functions.
- * \param dims either 1 or 2 or 3
- * \param baseInternalFormat user-specified base internal format
- * \param dstFormat destination Mesa texture format
- * \param dstAddr destination image address
- * \param dstX/Y/Zoffset destination x/y/z offset (ala TexSubImage), in texels
- * \param dstRowStride destination image row stride, in bytes
- * \param dstImageOffsets offset of each 2D slice within 3D texture, in texels
- * \param srcWidth/Height/Depth source image size, in pixels
- * \param srcFormat incoming image format
- * \param srcType incoming image data type
- * \param srcAddr source image address
- * \param srcPacking source image packing parameters
- */
-#define TEXSTORE_PARAMS \
- GLcontext *ctx, GLuint dims, \
- GLenum baseInternalFormat, \
- const struct gl_texture_format *dstFormat, \
- GLvoid *dstAddr, \
- GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \
- GLint dstRowStride, const GLuint *dstImageOffsets, \
- GLint srcWidth, GLint srcHeight, GLint srcDepth, \
- GLenum srcFormat, GLenum srcType, \
- const GLvoid *srcAddr, \
- const struct gl_pixelstore_attrib *srcPacking
-
-
-
-/**
- * Texture image storage function.
- */
-typedef GLboolean (*StoreTexImageFunc)(TEXSTORE_PARAMS);
-
-
-/**
- * Texture format record
- */
-struct gl_texture_format
-{
- GLint MesaFormat; /**< One of the MESA_FORMAT_* values */
-
- GLenum BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_ALPHA,
- * GL_LUMINANCE, GL_LUMINANCE_ALPHA,
- * GL_INTENSITY, GL_COLOR_INDEX or
- * GL_DEPTH_COMPONENT.
- */
- GLenum DataType; /**< GL_FLOAT or GL_UNSIGNED_NORMALIZED_ARB */
-
- /**
- * Bits per texel component. These are just rough approximations
- * for compressed texture formats.
- */
- /*@{*/
- GLubyte RedBits;
- GLubyte GreenBits;
- GLubyte BlueBits;
- GLubyte AlphaBits;
- GLubyte LuminanceBits;
- GLubyte IntensityBits;
- GLubyte IndexBits;
- GLubyte DepthBits;
- GLubyte StencilBits; /**< GL_EXT_packed_depth_stencil */
- /*@}*/
-
- GLuint TexelBytes; /**< Bytes per texel, 0 if compressed format */
-
- StoreTexImageFunc StoreImage;
-
- /**
- * \name Texel fetch function pointers
- */
- /*@{*/
- FetchTexelFuncC FetchTexel1D;
- FetchTexelFuncC FetchTexel2D;
- FetchTexelFuncC FetchTexel3D;
- FetchTexelFuncF FetchTexel1Df;
- FetchTexelFuncF FetchTexel2Df;
- FetchTexelFuncF FetchTexel3Df;
- /*@}*/
-
- StoreTexelFunc StoreTexel;
-};
-
-
-/**
* Texture image state. Describes the dimensions of a texture image,
* the texel format and pointers to Texel Fetch functions.
*/
struct gl_texture_image
{
+ GLint InternalFormat; /**< Internal format as given by the user */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_ALPHA,
* GL_LUMINANCE, GL_LUMINANCE_ALPHA,
* GL_INTENSITY, GL_COLOR_INDEX,
* GL_DEPTH_COMPONENT or GL_DEPTH_STENCIL_EXT
* only. Used for choosing TexEnv arithmetic.
*/
- GLint InternalFormat; /**< Internal format as given by the user */
+ GLuint TexFormat; /**< The actual format: MESA_FORMAT_x */
+
GLuint Border; /**< 0 or 1 */
GLuint Width; /**< = 2^WidthLog2 + 2*Border */
GLuint Height; /**< = 2^HeightLog2 + 2*Border */
@@ -1229,16 +1171,11 @@ struct gl_texture_image
GLboolean IsClientData; /**< Data owned by client? */
GLboolean _IsPowerOfTwo; /**< Are all dimensions powers of two? */
- const struct gl_texture_format *TexFormat;
-
struct gl_texture_object *TexObject; /**< Pointer back to parent object */
FetchTexelFuncC FetchTexelc; /**< GLchan texel fetch function pointer */
FetchTexelFuncF FetchTexelf; /**< Float texel fetch function pointer */
- GLboolean IsCompressed; /**< GL_ARB_texture_compression */
- GLuint CompressedSize; /**< GL_ARB_texture_compression */
-
GLuint RowStride; /**< Padded width in units of texels */
GLuint *ImageOffsets; /**< if 3D texture: array [Depth] of offsets to
each 2D slice in 'Data', in texels */
@@ -1758,7 +1695,7 @@ struct gl_program
struct prog_instruction *Instructions;
GLbitfield InputsRead; /**< Bitmask of which input regs are read */
- GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */
+ GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */
GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */
GLbitfield TexturesUsed[MAX_TEXTURE_UNITS]; /**< TEXTURE_x_BIT bitmask */
@@ -2157,20 +2094,12 @@ struct gl_renderbuffer
GLuint Name;
GLint RefCount;
GLuint Width, Height;
+
GLenum InternalFormat; /**< The user-specified format */
- GLenum _ActualFormat; /**< The driver-chosen format */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
GL_STENCIL_INDEX. */
- GLenum ColorEncoding; /**< GL_LINEAR or GL_SRGB */
- GLenum ComponentType; /**< GL_FLOAT, GL_INT, GL_UNSIGNED_INT,
- GL_UNSIGNED_NORMALIZED or GL_INDEX */
- GLubyte RedBits; /**< Bits of red per pixel */
- GLubyte GreenBits;
- GLubyte BlueBits;
- GLubyte AlphaBits;
- GLubyte IndexBits;
- GLubyte DepthBits;
- GLubyte StencilBits;
+ GLuint Format; /**< The actual format: MESA_FORMAT_x */
+
GLubyte NumSamples;
GLenum DataType; /**< Type of values passed to the Get/Put functions */
@@ -2390,6 +2319,7 @@ struct gl_constants
GLuint MaxTextureCoordUnits;
GLuint MaxTextureImageUnits;
GLuint MaxVertexTextureImageUnits;
+ GLuint MaxCombinedTextureImageUnits;
GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
@@ -2508,9 +2438,10 @@ struct gl_extensions
GLboolean EXT_copy_texture;
GLboolean EXT_depth_bounds_test;
GLboolean EXT_draw_range_elements;
- GLboolean EXT_framebuffer_object;
GLboolean EXT_fog_coord;
GLboolean EXT_framebuffer_blit;
+ GLboolean EXT_framebuffer_multisample;
+ GLboolean EXT_framebuffer_object;
GLboolean EXT_gpu_program_parameters;
GLboolean EXT_histogram;
GLboolean EXT_multi_draw_arrays;
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 4c8fc1f72e0..b3305448904 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -200,7 +200,12 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
}
break;
case GL_POINT_SPRITE_COORD_ORIGIN:
- if (ctx->Extensions.ARB_point_sprite || ctx->Extensions.NV_point_sprite) {
+ /* This is not completely correct. GL_POINT_SPRITE_COORD_ORIGIN was
+ * added to point sprites when the extension was merged into OpenGL
+ * 2.0. It is expected that an implementation supporting OpenGL 1.4
+ * and GL_ARB_point_sprite will generate an error here.
+ */
+ if (ctx->Extensions.ARB_point_sprite) {
GLenum value = (GLenum) params[0];
if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) {
_mesa_error(ctx, GL_INVALID_VALUE,
diff --git a/src/mesa/main/rbadaptors.c b/src/mesa/main/rbadaptors.c
index c1ac0606c86..1060c5796ed 100644
--- a/src/mesa/main/rbadaptors.c
+++ b/src/mesa/main/rbadaptors.c
@@ -218,14 +218,10 @@ _mesa_new_renderbuffer_16wrap8(GLcontext *ctx, struct gl_renderbuffer *rb8)
_glthread_UNLOCK_MUTEX(rb8->Mutex);
rb16->InternalFormat = rb8->InternalFormat;
- rb16->_ActualFormat = rb8->_ActualFormat;
+ rb16->Format = rb8->Format; /* XXX is this right? */
rb16->_BaseFormat = rb8->_BaseFormat;
rb16->DataType = GL_UNSIGNED_SHORT;
/* Note: passing through underlying bits/channel */
- rb16->RedBits = rb8->RedBits;
- rb16->GreenBits = rb8->GreenBits;
- rb16->BlueBits = rb8->BlueBits;
- rb16->AlphaBits = rb8->AlphaBits;
rb16->Wrapped = rb8;
rb16->AllocStorage = AllocStorage_wrapper;
@@ -385,14 +381,10 @@ _mesa_new_renderbuffer_32wrap8(GLcontext *ctx, struct gl_renderbuffer *rb8)
_glthread_UNLOCK_MUTEX(rb8->Mutex);
rb32->InternalFormat = rb8->InternalFormat;
- rb32->_ActualFormat = rb8->_ActualFormat;
+ rb32->Format = rb8->Format; /* XXX is this right? */
rb32->_BaseFormat = rb8->_BaseFormat;
rb32->DataType = GL_FLOAT;
/* Note: passing through underlying bits/channel */
- rb32->RedBits = rb8->RedBits;
- rb32->GreenBits = rb8->GreenBits;
- rb32->BlueBits = rb8->BlueBits;
- rb32->AlphaBits = rb8->AlphaBits;
rb32->Wrapped = rb8;
rb32->AllocStorage = AllocStorage_wrapper;
@@ -552,14 +544,10 @@ _mesa_new_renderbuffer_32wrap16(GLcontext *ctx, struct gl_renderbuffer *rb16)
_glthread_UNLOCK_MUTEX(rb16->Mutex);
rb32->InternalFormat = rb16->InternalFormat;
- rb32->_ActualFormat = rb16->_ActualFormat;
+ rb32->Format = rb16->Format; /* XXX is this right? */
rb32->_BaseFormat = rb16->_BaseFormat;
rb32->DataType = GL_FLOAT;
/* Note: passing through underlying bits/channel */
- rb32->RedBits = rb16->RedBits;
- rb32->GreenBits = rb16->GreenBits;
- rb32->BlueBits = rb16->BlueBits;
- rb32->AlphaBits = rb16->AlphaBits;
rb32->Wrapped = rb16;
rb32->AllocStorage = AllocStorage_wrapper;
diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c
new file mode 100644
index 00000000000..0385ae8d7d9
--- /dev/null
+++ b/src/mesa/main/remap.c
@@ -0,0 +1,216 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 2009 Chia-I Wu <[email protected]>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file remap.c
+ * Remap table management.
+ *
+ * Entries in the dispatch table are either static or dynamic. The
+ * dispatch table is shared by mesa core and glapi. When they are
+ * built separately, it is possible that a static entry in mesa core
+ * is dynamic, or assigned a different static offset, in glapi. The
+ * remap table is in charge of mapping a static entry in mesa core to
+ * a dynamic entry, or the corresponding static entry, in glapi.
+ */
+
+#include "remap.h"
+#include "imports.h"
+
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_remap_table
+
+
+#define need_MESA_remap_table
+#include "remap_helper.h"
+
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+#define MAX_ENTRY_POINTS 16
+
+
+/* this is global for quick access */
+int driDispatchRemapTable[driDispatchRemapTable_size];
+
+
+/**
+ * Return the spec string associated with the given function index.
+ * The index is available from including remap_helper.h.
+ *
+ * \param func_index an opaque function index.
+ *
+ * \return the spec string associated with the function index, or NULL.
+ */
+const char *
+_mesa_get_function_spec(GLint func_index)
+{
+ if (func_index < ARRAY_SIZE(_mesa_function_pool))
+ return _mesa_function_pool + func_index;
+ else
+ return NULL;
+}
+
+
+/**
+ * Map a function by its spec. The function will be added to glapi,
+ * and the dispatch offset will be returned.
+ *
+ * \param spec a '\0'-separated string array specifying a function.
+ * It begins with the parameter signature of the function,
+ * followed by the names of the entry points. An empty entry
+ * point name terminates the array.
+ *
+ * \return the offset of the (re-)mapped function in the dispatch
+ * table, or -1.
+ */
+GLint
+_mesa_map_function_spec(const char *spec)
+{
+ const char *signature;
+ const char *names[MAX_ENTRY_POINTS + 1];
+ GLint num_names = 0;
+
+ if (!spec)
+ return -1;
+
+ signature = spec;
+ spec += strlen(spec) + 1;
+
+ /* spec is terminated by an empty string */
+ while (*spec) {
+ names[num_names] = spec;
+ num_names++;
+ if (num_names >= MAX_ENTRY_POINTS)
+ break;
+ spec += strlen(spec) + 1;
+ }
+ if (!num_names)
+ return -1;
+
+ names[num_names] = NULL;
+
+ /* add the entry points to the dispatch table */
+ return _glapi_add_dispatch(names, signature);
+}
+
+
+/**
+ * Map an array of functions. This is a convenient function for
+ * use with arrays available from including remap_helper.h.
+ *
+ * Note that the dispatch offsets of the functions are not returned.
+ * If they are needed, _mesa_map_function_spec() should be used.
+ *
+ * \param func_array an array of function remaps.
+ */
+void
+_mesa_map_function_array(const struct gl_function_remap *func_array)
+{
+ GLint i;
+
+ if (!func_array)
+ return;
+
+ for (i = 0; func_array[i].func_index != -1; i++) {
+ const char *spec;
+ GLint offset;
+
+ spec = _mesa_get_function_spec(func_array[i].func_index);
+ if (!spec) {
+ _mesa_problem(NULL, "invalid function index %d",
+ func_array[i].func_index);
+ continue;
+ }
+
+ offset = _mesa_map_function_spec(spec);
+ /* error checks */
+ if (offset < 0) {
+ const char *name = spec + strlen(spec) + 1;
+ _mesa_warning(NULL, "failed to remap %s", name);
+ }
+ else if (func_array[i].dispatch_offset >= 0 &&
+ offset != func_array[i].dispatch_offset) {
+ const char *name = spec + strlen(spec) + 1;
+ _mesa_problem(NULL, "%s should be mapped to %d, not %d",
+ name, func_array[i].dispatch_offset, offset);
+ }
+ }
+}
+
+
+/**
+ * Map the functions which are already static.
+ *
+ * When a extension function are incorporated into the ABI, the
+ * extension suffix is usually stripped. Mapping such functions
+ * makes sure the alternative names are available.
+ *
+ * Note that functions mapped by _mesa_init_remap_table() are
+ * excluded.
+ */
+void
+_mesa_map_static_functions(void)
+{
+ /* Remap static functions which have alternative names and are in the ABI.
+ * This is to be on the safe side. glapi should have defined those names.
+ */
+ _mesa_map_function_array(MESA_alt_functions);
+}
+
+
+/**
+ * Initialize the remap table. This is called in one_time_init().
+ * The remap table needs to be initialized before calling the
+ * CALL/GET/SET macros defined in glapi/dispatch.h.
+ */
+void
+_mesa_init_remap_table(void)
+{
+ static GLboolean initialized = GL_FALSE;
+ GLint i;
+
+ if (initialized)
+ return;
+ initialized = GL_TRUE;
+
+ /* initialize the remap table */
+ for (i = 0; i < ARRAY_SIZE(driDispatchRemapTable); i++) {
+ GLint offset;
+ const char *spec;
+
+ /* sanity check */
+ ASSERT(i == MESA_remap_table_functions[i].remap_index);
+ spec = _mesa_function_pool + MESA_remap_table_functions[i].pool_index;
+
+ offset = _mesa_map_function_spec(spec);
+ /* store the dispatch offset in the remap table */
+ driDispatchRemapTable[i] = offset;
+ if (offset < 0)
+ _mesa_warning(NULL, "failed to remap index %d", i);
+ }
+}
+
+
+#endif /* FEATURE_remap_table */
diff --git a/src/mesa/main/remap.h b/src/mesa/main/remap.h
new file mode 100644
index 00000000000..7fb56e36005
--- /dev/null
+++ b/src/mesa/main/remap.h
@@ -0,0 +1,87 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 2009 Chia-I Wu <[email protected]>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef REMAP_H
+#define REMAP_H
+
+
+#include "main/mtypes.h"
+
+struct gl_function_remap;
+
+
+#if FEATURE_remap_table
+
+extern int
+driDispatchRemapTable[];
+
+extern const char *
+_mesa_get_function_spec(GLint func_index);
+
+extern GLint
+_mesa_map_function_spec(const char *spec);
+
+extern void
+_mesa_map_function_array(const struct gl_function_remap *func_array);
+
+extern void
+_mesa_map_static_functions(void);
+
+extern void
+_mesa_init_remap_table(void);
+
+#else /* FEATURE_remap_table */
+
+static INLINE const char *
+_mesa_get_function_spec(GLint func_index)
+{
+ return NULL;
+}
+
+static INLINE GLint
+_mesa_map_function_spec(const char *spec)
+{
+ return -1;
+}
+
+static INLINE void
+_mesa_map_function_array(const struct gl_function_remap *func_array)
+{
+}
+
+static INLINE void
+_mesa_map_static_functions(void)
+{
+}
+
+static INLINE void
+_mesa_init_remap_table(void)
+{
+}
+
+#endif /* FEATURE_remap_table */
+
+
+#endif /* REMAP_H */
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
new file mode 100644
index 00000000000..c80a524b4f0
--- /dev/null
+++ b/src/mesa/main/remap_helper.h
@@ -0,0 +1,5891 @@
+/* DO NOT EDIT - This file generated automatically by remap_helper.py (from Mesa) script */
+
+/*
+ * Copyright (C) 2009 Chia-I Wu <[email protected]>
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * Chia-I Wu,
+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include "glapi/dispatch.h"
+
+struct gl_function_remap {
+ GLint func_index;
+ GLint dispatch_offset; /* for sanity check */
+};
+
+/* this is internal to remap.c */
+#ifdef need_MESA_remap_table
+
+static const char _mesa_function_pool[] =
+ /* _mesa_function_pool[0]: MapGrid1d (offset 224) */
+ "idd\0"
+ "glMapGrid1d\0"
+ "\0"
+ /* _mesa_function_pool[17]: UniformMatrix3fvARB (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3fv\0"
+ "glUniformMatrix3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[64]: MapGrid1f (offset 225) */
+ "iff\0"
+ "glMapGrid1f\0"
+ "\0"
+ /* _mesa_function_pool[81]: RasterPos4i (offset 82) */
+ "iiii\0"
+ "glRasterPos4i\0"
+ "\0"
+ /* _mesa_function_pool[101]: RasterPos4d (offset 78) */
+ "dddd\0"
+ "glRasterPos4d\0"
+ "\0"
+ /* _mesa_function_pool[121]: NewList (dynamic) */
+ "ii\0"
+ "glNewList\0"
+ "\0"
+ /* _mesa_function_pool[135]: RasterPos4f (offset 80) */
+ "ffff\0"
+ "glRasterPos4f\0"
+ "\0"
+ /* _mesa_function_pool[155]: LoadIdentity (offset 290) */
+ "\0"
+ "glLoadIdentity\0"
+ "\0"
+ /* _mesa_function_pool[172]: SampleCoverageARB (will be remapped) */
+ "fi\0"
+ "glSampleCoverage\0"
+ "glSampleCoverageARB\0"
+ "\0"
+ /* _mesa_function_pool[213]: ConvolutionFilter1D (offset 348) */
+ "iiiiip\0"
+ "glConvolutionFilter1D\0"
+ "glConvolutionFilter1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[268]: BeginQueryARB (will be remapped) */
+ "ii\0"
+ "glBeginQuery\0"
+ "glBeginQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[301]: RasterPos3dv (offset 71) */
+ "p\0"
+ "glRasterPos3dv\0"
+ "\0"
+ /* _mesa_function_pool[319]: PointParameteriNV (will be remapped) */
+ "ii\0"
+ "glPointParameteri\0"
+ "glPointParameteriNV\0"
+ "\0"
+ /* _mesa_function_pool[361]: GetProgramiv (will be remapped) */
+ "iip\0"
+ "glGetProgramiv\0"
+ "\0"
+ /* _mesa_function_pool[381]: MultiTexCoord3sARB (offset 398) */
+ "iiii\0"
+ "glMultiTexCoord3s\0"
+ "glMultiTexCoord3sARB\0"
+ "\0"
+ /* _mesa_function_pool[426]: SecondaryColor3iEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3i\0"
+ "glSecondaryColor3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[472]: WindowPos3fMESA (will be remapped) */
+ "fff\0"
+ "glWindowPos3f\0"
+ "glWindowPos3fARB\0"
+ "glWindowPos3fMESA\0"
+ "\0"
+ /* _mesa_function_pool[526]: TexCoord1iv (offset 99) */
+ "p\0"
+ "glTexCoord1iv\0"
+ "\0"
+ /* _mesa_function_pool[543]: TexCoord4sv (offset 125) */
+ "p\0"
+ "glTexCoord4sv\0"
+ "\0"
+ /* _mesa_function_pool[560]: RasterPos4s (offset 84) */
+ "iiii\0"
+ "glRasterPos4s\0"
+ "\0"
+ /* _mesa_function_pool[580]: PixelTexGenParameterfvSGIS (will be remapped) */
+ "ip\0"
+ "glPixelTexGenParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[613]: ActiveTextureARB (offset 374) */
+ "i\0"
+ "glActiveTexture\0"
+ "glActiveTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[651]: BlitFramebufferEXT (will be remapped) */
+ "iiiiiiiiii\0"
+ "glBlitFramebuffer\0"
+ "glBlitFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[702]: TexCoord1f (offset 96) */
+ "f\0"
+ "glTexCoord1f\0"
+ "\0"
+ /* _mesa_function_pool[718]: TexCoord1d (offset 94) */
+ "d\0"
+ "glTexCoord1d\0"
+ "\0"
+ /* _mesa_function_pool[734]: VertexAttrib4ubvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4ubvNV\0"
+ "\0"
+ /* _mesa_function_pool[759]: TexCoord1i (offset 98) */
+ "i\0"
+ "glTexCoord1i\0"
+ "\0"
+ /* _mesa_function_pool[775]: GetProgramNamedParameterdvNV (will be remapped) */
+ "iipp\0"
+ "glGetProgramNamedParameterdvNV\0"
+ "\0"
+ /* _mesa_function_pool[812]: Histogram (offset 367) */
+ "iiii\0"
+ "glHistogram\0"
+ "glHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[845]: TexCoord1s (offset 100) */
+ "i\0"
+ "glTexCoord1s\0"
+ "\0"
+ /* _mesa_function_pool[861]: GetMapfv (offset 267) */
+ "iip\0"
+ "glGetMapfv\0"
+ "\0"
+ /* _mesa_function_pool[877]: EvalCoord1f (offset 230) */
+ "f\0"
+ "glEvalCoord1f\0"
+ "\0"
+ /* _mesa_function_pool[894]: TexImage4DSGIS (dynamic) */
+ "iiiiiiiiiip\0"
+ "glTexImage4DSGIS\0"
+ "\0"
+ /* _mesa_function_pool[924]: PolygonStipple (offset 175) */
+ "p\0"
+ "glPolygonStipple\0"
+ "\0"
+ /* _mesa_function_pool[944]: WindowPos2dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2dv\0"
+ "glWindowPos2dvARB\0"
+ "glWindowPos2dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[999]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1043]: BlendEquationSeparateEXT (will be remapped) */
+ "ii\0"
+ "glBlendEquationSeparate\0"
+ "glBlendEquationSeparateEXT\0"
+ "glBlendEquationSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[1125]: ListParameterfSGIX (dynamic) */
+ "iif\0"
+ "glListParameterfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[1151]: SecondaryColor3bEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3b\0"
+ "glSecondaryColor3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[1197]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */
+ "pppp\0"
+ "glTexCoord4fColor4fNormal3fVertex4fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1243]: GetPixelMapfv (offset 271) */
+ "ip\0"
+ "glGetPixelMapfv\0"
+ "\0"
+ /* _mesa_function_pool[1263]: Color3uiv (offset 22) */
+ "p\0"
+ "glColor3uiv\0"
+ "\0"
+ /* _mesa_function_pool[1278]: IsEnabled (offset 286) */
+ "i\0"
+ "glIsEnabled\0"
+ "\0"
+ /* _mesa_function_pool[1293]: VertexAttrib4svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4svNV\0"
+ "\0"
+ /* _mesa_function_pool[1317]: EvalCoord2fv (offset 235) */
+ "p\0"
+ "glEvalCoord2fv\0"
+ "\0"
+ /* _mesa_function_pool[1335]: GetBufferSubDataARB (will be remapped) */
+ "iiip\0"
+ "glGetBufferSubData\0"
+ "glGetBufferSubDataARB\0"
+ "\0"
+ /* _mesa_function_pool[1382]: BufferSubDataARB (will be remapped) */
+ "iiip\0"
+ "glBufferSubData\0"
+ "glBufferSubDataARB\0"
+ "\0"
+ /* _mesa_function_pool[1423]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1461]: AttachShader (will be remapped) */
+ "ii\0"
+ "glAttachShader\0"
+ "\0"
+ /* _mesa_function_pool[1480]: VertexAttrib2fARB (will be remapped) */
+ "iff\0"
+ "glVertexAttrib2f\0"
+ "glVertexAttrib2fARB\0"
+ "\0"
+ /* _mesa_function_pool[1522]: GetDebugLogLengthMESA (dynamic) */
+ "iii\0"
+ "glGetDebugLogLengthMESA\0"
+ "\0"
+ /* _mesa_function_pool[1551]: GetMapiv (offset 268) */
+ "iip\0"
+ "glGetMapiv\0"
+ "\0"
+ /* _mesa_function_pool[1567]: VertexAttrib3fARB (will be remapped) */
+ "ifff\0"
+ "glVertexAttrib3f\0"
+ "glVertexAttrib3fARB\0"
+ "\0"
+ /* _mesa_function_pool[1610]: Indexubv (offset 316) */
+ "p\0"
+ "glIndexubv\0"
+ "\0"
+ /* _mesa_function_pool[1624]: GetQueryivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryiv\0"
+ "glGetQueryivARB\0"
+ "\0"
+ /* _mesa_function_pool[1658]: TexImage3D (offset 371) */
+ "iiiiiiiiip\0"
+ "glTexImage3D\0"
+ "glTexImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[1699]: ReplacementCodeuiVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glReplacementCodeuiVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1735]: EdgeFlagPointer (offset 312) */
+ "ip\0"
+ "glEdgeFlagPointer\0"
+ "\0"
+ /* _mesa_function_pool[1757]: Color3ubv (offset 20) */
+ "p\0"
+ "glColor3ubv\0"
+ "\0"
+ /* _mesa_function_pool[1772]: GetQueryObjectivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectiv\0"
+ "glGetQueryObjectivARB\0"
+ "\0"
+ /* _mesa_function_pool[1818]: Vertex3dv (offset 135) */
+ "p\0"
+ "glVertex3dv\0"
+ "\0"
+ /* _mesa_function_pool[1833]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiTexCoord2fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1880]: CompressedTexSubImage2DARB (will be remapped) */
+ "iiiiiiiip\0"
+ "glCompressedTexSubImage2D\0"
+ "glCompressedTexSubImage2DARB\0"
+ "\0"
+ /* _mesa_function_pool[1946]: CombinerOutputNV (will be remapped) */
+ "iiiiiiiiii\0"
+ "glCombinerOutputNV\0"
+ "\0"
+ /* _mesa_function_pool[1977]: VertexAttribs3fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3fvNV\0"
+ "\0"
+ /* _mesa_function_pool[2003]: Uniform2fARB (will be remapped) */
+ "iff\0"
+ "glUniform2f\0"
+ "glUniform2fARB\0"
+ "\0"
+ /* _mesa_function_pool[2035]: LightModeliv (offset 166) */
+ "ip\0"
+ "glLightModeliv\0"
+ "\0"
+ /* _mesa_function_pool[2054]: VertexAttrib1svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1sv\0"
+ "glVertexAttrib1svARB\0"
+ "\0"
+ /* _mesa_function_pool[2097]: VertexAttribs1dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1dvNV\0"
+ "\0"
+ /* _mesa_function_pool[2123]: Uniform2ivARB (will be remapped) */
+ "iip\0"
+ "glUniform2iv\0"
+ "glUniform2ivARB\0"
+ "\0"
+ /* _mesa_function_pool[2157]: GetImageTransformParameterfvHP (dynamic) */
+ "iip\0"
+ "glGetImageTransformParameterfvHP\0"
+ "\0"
+ /* _mesa_function_pool[2195]: Normal3bv (offset 53) */
+ "p\0"
+ "glNormal3bv\0"
+ "\0"
+ /* _mesa_function_pool[2210]: TexGeniv (offset 193) */
+ "iip\0"
+ "glTexGeniv\0"
+ "\0"
+ /* _mesa_function_pool[2226]: WeightubvARB (dynamic) */
+ "ip\0"
+ "glWeightubvARB\0"
+ "\0"
+ /* _mesa_function_pool[2245]: VertexAttrib1fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1fvNV\0"
+ "\0"
+ /* _mesa_function_pool[2269]: Vertex3iv (offset 139) */
+ "p\0"
+ "glVertex3iv\0"
+ "\0"
+ /* _mesa_function_pool[2284]: CopyConvolutionFilter1D (offset 354) */
+ "iiiii\0"
+ "glCopyConvolutionFilter1D\0"
+ "glCopyConvolutionFilter1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[2346]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */
+ "iffffff\0"
+ "glReplacementCodeuiNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[2394]: DeleteSync (will be remapped) */
+ "i\0"
+ "glDeleteSync\0"
+ "\0"
+ /* _mesa_function_pool[2410]: FragmentMaterialfvSGIX (dynamic) */
+ "iip\0"
+ "glFragmentMaterialfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[2440]: BlendColor (offset 336) */
+ "ffff\0"
+ "glBlendColor\0"
+ "glBlendColorEXT\0"
+ "\0"
+ /* _mesa_function_pool[2475]: UniformMatrix4fvARB (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4fv\0"
+ "glUniformMatrix4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[2522]: DeleteVertexArraysAPPLE (will be remapped) */
+ "ip\0"
+ "glDeleteVertexArrays\0"
+ "glDeleteVertexArraysAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[2573]: ReadInstrumentsSGIX (dynamic) */
+ "i\0"
+ "glReadInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[2598]: CallLists (offset 3) */
+ "iip\0"
+ "glCallLists\0"
+ "\0"
+ /* _mesa_function_pool[2615]: UniformMatrix2x4fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2x4fv\0"
+ "\0"
+ /* _mesa_function_pool[2642]: Color4ubVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[2669]: Normal3iv (offset 59) */
+ "p\0"
+ "glNormal3iv\0"
+ "\0"
+ /* _mesa_function_pool[2684]: PassThrough (offset 199) */
+ "f\0"
+ "glPassThrough\0"
+ "\0"
+ /* _mesa_function_pool[2701]: FramebufferTextureLayerEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTextureLayer\0"
+ "glFramebufferTextureLayerEXT\0"
+ "\0"
+ /* _mesa_function_pool[2763]: GetListParameterfvSGIX (dynamic) */
+ "iip\0"
+ "glGetListParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[2793]: Viewport (offset 305) */
+ "iiii\0"
+ "glViewport\0"
+ "\0"
+ /* _mesa_function_pool[2810]: VertexAttrib4NusvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nusv\0"
+ "glVertexAttrib4NusvARB\0"
+ "\0"
+ /* _mesa_function_pool[2857]: WindowPos4svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4svMESA\0"
+ "\0"
+ /* _mesa_function_pool[2879]: CreateProgramObjectARB (will be remapped) */
+ "\0"
+ "glCreateProgramObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[2906]: FragmentLightModelivSGIX (dynamic) */
+ "ip\0"
+ "glFragmentLightModelivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[2937]: UniformMatrix4x3fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4x3fv\0"
+ "\0"
+ /* _mesa_function_pool[2964]: PrioritizeTextures (offset 331) */
+ "ipp\0"
+ "glPrioritizeTextures\0"
+ "glPrioritizeTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[3014]: AsyncMarkerSGIX (dynamic) */
+ "i\0"
+ "glAsyncMarkerSGIX\0"
+ "\0"
+ /* _mesa_function_pool[3035]: GlobalAlphaFactorubSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorubSUN\0"
+ "\0"
+ /* _mesa_function_pool[3063]: ClearDebugLogMESA (dynamic) */
+ "iii\0"
+ "glClearDebugLogMESA\0"
+ "\0"
+ /* _mesa_function_pool[3088]: ResetHistogram (offset 369) */
+ "i\0"
+ "glResetHistogram\0"
+ "glResetHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[3128]: GetProgramNamedParameterfvNV (will be remapped) */
+ "iipp\0"
+ "glGetProgramNamedParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[3165]: PointParameterfEXT (will be remapped) */
+ "if\0"
+ "glPointParameterf\0"
+ "glPointParameterfARB\0"
+ "glPointParameterfEXT\0"
+ "glPointParameterfSGIS\0"
+ "\0"
+ /* _mesa_function_pool[3251]: LoadIdentityDeformationMapSGIX (dynamic) */
+ "i\0"
+ "glLoadIdentityDeformationMapSGIX\0"
+ "\0"
+ /* _mesa_function_pool[3287]: GenFencesNV (will be remapped) */
+ "ip\0"
+ "glGenFencesNV\0"
+ "\0"
+ /* _mesa_function_pool[3305]: ImageTransformParameterfHP (dynamic) */
+ "iif\0"
+ "glImageTransformParameterfHP\0"
+ "\0"
+ /* _mesa_function_pool[3339]: MatrixIndexusvARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexusvARB\0"
+ "\0"
+ /* _mesa_function_pool[3363]: DrawElementsBaseVertex (will be remapped) */
+ "iiipi\0"
+ "glDrawElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[3395]: DisableVertexAttribArrayARB (will be remapped) */
+ "i\0"
+ "glDisableVertexAttribArray\0"
+ "glDisableVertexAttribArrayARB\0"
+ "\0"
+ /* _mesa_function_pool[3455]: TexCoord2sv (offset 109) */
+ "p\0"
+ "glTexCoord2sv\0"
+ "\0"
+ /* _mesa_function_pool[3472]: Vertex4dv (offset 143) */
+ "p\0"
+ "glVertex4dv\0"
+ "\0"
+ /* _mesa_function_pool[3487]: StencilMaskSeparate (will be remapped) */
+ "ii\0"
+ "glStencilMaskSeparate\0"
+ "\0"
+ /* _mesa_function_pool[3513]: ProgramLocalParameter4dARB (will be remapped) */
+ "iidddd\0"
+ "glProgramLocalParameter4dARB\0"
+ "\0"
+ /* _mesa_function_pool[3550]: CompressedTexImage3DARB (will be remapped) */
+ "iiiiiiiip\0"
+ "glCompressedTexImage3D\0"
+ "glCompressedTexImage3DARB\0"
+ "\0"
+ /* _mesa_function_pool[3610]: Color3sv (offset 18) */
+ "p\0"
+ "glColor3sv\0"
+ "\0"
+ /* _mesa_function_pool[3624]: GetConvolutionParameteriv (offset 358) */
+ "iip\0"
+ "glGetConvolutionParameteriv\0"
+ "glGetConvolutionParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[3688]: VertexAttrib1fARB (will be remapped) */
+ "if\0"
+ "glVertexAttrib1f\0"
+ "glVertexAttrib1fARB\0"
+ "\0"
+ /* _mesa_function_pool[3729]: Vertex2dv (offset 127) */
+ "p\0"
+ "glVertex2dv\0"
+ "\0"
+ /* _mesa_function_pool[3744]: TestFenceNV (will be remapped) */
+ "i\0"
+ "glTestFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[3761]: MultiTexCoord1fvARB (offset 379) */
+ "ip\0"
+ "glMultiTexCoord1fv\0"
+ "glMultiTexCoord1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[3806]: TexCoord3iv (offset 115) */
+ "p\0"
+ "glTexCoord3iv\0"
+ "\0"
+ /* _mesa_function_pool[3823]: ColorFragmentOp2ATI (will be remapped) */
+ "iiiiiiiiii\0"
+ "glColorFragmentOp2ATI\0"
+ "\0"
+ /* _mesa_function_pool[3857]: SecondaryColorPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glSecondaryColorPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[3895]: GetPixelTexGenParameterivSGIS (will be remapped) */
+ "ip\0"
+ "glGetPixelTexGenParameterivSGIS\0"
+ "\0"
+ /* _mesa_function_pool[3931]: Color3fv (offset 14) */
+ "p\0"
+ "glColor3fv\0"
+ "\0"
+ /* _mesa_function_pool[3945]: VertexAttrib4fNV (will be remapped) */
+ "iffff\0"
+ "glVertexAttrib4fNV\0"
+ "\0"
+ /* _mesa_function_pool[3971]: ReplacementCodeubSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeubSUN\0"
+ "\0"
+ /* _mesa_function_pool[3997]: FinishAsyncSGIX (dynamic) */
+ "p\0"
+ "glFinishAsyncSGIX\0"
+ "\0"
+ /* _mesa_function_pool[4018]: GetDebugLogMESA (dynamic) */
+ "iiiipp\0"
+ "glGetDebugLogMESA\0"
+ "\0"
+ /* _mesa_function_pool[4044]: FogCoorddEXT (will be remapped) */
+ "d\0"
+ "glFogCoordd\0"
+ "glFogCoorddEXT\0"
+ "\0"
+ /* _mesa_function_pool[4074]: Color4ubVertex3fSUN (dynamic) */
+ "iiiifff\0"
+ "glColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[4105]: FogCoordfEXT (will be remapped) */
+ "f\0"
+ "glFogCoordf\0"
+ "glFogCoordfEXT\0"
+ "\0"
+ /* _mesa_function_pool[4135]: PointSize (offset 173) */
+ "f\0"
+ "glPointSize\0"
+ "\0"
+ /* _mesa_function_pool[4150]: TexCoord2fVertex3fSUN (dynamic) */
+ "fffff\0"
+ "glTexCoord2fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[4181]: PopName (offset 200) */
+ "\0"
+ "glPopName\0"
+ "\0"
+ /* _mesa_function_pool[4193]: GlobalAlphaFactoriSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactoriSUN\0"
+ "\0"
+ /* _mesa_function_pool[4220]: VertexAttrib2dNV (will be remapped) */
+ "idd\0"
+ "glVertexAttrib2dNV\0"
+ "\0"
+ /* _mesa_function_pool[4244]: GetProgramInfoLog (will be remapped) */
+ "iipp\0"
+ "glGetProgramInfoLog\0"
+ "\0"
+ /* _mesa_function_pool[4270]: VertexAttrib4NbvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nbv\0"
+ "glVertexAttrib4NbvARB\0"
+ "\0"
+ /* _mesa_function_pool[4315]: GetActiveAttribARB (will be remapped) */
+ "iiipppp\0"
+ "glGetActiveAttrib\0"
+ "glGetActiveAttribARB\0"
+ "\0"
+ /* _mesa_function_pool[4363]: Vertex4sv (offset 149) */
+ "p\0"
+ "glVertex4sv\0"
+ "\0"
+ /* _mesa_function_pool[4378]: VertexAttrib4ubNV (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4ubNV\0"
+ "\0"
+ /* _mesa_function_pool[4405]: TextureRangeAPPLE (will be remapped) */
+ "iip\0"
+ "glTextureRangeAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[4430]: GetTexEnvfv (offset 276) */
+ "iip\0"
+ "glGetTexEnvfv\0"
+ "\0"
+ /* _mesa_function_pool[4449]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ "ffffffffffff\0"
+ "glTexCoord2fColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[4502]: Indexub (offset 315) */
+ "i\0"
+ "glIndexub\0"
+ "\0"
+ /* _mesa_function_pool[4515]: TexEnvi (offset 186) */
+ "iii\0"
+ "glTexEnvi\0"
+ "\0"
+ /* _mesa_function_pool[4530]: GetClipPlane (offset 259) */
+ "ip\0"
+ "glGetClipPlane\0"
+ "\0"
+ /* _mesa_function_pool[4549]: CombinerParameterfvNV (will be remapped) */
+ "ip\0"
+ "glCombinerParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[4577]: VertexAttribs3dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3dvNV\0"
+ "\0"
+ /* _mesa_function_pool[4603]: VertexAttribs4fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[4629]: VertexArrayRangeNV (will be remapped) */
+ "ip\0"
+ "glVertexArrayRangeNV\0"
+ "\0"
+ /* _mesa_function_pool[4654]: FragmentLightiSGIX (dynamic) */
+ "iii\0"
+ "glFragmentLightiSGIX\0"
+ "\0"
+ /* _mesa_function_pool[4680]: PolygonOffsetEXT (will be remapped) */
+ "ff\0"
+ "glPolygonOffsetEXT\0"
+ "\0"
+ /* _mesa_function_pool[4703]: PollAsyncSGIX (dynamic) */
+ "p\0"
+ "glPollAsyncSGIX\0"
+ "\0"
+ /* _mesa_function_pool[4722]: DeleteFragmentShaderATI (will be remapped) */
+ "i\0"
+ "glDeleteFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[4751]: Scaled (offset 301) */
+ "ddd\0"
+ "glScaled\0"
+ "\0"
+ /* _mesa_function_pool[4765]: Scalef (offset 302) */
+ "fff\0"
+ "glScalef\0"
+ "\0"
+ /* _mesa_function_pool[4779]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[4817]: MultTransposeMatrixdARB (will be remapped) */
+ "p\0"
+ "glMultTransposeMatrixd\0"
+ "glMultTransposeMatrixdARB\0"
+ "\0"
+ /* _mesa_function_pool[4869]: AlphaFunc (offset 240) */
+ "if\0"
+ "glAlphaFunc\0"
+ "\0"
+ /* _mesa_function_pool[4885]: WindowPos2svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2sv\0"
+ "glWindowPos2svARB\0"
+ "glWindowPos2svMESA\0"
+ "\0"
+ /* _mesa_function_pool[4940]: EdgeFlag (offset 41) */
+ "i\0"
+ "glEdgeFlag\0"
+ "\0"
+ /* _mesa_function_pool[4954]: TexCoord2iv (offset 107) */
+ "p\0"
+ "glTexCoord2iv\0"
+ "\0"
+ /* _mesa_function_pool[4971]: CompressedTexImage1DARB (will be remapped) */
+ "iiiiiip\0"
+ "glCompressedTexImage1D\0"
+ "glCompressedTexImage1DARB\0"
+ "\0"
+ /* _mesa_function_pool[5029]: Rotated (offset 299) */
+ "dddd\0"
+ "glRotated\0"
+ "\0"
+ /* _mesa_function_pool[5045]: VertexAttrib2sNV (will be remapped) */
+ "iii\0"
+ "glVertexAttrib2sNV\0"
+ "\0"
+ /* _mesa_function_pool[5069]: ReadPixels (offset 256) */
+ "iiiiiip\0"
+ "glReadPixels\0"
+ "\0"
+ /* _mesa_function_pool[5091]: EdgeFlagv (offset 42) */
+ "p\0"
+ "glEdgeFlagv\0"
+ "\0"
+ /* _mesa_function_pool[5106]: NormalPointerListIBM (dynamic) */
+ "iipi\0"
+ "glNormalPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[5135]: IndexPointerEXT (will be remapped) */
+ "iiip\0"
+ "glIndexPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[5159]: Color4iv (offset 32) */
+ "p\0"
+ "glColor4iv\0"
+ "\0"
+ /* _mesa_function_pool[5173]: TexParameterf (offset 178) */
+ "iif\0"
+ "glTexParameterf\0"
+ "\0"
+ /* _mesa_function_pool[5194]: TexParameteri (offset 180) */
+ "iii\0"
+ "glTexParameteri\0"
+ "\0"
+ /* _mesa_function_pool[5215]: NormalPointerEXT (will be remapped) */
+ "iiip\0"
+ "glNormalPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[5240]: MultiTexCoord3dARB (offset 392) */
+ "iddd\0"
+ "glMultiTexCoord3d\0"
+ "glMultiTexCoord3dARB\0"
+ "\0"
+ /* _mesa_function_pool[5285]: MultiTexCoord2iARB (offset 388) */
+ "iii\0"
+ "glMultiTexCoord2i\0"
+ "glMultiTexCoord2iARB\0"
+ "\0"
+ /* _mesa_function_pool[5329]: DrawPixels (offset 257) */
+ "iiiip\0"
+ "glDrawPixels\0"
+ "\0"
+ /* _mesa_function_pool[5349]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ "iffffffff\0"
+ "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[5409]: MultiTexCoord2svARB (offset 391) */
+ "ip\0"
+ "glMultiTexCoord2sv\0"
+ "glMultiTexCoord2svARB\0"
+ "\0"
+ /* _mesa_function_pool[5454]: ReplacementCodeubvSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeubvSUN\0"
+ "\0"
+ /* _mesa_function_pool[5481]: Uniform3iARB (will be remapped) */
+ "iiii\0"
+ "glUniform3i\0"
+ "glUniform3iARB\0"
+ "\0"
+ /* _mesa_function_pool[5514]: GetFragmentMaterialfvSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentMaterialfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[5547]: GetShaderInfoLog (will be remapped) */
+ "iipp\0"
+ "glGetShaderInfoLog\0"
+ "\0"
+ /* _mesa_function_pool[5572]: WeightivARB (dynamic) */
+ "ip\0"
+ "glWeightivARB\0"
+ "\0"
+ /* _mesa_function_pool[5590]: PollInstrumentsSGIX (dynamic) */
+ "p\0"
+ "glPollInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[5615]: GlobalAlphaFactordSUN (dynamic) */
+ "d\0"
+ "glGlobalAlphaFactordSUN\0"
+ "\0"
+ /* _mesa_function_pool[5642]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ "iip\0"
+ "glGetFinalCombinerInputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[5684]: GenerateMipmapEXT (will be remapped) */
+ "i\0"
+ "glGenerateMipmap\0"
+ "glGenerateMipmapEXT\0"
+ "\0"
+ /* _mesa_function_pool[5724]: GenLists (offset 5) */
+ "i\0"
+ "glGenLists\0"
+ "\0"
+ /* _mesa_function_pool[5738]: SetFragmentShaderConstantATI (will be remapped) */
+ "ip\0"
+ "glSetFragmentShaderConstantATI\0"
+ "\0"
+ /* _mesa_function_pool[5773]: GetMapAttribParameterivNV (dynamic) */
+ "iiip\0"
+ "glGetMapAttribParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[5807]: CreateShaderObjectARB (will be remapped) */
+ "i\0"
+ "glCreateShaderObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[5834]: GetSharpenTexFuncSGIS (dynamic) */
+ "ip\0"
+ "glGetSharpenTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[5862]: BufferDataARB (will be remapped) */
+ "iipi\0"
+ "glBufferData\0"
+ "glBufferDataARB\0"
+ "\0"
+ /* _mesa_function_pool[5897]: FlushVertexArrayRangeNV (will be remapped) */
+ "\0"
+ "glFlushVertexArrayRangeNV\0"
+ "\0"
+ /* _mesa_function_pool[5925]: MapGrid2d (offset 226) */
+ "iddidd\0"
+ "glMapGrid2d\0"
+ "\0"
+ /* _mesa_function_pool[5945]: MapGrid2f (offset 227) */
+ "iffiff\0"
+ "glMapGrid2f\0"
+ "\0"
+ /* _mesa_function_pool[5965]: SampleMapATI (will be remapped) */
+ "iii\0"
+ "glSampleMapATI\0"
+ "\0"
+ /* _mesa_function_pool[5985]: VertexPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glVertexPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[6011]: GetTexFilterFuncSGIS (dynamic) */
+ "iip\0"
+ "glGetTexFilterFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[6039]: Scissor (offset 176) */
+ "iiii\0"
+ "glScissor\0"
+ "\0"
+ /* _mesa_function_pool[6055]: Fogf (offset 153) */
+ "if\0"
+ "glFogf\0"
+ "\0"
+ /* _mesa_function_pool[6066]: GetCombinerOutputParameterfvNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[6105]: TexSubImage1D (offset 332) */
+ "iiiiiip\0"
+ "glTexSubImage1D\0"
+ "glTexSubImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[6149]: VertexAttrib1sARB (will be remapped) */
+ "ii\0"
+ "glVertexAttrib1s\0"
+ "glVertexAttrib1sARB\0"
+ "\0"
+ /* _mesa_function_pool[6190]: FenceSync (will be remapped) */
+ "ii\0"
+ "glFenceSync\0"
+ "\0"
+ /* _mesa_function_pool[6206]: Color4usv (offset 40) */
+ "p\0"
+ "glColor4usv\0"
+ "\0"
+ /* _mesa_function_pool[6221]: Fogi (offset 155) */
+ "ii\0"
+ "glFogi\0"
+ "\0"
+ /* _mesa_function_pool[6232]: DepthRange (offset 288) */
+ "dd\0"
+ "glDepthRange\0"
+ "\0"
+ /* _mesa_function_pool[6249]: RasterPos3iv (offset 75) */
+ "p\0"
+ "glRasterPos3iv\0"
+ "\0"
+ /* _mesa_function_pool[6267]: FinalCombinerInputNV (will be remapped) */
+ "iiii\0"
+ "glFinalCombinerInputNV\0"
+ "\0"
+ /* _mesa_function_pool[6296]: TexCoord2i (offset 106) */
+ "ii\0"
+ "glTexCoord2i\0"
+ "\0"
+ /* _mesa_function_pool[6313]: PixelMapfv (offset 251) */
+ "iip\0"
+ "glPixelMapfv\0"
+ "\0"
+ /* _mesa_function_pool[6331]: Color4ui (offset 37) */
+ "iiii\0"
+ "glColor4ui\0"
+ "\0"
+ /* _mesa_function_pool[6348]: RasterPos3s (offset 76) */
+ "iii\0"
+ "glRasterPos3s\0"
+ "\0"
+ /* _mesa_function_pool[6367]: Color3usv (offset 24) */
+ "p\0"
+ "glColor3usv\0"
+ "\0"
+ /* _mesa_function_pool[6382]: FlushRasterSGIX (dynamic) */
+ "\0"
+ "glFlushRasterSGIX\0"
+ "\0"
+ /* _mesa_function_pool[6402]: TexCoord2f (offset 104) */
+ "ff\0"
+ "glTexCoord2f\0"
+ "\0"
+ /* _mesa_function_pool[6419]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ "ifffff\0"
+ "glReplacementCodeuiTexCoord2fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[6468]: TexCoord2d (offset 102) */
+ "dd\0"
+ "glTexCoord2d\0"
+ "\0"
+ /* _mesa_function_pool[6485]: RasterPos3d (offset 70) */
+ "ddd\0"
+ "glRasterPos3d\0"
+ "\0"
+ /* _mesa_function_pool[6504]: RasterPos3f (offset 72) */
+ "fff\0"
+ "glRasterPos3f\0"
+ "\0"
+ /* _mesa_function_pool[6523]: Uniform1fARB (will be remapped) */
+ "if\0"
+ "glUniform1f\0"
+ "glUniform1fARB\0"
+ "\0"
+ /* _mesa_function_pool[6554]: AreTexturesResident (offset 322) */
+ "ipp\0"
+ "glAreTexturesResident\0"
+ "glAreTexturesResidentEXT\0"
+ "\0"
+ /* _mesa_function_pool[6606]: TexCoord2s (offset 108) */
+ "ii\0"
+ "glTexCoord2s\0"
+ "\0"
+ /* _mesa_function_pool[6623]: StencilOpSeparate (will be remapped) */
+ "iiii\0"
+ "glStencilOpSeparate\0"
+ "glStencilOpSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[6672]: ColorTableParameteriv (offset 341) */
+ "iip\0"
+ "glColorTableParameteriv\0"
+ "glColorTableParameterivSGI\0"
+ "\0"
+ /* _mesa_function_pool[6728]: FogCoordPointerListIBM (dynamic) */
+ "iipi\0"
+ "glFogCoordPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[6759]: WindowPos3dMESA (will be remapped) */
+ "ddd\0"
+ "glWindowPos3d\0"
+ "glWindowPos3dARB\0"
+ "glWindowPos3dMESA\0"
+ "\0"
+ /* _mesa_function_pool[6813]: Color4us (offset 39) */
+ "iiii\0"
+ "glColor4us\0"
+ "\0"
+ /* _mesa_function_pool[6830]: PointParameterfvEXT (will be remapped) */
+ "ip\0"
+ "glPointParameterfv\0"
+ "glPointParameterfvARB\0"
+ "glPointParameterfvEXT\0"
+ "glPointParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[6920]: Color3bv (offset 10) */
+ "p\0"
+ "glColor3bv\0"
+ "\0"
+ /* _mesa_function_pool[6934]: WindowPos2fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2fv\0"
+ "glWindowPos2fvARB\0"
+ "glWindowPos2fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[6989]: SecondaryColor3bvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3bv\0"
+ "glSecondaryColor3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[7035]: VertexPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glVertexPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[7065]: GetProgramLocalParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramLocalParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[7102]: FragmentMaterialfSGIX (dynamic) */
+ "iif\0"
+ "glFragmentMaterialfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[7131]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord2fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[7173]: RenderbufferStorageEXT (will be remapped) */
+ "iiii\0"
+ "glRenderbufferStorage\0"
+ "glRenderbufferStorageEXT\0"
+ "\0"
+ /* _mesa_function_pool[7226]: IsFenceNV (will be remapped) */
+ "i\0"
+ "glIsFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[7241]: AttachObjectARB (will be remapped) */
+ "ii\0"
+ "glAttachObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[7263]: GetFragmentLightivSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentLightivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[7293]: UniformMatrix2fvARB (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2fv\0"
+ "glUniformMatrix2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[7340]: MultiTexCoord2fARB (offset 386) */
+ "iff\0"
+ "glMultiTexCoord2f\0"
+ "glMultiTexCoord2fARB\0"
+ "\0"
+ /* _mesa_function_pool[7384]: ColorTable (offset 339) */
+ "iiiiip\0"
+ "glColorTable\0"
+ "glColorTableSGI\0"
+ "glColorTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[7437]: IndexPointer (offset 314) */
+ "iip\0"
+ "glIndexPointer\0"
+ "\0"
+ /* _mesa_function_pool[7457]: Accum (offset 213) */
+ "if\0"
+ "glAccum\0"
+ "\0"
+ /* _mesa_function_pool[7469]: GetTexImage (offset 281) */
+ "iiiip\0"
+ "glGetTexImage\0"
+ "\0"
+ /* _mesa_function_pool[7490]: MapControlPointsNV (dynamic) */
+ "iiiiiiiip\0"
+ "glMapControlPointsNV\0"
+ "\0"
+ /* _mesa_function_pool[7522]: ConvolutionFilter2D (offset 349) */
+ "iiiiiip\0"
+ "glConvolutionFilter2D\0"
+ "glConvolutionFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[7578]: Finish (offset 216) */
+ "\0"
+ "glFinish\0"
+ "\0"
+ /* _mesa_function_pool[7589]: MapParameterfvNV (dynamic) */
+ "iip\0"
+ "glMapParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[7613]: ClearStencil (offset 207) */
+ "i\0"
+ "glClearStencil\0"
+ "\0"
+ /* _mesa_function_pool[7631]: VertexAttrib3dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3dv\0"
+ "glVertexAttrib3dvARB\0"
+ "\0"
+ /* _mesa_function_pool[7674]: HintPGI (dynamic) */
+ "ii\0"
+ "glHintPGI\0"
+ "\0"
+ /* _mesa_function_pool[7688]: ConvolutionParameteriv (offset 353) */
+ "iip\0"
+ "glConvolutionParameteriv\0"
+ "glConvolutionParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[7746]: Color4s (offset 33) */
+ "iiii\0"
+ "glColor4s\0"
+ "\0"
+ /* _mesa_function_pool[7762]: InterleavedArrays (offset 317) */
+ "iip\0"
+ "glInterleavedArrays\0"
+ "\0"
+ /* _mesa_function_pool[7787]: RasterPos2fv (offset 65) */
+ "p\0"
+ "glRasterPos2fv\0"
+ "\0"
+ /* _mesa_function_pool[7805]: TexCoord1fv (offset 97) */
+ "p\0"
+ "glTexCoord1fv\0"
+ "\0"
+ /* _mesa_function_pool[7822]: Vertex2d (offset 126) */
+ "dd\0"
+ "glVertex2d\0"
+ "\0"
+ /* _mesa_function_pool[7837]: CullParameterdvEXT (will be remapped) */
+ "ip\0"
+ "glCullParameterdvEXT\0"
+ "\0"
+ /* _mesa_function_pool[7862]: ProgramNamedParameter4fNV (will be remapped) */
+ "iipffff\0"
+ "glProgramNamedParameter4fNV\0"
+ "\0"
+ /* _mesa_function_pool[7899]: Color3fVertex3fSUN (dynamic) */
+ "ffffff\0"
+ "glColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[7928]: ProgramEnvParameter4fvARB (will be remapped) */
+ "iip\0"
+ "glProgramEnvParameter4fvARB\0"
+ "glProgramParameter4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[7985]: Color4i (offset 31) */
+ "iiii\0"
+ "glColor4i\0"
+ "\0"
+ /* _mesa_function_pool[8001]: Color4f (offset 29) */
+ "ffff\0"
+ "glColor4f\0"
+ "\0"
+ /* _mesa_function_pool[8017]: RasterPos4fv (offset 81) */
+ "p\0"
+ "glRasterPos4fv\0"
+ "\0"
+ /* _mesa_function_pool[8035]: Color4d (offset 27) */
+ "dddd\0"
+ "glColor4d\0"
+ "\0"
+ /* _mesa_function_pool[8051]: ClearIndex (offset 205) */
+ "f\0"
+ "glClearIndex\0"
+ "\0"
+ /* _mesa_function_pool[8067]: Color4b (offset 25) */
+ "iiii\0"
+ "glColor4b\0"
+ "\0"
+ /* _mesa_function_pool[8083]: LoadMatrixd (offset 292) */
+ "p\0"
+ "glLoadMatrixd\0"
+ "\0"
+ /* _mesa_function_pool[8100]: FragmentLightModeliSGIX (dynamic) */
+ "ii\0"
+ "glFragmentLightModeliSGIX\0"
+ "\0"
+ /* _mesa_function_pool[8130]: RasterPos2dv (offset 63) */
+ "p\0"
+ "glRasterPos2dv\0"
+ "\0"
+ /* _mesa_function_pool[8148]: ConvolutionParameterfv (offset 351) */
+ "iip\0"
+ "glConvolutionParameterfv\0"
+ "glConvolutionParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[8206]: TbufferMask3DFX (dynamic) */
+ "i\0"
+ "glTbufferMask3DFX\0"
+ "\0"
+ /* _mesa_function_pool[8227]: GetTexGendv (offset 278) */
+ "iip\0"
+ "glGetTexGendv\0"
+ "\0"
+ /* _mesa_function_pool[8246]: LoadProgramNV (will be remapped) */
+ "iiip\0"
+ "glLoadProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[8268]: WaitSync (will be remapped) */
+ "iii\0"
+ "glWaitSync\0"
+ "\0"
+ /* _mesa_function_pool[8284]: EndList (offset 1) */
+ "\0"
+ "glEndList\0"
+ "\0"
+ /* _mesa_function_pool[8296]: VertexAttrib4fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[8320]: GetAttachedObjectsARB (will be remapped) */
+ "iipp\0"
+ "glGetAttachedObjectsARB\0"
+ "\0"
+ /* _mesa_function_pool[8350]: Uniform3fvARB (will be remapped) */
+ "iip\0"
+ "glUniform3fv\0"
+ "glUniform3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[8384]: EvalCoord1fv (offset 231) */
+ "p\0"
+ "glEvalCoord1fv\0"
+ "\0"
+ /* _mesa_function_pool[8402]: DrawRangeElements (offset 338) */
+ "iiiiip\0"
+ "glDrawRangeElements\0"
+ "glDrawRangeElementsEXT\0"
+ "\0"
+ /* _mesa_function_pool[8453]: EvalMesh2 (offset 238) */
+ "iiiii\0"
+ "glEvalMesh2\0"
+ "\0"
+ /* _mesa_function_pool[8472]: Vertex4fv (offset 145) */
+ "p\0"
+ "glVertex4fv\0"
+ "\0"
+ /* _mesa_function_pool[8487]: SpriteParameterfvSGIX (dynamic) */
+ "ip\0"
+ "glSpriteParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[8515]: CheckFramebufferStatusEXT (will be remapped) */
+ "i\0"
+ "glCheckFramebufferStatus\0"
+ "glCheckFramebufferStatusEXT\0"
+ "\0"
+ /* _mesa_function_pool[8571]: GlobalAlphaFactoruiSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactoruiSUN\0"
+ "\0"
+ /* _mesa_function_pool[8599]: GetHandleARB (will be remapped) */
+ "i\0"
+ "glGetHandleARB\0"
+ "\0"
+ /* _mesa_function_pool[8617]: GetVertexAttribivARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribiv\0"
+ "glGetVertexAttribivARB\0"
+ "\0"
+ /* _mesa_function_pool[8665]: GetCombinerInputParameterfvNV (will be remapped) */
+ "iiiip\0"
+ "glGetCombinerInputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[8704]: CreateProgram (will be remapped) */
+ "\0"
+ "glCreateProgram\0"
+ "\0"
+ /* _mesa_function_pool[8722]: LoadTransposeMatrixdARB (will be remapped) */
+ "p\0"
+ "glLoadTransposeMatrixd\0"
+ "glLoadTransposeMatrixdARB\0"
+ "\0"
+ /* _mesa_function_pool[8774]: GetMinmax (offset 364) */
+ "iiiip\0"
+ "glGetMinmax\0"
+ "glGetMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[8808]: StencilFuncSeparate (will be remapped) */
+ "iiii\0"
+ "glStencilFuncSeparate\0"
+ "\0"
+ /* _mesa_function_pool[8836]: SecondaryColor3sEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3s\0"
+ "glSecondaryColor3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[8882]: Color3fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[8908]: Normal3fv (offset 57) */
+ "p\0"
+ "glNormal3fv\0"
+ "\0"
+ /* _mesa_function_pool[8923]: GlobalAlphaFactorbSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorbSUN\0"
+ "\0"
+ /* _mesa_function_pool[8950]: Color3us (offset 23) */
+ "iii\0"
+ "glColor3us\0"
+ "\0"
+ /* _mesa_function_pool[8966]: ImageTransformParameterfvHP (dynamic) */
+ "iip\0"
+ "glImageTransformParameterfvHP\0"
+ "\0"
+ /* _mesa_function_pool[9001]: VertexAttrib4ivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4iv\0"
+ "glVertexAttrib4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[9044]: End (offset 43) */
+ "\0"
+ "glEnd\0"
+ "\0"
+ /* _mesa_function_pool[9052]: VertexAttrib3fNV (will be remapped) */
+ "ifff\0"
+ "glVertexAttrib3fNV\0"
+ "\0"
+ /* _mesa_function_pool[9077]: VertexAttribs2dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2dvNV\0"
+ "\0"
+ /* _mesa_function_pool[9103]: GetQueryObjectui64vEXT (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectui64vEXT\0"
+ "\0"
+ /* _mesa_function_pool[9133]: MultiTexCoord3fvARB (offset 395) */
+ "ip\0"
+ "glMultiTexCoord3fv\0"
+ "glMultiTexCoord3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[9178]: SecondaryColor3dEXT (will be remapped) */
+ "ddd\0"
+ "glSecondaryColor3d\0"
+ "glSecondaryColor3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[9224]: Color3ub (offset 19) */
+ "iii\0"
+ "glColor3ub\0"
+ "\0"
+ /* _mesa_function_pool[9240]: GetProgramParameterfvNV (will be remapped) */
+ "iiip\0"
+ "glGetProgramParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[9272]: TangentPointerEXT (dynamic) */
+ "iip\0"
+ "glTangentPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[9297]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[9332]: GetInstrumentsSGIX (dynamic) */
+ "\0"
+ "glGetInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[9355]: Color3ui (offset 21) */
+ "iii\0"
+ "glColor3ui\0"
+ "\0"
+ /* _mesa_function_pool[9371]: EvalMapsNV (dynamic) */
+ "ii\0"
+ "glEvalMapsNV\0"
+ "\0"
+ /* _mesa_function_pool[9388]: TexSubImage2D (offset 333) */
+ "iiiiiiiip\0"
+ "glTexSubImage2D\0"
+ "glTexSubImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[9434]: FragmentLightivSGIX (dynamic) */
+ "iip\0"
+ "glFragmentLightivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[9461]: GetTexParameterPointervAPPLE (will be remapped) */
+ "iip\0"
+ "glGetTexParameterPointervAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[9497]: TexGenfv (offset 191) */
+ "iip\0"
+ "glTexGenfv\0"
+ "\0"
+ /* _mesa_function_pool[9513]: PixelTransformParameterfvEXT (dynamic) */
+ "iip\0"
+ "glPixelTransformParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[9549]: VertexAttrib4bvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4bv\0"
+ "glVertexAttrib4bvARB\0"
+ "\0"
+ /* _mesa_function_pool[9592]: AlphaFragmentOp2ATI (will be remapped) */
+ "iiiiiiiii\0"
+ "glAlphaFragmentOp2ATI\0"
+ "\0"
+ /* _mesa_function_pool[9625]: MultiTexCoord4sARB (offset 406) */
+ "iiiii\0"
+ "glMultiTexCoord4s\0"
+ "glMultiTexCoord4sARB\0"
+ "\0"
+ /* _mesa_function_pool[9671]: GetFragmentMaterialivSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentMaterialivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[9704]: WindowPos4dMESA (will be remapped) */
+ "dddd\0"
+ "glWindowPos4dMESA\0"
+ "\0"
+ /* _mesa_function_pool[9728]: WeightPointerARB (dynamic) */
+ "iiip\0"
+ "glWeightPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[9753]: WindowPos2dMESA (will be remapped) */
+ "dd\0"
+ "glWindowPos2d\0"
+ "glWindowPos2dARB\0"
+ "glWindowPos2dMESA\0"
+ "\0"
+ /* _mesa_function_pool[9806]: FramebufferTexture3DEXT (will be remapped) */
+ "iiiiii\0"
+ "glFramebufferTexture3D\0"
+ "glFramebufferTexture3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[9863]: BlendEquation (offset 337) */
+ "i\0"
+ "glBlendEquation\0"
+ "glBlendEquationEXT\0"
+ "\0"
+ /* _mesa_function_pool[9901]: VertexAttrib3dNV (will be remapped) */
+ "iddd\0"
+ "glVertexAttrib3dNV\0"
+ "\0"
+ /* _mesa_function_pool[9926]: VertexAttrib3dARB (will be remapped) */
+ "iddd\0"
+ "glVertexAttrib3d\0"
+ "glVertexAttrib3dARB\0"
+ "\0"
+ /* _mesa_function_pool[9969]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ "ppppp\0"
+ "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[10033]: VertexAttrib4fARB (will be remapped) */
+ "iffff\0"
+ "glVertexAttrib4f\0"
+ "glVertexAttrib4fARB\0"
+ "\0"
+ /* _mesa_function_pool[10077]: GetError (offset 261) */
+ "\0"
+ "glGetError\0"
+ "\0"
+ /* _mesa_function_pool[10090]: IndexFuncEXT (dynamic) */
+ "if\0"
+ "glIndexFuncEXT\0"
+ "\0"
+ /* _mesa_function_pool[10109]: TexCoord3dv (offset 111) */
+ "p\0"
+ "glTexCoord3dv\0"
+ "\0"
+ /* _mesa_function_pool[10126]: Indexdv (offset 45) */
+ "p\0"
+ "glIndexdv\0"
+ "\0"
+ /* _mesa_function_pool[10139]: FramebufferTexture2DEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTexture2D\0"
+ "glFramebufferTexture2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[10195]: Normal3s (offset 60) */
+ "iii\0"
+ "glNormal3s\0"
+ "\0"
+ /* _mesa_function_pool[10211]: PushName (offset 201) */
+ "i\0"
+ "glPushName\0"
+ "\0"
+ /* _mesa_function_pool[10225]: MultiTexCoord2dvARB (offset 385) */
+ "ip\0"
+ "glMultiTexCoord2dv\0"
+ "glMultiTexCoord2dvARB\0"
+ "\0"
+ /* _mesa_function_pool[10270]: CullParameterfvEXT (will be remapped) */
+ "ip\0"
+ "glCullParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[10295]: Normal3i (offset 58) */
+ "iii\0"
+ "glNormal3i\0"
+ "\0"
+ /* _mesa_function_pool[10311]: ProgramNamedParameter4fvNV (will be remapped) */
+ "iipp\0"
+ "glProgramNamedParameter4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[10346]: SecondaryColorPointerEXT (will be remapped) */
+ "iiip\0"
+ "glSecondaryColorPointer\0"
+ "glSecondaryColorPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[10403]: VertexAttrib4fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4fv\0"
+ "glVertexAttrib4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[10446]: ColorPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glColorPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[10475]: GetActiveUniformARB (will be remapped) */
+ "iiipppp\0"
+ "glGetActiveUniform\0"
+ "glGetActiveUniformARB\0"
+ "\0"
+ /* _mesa_function_pool[10525]: ImageTransformParameteriHP (dynamic) */
+ "iii\0"
+ "glImageTransformParameteriHP\0"
+ "\0"
+ /* _mesa_function_pool[10559]: Normal3b (offset 52) */
+ "iii\0"
+ "glNormal3b\0"
+ "\0"
+ /* _mesa_function_pool[10575]: Normal3d (offset 54) */
+ "ddd\0"
+ "glNormal3d\0"
+ "\0"
+ /* _mesa_function_pool[10591]: Normal3f (offset 56) */
+ "fff\0"
+ "glNormal3f\0"
+ "\0"
+ /* _mesa_function_pool[10607]: MultiTexCoord1svARB (offset 383) */
+ "ip\0"
+ "glMultiTexCoord1sv\0"
+ "glMultiTexCoord1svARB\0"
+ "\0"
+ /* _mesa_function_pool[10652]: Indexi (offset 48) */
+ "i\0"
+ "glIndexi\0"
+ "\0"
+ /* _mesa_function_pool[10664]: EndQueryARB (will be remapped) */
+ "i\0"
+ "glEndQuery\0"
+ "glEndQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[10692]: DeleteFencesNV (will be remapped) */
+ "ip\0"
+ "glDeleteFencesNV\0"
+ "\0"
+ /* _mesa_function_pool[10713]: DeformationMap3dSGIX (dynamic) */
+ "iddiiddiiddiip\0"
+ "glDeformationMap3dSGIX\0"
+ "\0"
+ /* _mesa_function_pool[10752]: DepthMask (offset 211) */
+ "i\0"
+ "glDepthMask\0"
+ "\0"
+ /* _mesa_function_pool[10767]: IsShader (will be remapped) */
+ "i\0"
+ "glIsShader\0"
+ "\0"
+ /* _mesa_function_pool[10781]: Indexf (offset 46) */
+ "f\0"
+ "glIndexf\0"
+ "\0"
+ /* _mesa_function_pool[10793]: GetImageTransformParameterivHP (dynamic) */
+ "iip\0"
+ "glGetImageTransformParameterivHP\0"
+ "\0"
+ /* _mesa_function_pool[10831]: Indexd (offset 44) */
+ "d\0"
+ "glIndexd\0"
+ "\0"
+ /* _mesa_function_pool[10843]: GetMaterialiv (offset 270) */
+ "iip\0"
+ "glGetMaterialiv\0"
+ "\0"
+ /* _mesa_function_pool[10864]: StencilOp (offset 244) */
+ "iii\0"
+ "glStencilOp\0"
+ "\0"
+ /* _mesa_function_pool[10881]: WindowPos4ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[10903]: MultiTexCoord3svARB (offset 399) */
+ "ip\0"
+ "glMultiTexCoord3sv\0"
+ "glMultiTexCoord3svARB\0"
+ "\0"
+ /* _mesa_function_pool[10948]: TexEnvfv (offset 185) */
+ "iip\0"
+ "glTexEnvfv\0"
+ "\0"
+ /* _mesa_function_pool[10964]: MultiTexCoord4iARB (offset 404) */
+ "iiiii\0"
+ "glMultiTexCoord4i\0"
+ "glMultiTexCoord4iARB\0"
+ "\0"
+ /* _mesa_function_pool[11010]: Indexs (offset 50) */
+ "i\0"
+ "glIndexs\0"
+ "\0"
+ /* _mesa_function_pool[11022]: Binormal3ivEXT (dynamic) */
+ "p\0"
+ "glBinormal3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[11042]: ResizeBuffersMESA (will be remapped) */
+ "\0"
+ "glResizeBuffersMESA\0"
+ "\0"
+ /* _mesa_function_pool[11064]: GetUniformivARB (will be remapped) */
+ "iip\0"
+ "glGetUniformiv\0"
+ "glGetUniformivARB\0"
+ "\0"
+ /* _mesa_function_pool[11102]: PixelTexGenParameteriSGIS (will be remapped) */
+ "ii\0"
+ "glPixelTexGenParameteriSGIS\0"
+ "\0"
+ /* _mesa_function_pool[11134]: VertexPointervINTEL (dynamic) */
+ "iip\0"
+ "glVertexPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[11161]: Vertex2i (offset 130) */
+ "ii\0"
+ "glVertex2i\0"
+ "\0"
+ /* _mesa_function_pool[11176]: LoadMatrixf (offset 291) */
+ "p\0"
+ "glLoadMatrixf\0"
+ "\0"
+ /* _mesa_function_pool[11193]: Vertex2f (offset 128) */
+ "ff\0"
+ "glVertex2f\0"
+ "\0"
+ /* _mesa_function_pool[11208]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[11261]: Color4bv (offset 26) */
+ "p\0"
+ "glColor4bv\0"
+ "\0"
+ /* _mesa_function_pool[11275]: VertexPointer (offset 321) */
+ "iiip\0"
+ "glVertexPointer\0"
+ "\0"
+ /* _mesa_function_pool[11297]: SecondaryColor3uiEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3ui\0"
+ "glSecondaryColor3uiEXT\0"
+ "\0"
+ /* _mesa_function_pool[11345]: StartInstrumentsSGIX (dynamic) */
+ "\0"
+ "glStartInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[11370]: SecondaryColor3usvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3usv\0"
+ "glSecondaryColor3usvEXT\0"
+ "\0"
+ /* _mesa_function_pool[11418]: VertexAttrib2fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2fvNV\0"
+ "\0"
+ /* _mesa_function_pool[11442]: ProgramLocalParameter4dvARB (will be remapped) */
+ "iip\0"
+ "glProgramLocalParameter4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[11477]: DeleteLists (offset 4) */
+ "ii\0"
+ "glDeleteLists\0"
+ "\0"
+ /* _mesa_function_pool[11495]: LogicOp (offset 242) */
+ "i\0"
+ "glLogicOp\0"
+ "\0"
+ /* _mesa_function_pool[11508]: MatrixIndexuivARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexuivARB\0"
+ "\0"
+ /* _mesa_function_pool[11532]: Vertex2s (offset 132) */
+ "ii\0"
+ "glVertex2s\0"
+ "\0"
+ /* _mesa_function_pool[11547]: RenderbufferStorageMultisample (will be remapped) */
+ "iiiii\0"
+ "glRenderbufferStorageMultisample\0"
+ "glRenderbufferStorageMultisampleEXT\0"
+ "\0"
+ /* _mesa_function_pool[11623]: TexCoord4fv (offset 121) */
+ "p\0"
+ "glTexCoord4fv\0"
+ "\0"
+ /* _mesa_function_pool[11640]: Tangent3sEXT (dynamic) */
+ "iii\0"
+ "glTangent3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[11660]: GlobalAlphaFactorfSUN (dynamic) */
+ "f\0"
+ "glGlobalAlphaFactorfSUN\0"
+ "\0"
+ /* _mesa_function_pool[11687]: MultiTexCoord3iARB (offset 396) */
+ "iiii\0"
+ "glMultiTexCoord3i\0"
+ "glMultiTexCoord3iARB\0"
+ "\0"
+ /* _mesa_function_pool[11732]: IsProgram (will be remapped) */
+ "i\0"
+ "glIsProgram\0"
+ "\0"
+ /* _mesa_function_pool[11747]: TexCoordPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glTexCoordPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[11779]: GlobalAlphaFactorusSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorusSUN\0"
+ "\0"
+ /* _mesa_function_pool[11807]: VertexAttrib2dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2dvNV\0"
+ "\0"
+ /* _mesa_function_pool[11831]: FramebufferRenderbufferEXT (will be remapped) */
+ "iiii\0"
+ "glFramebufferRenderbuffer\0"
+ "glFramebufferRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[11892]: VertexAttrib1dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1dvNV\0"
+ "\0"
+ /* _mesa_function_pool[11916]: GenTextures (offset 328) */
+ "ip\0"
+ "glGenTextures\0"
+ "glGenTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[11951]: SetFenceNV (will be remapped) */
+ "ii\0"
+ "glSetFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[11968]: FramebufferTexture1DEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTexture1D\0"
+ "glFramebufferTexture1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[12024]: GetCombinerOutputParameterivNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[12063]: PixelTexGenParameterivSGIS (will be remapped) */
+ "ip\0"
+ "glPixelTexGenParameterivSGIS\0"
+ "\0"
+ /* _mesa_function_pool[12096]: TextureNormalEXT (dynamic) */
+ "i\0"
+ "glTextureNormalEXT\0"
+ "\0"
+ /* _mesa_function_pool[12118]: IndexPointerListIBM (dynamic) */
+ "iipi\0"
+ "glIndexPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[12146]: WeightfvARB (dynamic) */
+ "ip\0"
+ "glWeightfvARB\0"
+ "\0"
+ /* _mesa_function_pool[12164]: RasterPos2sv (offset 69) */
+ "p\0"
+ "glRasterPos2sv\0"
+ "\0"
+ /* _mesa_function_pool[12182]: Color4ubv (offset 36) */
+ "p\0"
+ "glColor4ubv\0"
+ "\0"
+ /* _mesa_function_pool[12197]: DrawBuffer (offset 202) */
+ "i\0"
+ "glDrawBuffer\0"
+ "\0"
+ /* _mesa_function_pool[12213]: TexCoord2fv (offset 105) */
+ "p\0"
+ "glTexCoord2fv\0"
+ "\0"
+ /* _mesa_function_pool[12230]: WindowPos4fMESA (will be remapped) */
+ "ffff\0"
+ "glWindowPos4fMESA\0"
+ "\0"
+ /* _mesa_function_pool[12254]: TexCoord1sv (offset 101) */
+ "p\0"
+ "glTexCoord1sv\0"
+ "\0"
+ /* _mesa_function_pool[12271]: WindowPos3dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3dv\0"
+ "glWindowPos3dvARB\0"
+ "glWindowPos3dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[12326]: DepthFunc (offset 245) */
+ "i\0"
+ "glDepthFunc\0"
+ "\0"
+ /* _mesa_function_pool[12341]: PixelMapusv (offset 253) */
+ "iip\0"
+ "glPixelMapusv\0"
+ "\0"
+ /* _mesa_function_pool[12360]: GetQueryObjecti64vEXT (will be remapped) */
+ "iip\0"
+ "glGetQueryObjecti64vEXT\0"
+ "\0"
+ /* _mesa_function_pool[12389]: MultiTexCoord1dARB (offset 376) */
+ "id\0"
+ "glMultiTexCoord1d\0"
+ "glMultiTexCoord1dARB\0"
+ "\0"
+ /* _mesa_function_pool[12432]: PointParameterivNV (will be remapped) */
+ "ip\0"
+ "glPointParameteriv\0"
+ "glPointParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[12476]: BlendFunc (offset 241) */
+ "ii\0"
+ "glBlendFunc\0"
+ "\0"
+ /* _mesa_function_pool[12492]: Uniform2fvARB (will be remapped) */
+ "iip\0"
+ "glUniform2fv\0"
+ "glUniform2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[12526]: BufferParameteriAPPLE (will be remapped) */
+ "iii\0"
+ "glBufferParameteriAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[12555]: MultiTexCoord3dvARB (offset 393) */
+ "ip\0"
+ "glMultiTexCoord3dv\0"
+ "glMultiTexCoord3dvARB\0"
+ "\0"
+ /* _mesa_function_pool[12600]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[12656]: DeleteObjectARB (will be remapped) */
+ "i\0"
+ "glDeleteObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[12677]: MatrixIndexPointerARB (dynamic) */
+ "iiip\0"
+ "glMatrixIndexPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[12707]: ProgramNamedParameter4dvNV (will be remapped) */
+ "iipp\0"
+ "glProgramNamedParameter4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[12742]: Tangent3fvEXT (dynamic) */
+ "p\0"
+ "glTangent3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[12761]: Flush (offset 217) */
+ "\0"
+ "glFlush\0"
+ "\0"
+ /* _mesa_function_pool[12771]: Color4uiv (offset 38) */
+ "p\0"
+ "glColor4uiv\0"
+ "\0"
+ /* _mesa_function_pool[12786]: GenVertexArrays (will be remapped) */
+ "ip\0"
+ "glGenVertexArrays\0"
+ "\0"
+ /* _mesa_function_pool[12808]: RasterPos3sv (offset 77) */
+ "p\0"
+ "glRasterPos3sv\0"
+ "\0"
+ /* _mesa_function_pool[12826]: BindFramebufferEXT (will be remapped) */
+ "ii\0"
+ "glBindFramebuffer\0"
+ "glBindFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[12869]: ReferencePlaneSGIX (dynamic) */
+ "p\0"
+ "glReferencePlaneSGIX\0"
+ "\0"
+ /* _mesa_function_pool[12893]: PushAttrib (offset 219) */
+ "i\0"
+ "glPushAttrib\0"
+ "\0"
+ /* _mesa_function_pool[12909]: RasterPos2i (offset 66) */
+ "ii\0"
+ "glRasterPos2i\0"
+ "\0"
+ /* _mesa_function_pool[12927]: ValidateProgramARB (will be remapped) */
+ "i\0"
+ "glValidateProgram\0"
+ "glValidateProgramARB\0"
+ "\0"
+ /* _mesa_function_pool[12969]: TexParameteriv (offset 181) */
+ "iip\0"
+ "glTexParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[12991]: UnlockArraysEXT (will be remapped) */
+ "\0"
+ "glUnlockArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[13011]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord2fColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[13052]: WindowPos3fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3fv\0"
+ "glWindowPos3fvARB\0"
+ "glWindowPos3fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[13107]: RasterPos2f (offset 64) */
+ "ff\0"
+ "glRasterPos2f\0"
+ "\0"
+ /* _mesa_function_pool[13125]: VertexAttrib1svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1svNV\0"
+ "\0"
+ /* _mesa_function_pool[13149]: RasterPos2d (offset 62) */
+ "dd\0"
+ "glRasterPos2d\0"
+ "\0"
+ /* _mesa_function_pool[13167]: RasterPos3fv (offset 73) */
+ "p\0"
+ "glRasterPos3fv\0"
+ "\0"
+ /* _mesa_function_pool[13185]: CopyTexSubImage3D (offset 373) */
+ "iiiiiiiii\0"
+ "glCopyTexSubImage3D\0"
+ "glCopyTexSubImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[13239]: VertexAttrib2dARB (will be remapped) */
+ "idd\0"
+ "glVertexAttrib2d\0"
+ "glVertexAttrib2dARB\0"
+ "\0"
+ /* _mesa_function_pool[13281]: Color4ub (offset 35) */
+ "iiii\0"
+ "glColor4ub\0"
+ "\0"
+ /* _mesa_function_pool[13298]: GetInteger64v (will be remapped) */
+ "ip\0"
+ "glGetInteger64v\0"
+ "\0"
+ /* _mesa_function_pool[13318]: TextureColorMaskSGIS (dynamic) */
+ "iiii\0"
+ "glTextureColorMaskSGIS\0"
+ "\0"
+ /* _mesa_function_pool[13347]: RasterPos2s (offset 68) */
+ "ii\0"
+ "glRasterPos2s\0"
+ "\0"
+ /* _mesa_function_pool[13365]: GetColorTable (offset 343) */
+ "iiip\0"
+ "glGetColorTable\0"
+ "glGetColorTableSGI\0"
+ "glGetColorTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[13425]: SelectBuffer (offset 195) */
+ "ip\0"
+ "glSelectBuffer\0"
+ "\0"
+ /* _mesa_function_pool[13444]: Indexiv (offset 49) */
+ "p\0"
+ "glIndexiv\0"
+ "\0"
+ /* _mesa_function_pool[13457]: TexCoord3i (offset 114) */
+ "iii\0"
+ "glTexCoord3i\0"
+ "\0"
+ /* _mesa_function_pool[13475]: CopyColorTable (offset 342) */
+ "iiiii\0"
+ "glCopyColorTable\0"
+ "glCopyColorTableSGI\0"
+ "\0"
+ /* _mesa_function_pool[13519]: GetHistogramParameterfv (offset 362) */
+ "iip\0"
+ "glGetHistogramParameterfv\0"
+ "glGetHistogramParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[13579]: Frustum (offset 289) */
+ "dddddd\0"
+ "glFrustum\0"
+ "\0"
+ /* _mesa_function_pool[13597]: GetString (offset 275) */
+ "i\0"
+ "glGetString\0"
+ "\0"
+ /* _mesa_function_pool[13612]: ColorPointervINTEL (dynamic) */
+ "iip\0"
+ "glColorPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[13638]: TexEnvf (offset 184) */
+ "iif\0"
+ "glTexEnvf\0"
+ "\0"
+ /* _mesa_function_pool[13653]: TexCoord3d (offset 110) */
+ "ddd\0"
+ "glTexCoord3d\0"
+ "\0"
+ /* _mesa_function_pool[13671]: AlphaFragmentOp1ATI (will be remapped) */
+ "iiiiii\0"
+ "glAlphaFragmentOp1ATI\0"
+ "\0"
+ /* _mesa_function_pool[13701]: TexCoord3f (offset 112) */
+ "fff\0"
+ "glTexCoord3f\0"
+ "\0"
+ /* _mesa_function_pool[13719]: MultiTexCoord3ivARB (offset 397) */
+ "ip\0"
+ "glMultiTexCoord3iv\0"
+ "glMultiTexCoord3ivARB\0"
+ "\0"
+ /* _mesa_function_pool[13764]: MultiTexCoord2sARB (offset 390) */
+ "iii\0"
+ "glMultiTexCoord2s\0"
+ "glMultiTexCoord2sARB\0"
+ "\0"
+ /* _mesa_function_pool[13808]: VertexAttrib1dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1dv\0"
+ "glVertexAttrib1dvARB\0"
+ "\0"
+ /* _mesa_function_pool[13851]: DeleteTextures (offset 327) */
+ "ip\0"
+ "glDeleteTextures\0"
+ "glDeleteTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[13892]: TexCoordPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glTexCoordPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[13920]: TexSubImage4DSGIS (dynamic) */
+ "iiiiiiiiiiiip\0"
+ "glTexSubImage4DSGIS\0"
+ "\0"
+ /* _mesa_function_pool[13955]: TexCoord3s (offset 116) */
+ "iii\0"
+ "glTexCoord3s\0"
+ "\0"
+ /* _mesa_function_pool[13973]: GetTexLevelParameteriv (offset 285) */
+ "iiip\0"
+ "glGetTexLevelParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[14004]: CombinerStageParameterfvNV (dynamic) */
+ "iip\0"
+ "glCombinerStageParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[14038]: StopInstrumentsSGIX (dynamic) */
+ "i\0"
+ "glStopInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[14063]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ "fffffffffffffff\0"
+ "glTexCoord4fColor4fNormal3fVertex4fSUN\0"
+ "\0"
+ /* _mesa_function_pool[14119]: ClearAccum (offset 204) */
+ "ffff\0"
+ "glClearAccum\0"
+ "\0"
+ /* _mesa_function_pool[14138]: DeformSGIX (dynamic) */
+ "i\0"
+ "glDeformSGIX\0"
+ "\0"
+ /* _mesa_function_pool[14154]: GetVertexAttribfvARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfv\0"
+ "glGetVertexAttribfvARB\0"
+ "\0"
+ /* _mesa_function_pool[14202]: SecondaryColor3ivEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3iv\0"
+ "glSecondaryColor3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[14248]: TexCoord4iv (offset 123) */
+ "p\0"
+ "glTexCoord4iv\0"
+ "\0"
+ /* _mesa_function_pool[14265]: UniformMatrix4x2fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4x2fv\0"
+ "\0"
+ /* _mesa_function_pool[14292]: GetDetailTexFuncSGIS (dynamic) */
+ "ip\0"
+ "glGetDetailTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[14319]: GetCombinerStageParameterfvNV (dynamic) */
+ "iip\0"
+ "glGetCombinerStageParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[14356]: PolygonOffset (offset 319) */
+ "ff\0"
+ "glPolygonOffset\0"
+ "\0"
+ /* _mesa_function_pool[14376]: BindVertexArray (will be remapped) */
+ "i\0"
+ "glBindVertexArray\0"
+ "\0"
+ /* _mesa_function_pool[14397]: Color4ubVertex2fvSUN (dynamic) */
+ "pp\0"
+ "glColor4ubVertex2fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[14424]: Rectd (offset 86) */
+ "dddd\0"
+ "glRectd\0"
+ "\0"
+ /* _mesa_function_pool[14438]: TexFilterFuncSGIS (dynamic) */
+ "iiip\0"
+ "glTexFilterFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[14464]: SampleMaskSGIS (will be remapped) */
+ "fi\0"
+ "glSampleMaskSGIS\0"
+ "glSampleMaskEXT\0"
+ "\0"
+ /* _mesa_function_pool[14501]: GetAttribLocationARB (will be remapped) */
+ "ip\0"
+ "glGetAttribLocation\0"
+ "glGetAttribLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[14548]: RasterPos3i (offset 74) */
+ "iii\0"
+ "glRasterPos3i\0"
+ "\0"
+ /* _mesa_function_pool[14567]: VertexAttrib4ubvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4ubv\0"
+ "glVertexAttrib4ubvARB\0"
+ "\0"
+ /* _mesa_function_pool[14612]: DetailTexFuncSGIS (dynamic) */
+ "iip\0"
+ "glDetailTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[14637]: Normal3fVertex3fSUN (dynamic) */
+ "ffffff\0"
+ "glNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[14667]: CopyTexImage2D (offset 324) */
+ "iiiiiiii\0"
+ "glCopyTexImage2D\0"
+ "glCopyTexImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[14714]: GetBufferPointervARB (will be remapped) */
+ "iip\0"
+ "glGetBufferPointerv\0"
+ "glGetBufferPointervARB\0"
+ "\0"
+ /* _mesa_function_pool[14762]: ProgramEnvParameter4fARB (will be remapped) */
+ "iiffff\0"
+ "glProgramEnvParameter4fARB\0"
+ "glProgramParameter4fNV\0"
+ "\0"
+ /* _mesa_function_pool[14820]: Uniform3ivARB (will be remapped) */
+ "iip\0"
+ "glUniform3iv\0"
+ "glUniform3ivARB\0"
+ "\0"
+ /* _mesa_function_pool[14854]: Lightfv (offset 160) */
+ "iip\0"
+ "glLightfv\0"
+ "\0"
+ /* _mesa_function_pool[14869]: ClearDepth (offset 208) */
+ "d\0"
+ "glClearDepth\0"
+ "\0"
+ /* _mesa_function_pool[14885]: GetFenceivNV (will be remapped) */
+ "iip\0"
+ "glGetFenceivNV\0"
+ "\0"
+ /* _mesa_function_pool[14905]: WindowPos4dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[14927]: ColorSubTable (offset 346) */
+ "iiiiip\0"
+ "glColorSubTable\0"
+ "glColorSubTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[14970]: Color4fv (offset 30) */
+ "p\0"
+ "glColor4fv\0"
+ "\0"
+ /* _mesa_function_pool[14984]: MultiTexCoord4ivARB (offset 405) */
+ "ip\0"
+ "glMultiTexCoord4iv\0"
+ "glMultiTexCoord4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[15029]: ProgramLocalParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramLocalParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15066]: ColorPointer (offset 308) */
+ "iiip\0"
+ "glColorPointer\0"
+ "\0"
+ /* _mesa_function_pool[15087]: Rects (offset 92) */
+ "iiii\0"
+ "glRects\0"
+ "\0"
+ /* _mesa_function_pool[15101]: GetMapAttribParameterfvNV (dynamic) */
+ "iiip\0"
+ "glGetMapAttribParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[15135]: Lightiv (offset 162) */
+ "iip\0"
+ "glLightiv\0"
+ "\0"
+ /* _mesa_function_pool[15150]: VertexAttrib4sARB (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4s\0"
+ "glVertexAttrib4sARB\0"
+ "\0"
+ /* _mesa_function_pool[15194]: GetQueryObjectuivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectuiv\0"
+ "glGetQueryObjectuivARB\0"
+ "\0"
+ /* _mesa_function_pool[15242]: GetTexParameteriv (offset 283) */
+ "iip\0"
+ "glGetTexParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[15267]: MapParameterivNV (dynamic) */
+ "iip\0"
+ "glMapParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[15291]: GenRenderbuffersEXT (will be remapped) */
+ "ip\0"
+ "glGenRenderbuffers\0"
+ "glGenRenderbuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[15336]: VertexAttrib2dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2dv\0"
+ "glVertexAttrib2dvARB\0"
+ "\0"
+ /* _mesa_function_pool[15379]: EdgeFlagPointerEXT (will be remapped) */
+ "iip\0"
+ "glEdgeFlagPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[15405]: VertexAttribs2svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2svNV\0"
+ "\0"
+ /* _mesa_function_pool[15431]: WeightbvARB (dynamic) */
+ "ip\0"
+ "glWeightbvARB\0"
+ "\0"
+ /* _mesa_function_pool[15449]: VertexAttrib2fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2fv\0"
+ "glVertexAttrib2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[15492]: GetBufferParameterivARB (will be remapped) */
+ "iip\0"
+ "glGetBufferParameteriv\0"
+ "glGetBufferParameterivARB\0"
+ "\0"
+ /* _mesa_function_pool[15546]: Rectdv (offset 87) */
+ "pp\0"
+ "glRectdv\0"
+ "\0"
+ /* _mesa_function_pool[15559]: ListParameteriSGIX (dynamic) */
+ "iii\0"
+ "glListParameteriSGIX\0"
+ "\0"
+ /* _mesa_function_pool[15585]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ "iffffffffff\0"
+ "glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[15644]: InstrumentsBufferSGIX (dynamic) */
+ "ip\0"
+ "glInstrumentsBufferSGIX\0"
+ "\0"
+ /* _mesa_function_pool[15672]: VertexAttrib4NivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Niv\0"
+ "glVertexAttrib4NivARB\0"
+ "\0"
+ /* _mesa_function_pool[15717]: GetAttachedShaders (will be remapped) */
+ "iipp\0"
+ "glGetAttachedShaders\0"
+ "\0"
+ /* _mesa_function_pool[15744]: GenVertexArraysAPPLE (will be remapped) */
+ "ip\0"
+ "glGenVertexArraysAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[15771]: Materialiv (offset 172) */
+ "iip\0"
+ "glMaterialiv\0"
+ "\0"
+ /* _mesa_function_pool[15789]: PushClientAttrib (offset 335) */
+ "i\0"
+ "glPushClientAttrib\0"
+ "\0"
+ /* _mesa_function_pool[15811]: ProgramEnvParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramEnvParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15846]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[15892]: WindowPos2iMESA (will be remapped) */
+ "ii\0"
+ "glWindowPos2i\0"
+ "glWindowPos2iARB\0"
+ "glWindowPos2iMESA\0"
+ "\0"
+ /* _mesa_function_pool[15945]: SecondaryColor3fvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3fv\0"
+ "glSecondaryColor3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15991]: PolygonMode (offset 174) */
+ "ii\0"
+ "glPolygonMode\0"
+ "\0"
+ /* _mesa_function_pool[16009]: CompressedTexSubImage1DARB (will be remapped) */
+ "iiiiiip\0"
+ "glCompressedTexSubImage1D\0"
+ "glCompressedTexSubImage1DARB\0"
+ "\0"
+ /* _mesa_function_pool[16073]: GetVertexAttribivNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribivNV\0"
+ "\0"
+ /* _mesa_function_pool[16100]: GetProgramStringARB (will be remapped) */
+ "iip\0"
+ "glGetProgramStringARB\0"
+ "\0"
+ /* _mesa_function_pool[16127]: TexBumpParameterfvATI (will be remapped) */
+ "ip\0"
+ "glTexBumpParameterfvATI\0"
+ "\0"
+ /* _mesa_function_pool[16155]: CompileShaderARB (will be remapped) */
+ "i\0"
+ "glCompileShader\0"
+ "glCompileShaderARB\0"
+ "\0"
+ /* _mesa_function_pool[16193]: DeleteShader (will be remapped) */
+ "i\0"
+ "glDeleteShader\0"
+ "\0"
+ /* _mesa_function_pool[16211]: DisableClientState (offset 309) */
+ "i\0"
+ "glDisableClientState\0"
+ "\0"
+ /* _mesa_function_pool[16235]: TexGeni (offset 192) */
+ "iii\0"
+ "glTexGeni\0"
+ "\0"
+ /* _mesa_function_pool[16250]: TexGenf (offset 190) */
+ "iif\0"
+ "glTexGenf\0"
+ "\0"
+ /* _mesa_function_pool[16265]: Uniform3fARB (will be remapped) */
+ "ifff\0"
+ "glUniform3f\0"
+ "glUniform3fARB\0"
+ "\0"
+ /* _mesa_function_pool[16298]: TexGend (offset 188) */
+ "iid\0"
+ "glTexGend\0"
+ "\0"
+ /* _mesa_function_pool[16313]: ListParameterfvSGIX (dynamic) */
+ "iip\0"
+ "glListParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16340]: GetPolygonStipple (offset 274) */
+ "p\0"
+ "glGetPolygonStipple\0"
+ "\0"
+ /* _mesa_function_pool[16363]: Tangent3dvEXT (dynamic) */
+ "p\0"
+ "glTangent3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[16382]: GetVertexAttribfvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfvNV\0"
+ "\0"
+ /* _mesa_function_pool[16409]: WindowPos3sMESA (will be remapped) */
+ "iii\0"
+ "glWindowPos3s\0"
+ "glWindowPos3sARB\0"
+ "glWindowPos3sMESA\0"
+ "\0"
+ /* _mesa_function_pool[16463]: VertexAttrib2svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2svNV\0"
+ "\0"
+ /* _mesa_function_pool[16487]: VertexAttribs1fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1fvNV\0"
+ "\0"
+ /* _mesa_function_pool[16513]: TexCoord2fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glTexCoord2fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[16542]: WindowPos4sMESA (will be remapped) */
+ "iiii\0"
+ "glWindowPos4sMESA\0"
+ "\0"
+ /* _mesa_function_pool[16566]: VertexAttrib4NuivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nuiv\0"
+ "glVertexAttrib4NuivARB\0"
+ "\0"
+ /* _mesa_function_pool[16613]: ClientActiveTextureARB (offset 375) */
+ "i\0"
+ "glClientActiveTexture\0"
+ "glClientActiveTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[16663]: PixelTexGenSGIX (will be remapped) */
+ "i\0"
+ "glPixelTexGenSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16684]: ReplacementCodeusvSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeusvSUN\0"
+ "\0"
+ /* _mesa_function_pool[16711]: Uniform4fARB (will be remapped) */
+ "iffff\0"
+ "glUniform4f\0"
+ "glUniform4fARB\0"
+ "\0"
+ /* _mesa_function_pool[16745]: Color4sv (offset 34) */
+ "p\0"
+ "glColor4sv\0"
+ "\0"
+ /* _mesa_function_pool[16759]: FlushMappedBufferRange (will be remapped) */
+ "iii\0"
+ "glFlushMappedBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[16789]: IsProgramNV (will be remapped) */
+ "i\0"
+ "glIsProgramARB\0"
+ "glIsProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[16821]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ "iii\0"
+ "glFlushMappedBufferRangeAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[16856]: PixelZoom (offset 246) */
+ "ff\0"
+ "glPixelZoom\0"
+ "\0"
+ /* _mesa_function_pool[16872]: ReplacementCodePointerSUN (dynamic) */
+ "iip\0"
+ "glReplacementCodePointerSUN\0"
+ "\0"
+ /* _mesa_function_pool[16905]: ProgramEnvParameter4dARB (will be remapped) */
+ "iidddd\0"
+ "glProgramEnvParameter4dARB\0"
+ "glProgramParameter4dNV\0"
+ "\0"
+ /* _mesa_function_pool[16963]: ColorTableParameterfv (offset 340) */
+ "iip\0"
+ "glColorTableParameterfv\0"
+ "glColorTableParameterfvSGI\0"
+ "\0"
+ /* _mesa_function_pool[17019]: FragmentLightModelfSGIX (dynamic) */
+ "if\0"
+ "glFragmentLightModelfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17049]: Binormal3bvEXT (dynamic) */
+ "p\0"
+ "glBinormal3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[17069]: PixelMapuiv (offset 252) */
+ "iip\0"
+ "glPixelMapuiv\0"
+ "\0"
+ /* _mesa_function_pool[17088]: Color3dv (offset 12) */
+ "p\0"
+ "glColor3dv\0"
+ "\0"
+ /* _mesa_function_pool[17102]: IsTexture (offset 330) */
+ "i\0"
+ "glIsTexture\0"
+ "glIsTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[17132]: VertexWeightfvEXT (dynamic) */
+ "p\0"
+ "glVertexWeightfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[17155]: VertexAttrib1dARB (will be remapped) */
+ "id\0"
+ "glVertexAttrib1d\0"
+ "glVertexAttrib1dARB\0"
+ "\0"
+ /* _mesa_function_pool[17196]: ImageTransformParameterivHP (dynamic) */
+ "iip\0"
+ "glImageTransformParameterivHP\0"
+ "\0"
+ /* _mesa_function_pool[17231]: TexCoord4i (offset 122) */
+ "iiii\0"
+ "glTexCoord4i\0"
+ "\0"
+ /* _mesa_function_pool[17250]: DeleteQueriesARB (will be remapped) */
+ "ip\0"
+ "glDeleteQueries\0"
+ "glDeleteQueriesARB\0"
+ "\0"
+ /* _mesa_function_pool[17289]: Color4ubVertex2fSUN (dynamic) */
+ "iiiiff\0"
+ "glColor4ubVertex2fSUN\0"
+ "\0"
+ /* _mesa_function_pool[17319]: FragmentColorMaterialSGIX (dynamic) */
+ "ii\0"
+ "glFragmentColorMaterialSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17351]: CurrentPaletteMatrixARB (dynamic) */
+ "i\0"
+ "glCurrentPaletteMatrixARB\0"
+ "\0"
+ /* _mesa_function_pool[17380]: GetMapdv (offset 266) */
+ "iip\0"
+ "glGetMapdv\0"
+ "\0"
+ /* _mesa_function_pool[17396]: SamplePatternSGIS (will be remapped) */
+ "i\0"
+ "glSamplePatternSGIS\0"
+ "glSamplePatternEXT\0"
+ "\0"
+ /* _mesa_function_pool[17438]: PixelStoref (offset 249) */
+ "if\0"
+ "glPixelStoref\0"
+ "\0"
+ /* _mesa_function_pool[17456]: IsQueryARB (will be remapped) */
+ "i\0"
+ "glIsQuery\0"
+ "glIsQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[17482]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ "iiiiifff\0"
+ "glReplacementCodeuiColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[17531]: PixelStorei (offset 250) */
+ "ii\0"
+ "glPixelStorei\0"
+ "\0"
+ /* _mesa_function_pool[17549]: VertexAttrib4usvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4usv\0"
+ "glVertexAttrib4usvARB\0"
+ "\0"
+ /* _mesa_function_pool[17594]: LinkProgramARB (will be remapped) */
+ "i\0"
+ "glLinkProgram\0"
+ "glLinkProgramARB\0"
+ "\0"
+ /* _mesa_function_pool[17628]: VertexAttrib2fNV (will be remapped) */
+ "iff\0"
+ "glVertexAttrib2fNV\0"
+ "\0"
+ /* _mesa_function_pool[17652]: ShaderSourceARB (will be remapped) */
+ "iipp\0"
+ "glShaderSource\0"
+ "glShaderSourceARB\0"
+ "\0"
+ /* _mesa_function_pool[17691]: FragmentMaterialiSGIX (dynamic) */
+ "iii\0"
+ "glFragmentMaterialiSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17720]: EvalCoord2dv (offset 233) */
+ "p\0"
+ "glEvalCoord2dv\0"
+ "\0"
+ /* _mesa_function_pool[17738]: VertexAttrib3svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3sv\0"
+ "glVertexAttrib3svARB\0"
+ "\0"
+ /* _mesa_function_pool[17781]: ColorMaterial (offset 151) */
+ "ii\0"
+ "glColorMaterial\0"
+ "\0"
+ /* _mesa_function_pool[17801]: CompressedTexSubImage3DARB (will be remapped) */
+ "iiiiiiiiiip\0"
+ "glCompressedTexSubImage3D\0"
+ "glCompressedTexSubImage3DARB\0"
+ "\0"
+ /* _mesa_function_pool[17869]: WindowPos2ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2iv\0"
+ "glWindowPos2ivARB\0"
+ "glWindowPos2ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[17924]: IsFramebufferEXT (will be remapped) */
+ "i\0"
+ "glIsFramebuffer\0"
+ "glIsFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[17962]: Uniform4ivARB (will be remapped) */
+ "iip\0"
+ "glUniform4iv\0"
+ "glUniform4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[17996]: GetVertexAttribdvARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribdv\0"
+ "glGetVertexAttribdvARB\0"
+ "\0"
+ /* _mesa_function_pool[18044]: TexBumpParameterivATI (will be remapped) */
+ "ip\0"
+ "glTexBumpParameterivATI\0"
+ "\0"
+ /* _mesa_function_pool[18072]: GetSeparableFilter (offset 359) */
+ "iiippp\0"
+ "glGetSeparableFilter\0"
+ "glGetSeparableFilterEXT\0"
+ "\0"
+ /* _mesa_function_pool[18125]: Binormal3dEXT (dynamic) */
+ "ddd\0"
+ "glBinormal3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[18146]: SpriteParameteriSGIX (dynamic) */
+ "ii\0"
+ "glSpriteParameteriSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18173]: RequestResidentProgramsNV (will be remapped) */
+ "ip\0"
+ "glRequestResidentProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[18205]: TagSampleBufferSGIX (dynamic) */
+ "\0"
+ "glTagSampleBufferSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18229]: ReplacementCodeusSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeusSUN\0"
+ "\0"
+ /* _mesa_function_pool[18255]: FeedbackBuffer (offset 194) */
+ "iip\0"
+ "glFeedbackBuffer\0"
+ "\0"
+ /* _mesa_function_pool[18277]: RasterPos2iv (offset 67) */
+ "p\0"
+ "glRasterPos2iv\0"
+ "\0"
+ /* _mesa_function_pool[18295]: TexImage1D (offset 182) */
+ "iiiiiiip\0"
+ "glTexImage1D\0"
+ "\0"
+ /* _mesa_function_pool[18318]: ListParameterivSGIX (dynamic) */
+ "iip\0"
+ "glListParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18345]: MultiDrawElementsEXT (will be remapped) */
+ "ipipi\0"
+ "glMultiDrawElements\0"
+ "glMultiDrawElementsEXT\0"
+ "\0"
+ /* _mesa_function_pool[18395]: Color3s (offset 17) */
+ "iii\0"
+ "glColor3s\0"
+ "\0"
+ /* _mesa_function_pool[18410]: Uniform1ivARB (will be remapped) */
+ "iip\0"
+ "glUniform1iv\0"
+ "glUniform1ivARB\0"
+ "\0"
+ /* _mesa_function_pool[18444]: WindowPos2sMESA (will be remapped) */
+ "ii\0"
+ "glWindowPos2s\0"
+ "glWindowPos2sARB\0"
+ "glWindowPos2sMESA\0"
+ "\0"
+ /* _mesa_function_pool[18497]: WeightusvARB (dynamic) */
+ "ip\0"
+ "glWeightusvARB\0"
+ "\0"
+ /* _mesa_function_pool[18516]: TexCoordPointer (offset 320) */
+ "iiip\0"
+ "glTexCoordPointer\0"
+ "\0"
+ /* _mesa_function_pool[18540]: FogCoordPointerEXT (will be remapped) */
+ "iip\0"
+ "glFogCoordPointer\0"
+ "glFogCoordPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[18584]: IndexMaterialEXT (dynamic) */
+ "ii\0"
+ "glIndexMaterialEXT\0"
+ "\0"
+ /* _mesa_function_pool[18607]: Color3i (offset 15) */
+ "iii\0"
+ "glColor3i\0"
+ "\0"
+ /* _mesa_function_pool[18622]: FrontFace (offset 157) */
+ "i\0"
+ "glFrontFace\0"
+ "\0"
+ /* _mesa_function_pool[18637]: EvalCoord2d (offset 232) */
+ "dd\0"
+ "glEvalCoord2d\0"
+ "\0"
+ /* _mesa_function_pool[18655]: SecondaryColor3ubvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3ubv\0"
+ "glSecondaryColor3ubvEXT\0"
+ "\0"
+ /* _mesa_function_pool[18703]: EvalCoord2f (offset 234) */
+ "ff\0"
+ "glEvalCoord2f\0"
+ "\0"
+ /* _mesa_function_pool[18721]: VertexAttrib4dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4dv\0"
+ "glVertexAttrib4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[18764]: BindAttribLocationARB (will be remapped) */
+ "iip\0"
+ "glBindAttribLocation\0"
+ "glBindAttribLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[18814]: Color3b (offset 9) */
+ "iii\0"
+ "glColor3b\0"
+ "\0"
+ /* _mesa_function_pool[18829]: MultiTexCoord2dARB (offset 384) */
+ "idd\0"
+ "glMultiTexCoord2d\0"
+ "glMultiTexCoord2dARB\0"
+ "\0"
+ /* _mesa_function_pool[18873]: ExecuteProgramNV (will be remapped) */
+ "iip\0"
+ "glExecuteProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[18897]: Color3f (offset 13) */
+ "fff\0"
+ "glColor3f\0"
+ "\0"
+ /* _mesa_function_pool[18912]: LightEnviSGIX (dynamic) */
+ "ii\0"
+ "glLightEnviSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18932]: Color3d (offset 11) */
+ "ddd\0"
+ "glColor3d\0"
+ "\0"
+ /* _mesa_function_pool[18947]: Normal3dv (offset 55) */
+ "p\0"
+ "glNormal3dv\0"
+ "\0"
+ /* _mesa_function_pool[18962]: Lightf (offset 159) */
+ "iif\0"
+ "glLightf\0"
+ "\0"
+ /* _mesa_function_pool[18976]: ReplacementCodeuiSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeuiSUN\0"
+ "\0"
+ /* _mesa_function_pool[19002]: MatrixMode (offset 293) */
+ "i\0"
+ "glMatrixMode\0"
+ "\0"
+ /* _mesa_function_pool[19018]: GetPixelMapusv (offset 273) */
+ "ip\0"
+ "glGetPixelMapusv\0"
+ "\0"
+ /* _mesa_function_pool[19039]: Lighti (offset 161) */
+ "iii\0"
+ "glLighti\0"
+ "\0"
+ /* _mesa_function_pool[19053]: VertexAttribPointerNV (will be remapped) */
+ "iiiip\0"
+ "glVertexAttribPointerNV\0"
+ "\0"
+ /* _mesa_function_pool[19084]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ "iiip\0"
+ "glGetFramebufferAttachmentParameteriv\0"
+ "glGetFramebufferAttachmentParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[19169]: PixelTransformParameterfEXT (dynamic) */
+ "iif\0"
+ "glPixelTransformParameterfEXT\0"
+ "\0"
+ /* _mesa_function_pool[19204]: MultiTexCoord4dvARB (offset 401) */
+ "ip\0"
+ "glMultiTexCoord4dv\0"
+ "glMultiTexCoord4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[19249]: PixelTransformParameteriEXT (dynamic) */
+ "iii\0"
+ "glPixelTransformParameteriEXT\0"
+ "\0"
+ /* _mesa_function_pool[19284]: GetDoublev (offset 260) */
+ "ip\0"
+ "glGetDoublev\0"
+ "\0"
+ /* _mesa_function_pool[19301]: MultMatrixd (offset 295) */
+ "p\0"
+ "glMultMatrixd\0"
+ "\0"
+ /* _mesa_function_pool[19318]: MultMatrixf (offset 294) */
+ "p\0"
+ "glMultMatrixf\0"
+ "\0"
+ /* _mesa_function_pool[19335]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ "ffiiiifff\0"
+ "glTexCoord2fColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[19378]: Uniform1iARB (will be remapped) */
+ "ii\0"
+ "glUniform1i\0"
+ "glUniform1iARB\0"
+ "\0"
+ /* _mesa_function_pool[19409]: VertexAttribPointerARB (will be remapped) */
+ "iiiiip\0"
+ "glVertexAttribPointer\0"
+ "glVertexAttribPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[19464]: SharpenTexFuncSGIS (dynamic) */
+ "iip\0"
+ "glSharpenTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[19490]: MultiTexCoord4fvARB (offset 403) */
+ "ip\0"
+ "glMultiTexCoord4fv\0"
+ "glMultiTexCoord4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[19535]: UniformMatrix2x3fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2x3fv\0"
+ "\0"
+ /* _mesa_function_pool[19562]: TrackMatrixNV (will be remapped) */
+ "iiii\0"
+ "glTrackMatrixNV\0"
+ "\0"
+ /* _mesa_function_pool[19584]: CombinerParameteriNV (will be remapped) */
+ "ii\0"
+ "glCombinerParameteriNV\0"
+ "\0"
+ /* _mesa_function_pool[19611]: DeleteAsyncMarkersSGIX (dynamic) */
+ "ii\0"
+ "glDeleteAsyncMarkersSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19640]: IsAsyncMarkerSGIX (dynamic) */
+ "i\0"
+ "glIsAsyncMarkerSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19663]: FrameZoomSGIX (dynamic) */
+ "i\0"
+ "glFrameZoomSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19682]: Normal3fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[19709]: RasterPos4sv (offset 85) */
+ "p\0"
+ "glRasterPos4sv\0"
+ "\0"
+ /* _mesa_function_pool[19727]: VertexAttrib4NsvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nsv\0"
+ "glVertexAttrib4NsvARB\0"
+ "\0"
+ /* _mesa_function_pool[19772]: VertexAttrib3fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3fv\0"
+ "glVertexAttrib3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[19815]: ClearColor (offset 206) */
+ "ffff\0"
+ "glClearColor\0"
+ "\0"
+ /* _mesa_function_pool[19834]: GetSynciv (will be remapped) */
+ "iiipp\0"
+ "glGetSynciv\0"
+ "\0"
+ /* _mesa_function_pool[19853]: DeleteFramebuffersEXT (will be remapped) */
+ "ip\0"
+ "glDeleteFramebuffers\0"
+ "glDeleteFramebuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[19902]: GlobalAlphaFactorsSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorsSUN\0"
+ "\0"
+ /* _mesa_function_pool[19929]: TexEnviv (offset 187) */
+ "iip\0"
+ "glTexEnviv\0"
+ "\0"
+ /* _mesa_function_pool[19945]: TexSubImage3D (offset 372) */
+ "iiiiiiiiiip\0"
+ "glTexSubImage3D\0"
+ "glTexSubImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[19993]: Tangent3fEXT (dynamic) */
+ "fff\0"
+ "glTangent3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[20013]: SecondaryColor3uivEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3uiv\0"
+ "glSecondaryColor3uivEXT\0"
+ "\0"
+ /* _mesa_function_pool[20061]: MatrixIndexubvARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexubvARB\0"
+ "\0"
+ /* _mesa_function_pool[20085]: Color4fNormal3fVertex3fSUN (dynamic) */
+ "ffffffffff\0"
+ "glColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[20126]: PixelTexGenParameterfSGIS (will be remapped) */
+ "if\0"
+ "glPixelTexGenParameterfSGIS\0"
+ "\0"
+ /* _mesa_function_pool[20158]: CreateShader (will be remapped) */
+ "i\0"
+ "glCreateShader\0"
+ "\0"
+ /* _mesa_function_pool[20176]: GetColorTableParameterfv (offset 344) */
+ "iip\0"
+ "glGetColorTableParameterfv\0"
+ "glGetColorTableParameterfvSGI\0"
+ "glGetColorTableParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[20268]: FragmentLightModelfvSGIX (dynamic) */
+ "ip\0"
+ "glFragmentLightModelfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20299]: Bitmap (offset 8) */
+ "iiffffp\0"
+ "glBitmap\0"
+ "\0"
+ /* _mesa_function_pool[20317]: MultiTexCoord3fARB (offset 394) */
+ "ifff\0"
+ "glMultiTexCoord3f\0"
+ "glMultiTexCoord3fARB\0"
+ "\0"
+ /* _mesa_function_pool[20362]: GetTexLevelParameterfv (offset 284) */
+ "iiip\0"
+ "glGetTexLevelParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[20393]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ "ip\0"
+ "glGetPixelTexGenParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[20429]: GenFramebuffersEXT (will be remapped) */
+ "ip\0"
+ "glGenFramebuffers\0"
+ "glGenFramebuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[20472]: GetProgramParameterdvNV (will be remapped) */
+ "iiip\0"
+ "glGetProgramParameterdvNV\0"
+ "\0"
+ /* _mesa_function_pool[20504]: Vertex2sv (offset 133) */
+ "p\0"
+ "glVertex2sv\0"
+ "\0"
+ /* _mesa_function_pool[20519]: GetIntegerv (offset 263) */
+ "ip\0"
+ "glGetIntegerv\0"
+ "\0"
+ /* _mesa_function_pool[20537]: IsVertexArrayAPPLE (will be remapped) */
+ "i\0"
+ "glIsVertexArray\0"
+ "glIsVertexArrayAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[20577]: FragmentLightfvSGIX (dynamic) */
+ "iip\0"
+ "glFragmentLightfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20604]: DetachShader (will be remapped) */
+ "ii\0"
+ "glDetachShader\0"
+ "\0"
+ /* _mesa_function_pool[20623]: VertexAttrib4NubARB (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4Nub\0"
+ "glVertexAttrib4NubARB\0"
+ "\0"
+ /* _mesa_function_pool[20671]: GetProgramEnvParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramEnvParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[20706]: GetTrackMatrixivNV (will be remapped) */
+ "iiip\0"
+ "glGetTrackMatrixivNV\0"
+ "\0"
+ /* _mesa_function_pool[20733]: VertexAttrib3svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3svNV\0"
+ "\0"
+ /* _mesa_function_pool[20757]: Uniform4fvARB (will be remapped) */
+ "iip\0"
+ "glUniform4fv\0"
+ "glUniform4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[20791]: MultTransposeMatrixfARB (will be remapped) */
+ "p\0"
+ "glMultTransposeMatrixf\0"
+ "glMultTransposeMatrixfARB\0"
+ "\0"
+ /* _mesa_function_pool[20843]: GetTexEnviv (offset 277) */
+ "iip\0"
+ "glGetTexEnviv\0"
+ "\0"
+ /* _mesa_function_pool[20862]: ColorFragmentOp1ATI (will be remapped) */
+ "iiiiiii\0"
+ "glColorFragmentOp1ATI\0"
+ "\0"
+ /* _mesa_function_pool[20893]: GetUniformfvARB (will be remapped) */
+ "iip\0"
+ "glGetUniformfv\0"
+ "glGetUniformfvARB\0"
+ "\0"
+ /* _mesa_function_pool[20931]: PopClientAttrib (offset 334) */
+ "\0"
+ "glPopClientAttrib\0"
+ "\0"
+ /* _mesa_function_pool[20951]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ "iffffffffffff\0"
+ "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[21022]: DetachObjectARB (will be remapped) */
+ "ii\0"
+ "glDetachObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[21044]: VertexBlendARB (dynamic) */
+ "i\0"
+ "glVertexBlendARB\0"
+ "\0"
+ /* _mesa_function_pool[21064]: WindowPos3iMESA (will be remapped) */
+ "iii\0"
+ "glWindowPos3i\0"
+ "glWindowPos3iARB\0"
+ "glWindowPos3iMESA\0"
+ "\0"
+ /* _mesa_function_pool[21118]: SeparableFilter2D (offset 360) */
+ "iiiiiipp\0"
+ "glSeparableFilter2D\0"
+ "glSeparableFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[21171]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[21216]: Map1d (offset 220) */
+ "iddiip\0"
+ "glMap1d\0"
+ "\0"
+ /* _mesa_function_pool[21232]: Map1f (offset 221) */
+ "iffiip\0"
+ "glMap1f\0"
+ "\0"
+ /* _mesa_function_pool[21248]: CompressedTexImage2DARB (will be remapped) */
+ "iiiiiiip\0"
+ "glCompressedTexImage2D\0"
+ "glCompressedTexImage2DARB\0"
+ "\0"
+ /* _mesa_function_pool[21307]: ArrayElement (offset 306) */
+ "i\0"
+ "glArrayElement\0"
+ "glArrayElementEXT\0"
+ "\0"
+ /* _mesa_function_pool[21343]: TexImage2D (offset 183) */
+ "iiiiiiiip\0"
+ "glTexImage2D\0"
+ "\0"
+ /* _mesa_function_pool[21367]: DepthBoundsEXT (will be remapped) */
+ "dd\0"
+ "glDepthBoundsEXT\0"
+ "\0"
+ /* _mesa_function_pool[21388]: ProgramParameters4fvNV (will be remapped) */
+ "iiip\0"
+ "glProgramParameters4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[21419]: DeformationMap3fSGIX (dynamic) */
+ "iffiiffiiffiip\0"
+ "glDeformationMap3fSGIX\0"
+ "\0"
+ /* _mesa_function_pool[21458]: GetProgramivNV (will be remapped) */
+ "iip\0"
+ "glGetProgramivNV\0"
+ "\0"
+ /* _mesa_function_pool[21480]: GetMinmaxParameteriv (offset 366) */
+ "iip\0"
+ "glGetMinmaxParameteriv\0"
+ "glGetMinmaxParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[21534]: PixelTransferf (offset 247) */
+ "if\0"
+ "glPixelTransferf\0"
+ "\0"
+ /* _mesa_function_pool[21555]: CopyTexImage1D (offset 323) */
+ "iiiiiii\0"
+ "glCopyTexImage1D\0"
+ "glCopyTexImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[21601]: PushMatrix (offset 298) */
+ "\0"
+ "glPushMatrix\0"
+ "\0"
+ /* _mesa_function_pool[21616]: Fogiv (offset 156) */
+ "ip\0"
+ "glFogiv\0"
+ "\0"
+ /* _mesa_function_pool[21628]: TexCoord1dv (offset 95) */
+ "p\0"
+ "glTexCoord1dv\0"
+ "\0"
+ /* _mesa_function_pool[21645]: AlphaFragmentOp3ATI (will be remapped) */
+ "iiiiiiiiiiii\0"
+ "glAlphaFragmentOp3ATI\0"
+ "\0"
+ /* _mesa_function_pool[21681]: PixelTransferi (offset 248) */
+ "ii\0"
+ "glPixelTransferi\0"
+ "\0"
+ /* _mesa_function_pool[21702]: GetVertexAttribdvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribdvNV\0"
+ "\0"
+ /* _mesa_function_pool[21729]: VertexAttrib3fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3fvNV\0"
+ "\0"
+ /* _mesa_function_pool[21753]: Rotatef (offset 300) */
+ "ffff\0"
+ "glRotatef\0"
+ "\0"
+ /* _mesa_function_pool[21769]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ "iip\0"
+ "glGetFinalCombinerInputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[21811]: Vertex3i (offset 138) */
+ "iii\0"
+ "glVertex3i\0"
+ "\0"
+ /* _mesa_function_pool[21827]: Vertex3f (offset 136) */
+ "fff\0"
+ "glVertex3f\0"
+ "\0"
+ /* _mesa_function_pool[21843]: Clear (offset 203) */
+ "i\0"
+ "glClear\0"
+ "\0"
+ /* _mesa_function_pool[21854]: Vertex3d (offset 134) */
+ "ddd\0"
+ "glVertex3d\0"
+ "\0"
+ /* _mesa_function_pool[21870]: GetMapParameterivNV (dynamic) */
+ "iip\0"
+ "glGetMapParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[21897]: Uniform4iARB (will be remapped) */
+ "iiiii\0"
+ "glUniform4i\0"
+ "glUniform4iARB\0"
+ "\0"
+ /* _mesa_function_pool[21931]: ReadBuffer (offset 254) */
+ "i\0"
+ "glReadBuffer\0"
+ "\0"
+ /* _mesa_function_pool[21947]: ConvolutionParameteri (offset 352) */
+ "iii\0"
+ "glConvolutionParameteri\0"
+ "glConvolutionParameteriEXT\0"
+ "\0"
+ /* _mesa_function_pool[22003]: Ortho (offset 296) */
+ "dddddd\0"
+ "glOrtho\0"
+ "\0"
+ /* _mesa_function_pool[22019]: Binormal3sEXT (dynamic) */
+ "iii\0"
+ "glBinormal3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[22040]: ListBase (offset 6) */
+ "i\0"
+ "glListBase\0"
+ "\0"
+ /* _mesa_function_pool[22054]: Vertex3s (offset 140) */
+ "iii\0"
+ "glVertex3s\0"
+ "\0"
+ /* _mesa_function_pool[22070]: ConvolutionParameterf (offset 350) */
+ "iif\0"
+ "glConvolutionParameterf\0"
+ "glConvolutionParameterfEXT\0"
+ "\0"
+ /* _mesa_function_pool[22126]: GetColorTableParameteriv (offset 345) */
+ "iip\0"
+ "glGetColorTableParameteriv\0"
+ "glGetColorTableParameterivSGI\0"
+ "glGetColorTableParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[22218]: ProgramEnvParameter4dvARB (will be remapped) */
+ "iip\0"
+ "glProgramEnvParameter4dvARB\0"
+ "glProgramParameter4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[22275]: ShadeModel (offset 177) */
+ "i\0"
+ "glShadeModel\0"
+ "\0"
+ /* _mesa_function_pool[22291]: VertexAttribs2fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2fvNV\0"
+ "\0"
+ /* _mesa_function_pool[22317]: Rectiv (offset 91) */
+ "pp\0"
+ "glRectiv\0"
+ "\0"
+ /* _mesa_function_pool[22330]: UseProgramObjectARB (will be remapped) */
+ "i\0"
+ "glUseProgram\0"
+ "glUseProgramObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[22368]: GetMapParameterfvNV (dynamic) */
+ "iip\0"
+ "glGetMapParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[22395]: PassTexCoordATI (will be remapped) */
+ "iii\0"
+ "glPassTexCoordATI\0"
+ "\0"
+ /* _mesa_function_pool[22418]: DeleteProgram (will be remapped) */
+ "i\0"
+ "glDeleteProgram\0"
+ "\0"
+ /* _mesa_function_pool[22437]: Tangent3ivEXT (dynamic) */
+ "p\0"
+ "glTangent3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[22456]: Tangent3dEXT (dynamic) */
+ "ddd\0"
+ "glTangent3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[22476]: SecondaryColor3dvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3dv\0"
+ "glSecondaryColor3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[22522]: Vertex2fv (offset 129) */
+ "p\0"
+ "glVertex2fv\0"
+ "\0"
+ /* _mesa_function_pool[22537]: MultiDrawArraysEXT (will be remapped) */
+ "ippi\0"
+ "glMultiDrawArrays\0"
+ "glMultiDrawArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[22582]: BindRenderbufferEXT (will be remapped) */
+ "ii\0"
+ "glBindRenderbuffer\0"
+ "glBindRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[22627]: MultiTexCoord4dARB (offset 400) */
+ "idddd\0"
+ "glMultiTexCoord4d\0"
+ "glMultiTexCoord4dARB\0"
+ "\0"
+ /* _mesa_function_pool[22673]: Vertex3sv (offset 141) */
+ "p\0"
+ "glVertex3sv\0"
+ "\0"
+ /* _mesa_function_pool[22688]: SecondaryColor3usEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3us\0"
+ "glSecondaryColor3usEXT\0"
+ "\0"
+ /* _mesa_function_pool[22736]: ProgramLocalParameter4fvARB (will be remapped) */
+ "iip\0"
+ "glProgramLocalParameter4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[22771]: DeleteProgramsNV (will be remapped) */
+ "ip\0"
+ "glDeleteProgramsARB\0"
+ "glDeleteProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[22814]: EvalMesh1 (offset 236) */
+ "iii\0"
+ "glEvalMesh1\0"
+ "\0"
+ /* _mesa_function_pool[22831]: MultiTexCoord1sARB (offset 382) */
+ "ii\0"
+ "glMultiTexCoord1s\0"
+ "glMultiTexCoord1sARB\0"
+ "\0"
+ /* _mesa_function_pool[22874]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ "iffffff\0"
+ "glReplacementCodeuiColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[22921]: GetVertexAttribPointervNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribPointerv\0"
+ "glGetVertexAttribPointervARB\0"
+ "glGetVertexAttribPointervNV\0"
+ "\0"
+ /* _mesa_function_pool[23009]: MultiTexCoord1dvARB (offset 377) */
+ "ip\0"
+ "glMultiTexCoord1dv\0"
+ "glMultiTexCoord1dvARB\0"
+ "\0"
+ /* _mesa_function_pool[23054]: Uniform2iARB (will be remapped) */
+ "iii\0"
+ "glUniform2i\0"
+ "glUniform2iARB\0"
+ "\0"
+ /* _mesa_function_pool[23086]: Vertex2iv (offset 131) */
+ "p\0"
+ "glVertex2iv\0"
+ "\0"
+ /* _mesa_function_pool[23101]: GetProgramStringNV (will be remapped) */
+ "iip\0"
+ "glGetProgramStringNV\0"
+ "\0"
+ /* _mesa_function_pool[23127]: ColorPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glColorPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[23152]: LineWidth (offset 168) */
+ "f\0"
+ "glLineWidth\0"
+ "\0"
+ /* _mesa_function_pool[23167]: MapBufferARB (will be remapped) */
+ "ii\0"
+ "glMapBuffer\0"
+ "glMapBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[23198]: MultiDrawElementsBaseVertex (will be remapped) */
+ "ipipip\0"
+ "glMultiDrawElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[23236]: Binormal3svEXT (dynamic) */
+ "p\0"
+ "glBinormal3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[23256]: ApplyTextureEXT (dynamic) */
+ "i\0"
+ "glApplyTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[23277]: TexGendv (offset 189) */
+ "iip\0"
+ "glTexGendv\0"
+ "\0"
+ /* _mesa_function_pool[23293]: TextureMaterialEXT (dynamic) */
+ "ii\0"
+ "glTextureMaterialEXT\0"
+ "\0"
+ /* _mesa_function_pool[23318]: TextureLightEXT (dynamic) */
+ "i\0"
+ "glTextureLightEXT\0"
+ "\0"
+ /* _mesa_function_pool[23339]: ResetMinmax (offset 370) */
+ "i\0"
+ "glResetMinmax\0"
+ "glResetMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[23373]: SpriteParameterfSGIX (dynamic) */
+ "if\0"
+ "glSpriteParameterfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[23400]: EnableClientState (offset 313) */
+ "i\0"
+ "glEnableClientState\0"
+ "\0"
+ /* _mesa_function_pool[23423]: VertexAttrib4sNV (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4sNV\0"
+ "\0"
+ /* _mesa_function_pool[23449]: GetConvolutionParameterfv (offset 357) */
+ "iip\0"
+ "glGetConvolutionParameterfv\0"
+ "glGetConvolutionParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[23513]: VertexAttribs4dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[23539]: MultiModeDrawArraysIBM (will be remapped) */
+ "pppii\0"
+ "glMultiModeDrawArraysIBM\0"
+ "\0"
+ /* _mesa_function_pool[23571]: VertexAttrib4dARB (will be remapped) */
+ "idddd\0"
+ "glVertexAttrib4d\0"
+ "glVertexAttrib4dARB\0"
+ "\0"
+ /* _mesa_function_pool[23615]: GetTexBumpParameterfvATI (will be remapped) */
+ "ip\0"
+ "glGetTexBumpParameterfvATI\0"
+ "\0"
+ /* _mesa_function_pool[23646]: ProgramNamedParameter4dNV (will be remapped) */
+ "iipdddd\0"
+ "glProgramNamedParameter4dNV\0"
+ "\0"
+ /* _mesa_function_pool[23683]: GetMaterialfv (offset 269) */
+ "iip\0"
+ "glGetMaterialfv\0"
+ "\0"
+ /* _mesa_function_pool[23704]: VertexWeightfEXT (dynamic) */
+ "f\0"
+ "glVertexWeightfEXT\0"
+ "\0"
+ /* _mesa_function_pool[23726]: Binormal3fEXT (dynamic) */
+ "fff\0"
+ "glBinormal3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[23747]: CallList (offset 2) */
+ "i\0"
+ "glCallList\0"
+ "\0"
+ /* _mesa_function_pool[23761]: Materialfv (offset 170) */
+ "iip\0"
+ "glMaterialfv\0"
+ "\0"
+ /* _mesa_function_pool[23779]: TexCoord3fv (offset 113) */
+ "p\0"
+ "glTexCoord3fv\0"
+ "\0"
+ /* _mesa_function_pool[23796]: FogCoordfvEXT (will be remapped) */
+ "p\0"
+ "glFogCoordfv\0"
+ "glFogCoordfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[23828]: MultiTexCoord1ivARB (offset 381) */
+ "ip\0"
+ "glMultiTexCoord1iv\0"
+ "glMultiTexCoord1ivARB\0"
+ "\0"
+ /* _mesa_function_pool[23873]: SecondaryColor3ubEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3ub\0"
+ "glSecondaryColor3ubEXT\0"
+ "\0"
+ /* _mesa_function_pool[23921]: MultiTexCoord2ivARB (offset 389) */
+ "ip\0"
+ "glMultiTexCoord2iv\0"
+ "glMultiTexCoord2ivARB\0"
+ "\0"
+ /* _mesa_function_pool[23966]: FogFuncSGIS (dynamic) */
+ "ip\0"
+ "glFogFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[23984]: CopyTexSubImage2D (offset 326) */
+ "iiiiiiii\0"
+ "glCopyTexSubImage2D\0"
+ "glCopyTexSubImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[24037]: GetObjectParameterivARB (will be remapped) */
+ "iip\0"
+ "glGetObjectParameterivARB\0"
+ "\0"
+ /* _mesa_function_pool[24068]: Color3iv (offset 16) */
+ "p\0"
+ "glColor3iv\0"
+ "\0"
+ /* _mesa_function_pool[24082]: TexCoord4fVertex4fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord4fVertex4fSUN\0"
+ "\0"
+ /* _mesa_function_pool[24116]: DrawElements (offset 311) */
+ "iiip\0"
+ "glDrawElements\0"
+ "\0"
+ /* _mesa_function_pool[24137]: BindVertexArrayAPPLE (will be remapped) */
+ "i\0"
+ "glBindVertexArrayAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[24163]: GetProgramLocalParameterdvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramLocalParameterdvARB\0"
+ "\0"
+ /* _mesa_function_pool[24200]: GetHistogramParameteriv (offset 363) */
+ "iip\0"
+ "glGetHistogramParameteriv\0"
+ "glGetHistogramParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[24260]: MultiTexCoord1iARB (offset 380) */
+ "ii\0"
+ "glMultiTexCoord1i\0"
+ "glMultiTexCoord1iARB\0"
+ "\0"
+ /* _mesa_function_pool[24303]: GetConvolutionFilter (offset 356) */
+ "iiip\0"
+ "glGetConvolutionFilter\0"
+ "glGetConvolutionFilterEXT\0"
+ "\0"
+ /* _mesa_function_pool[24358]: GetProgramivARB (will be remapped) */
+ "iip\0"
+ "glGetProgramivARB\0"
+ "\0"
+ /* _mesa_function_pool[24381]: BlendFuncSeparateEXT (will be remapped) */
+ "iiii\0"
+ "glBlendFuncSeparate\0"
+ "glBlendFuncSeparateEXT\0"
+ "glBlendFuncSeparateINGR\0"
+ "\0"
+ /* _mesa_function_pool[24454]: MapBufferRange (will be remapped) */
+ "iiii\0"
+ "glMapBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[24477]: ProgramParameters4dvNV (will be remapped) */
+ "iiip\0"
+ "glProgramParameters4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[24508]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[24545]: EvalPoint2 (offset 239) */
+ "ii\0"
+ "glEvalPoint2\0"
+ "\0"
+ /* _mesa_function_pool[24562]: EvalPoint1 (offset 237) */
+ "i\0"
+ "glEvalPoint1\0"
+ "\0"
+ /* _mesa_function_pool[24578]: Binormal3dvEXT (dynamic) */
+ "p\0"
+ "glBinormal3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[24598]: PopMatrix (offset 297) */
+ "\0"
+ "glPopMatrix\0"
+ "\0"
+ /* _mesa_function_pool[24612]: FinishFenceNV (will be remapped) */
+ "i\0"
+ "glFinishFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[24631]: GetFogFuncSGIS (dynamic) */
+ "p\0"
+ "glGetFogFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[24651]: GetUniformLocationARB (will be remapped) */
+ "ip\0"
+ "glGetUniformLocation\0"
+ "glGetUniformLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[24700]: SecondaryColor3fEXT (will be remapped) */
+ "fff\0"
+ "glSecondaryColor3f\0"
+ "glSecondaryColor3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[24746]: GetTexGeniv (offset 280) */
+ "iip\0"
+ "glGetTexGeniv\0"
+ "\0"
+ /* _mesa_function_pool[24765]: CombinerInputNV (will be remapped) */
+ "iiiiii\0"
+ "glCombinerInputNV\0"
+ "\0"
+ /* _mesa_function_pool[24791]: VertexAttrib3sARB (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3s\0"
+ "glVertexAttrib3sARB\0"
+ "\0"
+ /* _mesa_function_pool[24834]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[24879]: Map2d (offset 222) */
+ "iddiiddiip\0"
+ "glMap2d\0"
+ "\0"
+ /* _mesa_function_pool[24899]: Map2f (offset 223) */
+ "iffiiffiip\0"
+ "glMap2f\0"
+ "\0"
+ /* _mesa_function_pool[24919]: ProgramStringARB (will be remapped) */
+ "iiip\0"
+ "glProgramStringARB\0"
+ "\0"
+ /* _mesa_function_pool[24944]: Vertex4s (offset 148) */
+ "iiii\0"
+ "glVertex4s\0"
+ "\0"
+ /* _mesa_function_pool[24961]: TexCoord4fVertex4fvSUN (dynamic) */
+ "pp\0"
+ "glTexCoord4fVertex4fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[24990]: VertexAttrib3sNV (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3sNV\0"
+ "\0"
+ /* _mesa_function_pool[25015]: VertexAttrib1fNV (will be remapped) */
+ "if\0"
+ "glVertexAttrib1fNV\0"
+ "\0"
+ /* _mesa_function_pool[25038]: Vertex4f (offset 144) */
+ "ffff\0"
+ "glVertex4f\0"
+ "\0"
+ /* _mesa_function_pool[25055]: EvalCoord1d (offset 228) */
+ "d\0"
+ "glEvalCoord1d\0"
+ "\0"
+ /* _mesa_function_pool[25072]: Vertex4d (offset 142) */
+ "dddd\0"
+ "glVertex4d\0"
+ "\0"
+ /* _mesa_function_pool[25089]: RasterPos4dv (offset 79) */
+ "p\0"
+ "glRasterPos4dv\0"
+ "\0"
+ /* _mesa_function_pool[25107]: FragmentLightfSGIX (dynamic) */
+ "iif\0"
+ "glFragmentLightfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[25133]: GetCompressedTexImageARB (will be remapped) */
+ "iip\0"
+ "glGetCompressedTexImage\0"
+ "glGetCompressedTexImageARB\0"
+ "\0"
+ /* _mesa_function_pool[25189]: GetTexGenfv (offset 279) */
+ "iip\0"
+ "glGetTexGenfv\0"
+ "\0"
+ /* _mesa_function_pool[25208]: Vertex4i (offset 146) */
+ "iiii\0"
+ "glVertex4i\0"
+ "\0"
+ /* _mesa_function_pool[25225]: VertexWeightPointerEXT (dynamic) */
+ "iiip\0"
+ "glVertexWeightPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[25256]: GetHistogram (offset 361) */
+ "iiiip\0"
+ "glGetHistogram\0"
+ "glGetHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[25296]: ActiveStencilFaceEXT (will be remapped) */
+ "i\0"
+ "glActiveStencilFaceEXT\0"
+ "\0"
+ /* _mesa_function_pool[25322]: StencilFuncSeparateATI (will be remapped) */
+ "iiii\0"
+ "glStencilFuncSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[25353]: Materialf (offset 169) */
+ "iif\0"
+ "glMaterialf\0"
+ "\0"
+ /* _mesa_function_pool[25370]: GetShaderSourceARB (will be remapped) */
+ "iipp\0"
+ "glGetShaderSource\0"
+ "glGetShaderSourceARB\0"
+ "\0"
+ /* _mesa_function_pool[25415]: IglooInterfaceSGIX (dynamic) */
+ "ip\0"
+ "glIglooInterfaceSGIX\0"
+ "\0"
+ /* _mesa_function_pool[25440]: Materiali (offset 171) */
+ "iii\0"
+ "glMateriali\0"
+ "\0"
+ /* _mesa_function_pool[25457]: VertexAttrib4dNV (will be remapped) */
+ "idddd\0"
+ "glVertexAttrib4dNV\0"
+ "\0"
+ /* _mesa_function_pool[25483]: MultiModeDrawElementsIBM (will be remapped) */
+ "ppipii\0"
+ "glMultiModeDrawElementsIBM\0"
+ "\0"
+ /* _mesa_function_pool[25518]: Indexsv (offset 51) */
+ "p\0"
+ "glIndexsv\0"
+ "\0"
+ /* _mesa_function_pool[25531]: MultiTexCoord4svARB (offset 407) */
+ "ip\0"
+ "glMultiTexCoord4sv\0"
+ "glMultiTexCoord4svARB\0"
+ "\0"
+ /* _mesa_function_pool[25576]: LightModelfv (offset 164) */
+ "ip\0"
+ "glLightModelfv\0"
+ "\0"
+ /* _mesa_function_pool[25595]: TexCoord2dv (offset 103) */
+ "p\0"
+ "glTexCoord2dv\0"
+ "\0"
+ /* _mesa_function_pool[25612]: GenQueriesARB (will be remapped) */
+ "ip\0"
+ "glGenQueries\0"
+ "glGenQueriesARB\0"
+ "\0"
+ /* _mesa_function_pool[25645]: EvalCoord1dv (offset 229) */
+ "p\0"
+ "glEvalCoord1dv\0"
+ "\0"
+ /* _mesa_function_pool[25663]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ "ifff\0"
+ "glReplacementCodeuiVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[25700]: Translated (offset 303) */
+ "ddd\0"
+ "glTranslated\0"
+ "\0"
+ /* _mesa_function_pool[25718]: Translatef (offset 304) */
+ "fff\0"
+ "glTranslatef\0"
+ "\0"
+ /* _mesa_function_pool[25736]: StencilMask (offset 209) */
+ "i\0"
+ "glStencilMask\0"
+ "\0"
+ /* _mesa_function_pool[25753]: Tangent3iEXT (dynamic) */
+ "iii\0"
+ "glTangent3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[25773]: GetLightiv (offset 265) */
+ "iip\0"
+ "glGetLightiv\0"
+ "\0"
+ /* _mesa_function_pool[25791]: DrawMeshArraysSUN (dynamic) */
+ "iiii\0"
+ "glDrawMeshArraysSUN\0"
+ "\0"
+ /* _mesa_function_pool[25817]: IsList (offset 287) */
+ "i\0"
+ "glIsList\0"
+ "\0"
+ /* _mesa_function_pool[25829]: IsSync (will be remapped) */
+ "i\0"
+ "glIsSync\0"
+ "\0"
+ /* _mesa_function_pool[25841]: RenderMode (offset 196) */
+ "i\0"
+ "glRenderMode\0"
+ "\0"
+ /* _mesa_function_pool[25857]: GetMapControlPointsNV (dynamic) */
+ "iiiiiip\0"
+ "glGetMapControlPointsNV\0"
+ "\0"
+ /* _mesa_function_pool[25890]: DrawBuffersARB (will be remapped) */
+ "ip\0"
+ "glDrawBuffers\0"
+ "glDrawBuffersARB\0"
+ "glDrawBuffersATI\0"
+ "\0"
+ /* _mesa_function_pool[25942]: ProgramLocalParameter4fARB (will be remapped) */
+ "iiffff\0"
+ "glProgramLocalParameter4fARB\0"
+ "\0"
+ /* _mesa_function_pool[25979]: SpriteParameterivSGIX (dynamic) */
+ "ip\0"
+ "glSpriteParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[26007]: ProvokingVertexEXT (will be remapped) */
+ "i\0"
+ "glProvokingVertexEXT\0"
+ "glProvokingVertex\0"
+ "\0"
+ /* _mesa_function_pool[26049]: MultiTexCoord1fARB (offset 378) */
+ "if\0"
+ "glMultiTexCoord1f\0"
+ "glMultiTexCoord1fARB\0"
+ "\0"
+ /* _mesa_function_pool[26092]: LoadName (offset 198) */
+ "i\0"
+ "glLoadName\0"
+ "\0"
+ /* _mesa_function_pool[26106]: VertexAttribs4ubvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4ubvNV\0"
+ "\0"
+ /* _mesa_function_pool[26133]: WeightsvARB (dynamic) */
+ "ip\0"
+ "glWeightsvARB\0"
+ "\0"
+ /* _mesa_function_pool[26151]: Uniform1fvARB (will be remapped) */
+ "iip\0"
+ "glUniform1fv\0"
+ "glUniform1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[26185]: CopyTexSubImage1D (offset 325) */
+ "iiiiii\0"
+ "glCopyTexSubImage1D\0"
+ "glCopyTexSubImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[26236]: CullFace (offset 152) */
+ "i\0"
+ "glCullFace\0"
+ "\0"
+ /* _mesa_function_pool[26250]: BindTexture (offset 307) */
+ "ii\0"
+ "glBindTexture\0"
+ "glBindTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[26285]: BeginFragmentShaderATI (will be remapped) */
+ "\0"
+ "glBeginFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[26312]: MultiTexCoord4fARB (offset 402) */
+ "iffff\0"
+ "glMultiTexCoord4f\0"
+ "glMultiTexCoord4fARB\0"
+ "\0"
+ /* _mesa_function_pool[26358]: VertexAttribs3svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3svNV\0"
+ "\0"
+ /* _mesa_function_pool[26384]: StencilFunc (offset 243) */
+ "iii\0"
+ "glStencilFunc\0"
+ "\0"
+ /* _mesa_function_pool[26403]: CopyPixels (offset 255) */
+ "iiiii\0"
+ "glCopyPixels\0"
+ "\0"
+ /* _mesa_function_pool[26423]: Rectsv (offset 93) */
+ "pp\0"
+ "glRectsv\0"
+ "\0"
+ /* _mesa_function_pool[26436]: ReplacementCodeuivSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeuivSUN\0"
+ "\0"
+ /* _mesa_function_pool[26463]: EnableVertexAttribArrayARB (will be remapped) */
+ "i\0"
+ "glEnableVertexAttribArray\0"
+ "glEnableVertexAttribArrayARB\0"
+ "\0"
+ /* _mesa_function_pool[26521]: NormalPointervINTEL (dynamic) */
+ "ip\0"
+ "glNormalPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[26547]: CopyConvolutionFilter2D (offset 355) */
+ "iiiiii\0"
+ "glCopyConvolutionFilter2D\0"
+ "glCopyConvolutionFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[26610]: WindowPos3ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3iv\0"
+ "glWindowPos3ivARB\0"
+ "glWindowPos3ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[26665]: CopyBufferSubData (will be remapped) */
+ "iiiii\0"
+ "glCopyBufferSubData\0"
+ "\0"
+ /* _mesa_function_pool[26692]: NormalPointer (offset 318) */
+ "iip\0"
+ "glNormalPointer\0"
+ "\0"
+ /* _mesa_function_pool[26713]: TexParameterfv (offset 179) */
+ "iip\0"
+ "glTexParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[26735]: IsBufferARB (will be remapped) */
+ "i\0"
+ "glIsBuffer\0"
+ "glIsBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[26763]: WindowPos4iMESA (will be remapped) */
+ "iiii\0"
+ "glWindowPos4iMESA\0"
+ "\0"
+ /* _mesa_function_pool[26787]: VertexAttrib4uivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4uiv\0"
+ "glVertexAttrib4uivARB\0"
+ "\0"
+ /* _mesa_function_pool[26832]: Tangent3bvEXT (dynamic) */
+ "p\0"
+ "glTangent3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[26851]: UniformMatrix3x4fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3x4fv\0"
+ "\0"
+ /* _mesa_function_pool[26878]: ClipPlane (offset 150) */
+ "ip\0"
+ "glClipPlane\0"
+ "\0"
+ /* _mesa_function_pool[26894]: Recti (offset 90) */
+ "iiii\0"
+ "glRecti\0"
+ "\0"
+ /* _mesa_function_pool[26908]: DrawRangeElementsBaseVertex (will be remapped) */
+ "iiiiipi\0"
+ "glDrawRangeElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[26947]: TexCoordPointervINTEL (dynamic) */
+ "iip\0"
+ "glTexCoordPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[26976]: DeleteBuffersARB (will be remapped) */
+ "ip\0"
+ "glDeleteBuffers\0"
+ "glDeleteBuffersARB\0"
+ "\0"
+ /* _mesa_function_pool[27015]: WindowPos4fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[27037]: GetPixelMapuiv (offset 272) */
+ "ip\0"
+ "glGetPixelMapuiv\0"
+ "\0"
+ /* _mesa_function_pool[27058]: Rectf (offset 88) */
+ "ffff\0"
+ "glRectf\0"
+ "\0"
+ /* _mesa_function_pool[27072]: VertexAttrib1sNV (will be remapped) */
+ "ii\0"
+ "glVertexAttrib1sNV\0"
+ "\0"
+ /* _mesa_function_pool[27095]: Indexfv (offset 47) */
+ "p\0"
+ "glIndexfv\0"
+ "\0"
+ /* _mesa_function_pool[27108]: SecondaryColor3svEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3sv\0"
+ "glSecondaryColor3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[27154]: LoadTransposeMatrixfARB (will be remapped) */
+ "p\0"
+ "glLoadTransposeMatrixf\0"
+ "glLoadTransposeMatrixfARB\0"
+ "\0"
+ /* _mesa_function_pool[27206]: GetPointerv (offset 329) */
+ "ip\0"
+ "glGetPointerv\0"
+ "glGetPointervEXT\0"
+ "\0"
+ /* _mesa_function_pool[27241]: Tangent3bEXT (dynamic) */
+ "iii\0"
+ "glTangent3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[27261]: CombinerParameterfNV (will be remapped) */
+ "if\0"
+ "glCombinerParameterfNV\0"
+ "\0"
+ /* _mesa_function_pool[27288]: IndexMask (offset 212) */
+ "i\0"
+ "glIndexMask\0"
+ "\0"
+ /* _mesa_function_pool[27303]: BindProgramNV (will be remapped) */
+ "ii\0"
+ "glBindProgramARB\0"
+ "glBindProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[27340]: VertexAttrib4svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4sv\0"
+ "glVertexAttrib4svARB\0"
+ "\0"
+ /* _mesa_function_pool[27383]: GetFloatv (offset 262) */
+ "ip\0"
+ "glGetFloatv\0"
+ "\0"
+ /* _mesa_function_pool[27399]: CreateDebugObjectMESA (dynamic) */
+ "\0"
+ "glCreateDebugObjectMESA\0"
+ "\0"
+ /* _mesa_function_pool[27425]: GetShaderiv (will be remapped) */
+ "iip\0"
+ "glGetShaderiv\0"
+ "\0"
+ /* _mesa_function_pool[27444]: ClientWaitSync (will be remapped) */
+ "iii\0"
+ "glClientWaitSync\0"
+ "\0"
+ /* _mesa_function_pool[27466]: TexCoord4s (offset 124) */
+ "iiii\0"
+ "glTexCoord4s\0"
+ "\0"
+ /* _mesa_function_pool[27485]: TexCoord3sv (offset 117) */
+ "p\0"
+ "glTexCoord3sv\0"
+ "\0"
+ /* _mesa_function_pool[27502]: BindFragmentShaderATI (will be remapped) */
+ "i\0"
+ "glBindFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[27529]: PopAttrib (offset 218) */
+ "\0"
+ "glPopAttrib\0"
+ "\0"
+ /* _mesa_function_pool[27543]: Fogfv (offset 154) */
+ "ip\0"
+ "glFogfv\0"
+ "\0"
+ /* _mesa_function_pool[27555]: UnmapBufferARB (will be remapped) */
+ "i\0"
+ "glUnmapBuffer\0"
+ "glUnmapBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[27589]: InitNames (offset 197) */
+ "\0"
+ "glInitNames\0"
+ "\0"
+ /* _mesa_function_pool[27603]: Normal3sv (offset 61) */
+ "p\0"
+ "glNormal3sv\0"
+ "\0"
+ /* _mesa_function_pool[27618]: Minmax (offset 368) */
+ "iii\0"
+ "glMinmax\0"
+ "glMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[27644]: TexCoord4d (offset 118) */
+ "dddd\0"
+ "glTexCoord4d\0"
+ "\0"
+ /* _mesa_function_pool[27663]: TexCoord4f (offset 120) */
+ "ffff\0"
+ "glTexCoord4f\0"
+ "\0"
+ /* _mesa_function_pool[27682]: FogCoorddvEXT (will be remapped) */
+ "p\0"
+ "glFogCoorddv\0"
+ "glFogCoorddvEXT\0"
+ "\0"
+ /* _mesa_function_pool[27714]: FinishTextureSUNX (dynamic) */
+ "\0"
+ "glFinishTextureSUNX\0"
+ "\0"
+ /* _mesa_function_pool[27736]: GetFragmentLightfvSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentLightfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[27766]: Binormal3fvEXT (dynamic) */
+ "p\0"
+ "glBinormal3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[27786]: GetBooleanv (offset 258) */
+ "ip\0"
+ "glGetBooleanv\0"
+ "\0"
+ /* _mesa_function_pool[27804]: ColorFragmentOp3ATI (will be remapped) */
+ "iiiiiiiiiiiii\0"
+ "glColorFragmentOp3ATI\0"
+ "\0"
+ /* _mesa_function_pool[27841]: Hint (offset 158) */
+ "ii\0"
+ "glHint\0"
+ "\0"
+ /* _mesa_function_pool[27852]: Color4dv (offset 28) */
+ "p\0"
+ "glColor4dv\0"
+ "\0"
+ /* _mesa_function_pool[27866]: VertexAttrib2svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2sv\0"
+ "glVertexAttrib2svARB\0"
+ "\0"
+ /* _mesa_function_pool[27909]: AreProgramsResidentNV (will be remapped) */
+ "ipp\0"
+ "glAreProgramsResidentNV\0"
+ "\0"
+ /* _mesa_function_pool[27938]: WindowPos3svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3sv\0"
+ "glWindowPos3svARB\0"
+ "glWindowPos3svMESA\0"
+ "\0"
+ /* _mesa_function_pool[27993]: CopyColorSubTable (offset 347) */
+ "iiiii\0"
+ "glCopyColorSubTable\0"
+ "glCopyColorSubTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[28043]: WeightdvARB (dynamic) */
+ "ip\0"
+ "glWeightdvARB\0"
+ "\0"
+ /* _mesa_function_pool[28061]: DeleteRenderbuffersEXT (will be remapped) */
+ "ip\0"
+ "glDeleteRenderbuffers\0"
+ "glDeleteRenderbuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[28112]: VertexAttrib4NubvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nubv\0"
+ "glVertexAttrib4NubvARB\0"
+ "\0"
+ /* _mesa_function_pool[28159]: VertexAttrib3dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3dvNV\0"
+ "\0"
+ /* _mesa_function_pool[28183]: GetObjectParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetObjectParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[28214]: Vertex4iv (offset 147) */
+ "p\0"
+ "glVertex4iv\0"
+ "\0"
+ /* _mesa_function_pool[28229]: GetProgramEnvParameterdvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramEnvParameterdvARB\0"
+ "\0"
+ /* _mesa_function_pool[28264]: TexCoord4dv (offset 119) */
+ "p\0"
+ "glTexCoord4dv\0"
+ "\0"
+ /* _mesa_function_pool[28281]: LockArraysEXT (will be remapped) */
+ "ii\0"
+ "glLockArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[28301]: Begin (offset 7) */
+ "i\0"
+ "glBegin\0"
+ "\0"
+ /* _mesa_function_pool[28312]: LightModeli (offset 165) */
+ "ii\0"
+ "glLightModeli\0"
+ "\0"
+ /* _mesa_function_pool[28330]: Rectfv (offset 89) */
+ "pp\0"
+ "glRectfv\0"
+ "\0"
+ /* _mesa_function_pool[28343]: LightModelf (offset 163) */
+ "if\0"
+ "glLightModelf\0"
+ "\0"
+ /* _mesa_function_pool[28361]: GetTexParameterfv (offset 282) */
+ "iip\0"
+ "glGetTexParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[28386]: GetLightfv (offset 264) */
+ "iip\0"
+ "glGetLightfv\0"
+ "\0"
+ /* _mesa_function_pool[28404]: PixelTransformParameterivEXT (dynamic) */
+ "iip\0"
+ "glPixelTransformParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[28440]: BinormalPointerEXT (dynamic) */
+ "iip\0"
+ "glBinormalPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[28466]: VertexAttrib1dNV (will be remapped) */
+ "id\0"
+ "glVertexAttrib1dNV\0"
+ "\0"
+ /* _mesa_function_pool[28489]: GetCombinerInputParameterivNV (will be remapped) */
+ "iiiip\0"
+ "glGetCombinerInputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[28528]: Disable (offset 214) */
+ "i\0"
+ "glDisable\0"
+ "\0"
+ /* _mesa_function_pool[28541]: MultiTexCoord2fvARB (offset 387) */
+ "ip\0"
+ "glMultiTexCoord2fv\0"
+ "glMultiTexCoord2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[28586]: GetRenderbufferParameterivEXT (will be remapped) */
+ "iip\0"
+ "glGetRenderbufferParameteriv\0"
+ "glGetRenderbufferParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[28652]: CombinerParameterivNV (will be remapped) */
+ "ip\0"
+ "glCombinerParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[28680]: GenFragmentShadersATI (will be remapped) */
+ "i\0"
+ "glGenFragmentShadersATI\0"
+ "\0"
+ /* _mesa_function_pool[28707]: DrawArrays (offset 310) */
+ "iii\0"
+ "glDrawArrays\0"
+ "glDrawArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[28741]: WeightuivARB (dynamic) */
+ "ip\0"
+ "glWeightuivARB\0"
+ "\0"
+ /* _mesa_function_pool[28760]: VertexAttrib2sARB (will be remapped) */
+ "iii\0"
+ "glVertexAttrib2s\0"
+ "glVertexAttrib2sARB\0"
+ "\0"
+ /* _mesa_function_pool[28802]: ColorMask (offset 210) */
+ "iiii\0"
+ "glColorMask\0"
+ "\0"
+ /* _mesa_function_pool[28820]: GenAsyncMarkersSGIX (dynamic) */
+ "i\0"
+ "glGenAsyncMarkersSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28845]: Tangent3svEXT (dynamic) */
+ "p\0"
+ "glTangent3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[28864]: GetListParameterivSGIX (dynamic) */
+ "iip\0"
+ "glGetListParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28894]: BindBufferARB (will be remapped) */
+ "ii\0"
+ "glBindBuffer\0"
+ "glBindBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[28927]: GetInfoLogARB (will be remapped) */
+ "iipp\0"
+ "glGetInfoLogARB\0"
+ "\0"
+ /* _mesa_function_pool[28949]: RasterPos4iv (offset 83) */
+ "p\0"
+ "glRasterPos4iv\0"
+ "\0"
+ /* _mesa_function_pool[28967]: Enable (offset 215) */
+ "i\0"
+ "glEnable\0"
+ "\0"
+ /* _mesa_function_pool[28979]: LineStipple (offset 167) */
+ "ii\0"
+ "glLineStipple\0"
+ "\0"
+ /* _mesa_function_pool[28997]: VertexAttribs4svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4svNV\0"
+ "\0"
+ /* _mesa_function_pool[29023]: EdgeFlagPointerListIBM (dynamic) */
+ "ipi\0"
+ "glEdgeFlagPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[29053]: UniformMatrix3x2fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3x2fv\0"
+ "\0"
+ /* _mesa_function_pool[29080]: GetMinmaxParameterfv (offset 365) */
+ "iip\0"
+ "glGetMinmaxParameterfv\0"
+ "glGetMinmaxParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[29134]: VertexAttrib1fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1fv\0"
+ "glVertexAttrib1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[29177]: GenBuffersARB (will be remapped) */
+ "ip\0"
+ "glGenBuffers\0"
+ "glGenBuffersARB\0"
+ "\0"
+ /* _mesa_function_pool[29210]: VertexAttribs1svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1svNV\0"
+ "\0"
+ /* _mesa_function_pool[29236]: Vertex3fv (offset 137) */
+ "p\0"
+ "glVertex3fv\0"
+ "\0"
+ /* _mesa_function_pool[29251]: GetTexBumpParameterivATI (will be remapped) */
+ "ip\0"
+ "glGetTexBumpParameterivATI\0"
+ "\0"
+ /* _mesa_function_pool[29282]: Binormal3bEXT (dynamic) */
+ "iii\0"
+ "glBinormal3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[29303]: FragmentMaterialivSGIX (dynamic) */
+ "iip\0"
+ "glFragmentMaterialivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[29333]: IsRenderbufferEXT (will be remapped) */
+ "i\0"
+ "glIsRenderbuffer\0"
+ "glIsRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[29373]: GenProgramsNV (will be remapped) */
+ "ip\0"
+ "glGenProgramsARB\0"
+ "glGenProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[29410]: VertexAttrib4dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[29434]: EndFragmentShaderATI (will be remapped) */
+ "\0"
+ "glEndFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[29459]: Binormal3iEXT (dynamic) */
+ "iii\0"
+ "glBinormal3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[29480]: WindowPos2fMESA (will be remapped) */
+ "ff\0"
+ "glWindowPos2f\0"
+ "glWindowPos2fARB\0"
+ "glWindowPos2fMESA\0"
+ "\0"
+ ;
+
+/* these functions need to be remapped */
+static const struct {
+ GLint pool_index;
+ GLint remap_index;
+} MESA_remap_table_functions[] = {
+ { 1461, AttachShader_remap_index },
+ { 8704, CreateProgram_remap_index },
+ { 20158, CreateShader_remap_index },
+ { 22418, DeleteProgram_remap_index },
+ { 16193, DeleteShader_remap_index },
+ { 20604, DetachShader_remap_index },
+ { 15717, GetAttachedShaders_remap_index },
+ { 4244, GetProgramInfoLog_remap_index },
+ { 361, GetProgramiv_remap_index },
+ { 5547, GetShaderInfoLog_remap_index },
+ { 27425, GetShaderiv_remap_index },
+ { 11732, IsProgram_remap_index },
+ { 10767, IsShader_remap_index },
+ { 8808, StencilFuncSeparate_remap_index },
+ { 3487, StencilMaskSeparate_remap_index },
+ { 6623, StencilOpSeparate_remap_index },
+ { 19535, UniformMatrix2x3fv_remap_index },
+ { 2615, UniformMatrix2x4fv_remap_index },
+ { 29053, UniformMatrix3x2fv_remap_index },
+ { 26851, UniformMatrix3x4fv_remap_index },
+ { 14265, UniformMatrix4x2fv_remap_index },
+ { 2937, UniformMatrix4x3fv_remap_index },
+ { 8722, LoadTransposeMatrixdARB_remap_index },
+ { 27154, LoadTransposeMatrixfARB_remap_index },
+ { 4817, MultTransposeMatrixdARB_remap_index },
+ { 20791, MultTransposeMatrixfARB_remap_index },
+ { 172, SampleCoverageARB_remap_index },
+ { 4971, CompressedTexImage1DARB_remap_index },
+ { 21248, CompressedTexImage2DARB_remap_index },
+ { 3550, CompressedTexImage3DARB_remap_index },
+ { 16009, CompressedTexSubImage1DARB_remap_index },
+ { 1880, CompressedTexSubImage2DARB_remap_index },
+ { 17801, CompressedTexSubImage3DARB_remap_index },
+ { 25133, GetCompressedTexImageARB_remap_index },
+ { 3395, DisableVertexAttribArrayARB_remap_index },
+ { 26463, EnableVertexAttribArrayARB_remap_index },
+ { 28229, GetProgramEnvParameterdvARB_remap_index },
+ { 20671, GetProgramEnvParameterfvARB_remap_index },
+ { 24163, GetProgramLocalParameterdvARB_remap_index },
+ { 7065, GetProgramLocalParameterfvARB_remap_index },
+ { 16100, GetProgramStringARB_remap_index },
+ { 24358, GetProgramivARB_remap_index },
+ { 17996, GetVertexAttribdvARB_remap_index },
+ { 14154, GetVertexAttribfvARB_remap_index },
+ { 8617, GetVertexAttribivARB_remap_index },
+ { 16905, ProgramEnvParameter4dARB_remap_index },
+ { 22218, ProgramEnvParameter4dvARB_remap_index },
+ { 14762, ProgramEnvParameter4fARB_remap_index },
+ { 7928, ProgramEnvParameter4fvARB_remap_index },
+ { 3513, ProgramLocalParameter4dARB_remap_index },
+ { 11442, ProgramLocalParameter4dvARB_remap_index },
+ { 25942, ProgramLocalParameter4fARB_remap_index },
+ { 22736, ProgramLocalParameter4fvARB_remap_index },
+ { 24919, ProgramStringARB_remap_index },
+ { 17155, VertexAttrib1dARB_remap_index },
+ { 13808, VertexAttrib1dvARB_remap_index },
+ { 3688, VertexAttrib1fARB_remap_index },
+ { 29134, VertexAttrib1fvARB_remap_index },
+ { 6149, VertexAttrib1sARB_remap_index },
+ { 2054, VertexAttrib1svARB_remap_index },
+ { 13239, VertexAttrib2dARB_remap_index },
+ { 15336, VertexAttrib2dvARB_remap_index },
+ { 1480, VertexAttrib2fARB_remap_index },
+ { 15449, VertexAttrib2fvARB_remap_index },
+ { 28760, VertexAttrib2sARB_remap_index },
+ { 27866, VertexAttrib2svARB_remap_index },
+ { 9926, VertexAttrib3dARB_remap_index },
+ { 7631, VertexAttrib3dvARB_remap_index },
+ { 1567, VertexAttrib3fARB_remap_index },
+ { 19772, VertexAttrib3fvARB_remap_index },
+ { 24791, VertexAttrib3sARB_remap_index },
+ { 17738, VertexAttrib3svARB_remap_index },
+ { 4270, VertexAttrib4NbvARB_remap_index },
+ { 15672, VertexAttrib4NivARB_remap_index },
+ { 19727, VertexAttrib4NsvARB_remap_index },
+ { 20623, VertexAttrib4NubARB_remap_index },
+ { 28112, VertexAttrib4NubvARB_remap_index },
+ { 16566, VertexAttrib4NuivARB_remap_index },
+ { 2810, VertexAttrib4NusvARB_remap_index },
+ { 9549, VertexAttrib4bvARB_remap_index },
+ { 23571, VertexAttrib4dARB_remap_index },
+ { 18721, VertexAttrib4dvARB_remap_index },
+ { 10033, VertexAttrib4fARB_remap_index },
+ { 10403, VertexAttrib4fvARB_remap_index },
+ { 9001, VertexAttrib4ivARB_remap_index },
+ { 15150, VertexAttrib4sARB_remap_index },
+ { 27340, VertexAttrib4svARB_remap_index },
+ { 14567, VertexAttrib4ubvARB_remap_index },
+ { 26787, VertexAttrib4uivARB_remap_index },
+ { 17549, VertexAttrib4usvARB_remap_index },
+ { 19409, VertexAttribPointerARB_remap_index },
+ { 28894, BindBufferARB_remap_index },
+ { 5862, BufferDataARB_remap_index },
+ { 1382, BufferSubDataARB_remap_index },
+ { 26976, DeleteBuffersARB_remap_index },
+ { 29177, GenBuffersARB_remap_index },
+ { 15492, GetBufferParameterivARB_remap_index },
+ { 14714, GetBufferPointervARB_remap_index },
+ { 1335, GetBufferSubDataARB_remap_index },
+ { 26735, IsBufferARB_remap_index },
+ { 23167, MapBufferARB_remap_index },
+ { 27555, UnmapBufferARB_remap_index },
+ { 268, BeginQueryARB_remap_index },
+ { 17250, DeleteQueriesARB_remap_index },
+ { 10664, EndQueryARB_remap_index },
+ { 25612, GenQueriesARB_remap_index },
+ { 1772, GetQueryObjectivARB_remap_index },
+ { 15194, GetQueryObjectuivARB_remap_index },
+ { 1624, GetQueryivARB_remap_index },
+ { 17456, IsQueryARB_remap_index },
+ { 7241, AttachObjectARB_remap_index },
+ { 16155, CompileShaderARB_remap_index },
+ { 2879, CreateProgramObjectARB_remap_index },
+ { 5807, CreateShaderObjectARB_remap_index },
+ { 12656, DeleteObjectARB_remap_index },
+ { 21022, DetachObjectARB_remap_index },
+ { 10475, GetActiveUniformARB_remap_index },
+ { 8320, GetAttachedObjectsARB_remap_index },
+ { 8599, GetHandleARB_remap_index },
+ { 28927, GetInfoLogARB_remap_index },
+ { 28183, GetObjectParameterfvARB_remap_index },
+ { 24037, GetObjectParameterivARB_remap_index },
+ { 25370, GetShaderSourceARB_remap_index },
+ { 24651, GetUniformLocationARB_remap_index },
+ { 20893, GetUniformfvARB_remap_index },
+ { 11064, GetUniformivARB_remap_index },
+ { 17594, LinkProgramARB_remap_index },
+ { 17652, ShaderSourceARB_remap_index },
+ { 6523, Uniform1fARB_remap_index },
+ { 26151, Uniform1fvARB_remap_index },
+ { 19378, Uniform1iARB_remap_index },
+ { 18410, Uniform1ivARB_remap_index },
+ { 2003, Uniform2fARB_remap_index },
+ { 12492, Uniform2fvARB_remap_index },
+ { 23054, Uniform2iARB_remap_index },
+ { 2123, Uniform2ivARB_remap_index },
+ { 16265, Uniform3fARB_remap_index },
+ { 8350, Uniform3fvARB_remap_index },
+ { 5481, Uniform3iARB_remap_index },
+ { 14820, Uniform3ivARB_remap_index },
+ { 16711, Uniform4fARB_remap_index },
+ { 20757, Uniform4fvARB_remap_index },
+ { 21897, Uniform4iARB_remap_index },
+ { 17962, Uniform4ivARB_remap_index },
+ { 7293, UniformMatrix2fvARB_remap_index },
+ { 17, UniformMatrix3fvARB_remap_index },
+ { 2475, UniformMatrix4fvARB_remap_index },
+ { 22330, UseProgramObjectARB_remap_index },
+ { 12927, ValidateProgramARB_remap_index },
+ { 18764, BindAttribLocationARB_remap_index },
+ { 4315, GetActiveAttribARB_remap_index },
+ { 14501, GetAttribLocationARB_remap_index },
+ { 25890, DrawBuffersARB_remap_index },
+ { 11547, RenderbufferStorageMultisample_remap_index },
+ { 16759, FlushMappedBufferRange_remap_index },
+ { 24454, MapBufferRange_remap_index },
+ { 14376, BindVertexArray_remap_index },
+ { 12786, GenVertexArrays_remap_index },
+ { 26665, CopyBufferSubData_remap_index },
+ { 27444, ClientWaitSync_remap_index },
+ { 2394, DeleteSync_remap_index },
+ { 6190, FenceSync_remap_index },
+ { 13298, GetInteger64v_remap_index },
+ { 19834, GetSynciv_remap_index },
+ { 25829, IsSync_remap_index },
+ { 8268, WaitSync_remap_index },
+ { 3363, DrawElementsBaseVertex_remap_index },
+ { 26908, DrawRangeElementsBaseVertex_remap_index },
+ { 23198, MultiDrawElementsBaseVertex_remap_index },
+ { 4680, PolygonOffsetEXT_remap_index },
+ { 20393, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 3895, GetPixelTexGenParameterivSGIS_remap_index },
+ { 20126, PixelTexGenParameterfSGIS_remap_index },
+ { 580, PixelTexGenParameterfvSGIS_remap_index },
+ { 11102, PixelTexGenParameteriSGIS_remap_index },
+ { 12063, PixelTexGenParameterivSGIS_remap_index },
+ { 14464, SampleMaskSGIS_remap_index },
+ { 17396, SamplePatternSGIS_remap_index },
+ { 23127, ColorPointerEXT_remap_index },
+ { 15379, EdgeFlagPointerEXT_remap_index },
+ { 5135, IndexPointerEXT_remap_index },
+ { 5215, NormalPointerEXT_remap_index },
+ { 13892, TexCoordPointerEXT_remap_index },
+ { 5985, VertexPointerEXT_remap_index },
+ { 3165, PointParameterfEXT_remap_index },
+ { 6830, PointParameterfvEXT_remap_index },
+ { 28281, LockArraysEXT_remap_index },
+ { 12991, UnlockArraysEXT_remap_index },
+ { 7837, CullParameterdvEXT_remap_index },
+ { 10270, CullParameterfvEXT_remap_index },
+ { 1151, SecondaryColor3bEXT_remap_index },
+ { 6989, SecondaryColor3bvEXT_remap_index },
+ { 9178, SecondaryColor3dEXT_remap_index },
+ { 22476, SecondaryColor3dvEXT_remap_index },
+ { 24700, SecondaryColor3fEXT_remap_index },
+ { 15945, SecondaryColor3fvEXT_remap_index },
+ { 426, SecondaryColor3iEXT_remap_index },
+ { 14202, SecondaryColor3ivEXT_remap_index },
+ { 8836, SecondaryColor3sEXT_remap_index },
+ { 27108, SecondaryColor3svEXT_remap_index },
+ { 23873, SecondaryColor3ubEXT_remap_index },
+ { 18655, SecondaryColor3ubvEXT_remap_index },
+ { 11297, SecondaryColor3uiEXT_remap_index },
+ { 20013, SecondaryColor3uivEXT_remap_index },
+ { 22688, SecondaryColor3usEXT_remap_index },
+ { 11370, SecondaryColor3usvEXT_remap_index },
+ { 10346, SecondaryColorPointerEXT_remap_index },
+ { 22537, MultiDrawArraysEXT_remap_index },
+ { 18345, MultiDrawElementsEXT_remap_index },
+ { 18540, FogCoordPointerEXT_remap_index },
+ { 4044, FogCoorddEXT_remap_index },
+ { 27682, FogCoorddvEXT_remap_index },
+ { 4105, FogCoordfEXT_remap_index },
+ { 23796, FogCoordfvEXT_remap_index },
+ { 16663, PixelTexGenSGIX_remap_index },
+ { 24381, BlendFuncSeparateEXT_remap_index },
+ { 5897, FlushVertexArrayRangeNV_remap_index },
+ { 4629, VertexArrayRangeNV_remap_index },
+ { 24765, CombinerInputNV_remap_index },
+ { 1946, CombinerOutputNV_remap_index },
+ { 27261, CombinerParameterfNV_remap_index },
+ { 4549, CombinerParameterfvNV_remap_index },
+ { 19584, CombinerParameteriNV_remap_index },
+ { 28652, CombinerParameterivNV_remap_index },
+ { 6267, FinalCombinerInputNV_remap_index },
+ { 8665, GetCombinerInputParameterfvNV_remap_index },
+ { 28489, GetCombinerInputParameterivNV_remap_index },
+ { 6066, GetCombinerOutputParameterfvNV_remap_index },
+ { 12024, GetCombinerOutputParameterivNV_remap_index },
+ { 5642, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 21769, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11042, ResizeBuffersMESA_remap_index },
+ { 9753, WindowPos2dMESA_remap_index },
+ { 944, WindowPos2dvMESA_remap_index },
+ { 29480, WindowPos2fMESA_remap_index },
+ { 6934, WindowPos2fvMESA_remap_index },
+ { 15892, WindowPos2iMESA_remap_index },
+ { 17869, WindowPos2ivMESA_remap_index },
+ { 18444, WindowPos2sMESA_remap_index },
+ { 4885, WindowPos2svMESA_remap_index },
+ { 6759, WindowPos3dMESA_remap_index },
+ { 12271, WindowPos3dvMESA_remap_index },
+ { 472, WindowPos3fMESA_remap_index },
+ { 13052, WindowPos3fvMESA_remap_index },
+ { 21064, WindowPos3iMESA_remap_index },
+ { 26610, WindowPos3ivMESA_remap_index },
+ { 16409, WindowPos3sMESA_remap_index },
+ { 27938, WindowPos3svMESA_remap_index },
+ { 9704, WindowPos4dMESA_remap_index },
+ { 14905, WindowPos4dvMESA_remap_index },
+ { 12230, WindowPos4fMESA_remap_index },
+ { 27015, WindowPos4fvMESA_remap_index },
+ { 26763, WindowPos4iMESA_remap_index },
+ { 10881, WindowPos4ivMESA_remap_index },
+ { 16542, WindowPos4sMESA_remap_index },
+ { 2857, WindowPos4svMESA_remap_index },
+ { 23539, MultiModeDrawArraysIBM_remap_index },
+ { 25483, MultiModeDrawElementsIBM_remap_index },
+ { 10692, DeleteFencesNV_remap_index },
+ { 24612, FinishFenceNV_remap_index },
+ { 3287, GenFencesNV_remap_index },
+ { 14885, GetFenceivNV_remap_index },
+ { 7226, IsFenceNV_remap_index },
+ { 11951, SetFenceNV_remap_index },
+ { 3744, TestFenceNV_remap_index },
+ { 27909, AreProgramsResidentNV_remap_index },
+ { 27303, BindProgramNV_remap_index },
+ { 22771, DeleteProgramsNV_remap_index },
+ { 18873, ExecuteProgramNV_remap_index },
+ { 29373, GenProgramsNV_remap_index },
+ { 20472, GetProgramParameterdvNV_remap_index },
+ { 9240, GetProgramParameterfvNV_remap_index },
+ { 23101, GetProgramStringNV_remap_index },
+ { 21458, GetProgramivNV_remap_index },
+ { 20706, GetTrackMatrixivNV_remap_index },
+ { 22921, GetVertexAttribPointervNV_remap_index },
+ { 21702, GetVertexAttribdvNV_remap_index },
+ { 16382, GetVertexAttribfvNV_remap_index },
+ { 16073, GetVertexAttribivNV_remap_index },
+ { 16789, IsProgramNV_remap_index },
+ { 8246, LoadProgramNV_remap_index },
+ { 24477, ProgramParameters4dvNV_remap_index },
+ { 21388, ProgramParameters4fvNV_remap_index },
+ { 18173, RequestResidentProgramsNV_remap_index },
+ { 19562, TrackMatrixNV_remap_index },
+ { 28466, VertexAttrib1dNV_remap_index },
+ { 11892, VertexAttrib1dvNV_remap_index },
+ { 25015, VertexAttrib1fNV_remap_index },
+ { 2245, VertexAttrib1fvNV_remap_index },
+ { 27072, VertexAttrib1sNV_remap_index },
+ { 13125, VertexAttrib1svNV_remap_index },
+ { 4220, VertexAttrib2dNV_remap_index },
+ { 11807, VertexAttrib2dvNV_remap_index },
+ { 17628, VertexAttrib2fNV_remap_index },
+ { 11418, VertexAttrib2fvNV_remap_index },
+ { 5045, VertexAttrib2sNV_remap_index },
+ { 16463, VertexAttrib2svNV_remap_index },
+ { 9901, VertexAttrib3dNV_remap_index },
+ { 28159, VertexAttrib3dvNV_remap_index },
+ { 9052, VertexAttrib3fNV_remap_index },
+ { 21729, VertexAttrib3fvNV_remap_index },
+ { 24990, VertexAttrib3sNV_remap_index },
+ { 20733, VertexAttrib3svNV_remap_index },
+ { 25457, VertexAttrib4dNV_remap_index },
+ { 29410, VertexAttrib4dvNV_remap_index },
+ { 3945, VertexAttrib4fNV_remap_index },
+ { 8296, VertexAttrib4fvNV_remap_index },
+ { 23423, VertexAttrib4sNV_remap_index },
+ { 1293, VertexAttrib4svNV_remap_index },
+ { 4378, VertexAttrib4ubNV_remap_index },
+ { 734, VertexAttrib4ubvNV_remap_index },
+ { 19053, VertexAttribPointerNV_remap_index },
+ { 2097, VertexAttribs1dvNV_remap_index },
+ { 16487, VertexAttribs1fvNV_remap_index },
+ { 29210, VertexAttribs1svNV_remap_index },
+ { 9077, VertexAttribs2dvNV_remap_index },
+ { 22291, VertexAttribs2fvNV_remap_index },
+ { 15405, VertexAttribs2svNV_remap_index },
+ { 4577, VertexAttribs3dvNV_remap_index },
+ { 1977, VertexAttribs3fvNV_remap_index },
+ { 26358, VertexAttribs3svNV_remap_index },
+ { 23513, VertexAttribs4dvNV_remap_index },
+ { 4603, VertexAttribs4fvNV_remap_index },
+ { 28997, VertexAttribs4svNV_remap_index },
+ { 26106, VertexAttribs4ubvNV_remap_index },
+ { 23615, GetTexBumpParameterfvATI_remap_index },
+ { 29251, GetTexBumpParameterivATI_remap_index },
+ { 16127, TexBumpParameterfvATI_remap_index },
+ { 18044, TexBumpParameterivATI_remap_index },
+ { 13671, AlphaFragmentOp1ATI_remap_index },
+ { 9592, AlphaFragmentOp2ATI_remap_index },
+ { 21645, AlphaFragmentOp3ATI_remap_index },
+ { 26285, BeginFragmentShaderATI_remap_index },
+ { 27502, BindFragmentShaderATI_remap_index },
+ { 20862, ColorFragmentOp1ATI_remap_index },
+ { 3823, ColorFragmentOp2ATI_remap_index },
+ { 27804, ColorFragmentOp3ATI_remap_index },
+ { 4722, DeleteFragmentShaderATI_remap_index },
+ { 29434, EndFragmentShaderATI_remap_index },
+ { 28680, GenFragmentShadersATI_remap_index },
+ { 22395, PassTexCoordATI_remap_index },
+ { 5965, SampleMapATI_remap_index },
+ { 5738, SetFragmentShaderConstantATI_remap_index },
+ { 319, PointParameteriNV_remap_index },
+ { 12432, PointParameterivNV_remap_index },
+ { 25296, ActiveStencilFaceEXT_remap_index },
+ { 24137, BindVertexArrayAPPLE_remap_index },
+ { 2522, DeleteVertexArraysAPPLE_remap_index },
+ { 15744, GenVertexArraysAPPLE_remap_index },
+ { 20537, IsVertexArrayAPPLE_remap_index },
+ { 775, GetProgramNamedParameterdvNV_remap_index },
+ { 3128, GetProgramNamedParameterfvNV_remap_index },
+ { 23646, ProgramNamedParameter4dNV_remap_index },
+ { 12707, ProgramNamedParameter4dvNV_remap_index },
+ { 7862, ProgramNamedParameter4fNV_remap_index },
+ { 10311, ProgramNamedParameter4fvNV_remap_index },
+ { 21367, DepthBoundsEXT_remap_index },
+ { 1043, BlendEquationSeparateEXT_remap_index },
+ { 12826, BindFramebufferEXT_remap_index },
+ { 22582, BindRenderbufferEXT_remap_index },
+ { 8515, CheckFramebufferStatusEXT_remap_index },
+ { 19853, DeleteFramebuffersEXT_remap_index },
+ { 28061, DeleteRenderbuffersEXT_remap_index },
+ { 11831, FramebufferRenderbufferEXT_remap_index },
+ { 11968, FramebufferTexture1DEXT_remap_index },
+ { 10139, FramebufferTexture2DEXT_remap_index },
+ { 9806, FramebufferTexture3DEXT_remap_index },
+ { 20429, GenFramebuffersEXT_remap_index },
+ { 15291, GenRenderbuffersEXT_remap_index },
+ { 5684, GenerateMipmapEXT_remap_index },
+ { 19084, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 28586, GetRenderbufferParameterivEXT_remap_index },
+ { 17924, IsFramebufferEXT_remap_index },
+ { 29333, IsRenderbufferEXT_remap_index },
+ { 7173, RenderbufferStorageEXT_remap_index },
+ { 651, BlitFramebufferEXT_remap_index },
+ { 12526, BufferParameteriAPPLE_remap_index },
+ { 16821, FlushMappedBufferRangeAPPLE_remap_index },
+ { 2701, FramebufferTextureLayerEXT_remap_index },
+ { 26007, ProvokingVertexEXT_remap_index },
+ { 9461, GetTexParameterPointervAPPLE_remap_index },
+ { 4405, TextureRangeAPPLE_remap_index },
+ { 25322, StencilFuncSeparateATI_remap_index },
+ { 15811, ProgramEnvParameters4fvEXT_remap_index },
+ { 15029, ProgramLocalParameters4fvEXT_remap_index },
+ { 12360, GetQueryObjecti64vEXT_remap_index },
+ { 9103, GetQueryObjectui64vEXT_remap_index },
+ { -1, -1 }
+};
+
+/* these functions are in the ABI, but have alternative names */
+static const struct gl_function_remap MESA_alt_functions[] = {
+ /* from GL_EXT_blend_color */
+ { 2440, _gloffset_BlendColor },
+ /* from GL_EXT_blend_minmax */
+ { 9863, _gloffset_BlendEquation },
+ /* from GL_EXT_color_subtable */
+ { 14927, _gloffset_ColorSubTable },
+ { 27993, _gloffset_CopyColorSubTable },
+ /* from GL_EXT_convolution */
+ { 213, _gloffset_ConvolutionFilter1D },
+ { 2284, _gloffset_CopyConvolutionFilter1D },
+ { 3624, _gloffset_GetConvolutionParameteriv },
+ { 7522, _gloffset_ConvolutionFilter2D },
+ { 7688, _gloffset_ConvolutionParameteriv },
+ { 8148, _gloffset_ConvolutionParameterfv },
+ { 18072, _gloffset_GetSeparableFilter },
+ { 21118, _gloffset_SeparableFilter2D },
+ { 21947, _gloffset_ConvolutionParameteri },
+ { 22070, _gloffset_ConvolutionParameterf },
+ { 23449, _gloffset_GetConvolutionParameterfv },
+ { 24303, _gloffset_GetConvolutionFilter },
+ { 26547, _gloffset_CopyConvolutionFilter2D },
+ /* from GL_EXT_copy_texture */
+ { 13185, _gloffset_CopyTexSubImage3D },
+ { 14667, _gloffset_CopyTexImage2D },
+ { 21555, _gloffset_CopyTexImage1D },
+ { 23984, _gloffset_CopyTexSubImage2D },
+ { 26185, _gloffset_CopyTexSubImage1D },
+ /* from GL_EXT_draw_range_elements */
+ { 8402, _gloffset_DrawRangeElements },
+ /* from GL_EXT_histogram */
+ { 812, _gloffset_Histogram },
+ { 3088, _gloffset_ResetHistogram },
+ { 8774, _gloffset_GetMinmax },
+ { 13519, _gloffset_GetHistogramParameterfv },
+ { 21480, _gloffset_GetMinmaxParameteriv },
+ { 23339, _gloffset_ResetMinmax },
+ { 24200, _gloffset_GetHistogramParameteriv },
+ { 25256, _gloffset_GetHistogram },
+ { 27618, _gloffset_Minmax },
+ { 29080, _gloffset_GetMinmaxParameterfv },
+ /* from GL_EXT_paletted_texture */
+ { 7384, _gloffset_ColorTable },
+ { 13365, _gloffset_GetColorTable },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
+ /* from GL_EXT_subtexture */
+ { 6105, _gloffset_TexSubImage1D },
+ { 9388, _gloffset_TexSubImage2D },
+ /* from GL_EXT_texture3D */
+ { 1658, _gloffset_TexImage3D },
+ { 19945, _gloffset_TexSubImage3D },
+ /* from GL_EXT_texture_object */
+ { 2964, _gloffset_PrioritizeTextures },
+ { 6554, _gloffset_AreTexturesResident },
+ { 11916, _gloffset_GenTextures },
+ { 13851, _gloffset_DeleteTextures },
+ { 17102, _gloffset_IsTexture },
+ { 26250, _gloffset_BindTexture },
+ /* from GL_EXT_vertex_array */
+ { 21307, _gloffset_ArrayElement },
+ { 27206, _gloffset_GetPointerv },
+ { 28707, _gloffset_DrawArrays },
+ /* from GL_SGI_color_table */
+ { 6672, _gloffset_ColorTableParameteriv },
+ { 7384, _gloffset_ColorTable },
+ { 13365, _gloffset_GetColorTable },
+ { 13475, _gloffset_CopyColorTable },
+ { 16963, _gloffset_ColorTableParameterfv },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
+ /* from GL_VERSION_1_3 */
+ { 381, _gloffset_MultiTexCoord3sARB },
+ { 613, _gloffset_ActiveTextureARB },
+ { 3761, _gloffset_MultiTexCoord1fvARB },
+ { 5240, _gloffset_MultiTexCoord3dARB },
+ { 5285, _gloffset_MultiTexCoord2iARB },
+ { 5409, _gloffset_MultiTexCoord2svARB },
+ { 7340, _gloffset_MultiTexCoord2fARB },
+ { 9133, _gloffset_MultiTexCoord3fvARB },
+ { 9625, _gloffset_MultiTexCoord4sARB },
+ { 10225, _gloffset_MultiTexCoord2dvARB },
+ { 10607, _gloffset_MultiTexCoord1svARB },
+ { 10903, _gloffset_MultiTexCoord3svARB },
+ { 10964, _gloffset_MultiTexCoord4iARB },
+ { 11687, _gloffset_MultiTexCoord3iARB },
+ { 12389, _gloffset_MultiTexCoord1dARB },
+ { 12555, _gloffset_MultiTexCoord3dvARB },
+ { 13719, _gloffset_MultiTexCoord3ivARB },
+ { 13764, _gloffset_MultiTexCoord2sARB },
+ { 14984, _gloffset_MultiTexCoord4ivARB },
+ { 16613, _gloffset_ClientActiveTextureARB },
+ { 18829, _gloffset_MultiTexCoord2dARB },
+ { 19204, _gloffset_MultiTexCoord4dvARB },
+ { 19490, _gloffset_MultiTexCoord4fvARB },
+ { 20317, _gloffset_MultiTexCoord3fARB },
+ { 22627, _gloffset_MultiTexCoord4dARB },
+ { 22831, _gloffset_MultiTexCoord1sARB },
+ { 23009, _gloffset_MultiTexCoord1dvARB },
+ { 23828, _gloffset_MultiTexCoord1ivARB },
+ { 23921, _gloffset_MultiTexCoord2ivARB },
+ { 24260, _gloffset_MultiTexCoord1iARB },
+ { 25531, _gloffset_MultiTexCoord4svARB },
+ { 26049, _gloffset_MultiTexCoord1fARB },
+ { 26312, _gloffset_MultiTexCoord4fARB },
+ { 28541, _gloffset_MultiTexCoord2fvARB },
+ { -1, -1 }
+};
+
+#endif /* need_MESA_remap_table */
+
+#if defined(need_GL_3DFX_tbuffer)
+static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = {
+ { 8206, -1 }, /* TbufferMask3DFX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_flush_buffer_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_flush_buffer_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_texture_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_texture_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_vertex_array_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_vertex_array_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_copy_buffer)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_copy_buffer_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_draw_buffers)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_buffers_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_draw_elements_base_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_elements_base_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_framebuffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_map_buffer_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_matrix_palette)
+static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
+ { 3339, -1 }, /* MatrixIndexusvARB */
+ { 11508, -1 }, /* MatrixIndexuivARB */
+ { 12677, -1 }, /* MatrixIndexPointerARB */
+ { 17351, -1 }, /* CurrentPaletteMatrixARB */
+ { 20061, -1 }, /* MatrixIndexubvARB */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_occlusion_query)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_occlusion_query_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_point_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_point_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_provoking_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_provoking_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_shader_objects)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_shader_objects_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_sync)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_sync_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_texture_compression)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_texture_compression_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_transpose_matrix)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_transpose_matrix_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_array_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_blend)
+static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
+ { 2226, -1 }, /* WeightubvARB */
+ { 5572, -1 }, /* WeightivARB */
+ { 9728, -1 }, /* WeightPointerARB */
+ { 12146, -1 }, /* WeightfvARB */
+ { 15431, -1 }, /* WeightbvARB */
+ { 18497, -1 }, /* WeightusvARB */
+ { 21044, -1 }, /* VertexBlendARB */
+ { 26133, -1 }, /* WeightsvARB */
+ { 28043, -1 }, /* WeightdvARB */
+ { 28741, -1 }, /* WeightuivARB */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_buffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_buffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_program)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_program_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_shader)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_shader_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_window_pos)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_window_pos_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_blend_equation_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_blend_equation_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_draw_buffers)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_draw_buffers_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_envmap_bumpmap)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_envmap_bumpmap_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_fragment_shader)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_fragment_shader_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_separate_stencil)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_separate_stencil_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_color)
+static const struct gl_function_remap GL_EXT_blend_color_functions[] = {
+ { 2440, _gloffset_BlendColor },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_equation_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_blend_equation_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_func_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_minmax)
+static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = {
+ { 9863, _gloffset_BlendEquation },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_color_subtable)
+static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
+ { 14927, _gloffset_ColorSubTable },
+ { 27993, _gloffset_CopyColorSubTable },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_compiled_vertex_array)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_compiled_vertex_array_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_convolution)
+static const struct gl_function_remap GL_EXT_convolution_functions[] = {
+ { 213, _gloffset_ConvolutionFilter1D },
+ { 2284, _gloffset_CopyConvolutionFilter1D },
+ { 3624, _gloffset_GetConvolutionParameteriv },
+ { 7522, _gloffset_ConvolutionFilter2D },
+ { 7688, _gloffset_ConvolutionParameteriv },
+ { 8148, _gloffset_ConvolutionParameterfv },
+ { 18072, _gloffset_GetSeparableFilter },
+ { 21118, _gloffset_SeparableFilter2D },
+ { 21947, _gloffset_ConvolutionParameteri },
+ { 22070, _gloffset_ConvolutionParameterf },
+ { 23449, _gloffset_GetConvolutionParameterfv },
+ { 24303, _gloffset_GetConvolutionFilter },
+ { 26547, _gloffset_CopyConvolutionFilter2D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_coordinate_frame)
+static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
+ { 9272, -1 }, /* TangentPointerEXT */
+ { 11022, -1 }, /* Binormal3ivEXT */
+ { 11640, -1 }, /* Tangent3sEXT */
+ { 12742, -1 }, /* Tangent3fvEXT */
+ { 16363, -1 }, /* Tangent3dvEXT */
+ { 17049, -1 }, /* Binormal3bvEXT */
+ { 18125, -1 }, /* Binormal3dEXT */
+ { 19993, -1 }, /* Tangent3fEXT */
+ { 22019, -1 }, /* Binormal3sEXT */
+ { 22437, -1 }, /* Tangent3ivEXT */
+ { 22456, -1 }, /* Tangent3dEXT */
+ { 23236, -1 }, /* Binormal3svEXT */
+ { 23726, -1 }, /* Binormal3fEXT */
+ { 24578, -1 }, /* Binormal3dvEXT */
+ { 25753, -1 }, /* Tangent3iEXT */
+ { 26832, -1 }, /* Tangent3bvEXT */
+ { 27241, -1 }, /* Tangent3bEXT */
+ { 27766, -1 }, /* Binormal3fvEXT */
+ { 28440, -1 }, /* BinormalPointerEXT */
+ { 28845, -1 }, /* Tangent3svEXT */
+ { 29282, -1 }, /* Binormal3bEXT */
+ { 29459, -1 }, /* Binormal3iEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_copy_texture)
+static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
+ { 13185, _gloffset_CopyTexSubImage3D },
+ { 14667, _gloffset_CopyTexImage2D },
+ { 21555, _gloffset_CopyTexImage1D },
+ { 23984, _gloffset_CopyTexSubImage2D },
+ { 26185, _gloffset_CopyTexSubImage1D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_cull_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_cull_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_depth_bounds_test)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_depth_bounds_test_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_draw_range_elements)
+static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
+ { 8402, _gloffset_DrawRangeElements },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_fog_coord)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_fog_coord_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_framebuffer_blit)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_blit_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_framebuffer_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_framebuffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_gpu_program_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_histogram)
+static const struct gl_function_remap GL_EXT_histogram_functions[] = {
+ { 812, _gloffset_Histogram },
+ { 3088, _gloffset_ResetHistogram },
+ { 8774, _gloffset_GetMinmax },
+ { 13519, _gloffset_GetHistogramParameterfv },
+ { 21480, _gloffset_GetMinmaxParameteriv },
+ { 23339, _gloffset_ResetMinmax },
+ { 24200, _gloffset_GetHistogramParameteriv },
+ { 25256, _gloffset_GetHistogram },
+ { 27618, _gloffset_Minmax },
+ { 29080, _gloffset_GetMinmaxParameterfv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_index_func)
+static const struct gl_function_remap GL_EXT_index_func_functions[] = {
+ { 10090, -1 }, /* IndexFuncEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_index_material)
+static const struct gl_function_remap GL_EXT_index_material_functions[] = {
+ { 18584, -1 }, /* IndexMaterialEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_light_texture)
+static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
+ { 23256, -1 }, /* ApplyTextureEXT */
+ { 23293, -1 }, /* TextureMaterialEXT */
+ { 23318, -1 }, /* TextureLightEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_multi_draw_arrays)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_multi_draw_arrays_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_paletted_texture)
+static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = {
+ { 7384, _gloffset_ColorTable },
+ { 13365, _gloffset_GetColorTable },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_pixel_transform)
+static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
+ { 9513, -1 }, /* PixelTransformParameterfvEXT */
+ { 19169, -1 }, /* PixelTransformParameterfEXT */
+ { 19249, -1 }, /* PixelTransformParameteriEXT */
+ { 28404, -1 }, /* PixelTransformParameterivEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_point_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_point_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_polygon_offset)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_polygon_offset_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_provoking_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_provoking_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_secondary_color)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_secondary_color_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_stencil_two_side)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_subtexture)
+static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
+ { 6105, _gloffset_TexSubImage1D },
+ { 9388, _gloffset_TexSubImage2D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture3D)
+static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
+ { 1658, _gloffset_TexImage3D },
+ { 19945, _gloffset_TexSubImage3D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_array)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_object)
+static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
+ { 2964, _gloffset_PrioritizeTextures },
+ { 6554, _gloffset_AreTexturesResident },
+ { 11916, _gloffset_GenTextures },
+ { 13851, _gloffset_DeleteTextures },
+ { 17102, _gloffset_IsTexture },
+ { 26250, _gloffset_BindTexture },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_perturb_normal)
+static const struct gl_function_remap GL_EXT_texture_perturb_normal_functions[] = {
+ { 12096, -1 }, /* TextureNormalEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_timer_query)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_timer_query_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_vertex_array)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
+ { 21307, _gloffset_ArrayElement },
+ { 27206, _gloffset_GetPointerv },
+ { 28707, _gloffset_DrawArrays },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_vertex_weighting)
+static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
+ { 17132, -1 }, /* VertexWeightfvEXT */
+ { 23704, -1 }, /* VertexWeightfEXT */
+ { 25225, -1 }, /* VertexWeightPointerEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_HP_image_transform)
+static const struct gl_function_remap GL_HP_image_transform_functions[] = {
+ { 2157, -1 }, /* GetImageTransformParameterfvHP */
+ { 3305, -1 }, /* ImageTransformParameterfHP */
+ { 8966, -1 }, /* ImageTransformParameterfvHP */
+ { 10525, -1 }, /* ImageTransformParameteriHP */
+ { 10793, -1 }, /* GetImageTransformParameterivHP */
+ { 17196, -1 }, /* ImageTransformParameterivHP */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_IBM_multimode_draw_arrays)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_IBM_vertex_array_lists)
+static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
+ { 3857, -1 }, /* SecondaryColorPointerListIBM */
+ { 5106, -1 }, /* NormalPointerListIBM */
+ { 6728, -1 }, /* FogCoordPointerListIBM */
+ { 7035, -1 }, /* VertexPointerListIBM */
+ { 10446, -1 }, /* ColorPointerListIBM */
+ { 11747, -1 }, /* TexCoordPointerListIBM */
+ { 12118, -1 }, /* IndexPointerListIBM */
+ { 29023, -1 }, /* EdgeFlagPointerListIBM */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_INGR_blend_func_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_INGR_blend_func_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_INTEL_parallel_arrays)
+static const struct gl_function_remap GL_INTEL_parallel_arrays_functions[] = {
+ { 11134, -1 }, /* VertexPointervINTEL */
+ { 13612, -1 }, /* ColorPointervINTEL */
+ { 26521, -1 }, /* NormalPointervINTEL */
+ { 26947, -1 }, /* TexCoordPointervINTEL */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_MESA_resize_buffers)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_MESA_resize_buffers_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_MESA_shader_debug)
+static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
+ { 1522, -1 }, /* GetDebugLogLengthMESA */
+ { 3063, -1 }, /* ClearDebugLogMESA */
+ { 4018, -1 }, /* GetDebugLogMESA */
+ { 27399, -1 }, /* CreateDebugObjectMESA */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_MESA_window_pos)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_MESA_window_pos_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_evaluators)
+static const struct gl_function_remap GL_NV_evaluators_functions[] = {
+ { 5773, -1 }, /* GetMapAttribParameterivNV */
+ { 7490, -1 }, /* MapControlPointsNV */
+ { 7589, -1 }, /* MapParameterfvNV */
+ { 9371, -1 }, /* EvalMapsNV */
+ { 15101, -1 }, /* GetMapAttribParameterfvNV */
+ { 15267, -1 }, /* MapParameterivNV */
+ { 21870, -1 }, /* GetMapParameterivNV */
+ { 22368, -1 }, /* GetMapParameterfvNV */
+ { 25857, -1 }, /* GetMapControlPointsNV */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_fence)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_fence_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_fragment_program)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_fragment_program_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_point_sprite)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_point_sprite_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_register_combiners)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_register_combiners_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_register_combiners2)
+static const struct gl_function_remap GL_NV_register_combiners2_functions[] = {
+ { 14004, -1 }, /* CombinerStageParameterfvNV */
+ { 14319, -1 }, /* GetCombinerStageParameterfvNV */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_vertex_array_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_vertex_array_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_vertex_program)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_vertex_program_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_PGI_misc_hints)
+static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
+ { 7674, -1 }, /* HintPGI */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_detail_texture)
+static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
+ { 14292, -1 }, /* GetDetailTexFuncSGIS */
+ { 14612, -1 }, /* DetailTexFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_fog_function)
+static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
+ { 23966, -1 }, /* FogFuncSGIS */
+ { 24631, -1 }, /* GetFogFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIS_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_pixel_texture)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIS_pixel_texture_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_point_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_sharpen_texture)
+static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
+ { 5834, -1 }, /* GetSharpenTexFuncSGIS */
+ { 19464, -1 }, /* SharpenTexFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture4D)
+static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
+ { 894, -1 }, /* TexImage4DSGIS */
+ { 13920, -1 }, /* TexSubImage4DSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture_color_mask)
+static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = {
+ { 13318, -1 }, /* TextureColorMaskSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture_filter4)
+static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
+ { 6011, -1 }, /* GetTexFilterFuncSGIS */
+ { 14438, -1 }, /* TexFilterFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_async)
+static const struct gl_function_remap GL_SGIX_async_functions[] = {
+ { 3014, -1 }, /* AsyncMarkerSGIX */
+ { 3997, -1 }, /* FinishAsyncSGIX */
+ { 4703, -1 }, /* PollAsyncSGIX */
+ { 19611, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 19640, -1 }, /* IsAsyncMarkerSGIX */
+ { 28820, -1 }, /* GenAsyncMarkersSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_flush_raster)
+static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
+ { 6382, -1 }, /* FlushRasterSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_fragment_lighting)
+static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
+ { 2410, -1 }, /* FragmentMaterialfvSGIX */
+ { 2906, -1 }, /* FragmentLightModelivSGIX */
+ { 4654, -1 }, /* FragmentLightiSGIX */
+ { 5514, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 7102, -1 }, /* FragmentMaterialfSGIX */
+ { 7263, -1 }, /* GetFragmentLightivSGIX */
+ { 8100, -1 }, /* FragmentLightModeliSGIX */
+ { 9434, -1 }, /* FragmentLightivSGIX */
+ { 9671, -1 }, /* GetFragmentMaterialivSGIX */
+ { 17019, -1 }, /* FragmentLightModelfSGIX */
+ { 17319, -1 }, /* FragmentColorMaterialSGIX */
+ { 17691, -1 }, /* FragmentMaterialiSGIX */
+ { 18912, -1 }, /* LightEnviSGIX */
+ { 20268, -1 }, /* FragmentLightModelfvSGIX */
+ { 20577, -1 }, /* FragmentLightfvSGIX */
+ { 25107, -1 }, /* FragmentLightfSGIX */
+ { 27736, -1 }, /* GetFragmentLightfvSGIX */
+ { 29303, -1 }, /* FragmentMaterialivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_framezoom)
+static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
+ { 19663, -1 }, /* FrameZoomSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_igloo_interface)
+static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
+ { 25415, -1 }, /* IglooInterfaceSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_instruments)
+static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
+ { 2573, -1 }, /* ReadInstrumentsSGIX */
+ { 5590, -1 }, /* PollInstrumentsSGIX */
+ { 9332, -1 }, /* GetInstrumentsSGIX */
+ { 11345, -1 }, /* StartInstrumentsSGIX */
+ { 14038, -1 }, /* StopInstrumentsSGIX */
+ { 15644, -1 }, /* InstrumentsBufferSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_list_priority)
+static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
+ { 1125, -1 }, /* ListParameterfSGIX */
+ { 2763, -1 }, /* GetListParameterfvSGIX */
+ { 15559, -1 }, /* ListParameteriSGIX */
+ { 16313, -1 }, /* ListParameterfvSGIX */
+ { 18318, -1 }, /* ListParameterivSGIX */
+ { 28864, -1 }, /* GetListParameterivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_pixel_texture)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_polynomial_ffd)
+static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = {
+ { 3251, -1 }, /* LoadIdentityDeformationMapSGIX */
+ { 10713, -1 }, /* DeformationMap3dSGIX */
+ { 14138, -1 }, /* DeformSGIX */
+ { 21419, -1 }, /* DeformationMap3fSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_reference_plane)
+static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
+ { 12869, -1 }, /* ReferencePlaneSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_sprite)
+static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
+ { 8487, -1 }, /* SpriteParameterfvSGIX */
+ { 18146, -1 }, /* SpriteParameteriSGIX */
+ { 23373, -1 }, /* SpriteParameterfSGIX */
+ { 25979, -1 }, /* SpriteParameterivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_tag_sample_buffer)
+static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = {
+ { 18205, -1 }, /* TagSampleBufferSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGI_color_table)
+static const struct gl_function_remap GL_SGI_color_table_functions[] = {
+ { 6672, _gloffset_ColorTableParameteriv },
+ { 7384, _gloffset_ColorTable },
+ { 13365, _gloffset_GetColorTable },
+ { 13475, _gloffset_CopyColorTable },
+ { 16963, _gloffset_ColorTableParameterfv },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUNX_constant_data)
+static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
+ { 27714, -1 }, /* FinishTextureSUNX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_global_alpha)
+static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
+ { 3035, -1 }, /* GlobalAlphaFactorubSUN */
+ { 4193, -1 }, /* GlobalAlphaFactoriSUN */
+ { 5615, -1 }, /* GlobalAlphaFactordSUN */
+ { 8571, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 8923, -1 }, /* GlobalAlphaFactorbSUN */
+ { 11660, -1 }, /* GlobalAlphaFactorfSUN */
+ { 11779, -1 }, /* GlobalAlphaFactorusSUN */
+ { 19902, -1 }, /* GlobalAlphaFactorsSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_mesh_array)
+static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
+ { 25791, -1 }, /* DrawMeshArraysSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_triangle_list)
+static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
+ { 3971, -1 }, /* ReplacementCodeubSUN */
+ { 5454, -1 }, /* ReplacementCodeubvSUN */
+ { 16684, -1 }, /* ReplacementCodeusvSUN */
+ { 16872, -1 }, /* ReplacementCodePointerSUN */
+ { 18229, -1 }, /* ReplacementCodeusSUN */
+ { 18976, -1 }, /* ReplacementCodeuiSUN */
+ { 26436, -1 }, /* ReplacementCodeuivSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_vertex)
+static const struct gl_function_remap GL_SUN_vertex_functions[] = {
+ { 999, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */
+ { 1197, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */
+ { 1423, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */
+ { 1699, -1 }, /* ReplacementCodeuiVertex3fvSUN */
+ { 1833, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
+ { 2346, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
+ { 2642, -1 }, /* Color4ubVertex3fvSUN */
+ { 4074, -1 }, /* Color4ubVertex3fSUN */
+ { 4150, -1 }, /* TexCoord2fVertex3fSUN */
+ { 4449, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 4779, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 5349, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 6419, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 7131, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 7899, -1 }, /* Color3fVertex3fSUN */
+ { 8882, -1 }, /* Color3fVertex3fvSUN */
+ { 9297, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 9969, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 11208, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 12600, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 13011, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14063, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 14397, -1 }, /* Color4ubVertex2fvSUN */
+ { 14637, -1 }, /* Normal3fVertex3fSUN */
+ { 15585, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 15846, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 16513, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 17289, -1 }, /* Color4ubVertex2fSUN */
+ { 17482, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 19335, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 19682, -1 }, /* Normal3fVertex3fvSUN */
+ { 20085, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 20951, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 21171, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 22874, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 24082, -1 }, /* TexCoord4fVertex4fSUN */
+ { 24508, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 24834, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 24961, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 25663, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_1_3)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
+ { 381, _gloffset_MultiTexCoord3sARB },
+ { 613, _gloffset_ActiveTextureARB },
+ { 3761, _gloffset_MultiTexCoord1fvARB },
+ { 5240, _gloffset_MultiTexCoord3dARB },
+ { 5285, _gloffset_MultiTexCoord2iARB },
+ { 5409, _gloffset_MultiTexCoord2svARB },
+ { 7340, _gloffset_MultiTexCoord2fARB },
+ { 9133, _gloffset_MultiTexCoord3fvARB },
+ { 9625, _gloffset_MultiTexCoord4sARB },
+ { 10225, _gloffset_MultiTexCoord2dvARB },
+ { 10607, _gloffset_MultiTexCoord1svARB },
+ { 10903, _gloffset_MultiTexCoord3svARB },
+ { 10964, _gloffset_MultiTexCoord4iARB },
+ { 11687, _gloffset_MultiTexCoord3iARB },
+ { 12389, _gloffset_MultiTexCoord1dARB },
+ { 12555, _gloffset_MultiTexCoord3dvARB },
+ { 13719, _gloffset_MultiTexCoord3ivARB },
+ { 13764, _gloffset_MultiTexCoord2sARB },
+ { 14984, _gloffset_MultiTexCoord4ivARB },
+ { 16613, _gloffset_ClientActiveTextureARB },
+ { 18829, _gloffset_MultiTexCoord2dARB },
+ { 19204, _gloffset_MultiTexCoord4dvARB },
+ { 19490, _gloffset_MultiTexCoord4fvARB },
+ { 20317, _gloffset_MultiTexCoord3fARB },
+ { 22627, _gloffset_MultiTexCoord4dARB },
+ { 22831, _gloffset_MultiTexCoord1sARB },
+ { 23009, _gloffset_MultiTexCoord1dvARB },
+ { 23828, _gloffset_MultiTexCoord1ivARB },
+ { 23921, _gloffset_MultiTexCoord2ivARB },
+ { 24260, _gloffset_MultiTexCoord1iARB },
+ { 25531, _gloffset_MultiTexCoord4svARB },
+ { 26049, _gloffset_MultiTexCoord1fARB },
+ { 26312, _gloffset_MultiTexCoord4fARB },
+ { 28541, _gloffset_MultiTexCoord2fvARB },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_1_4)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_1_4_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_1_5)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_1_5_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_2_0)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_2_0_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_2_1)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_2_1_functions[] = {
+ { -1, -1 }
+};
+#endif
+
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 5bef7c84fb2..3bb062bae2a 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -43,6 +43,8 @@
#include "glheader.h"
#include "imports.h"
#include "context.h"
+#include "fbobject.h"
+#include "formats.h"
#include "mtypes.h"
#include "fbobject.h"
#include "renderbuffer.h"
@@ -72,7 +74,7 @@ get_pointer_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb,
if (!rb->Data)
return NULL;
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- /* Can't assert _ActualFormat since these funcs may be used for serveral
+ /* Can't assert rb->Format since these funcs may be used for serveral
* different formats (GL_ALPHA8, GL_STENCIL_INDEX8, etc).
*/
return (GLubyte *) rb->Data + y * rb->Width + x;
@@ -448,7 +450,7 @@ static void *
get_pointer_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
/* No direct access since this buffer is RGB but caller will be
* treating it as if it were RGBA.
*/
@@ -463,7 +465,7 @@ get_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLubyte *src = (const GLubyte *) rb->Data + 3 * (y * rb->Width + x);
GLubyte *dst = (GLubyte *) values;
GLuint i;
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
dst[i * 4 + 0] = src[i * 3 + 0];
@@ -480,7 +482,7 @@ get_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
{
GLubyte *dst = (GLubyte *) values;
GLuint i;
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
const GLubyte *src
@@ -501,7 +503,7 @@ put_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLubyte *src = (const GLubyte *) values;
GLubyte *dst = (GLubyte *) rb->Data + 3 * (y * rb->Width + x);
GLuint i;
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
@@ -521,7 +523,7 @@ put_row_rgb_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLubyte *src = (const GLubyte *) values;
GLubyte *dst = (GLubyte *) rb->Data + 3 * (y * rb->Width + x);
GLuint i;
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
@@ -542,7 +544,7 @@ put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLubyte val1 = ((const GLubyte *) value)[1];
const GLubyte val2 = ((const GLubyte *) value)[2];
GLubyte *dst = (GLubyte *) rb->Data + 3 * (y * rb->Width + x);
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
if (!mask && val0 == val1 && val1 == val2) {
/* optimized case */
@@ -569,7 +571,7 @@ put_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
/* note: incoming values are RGB+A! */
const GLubyte *src = (const GLubyte *) values;
GLuint i;
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
@@ -592,7 +594,7 @@ put_mono_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb,
const GLubyte val1 = ((const GLubyte *) value)[1];
const GLubyte val2 = ((const GLubyte *) value)[2];
GLuint i;
- ASSERT(rb->_ActualFormat == GL_RGB8);
+ ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
@@ -617,7 +619,7 @@ get_pointer_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb,
if (!rb->Data)
return NULL;
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
return (GLubyte *) rb->Data + 4 * (y * rb->Width + x);
}
@@ -628,7 +630,7 @@ get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
{
const GLubyte *src = (const GLubyte *) rb->Data + 4 * (y * rb->Width + x);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
_mesa_memcpy(values, src, 4 * count * sizeof(GLubyte));
}
@@ -641,7 +643,7 @@ get_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
GLuint *dst = (GLuint *) values;
GLuint i;
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
for (i = 0; i < count; i++) {
const GLuint *src = (GLuint *) rb->Data + (y[i] * rb->Width + x[i]);
dst[i] = *src;
@@ -657,7 +659,7 @@ put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLuint *src = (const GLuint *) values;
GLuint *dst = (GLuint *) rb->Data + (y * rb->Width + x);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
if (mask) {
GLuint i;
for (i = 0; i < count; i++) {
@@ -681,7 +683,7 @@ put_row_rgb_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
GLubyte *dst = (GLubyte *) rb->Data + 4 * (y * rb->Width + x);
GLuint i;
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
dst[i * 4 + 0] = src[i * 3 + 0];
@@ -701,7 +703,7 @@ put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLuint val = *((const GLuint *) value);
GLuint *dst = (GLuint *) rb->Data + (y * rb->Width + x);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
if (!mask && val == 0) {
/* common case */
_mesa_bzero(dst, count * 4 * sizeof(GLubyte));
@@ -735,7 +737,7 @@ put_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLuint *src = (const GLuint *) values;
GLuint i;
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
GLuint *dst = (GLuint *) rb->Data + (y[i] * rb->Width + x[i]);
@@ -754,7 +756,7 @@ put_mono_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb,
const GLuint val = *((const GLuint *) value);
GLuint i;
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->_ActualFormat == GL_RGBA8);
+ ASSERT(rb->Format == MESA_FORMAT_RGBA8888);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
GLuint *dst = (GLuint *) rb->Data + (y[i] * rb->Width + x[i]);
@@ -947,15 +949,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
{
GLuint pixelSize;
- /* first clear these fields */
- rb->RedBits =
- rb->GreenBits =
- rb->BlueBits =
- rb->AlphaBits =
- rb->IndexBits =
- rb->DepthBits =
- rb->StencilBits = 0;
-
switch (internalFormat) {
case GL_RGB:
case GL_R3_G3_B2:
@@ -965,8 +958,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- rb->_ActualFormat = GL_RGB8;
- rb->_BaseFormat = GL_RGB;
+ rb->Format = MESA_FORMAT_RGB888;
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetPointer = get_pointer_ubyte3;
rb->GetRow = get_row_ubyte3;
@@ -976,10 +968,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ubyte3;
rb->PutValues = put_values_ubyte3;
rb->PutMonoValues = put_mono_values_ubyte3;
- rb->RedBits = 8 * sizeof(GLubyte);
- rb->GreenBits = 8 * sizeof(GLubyte);
- rb->BlueBits = 8 * sizeof(GLubyte);
- rb->AlphaBits = 0;
pixelSize = 3 * sizeof(GLubyte);
break;
case GL_RGBA:
@@ -987,8 +975,11 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
case GL_RGBA4:
case GL_RGB5_A1:
case GL_RGBA8:
- rb->_ActualFormat = GL_RGBA8;
- rb->_BaseFormat = GL_RGBA;
+#if 1
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+#endif
+ rb->Format = MESA_FORMAT_RGBA8888;
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetPointer = get_pointer_ubyte4;
rb->GetRow = get_row_ubyte4;
@@ -998,18 +989,12 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ubyte4;
rb->PutValues = put_values_ubyte4;
rb->PutMonoValues = put_mono_values_ubyte4;
- rb->RedBits = 8 * sizeof(GLubyte);
- rb->GreenBits = 8 * sizeof(GLubyte);
- rb->BlueBits = 8 * sizeof(GLubyte);
- rb->AlphaBits = 8 * sizeof(GLubyte);
pixelSize = 4 * sizeof(GLubyte);
break;
- case GL_RGB10_A2:
- case GL_RGBA12:
case GL_RGBA16:
- rb->_ActualFormat = GL_RGBA16;
- rb->_BaseFormat = GL_RGBA;
- rb->DataType = GL_UNSIGNED_SHORT;
+ /* for accum buffer */
+ rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
+ rb->DataType = GL_SHORT;
rb->GetPointer = get_pointer_ushort4;
rb->GetRow = get_row_ushort4;
rb->GetValues = get_values_ushort4;
@@ -1018,16 +1003,11 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ushort4;
rb->PutValues = put_values_ushort4;
rb->PutMonoValues = put_mono_values_ushort4;
- rb->RedBits = 8 * sizeof(GLushort);
- rb->GreenBits = 8 * sizeof(GLushort);
- rb->BlueBits = 8 * sizeof(GLushort);
- rb->AlphaBits = 8 * sizeof(GLushort);
pixelSize = 4 * sizeof(GLushort);
break;
-#if 00
+#if 0
case GL_ALPHA8:
- rb->_ActualFormat = GL_ALPHA8;
- rb->_BaseFormat = GL_RGBA; /* Yes, not GL_ALPHA! */
+ rb->Format = MESA_FORMAT_A8;
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetPointer = get_pointer_alpha8;
rb->GetRow = get_row_alpha8;
@@ -1037,10 +1017,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_alpha8;
rb->PutValues = put_values_alpha8;
rb->PutMonoValues = put_mono_values_alpha8;
- rb->RedBits = 0; /*red*/
- rb->GreenBits = 0; /*green*/
- rb->BlueBits = 0; /*blue*/
- rb->AlphaBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
break;
#endif
@@ -1048,8 +1024,8 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
case GL_STENCIL_INDEX1_EXT:
case GL_STENCIL_INDEX4_EXT:
case GL_STENCIL_INDEX8_EXT:
- rb->_ActualFormat = GL_STENCIL_INDEX8_EXT;
- rb->_BaseFormat = GL_STENCIL_INDEX;
+ case GL_STENCIL_INDEX16_EXT:
+ rb->Format = MESA_FORMAT_S8;
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetPointer = get_pointer_ubyte;
rb->GetRow = get_row_ubyte;
@@ -1059,28 +1035,11 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ubyte;
rb->PutValues = put_values_ubyte;
rb->PutMonoValues = put_mono_values_ubyte;
- rb->StencilBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
break;
- case GL_STENCIL_INDEX16_EXT:
- rb->_ActualFormat = GL_STENCIL_INDEX16_EXT;
- rb->_BaseFormat = GL_STENCIL_INDEX;
- rb->DataType = GL_UNSIGNED_SHORT;
- rb->GetPointer = get_pointer_ushort;
- rb->GetRow = get_row_ushort;
- rb->GetValues = get_values_ushort;
- rb->PutRow = put_row_ushort;
- rb->PutRowRGB = NULL;
- rb->PutMonoRow = put_mono_row_ushort;
- rb->PutValues = put_values_ushort;
- rb->PutMonoValues = put_mono_values_ushort;
- rb->StencilBits = 8 * sizeof(GLushort);
- pixelSize = sizeof(GLushort);
- break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
- rb->_ActualFormat = GL_DEPTH_COMPONENT16;
- rb->_BaseFormat = GL_DEPTH_COMPONENT;
+ rb->Format = MESA_FORMAT_Z16;
rb->DataType = GL_UNSIGNED_SHORT;
rb->GetPointer = get_pointer_ushort;
rb->GetRow = get_row_ushort;
@@ -1090,12 +1049,22 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ushort;
rb->PutValues = put_values_ushort;
rb->PutMonoValues = put_mono_values_ushort;
- rb->DepthBits = 8 * sizeof(GLushort);
pixelSize = sizeof(GLushort);
break;
case GL_DEPTH_COMPONENT24:
+ rb->DataType = GL_UNSIGNED_INT;
+ rb->GetPointer = get_pointer_uint;
+ rb->GetRow = get_row_uint;
+ rb->GetValues = get_values_uint;
+ rb->PutRow = put_row_uint;
+ rb->PutRowRGB = NULL;
+ rb->PutMonoRow = put_mono_row_uint;
+ rb->PutValues = put_values_uint;
+ rb->PutMonoValues = put_mono_values_uint;
+ rb->Format = MESA_FORMAT_X8_Z24;
+ pixelSize = sizeof(GLuint);
+ break;
case GL_DEPTH_COMPONENT32:
- rb->_BaseFormat = GL_DEPTH_COMPONENT;
rb->DataType = GL_UNSIGNED_INT;
rb->GetPointer = get_pointer_uint;
rb->GetRow = get_row_uint;
@@ -1105,20 +1074,12 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_uint;
rb->PutValues = put_values_uint;
rb->PutMonoValues = put_mono_values_uint;
- if (internalFormat == GL_DEPTH_COMPONENT24) {
- rb->_ActualFormat = GL_DEPTH_COMPONENT24;
- rb->DepthBits = 24;
- }
- else {
- rb->_ActualFormat = GL_DEPTH_COMPONENT32;
- rb->DepthBits = 32;
- }
+ rb->Format = MESA_FORMAT_Z32;
pixelSize = sizeof(GLuint);
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->_ActualFormat = GL_DEPTH24_STENCIL8_EXT;
- rb->_BaseFormat = GL_DEPTH_STENCIL_EXT;
+ rb->Format = MESA_FORMAT_Z24_S8;
rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
rb->GetPointer = get_pointer_uint;
rb->GetRow = get_row_uint;
@@ -1128,13 +1089,12 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_uint;
rb->PutValues = put_values_uint;
rb->PutMonoValues = put_mono_values_uint;
- rb->DepthBits = 24;
- rb->StencilBits = 8;
pixelSize = sizeof(GLuint);
break;
case GL_COLOR_INDEX8_EXT:
- rb->_ActualFormat = GL_COLOR_INDEX8_EXT;
- rb->_BaseFormat = GL_COLOR_INDEX;
+ case GL_COLOR_INDEX16_EXT:
+ case COLOR_INDEX32:
+ rb->Format = MESA_FORMAT_CI8;
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetPointer = get_pointer_ubyte;
rb->GetRow = get_row_ubyte;
@@ -1144,39 +1104,8 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ubyte;
rb->PutValues = put_values_ubyte;
rb->PutMonoValues = put_mono_values_ubyte;
- rb->IndexBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
break;
- case GL_COLOR_INDEX16_EXT:
- rb->_ActualFormat = GL_COLOR_INDEX16_EXT;
- rb->_BaseFormat = GL_COLOR_INDEX;
- rb->DataType = GL_UNSIGNED_SHORT;
- rb->GetPointer = get_pointer_ushort;
- rb->GetRow = get_row_ushort;
- rb->GetValues = get_values_ushort;
- rb->PutRow = put_row_ushort;
- rb->PutRowRGB = NULL;
- rb->PutMonoRow = put_mono_row_ushort;
- rb->PutValues = put_values_ushort;
- rb->PutMonoValues = put_mono_values_ushort;
- rb->IndexBits = 8 * sizeof(GLushort);
- pixelSize = sizeof(GLushort);
- break;
- case COLOR_INDEX32:
- rb->_ActualFormat = COLOR_INDEX32;
- rb->_BaseFormat = GL_COLOR_INDEX;
- rb->DataType = GL_UNSIGNED_INT;
- rb->GetPointer = get_pointer_uint;
- rb->GetRow = get_row_uint;
- rb->GetValues = get_values_uint;
- rb->PutRow = put_row_uint;
- rb->PutRowRGB = NULL;
- rb->PutMonoRow = put_mono_row_uint;
- rb->PutValues = put_values_uint;
- rb->PutMonoValues = put_mono_values_uint;
- rb->IndexBits = 8 * sizeof(GLuint);
- pixelSize = sizeof(GLuint);
- break;
default:
_mesa_problem(ctx, "Bad internalFormat in _mesa_soft_renderbuffer_storage");
return GL_FALSE;
@@ -1213,6 +1142,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->Width = width;
rb->Height = height;
+ rb->_BaseFormat = _mesa_base_fbo_format(ctx, rb->InternalFormat);
return GL_TRUE;
}
@@ -1239,7 +1169,7 @@ alloc_storage_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb,
GLenum internalFormat, GLuint width, GLuint height)
{
ASSERT(arb != arb->Wrapped);
- ASSERT(arb->_ActualFormat == GL_ALPHA8);
+ ASSERT(arb->Format == MESA_FORMAT_A8);
/* first, pass the call to the wrapped RGB buffer */
if (!arb->Wrapped->AllocStorage(ctx, arb->Wrapped, internalFormat,
@@ -1439,8 +1369,8 @@ put_mono_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb,
static void
copy_buffer_alpha8(struct gl_renderbuffer* dst, struct gl_renderbuffer* src)
{
- ASSERT(dst->_ActualFormat == GL_ALPHA8);
- ASSERT(src->_ActualFormat == GL_ALPHA8);
+ ASSERT(dst->Format == MESA_FORMAT_A8);
+ ASSERT(src->Format == MESA_FORMAT_A8);
ASSERT(dst->Width == src->Width);
ASSERT(dst->Height == src->Height);
@@ -1486,16 +1416,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
rb->Width = 0;
rb->Height = 0;
rb->InternalFormat = GL_NONE;
- rb->_ActualFormat = GL_NONE;
- rb->_BaseFormat = GL_NONE;
-
- rb->ComponentType = GL_UNSIGNED_NORMALIZED; /* ARB_fbo */
- rb->ColorEncoding = GL_LINEAR; /* ARB_fbo */
-
- rb->RedBits = rb->GreenBits = rb->BlueBits = rb->AlphaBits = 0;
- rb->IndexBits = 0;
- rb->DepthBits = 0;
- rb->StencilBits = 0;
+ rb->Format = MESA_FORMAT_NONE;
rb->DataType = GL_NONE;
rb->Data = NULL;
@@ -1612,18 +1533,15 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
if (rgbBits <= 8) {
if (alphaBits)
- rb->_ActualFormat = GL_RGBA8;
+ rb->Format = MESA_FORMAT_RGBA8888;
else
- rb->_ActualFormat = GL_RGB8;
+ rb->Format = MESA_FORMAT_RGB888;
}
else {
assert(rgbBits <= 16);
- if (alphaBits)
- rb->_ActualFormat = GL_RGBA16;
- else
- rb->_ActualFormat = GL_RGBA16; /* don't really have RGB16 yet */
+ rb->Format = MESA_FORMAT_NONE; /*XXX RGBA16;*/
}
- rb->InternalFormat = rb->_ActualFormat;
+ rb->InternalFormat = GL_RGBA;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, b, rb);
@@ -1677,15 +1595,9 @@ _mesa_add_color_index_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
return GL_FALSE;
}
- if (indexBits <= 8) {
- /* only support GLuint for now */
- /*rb->InternalFormat = GL_COLOR_INDEX8_EXT;*/
- rb->_ActualFormat = COLOR_INDEX32;
- }
- else {
- rb->_ActualFormat = COLOR_INDEX32;
- }
- rb->InternalFormat = rb->_ActualFormat;
+ assert(indexBits <= 8);
+ rb->Format = MESA_FORMAT_CI8;
+ rb->InternalFormat = GL_COLOR_INDEX;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, b, rb);
@@ -1758,8 +1670,7 @@ _mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
* values.
*/
arb->InternalFormat = arb->Wrapped->InternalFormat;
- arb->_ActualFormat = GL_ALPHA8;
- arb->_BaseFormat = arb->Wrapped->_BaseFormat;
+ arb->Format = MESA_FORMAT_A8;
arb->DataType = arb->Wrapped->DataType;
arb->AllocStorage = alloc_storage_alpha8;
arb->Delete = delete_renderbuffer_alpha8;
@@ -1833,15 +1744,17 @@ _mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
}
if (depthBits <= 16) {
- rb->_ActualFormat = GL_DEPTH_COMPONENT16;
+ rb->Format = MESA_FORMAT_Z16;
+ rb->InternalFormat = GL_DEPTH_COMPONENT16;
}
else if (depthBits <= 24) {
- rb->_ActualFormat = GL_DEPTH_COMPONENT24;
+ rb->Format = MESA_FORMAT_X8_Z24;
+ rb->InternalFormat = GL_DEPTH_COMPONENT24;
}
else {
- rb->_ActualFormat = GL_DEPTH_COMPONENT32;
+ rb->Format = MESA_FORMAT_Z32;
+ rb->InternalFormat = GL_DEPTH_COMPONENT32;
}
- rb->InternalFormat = rb->_ActualFormat;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, rb);
@@ -1878,14 +1791,9 @@ _mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
return GL_FALSE;
}
- if (stencilBits <= 8) {
- rb->_ActualFormat = GL_STENCIL_INDEX8_EXT;
- }
- else {
- /* not really supported (see s_stencil.c code) */
- rb->_ActualFormat = GL_STENCIL_INDEX16_EXT;
- }
- rb->InternalFormat = rb->_ActualFormat;
+ assert(stencilBits <= 8);
+ rb->Format = MESA_FORMAT_S8;
+ rb->InternalFormat = GL_STENCIL_INDEX8;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, rb);
@@ -1923,7 +1831,7 @@ _mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
return GL_FALSE;
}
- rb->_ActualFormat = GL_RGBA16;
+ rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
rb->InternalFormat = GL_RGBA16;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_ACCUM, rb);
@@ -1967,13 +1875,9 @@ _mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
return GL_FALSE;
}
- if (colorBits <= 8) {
- rb->_ActualFormat = GL_RGBA8;
- }
- else {
- rb->_ActualFormat = GL_RGBA16;
- }
- rb->InternalFormat = rb->_ActualFormat;
+ assert (colorBits <= 8);
+ rb->Format = MESA_FORMAT_RGBA8888;
+ rb->InternalFormat = GL_RGBA;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_AUX0 + i, rb);
@@ -2071,6 +1975,8 @@ void
_mesa_add_renderbuffer(struct gl_framebuffer *fb,
GLuint bufferName, struct gl_renderbuffer *rb)
{
+ GLenum baseFormat;
+
assert(fb);
assert(rb);
assert(bufferName < BUFFER_COUNT);
@@ -2095,7 +2001,8 @@ _mesa_add_renderbuffer(struct gl_framebuffer *fb,
* and the device driver is expecting 8-bit values (GLubyte), we can
* use a "renderbuffer adaptor/wrapper" to do the necessary conversions.
*/
- if (rb->_BaseFormat == GL_RGBA) {
+ baseFormat = _mesa_get_format_base_format(rb->Format);
+ if (baseFormat == GL_RGBA) {
if (CHAN_BITS == 16 && rb->DataType == GL_UNSIGNED_BYTE) {
GET_CURRENT_CONTEXT(ctx);
rb = _mesa_new_renderbuffer_16wrap8(ctx, rb);
@@ -2202,7 +2109,7 @@ _mesa_new_depthstencil_renderbuffer(GLcontext *ctx, GLuint name)
/* init fields not covered by _mesa_new_renderbuffer() */
dsrb->InternalFormat = GL_DEPTH24_STENCIL8_EXT;
- dsrb->_ActualFormat = GL_DEPTH24_STENCIL8_EXT;
+ dsrb->Format = MESA_FORMAT_Z24_S8;
dsrb->AllocStorage = _mesa_soft_renderbuffer_storage;
return dsrb;
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 96fd8695a59..d0dc7e551c9 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -26,6 +26,12 @@
#include "glheader.h"
#include "context.h"
#include "shaders.h"
+#include "shader/shader_api.h"
+
+
+/** Define this to enable shader substitution (see below) */
+#define SHADER_SUBST 0
+
/**
@@ -404,7 +410,6 @@ _mesa_read_shader(const char *fname)
}
-
/**
* Called via glShaderSource() and glShaderSourceARB() API functions.
* Basically, concatenate the source code strings into one long string
@@ -418,6 +423,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
GLint *offsets;
GLsizei i, totalLength;
GLcharARB *source;
+ GLuint checksum;
if (!shaderObj || string == NULL) {
_mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB");
@@ -469,15 +475,16 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
source[totalLength - 1] = '\0';
source[totalLength - 2] = '\0';
- if (0) {
+ if (SHADER_SUBST) {
/* Compute the shader's source code checksum then try to open a file
* named newshader_<CHECKSUM>. If it exists, use it in place of the
* original shader source code. For debugging.
*/
- const GLuint checksum = _mesa_str_checksum(source);
char filename[100];
GLcharARB *newSource;
+ checksum = _mesa_str_checksum(source);
+
sprintf(filename, "newshader_%d", checksum);
newSource = _mesa_read_shader(filename);
@@ -491,6 +498,12 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
ctx->Driver.ShaderSource(ctx, shaderObj, source);
+ if (SHADER_SUBST) {
+ struct gl_shader *sh = _mesa_lookup_shader(ctx, shaderObj);
+ if (sh)
+ sh->SourceChecksum = checksum; /* save original checksum */
+ }
+
_mesa_free(offsets);
}
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index c1b8c7675a2..a4f1926ab37 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -34,10 +34,10 @@
#include "imports.h"
#include "colormac.h"
#include "context.h"
+#include "formats.h"
#include "image.h"
#include "mipmap.h"
#include "texcompress.h"
-#include "texformat.h"
#include "texstore.h"
@@ -113,250 +113,121 @@ _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all)
}
-
-/**
- * Return number of bytes needed to store a texture of the given size
- * using the specified compressed format.
- * This is called via the ctx->Driver.CompressedTextureSize function,
- * unless a device driver overrides it.
- *
- * \param width texture width in texels.
- * \param height texture height in texels.
- * \param depth texture depth in texels.
- * \param mesaFormat one of the MESA_FORMAT_* compressed formats
- *
- * \return size in bytes, or zero if bad format
- */
-GLuint
-_mesa_compressed_texture_size( GLcontext *ctx,
- GLsizei width, GLsizei height, GLsizei depth,
- GLuint mesaFormat )
-{
- GLuint size;
-
- ASSERT(depth == 1);
- (void) depth;
- (void) size;
-
- switch (mesaFormat) {
-#if FEATURE_texture_fxt1
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
- /* round up width to next multiple of 8, height to next multiple of 4 */
- width = (width + 7) & ~7;
- height = (height + 3) & ~3;
- /* 16 bytes per 8x4 tile of RGB[A] texels */
- size = width * height / 2;
- /* Textures smaller than 8x4 will effectively be made into 8x4 and
- * take 16 bytes.
- */
- return size;
-#endif
-#if FEATURE_texture_s3tc
- case MESA_FORMAT_RGB_DXT1:
- case MESA_FORMAT_RGBA_DXT1:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
-#endif
- /* round up width, height to next multiple of 4 */
- width = (width + 3) & ~3;
- height = (height + 3) & ~3;
- /* 8 bytes per 4x4 tile of RGB[A] texels */
- size = width * height / 2;
- /* Textures smaller than 4x4 will effectively be made into 4x4 and
- * take 8 bytes.
- */
- return size;
- case MESA_FORMAT_RGBA_DXT3:
- case MESA_FORMAT_RGBA_DXT5:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGBA_DXT3:
- case MESA_FORMAT_SRGBA_DXT5:
-#endif
- /* round up width, height to next multiple of 4 */
- width = (width + 3) & ~3;
- height = (height + 3) & ~3;
- /* 16 bytes per 4x4 tile of RGBA texels */
- size = width * height; /* simple! */
- /* Textures smaller than 4x4 will effectively be made into 4x4 and
- * take 16 bytes.
- */
- return size;
-#endif
- default:
- _mesa_problem(ctx, "bad mesaFormat in _mesa_compressed_texture_size");
- return 0;
- }
-}
-
-
/**
- * As above, but format is specified by a GLenum (GL_COMPRESSED_*) token.
- *
- * Note: This function CAN NOT return a padded hardware texture size.
- * That's why we don't call the ctx->Driver.CompressedTextureSize() function.
- *
- * We use this function to validate the <imageSize> parameter
- * of glCompressedTex[Sub]Image1/2/3D(), which must be an exact match.
+ * Convert a compressed MESA_FORMAT_x to a GLenum.
*/
-GLuint
-_mesa_compressed_texture_size_glenum(GLcontext *ctx,
- GLsizei width, GLsizei height,
- GLsizei depth, GLenum glformat)
+gl_format
+_mesa_glenum_to_compressed_format(GLenum format)
{
- GLuint mesaFormat;
-
- switch (glformat) {
-#if FEATURE_texture_fxt1
+ switch (format) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
- mesaFormat = MESA_FORMAT_RGB_FXT1;
- break;
+ return MESA_FORMAT_RGB_FXT1;
case GL_COMPRESSED_RGBA_FXT1_3DFX:
- mesaFormat = MESA_FORMAT_RGBA_FXT1;
- break;
-#endif
-#if FEATURE_texture_s3tc
+ return MESA_FORMAT_RGBA_FXT1;
+
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case GL_RGB_S3TC:
- mesaFormat = MESA_FORMAT_RGB_DXT1;
- break;
+ return MESA_FORMAT_RGB_DXT1;
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case GL_RGB4_S3TC:
- mesaFormat = MESA_FORMAT_RGBA_DXT1;
- break;
+ return MESA_FORMAT_RGBA_DXT1;
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
case GL_RGBA_S3TC:
- mesaFormat = MESA_FORMAT_RGBA_DXT3;
- break;
+ return MESA_FORMAT_RGBA_DXT3;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
case GL_RGBA4_S3TC:
- mesaFormat = MESA_FORMAT_RGBA_DXT5;
- break;
-#if FEATURE_EXT_texture_sRGB
+ return MESA_FORMAT_RGBA_DXT5;
+
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
- mesaFormat = MESA_FORMAT_SRGB_DXT1;
- break;
+ return MESA_FORMAT_SRGB_DXT1;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
- mesaFormat = MESA_FORMAT_SRGBA_DXT1;
- break;
+ return MESA_FORMAT_SRGBA_DXT1;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- mesaFormat = MESA_FORMAT_SRGBA_DXT3;
- break;
+ return MESA_FORMAT_SRGBA_DXT3;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- mesaFormat = MESA_FORMAT_SRGBA_DXT5;
- break;
-#endif
-#endif
+ return MESA_FORMAT_SRGBA_DXT5;
+
default:
- return 0;
+ return MESA_FORMAT_NONE;
}
-
- return _mesa_compressed_texture_size(ctx, width, height, depth, mesaFormat);
}
-/*
- * Compute the bytes per row in a compressed texture image.
- * We use this for computing the destination address for sub-texture updates.
- * \param mesaFormat one of the MESA_FORMAT_* compressed formats
- * \param width image width in pixels
- * \return stride, in bytes, between rows for compressed image
+/**
+ * Given a compressed MESA_FORMAT_x value, return the corresponding
+ * GLenum for that format.
+ * This is needed for glGetTexLevelParameter(GL_TEXTURE_INTERNAL_FORMAT)
+ * which must return the specific texture format used when the user might
+ * have originally specified a generic compressed format in their
+ * glTexImage2D() call.
+ * For non-compressed textures, we always return the user-specified
+ * internal format unchanged.
*/
-GLint
-_mesa_compressed_row_stride(GLuint mesaFormat, GLsizei width)
+GLenum
+_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat)
{
- GLint stride;
-
switch (mesaFormat) {
#if FEATURE_texture_fxt1
case MESA_FORMAT_RGB_FXT1:
+ return GL_COMPRESSED_RGB_FXT1_3DFX;
case MESA_FORMAT_RGBA_FXT1:
- stride = ((width + 7) / 8) * 16; /* 16 bytes per 8x4 tile */
- break;
+ return GL_COMPRESSED_RGBA_FXT1_3DFX;
#endif
#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
+ return GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
case MESA_FORMAT_RGBA_DXT1:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
-#endif
- stride = ((width + 3) / 4) * 8; /* 8 bytes per 4x4 tile */
- break;
+ return GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
case MESA_FORMAT_RGBA_DXT3:
+ return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
case MESA_FORMAT_RGBA_DXT5:
+ return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
#if FEATURE_EXT_texture_sRGB
+ case MESA_FORMAT_SRGB_DXT1:
+ return GL_COMPRESSED_SRGB_S3TC_DXT1_EXT;
+ case MESA_FORMAT_SRGBA_DXT1:
+ return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
case MESA_FORMAT_SRGBA_DXT3:
+ return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
case MESA_FORMAT_SRGBA_DXT5:
+ return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
#endif
- stride = ((width + 3) / 4) * 16; /* 16 bytes per 4x4 tile */
- break;
#endif
default:
- _mesa_problem(NULL, "bad mesaFormat in _mesa_compressed_row_stride");
+ _mesa_problem(ctx, "Unexpected mesa texture format in"
+ " _mesa_compressed_format_to_glenum()");
return 0;
}
-
- return stride;
}
/*
* Return the address of the pixel at (col, row, img) in a
* compressed texture image.
- * \param col, row, img - image position (3D)
+ * \param col, row, img - image position (3D), should be a multiple of the
+ * format's block size.
* \param format - compressed image format
- * \param width - image width
+ * \param width - image width (stride) in pixels
* \param image - the image address
- * \return address of pixel at (row, col)
+ * \return address of pixel at (row, col, img)
*/
GLubyte *
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
- GLuint mesaFormat,
+ gl_format mesaFormat,
GLsizei width, const GLubyte *image)
{
- GLubyte *addr;
+ /* XXX only 2D images implemented, not 3D */
+ const GLuint blockSize = _mesa_get_format_bytes(mesaFormat);
+ GLuint bw, bh;
+ GLint offset;
- (void) img;
+ _mesa_get_format_block_size(mesaFormat, &bw, &bh);
- /* We try to spot a "complete" subtexture "above" ROW, COL;
- * this texture is given by appropriate rounding of WIDTH x ROW.
- * Then we just add the amount left (usually on the left).
- *
- * Example for X*Y microtiles (Z bytes each)
- * offset = Z * (((width + X - 1) / X) * (row / Y) + col / X);
- */
+ ASSERT(col % bw == 0);
+ ASSERT(row % bh == 0);
- switch (mesaFormat) {
-#if FEATURE_texture_fxt1
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
- addr = (GLubyte *) image + 16 * (((width + 7) / 8) * (row / 4) + col / 8);
- break;
-#endif
-#if FEATURE_texture_s3tc
- case MESA_FORMAT_RGB_DXT1:
- case MESA_FORMAT_RGBA_DXT1:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
-#endif
- addr = (GLubyte *) image + 8 * (((width + 3) / 4) * (row / 4) + col / 4);
- break;
- case MESA_FORMAT_RGBA_DXT3:
- case MESA_FORMAT_RGBA_DXT5:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGBA_DXT3:
- case MESA_FORMAT_SRGBA_DXT5:
-#endif
- addr = (GLubyte *) image + 16 * (((width + 3) / 4) * (row / 4) + col / 4);
- break;
-#endif
- default:
- _mesa_problem(NULL, "bad mesaFormat in _mesa_compressed_image_address");
- addr = NULL;
- }
+ offset = ((width + bw - 1) / bw) * (row / bh) + col / bw;
+ offset *= blockSize;
- return addr;
+ return (GLubyte *) image + offset;
}
diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h
index 44f33382228..5e73a3149bd 100644
--- a/src/mesa/main/texcompress.h
+++ b/src/mesa/main/texcompress.h
@@ -26,46 +26,28 @@
#define TEXCOMPRESS_H
#include "mtypes.h"
+#include "formats.h"
#if _HAVE_FULL_GL
extern GLuint
_mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all);
-extern GLuint
-_mesa_compressed_texture_size( GLcontext *ctx,
- GLsizei width, GLsizei height, GLsizei depth,
- GLuint mesaFormat );
-
-extern GLuint
-_mesa_compressed_texture_size_glenum(GLcontext *ctx,
- GLsizei width, GLsizei height,
- GLsizei depth, GLenum glformat);
-
-extern GLint
-_mesa_compressed_row_stride(GLuint mesaFormat, GLsizei width);
+extern gl_format
+_mesa_glenum_to_compressed_format(GLenum format);
+extern GLenum
+_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat);
extern GLubyte *
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
- GLuint mesaFormat,
+ gl_format mesaFormat,
GLsizei width, const GLubyte *image);
-
-extern void
-_mesa_init_texture_s3tc( GLcontext *ctx );
-
-extern void
-_mesa_init_texture_fxt1( GLcontext *ctx );
-
-
#else /* _HAVE_FULL_GL */
/* no-op macros */
#define _mesa_get_compressed_formats( c, f ) 0
-#define _mesa_compressed_texture_size( c, w, h, d, f ) 0
-#define _mesa_compressed_texture_size_glenum( c, w, h, d, f ) 0
-#define _mesa_compressed_row_stride( f, w) 0
#define _mesa_compressed_image_address(c, r, i, f, w, i2 ) 0
#define _mesa_compress_teximage( c, w, h, sF, s, sRS, dF, d, drs ) ((void)0)
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index fc151605c9e..85becb80d2a 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -37,10 +37,13 @@
#include "image.h"
#include "mipmap.h"
#include "texcompress.h"
-#include "texformat.h"
+#include "texcompress_fxt1.h"
#include "texstore.h"
+#if FEATURE_texture_fxt1
+
+
static void
fxt1_encode (GLuint width, GLuint height, GLint comps,
const void *source, GLint srcRowStride,
@@ -52,20 +55,10 @@ fxt1_decode_1 (const void *texture, GLint stride,
/**
- * Called during context initialization.
- */
-void
-_mesa_init_texture_fxt1( GLcontext *ctx )
-{
- (void) ctx;
-}
-
-
-/**
- * Called via TexFormat->StoreImage to store an RGB_FXT1 texture.
+ * Store user's image in rgb_fxt1 format.
*/
-static GLboolean
-texstore_rgb_fxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
@@ -73,7 +66,7 @@ texstore_rgb_fxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == &_mesa_texformat_rgb_fxt1);
+ ASSERT(dstFormat == MESA_FORMAT_RGB_FXT1);
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
@@ -87,7 +80,7 @@ texstore_rgb_fxt1(TEXSTORE_PARAMS)
/* convert image to RGB/GLchan */
tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ _mesa_get_format_base_format(dstFormat),
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -105,7 +98,7 @@ texstore_rgb_fxt1(TEXSTORE_PARAMS)
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat->MesaFormat,
+ dstFormat,
texWidth, (GLubyte *) dstAddr);
fxt1_encode(srcWidth, srcHeight, 3, pixels, srcRowStride,
@@ -119,10 +112,10 @@ texstore_rgb_fxt1(TEXSTORE_PARAMS)
/**
- * Called via TexFormat->StoreImage to store an RGBA_FXT1 texture.
+ * Store user's image in rgba_fxt1 format.
*/
-static GLboolean
-texstore_rgba_fxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
@@ -130,7 +123,7 @@ texstore_rgba_fxt1(TEXSTORE_PARAMS)
GLint texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == &_mesa_texformat_rgba_fxt1);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_FXT1);
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
@@ -144,7 +137,7 @@ texstore_rgba_fxt1(TEXSTORE_PARAMS)
/* convert image to RGBA/GLchan */
tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ _mesa_get_format_base_format(dstFormat),
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -162,7 +155,7 @@ texstore_rgba_fxt1(TEXSTORE_PARAMS)
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat->MesaFormat,
+ dstFormat,
texWidth, (GLubyte *) dstAddr);
fxt1_encode(srcWidth, srcHeight, 4, pixels, srcRowStride,
@@ -175,18 +168,9 @@ texstore_rgba_fxt1(TEXSTORE_PARAMS)
}
-static void
-fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
-{
- (void) k;
- fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
-}
-
-
-static void
-fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -199,19 +183,9 @@ fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
}
-static void
-fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
-{
- (void) k;
- fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
- texel[ACOMP] = 255;
-}
-
-
-static void
-fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -225,55 +199,6 @@ fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
-const struct gl_texture_format _mesa_texformat_rgb_fxt1 = {
- MESA_FORMAT_RGB_FXT1, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgb_fxt1, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgb_fxt1, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgb_fxt1, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba_fxt1 = {
- MESA_FORMAT_RGBA_FXT1, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 1, /*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_fxt1, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgba_fxt1, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_fxt1, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-
/***************************************************************************\
* FXT1 encoder
*
@@ -1722,3 +1647,6 @@ fxt1_decode_1 (const void *texture, GLint stride, /* in pixels */
decode_1[mode](code, t, rgba);
}
+
+
+#endif /* FEATURE_texture_fxt1 */
diff --git a/src/mesa/main/texcompress_fxt1.h b/src/mesa/main/texcompress_fxt1.h
new file mode 100644
index 00000000000..d63ca71e212
--- /dev/null
+++ b/src/mesa/main/texcompress_fxt1.h
@@ -0,0 +1,59 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef TEXCOMPRESS_FXT1_H
+#define TEXCOMPRESS_FXT1_H
+
+#include "main/mtypes.h"
+#include "texstore.h"
+
+#if FEATURE_texture_fxt1
+
+extern GLboolean
+_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_fxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgb_fxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+#else /* FEATURE_texture_fxt1 */
+
+/* these are used only in texstore_funcs[] */
+#define _mesa_texstore_rgb_fxt1 NULL
+#define _mesa_texstore_rgba_fxt1 NULL
+
+/* these are used only in texfetch_funcs[] */
+#define _mesa_fetch_texel_2d_f_rgba_fxt1 NULL
+#define _mesa_fetch_texel_2d_f_rgb_fxt1 NULL
+
+#endif /* FEATURE_texture_fxt1 */
+
+#endif /* TEXCOMPRESS_FXT1_H */
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index a1c0f18f36f..b271a539a72 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -41,9 +41,13 @@
#include "dlopen.h"
#include "image.h"
#include "texcompress.h"
-#include "texformat.h"
+#include "texcompress_s3tc.h"
#include "texstore.h"
+
+#if FEATURE_texture_s3tc
+
+
#ifdef __MINGW32__
#define DXTN_LIBNAME "dxtn.dll"
#define RTLD_LAZY 0
@@ -153,10 +157,10 @@ _mesa_init_texture_s3tc( GLcontext *ctx )
}
/**
- * Called via TexFormat->StoreImage to store an RGB_DXT1 texture.
+ * Store user's image in rgb_dxt1 format.
*/
-static GLboolean
-texstore_rgb_dxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
@@ -164,7 +168,7 @@ texstore_rgb_dxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == &_mesa_texformat_rgb_dxt1);
+ ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -178,7 +182,7 @@ texstore_rgb_dxt1(TEXSTORE_PARAMS)
/* convert image to RGB/GLchan */
tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ _mesa_get_format_base_format(dstFormat),
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -196,7 +200,7 @@ texstore_rgb_dxt1(TEXSTORE_PARAMS)
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat->MesaFormat,
+ dstFormat,
texWidth, (GLubyte *) dstAddr);
if (ext_tx_compress_dxtn) {
@@ -216,10 +220,10 @@ texstore_rgb_dxt1(TEXSTORE_PARAMS)
/**
- * Called via TexFormat->StoreImage to store an RGBA_DXT1 texture.
+ * Store user's image in rgba_dxt1 format.
*/
-static GLboolean
-texstore_rgba_dxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
@@ -227,7 +231,7 @@ texstore_rgba_dxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == &_mesa_texformat_rgba_dxt1);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -241,7 +245,7 @@ texstore_rgba_dxt1(TEXSTORE_PARAMS)
/* convert image to RGBA/GLchan */
tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ _mesa_get_format_base_format(dstFormat),
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -259,7 +263,7 @@ texstore_rgba_dxt1(TEXSTORE_PARAMS)
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat->MesaFormat,
+ dstFormat,
texWidth, (GLubyte *) dstAddr);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
@@ -278,10 +282,10 @@ texstore_rgba_dxt1(TEXSTORE_PARAMS)
/**
- * Called via TexFormat->StoreImage to store an RGBA_DXT3 texture.
+ * Store user's image in rgba_dxt3 format.
*/
-static GLboolean
-texstore_rgba_dxt3(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
@@ -289,7 +293,7 @@ texstore_rgba_dxt3(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == &_mesa_texformat_rgba_dxt3);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -303,7 +307,7 @@ texstore_rgba_dxt3(TEXSTORE_PARAMS)
/* convert image to RGBA/GLchan */
tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ _mesa_get_format_base_format(dstFormat),
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -320,7 +324,7 @@ texstore_rgba_dxt3(TEXSTORE_PARAMS)
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat->MesaFormat,
+ dstFormat,
texWidth, (GLubyte *) dstAddr);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
@@ -339,10 +343,10 @@ texstore_rgba_dxt3(TEXSTORE_PARAMS)
/**
- * Called via TexFormat->StoreImage to store an RGBA_DXT5 texture.
+ * Store user's image in rgba_dxt5 format.
*/
-static GLboolean
-texstore_rgba_dxt5(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
@@ -350,7 +354,7 @@ texstore_rgba_dxt5(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == &_mesa_texformat_rgba_dxt5);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -364,7 +368,7 @@ texstore_rgba_dxt5(TEXSTORE_PARAMS)
/* convert image to RGBA/GLchan */
tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ _mesa_get_format_base_format(dstFormat),
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -381,7 +385,7 @@ texstore_rgba_dxt5(TEXSTORE_PARAMS)
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat->MesaFormat,
+ dstFormat,
texWidth, (GLubyte *) dstAddr);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
@@ -414,9 +418,9 @@ fetch_texel_2d_rgb_dxt1( const struct gl_texture_image *texImage,
}
-static void
-fetch_texel_2d_f_rgb_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -442,9 +446,9 @@ fetch_texel_2d_rgba_dxt1( const struct gl_texture_image *texImage,
}
-static void
-fetch_texel_2d_f_rgba_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -471,9 +475,9 @@ fetch_texel_2d_rgba_dxt3( const struct gl_texture_image *texImage,
}
-static void
-fetch_texel_2d_f_rgba_dxt3( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -499,9 +503,9 @@ fetch_texel_2d_rgba_dxt5( const struct gl_texture_image *texImage,
}
-static void
-fetch_texel_2d_f_rgba_dxt5( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -513,9 +517,9 @@ fetch_texel_2d_f_rgba_dxt5( const struct gl_texture_image *texImage,
}
#if FEATURE_EXT_texture_sRGB
-static void
-fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -526,9 +530,9 @@ fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-static void
-fetch_texel_2d_f_srgba_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -539,9 +543,9 @@ fetch_texel_2d_f_srgba_dxt1( const struct gl_texture_image *texImage,
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-static void
-fetch_texel_2d_f_srgba_dxt3( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -552,9 +556,9 @@ fetch_texel_2d_f_srgba_dxt3( const struct gl_texture_image *texImage,
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-static void
-fetch_texel_2d_f_srgba_dxt5( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
@@ -564,198 +568,7 @@ fetch_texel_2d_f_srgba_dxt5( const struct gl_texture_image *texImage,
texel[BCOMP] = nonlinear_to_linear(rgba[BCOMP]);
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-#endif
+#endif /* FEATURE_EXT_texture_sRGB */
-const struct gl_texture_format _mesa_texformat_rgb_dxt1 = {
- MESA_FORMAT_RGB_DXT1, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgb_dxt1, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgb_dxt1, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgb_dxt1, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba_dxt1 = {
- MESA_FORMAT_RGBA_DXT1, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 1, /*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_dxt1, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgba_dxt1, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_dxt1, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba_dxt3 = {
- MESA_FORMAT_RGBA_DXT3, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 4, /*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_dxt3, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgba_dxt3, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_dxt3, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba_dxt5 = {
- MESA_FORMAT_RGBA_DXT5, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4,/*approx*/ /* RedBits */
- 4,/*approx*/ /* GreenBits */
- 4,/*approx*/ /* BlueBits */
- 4,/*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_dxt5, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgba_dxt5, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_dxt5, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-#if FEATURE_EXT_texture_sRGB
-const struct gl_texture_format _mesa_texformat_srgb_dxt1 = {
- MESA_FORMAT_SRGB_DXT1, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgb_dxt1, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgb_dxt1, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_srgba_dxt1 = {
- MESA_FORMAT_SRGBA_DXT1, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 1, /*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_dxt1, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgba_dxt1, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_srgba_dxt3 = {
- MESA_FORMAT_SRGBA_DXT3, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /*approx*/ /* RedBits */
- 4, /*approx*/ /* GreenBits */
- 4, /*approx*/ /* BlueBits */
- 4, /*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_dxt3, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgba_dxt3, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_srgba_dxt5 = {
- MESA_FORMAT_SRGBA_DXT5, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4,/*approx*/ /* RedBits */
- 4,/*approx*/ /* GreenBits */
- 4,/*approx*/ /* BlueBits */
- 4,/*approx*/ /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- texstore_rgba_dxt5, /* StoreTexImageFunc */
- NULL, /*impossible*/ /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /*impossible*/ /* FetchTexel3D */
- NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgba_dxt5, /* FetchTexel2Df */
- NULL, /*impossible*/ /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-#endif
+#endif /* FEATURE_texture_s3tc */
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
new file mode 100644
index 00000000000..2e7688d3669
--- /dev/null
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -0,0 +1,106 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef TEXCOMPRESS_S3TC_H
+#define TEXCOMPRESS_S3TC_H
+
+#include "main/mtypes.h"
+#include "texstore.h"
+
+
+#if FEATURE_texture_s3tc
+
+extern GLboolean
+_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS);
+
+extern void
+_mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgb_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_init_texture_s3tc(GLcontext *ctx);
+
+#else /* FEATURE_texture_s3tc */
+
+/* these are used only in texstore_funcs[] */
+#define _mesa_texstore_rgb_dxt1 NULL
+#define _mesa_texstore_rgba_dxt1 NULL
+#define _mesa_texstore_rgba_dxt3 NULL
+#define _mesa_texstore_rgba_dxt5 NULL
+
+/* these are used only in texfetch_funcs[] */
+#define _mesa_fetch_texel_2d_f_rgb_dxt1 NULL
+#define _mesa_fetch_texel_2d_f_rgba_dxt1 NULL
+#define _mesa_fetch_texel_2d_f_rgba_dxt3 NULL
+#define _mesa_fetch_texel_2d_f_rgba_dxt5 NULL
+#define _mesa_fetch_texel_2d_f_srgb_dxt1 NULL
+#define _mesa_fetch_texel_2d_f_srgba_dxt1 NULL
+#define _mesa_fetch_texel_2d_f_srgba_dxt3 NULL
+#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL
+
+static INLINE void
+_mesa_init_texture_s3tc(GLcontext *ctx)
+{
+}
+
+#endif /* FEATURE_texture_s3tc */
+
+#endif /* TEXCOMPRESS_S3TC_H */
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 6d86a4275cc..4442fb8cf8e 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -598,7 +598,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
void GLAPIENTRY
_mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param )
{
- _mesa_TexEnvfv( target, pname, &param );
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0;
+ _mesa_TexEnvfv( target, pname, p );
}
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index d7e77e759e0..f439d4addb3 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -367,7 +367,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
else {
/* calculate from vp->outputs */
struct gl_vertex_program *vprog;
- GLbitfield vp_outputs;
+ GLbitfield64 vp_outputs;
/* Choose GLSL vertex shader over ARB vertex program. Need this
* since vertex shader state validation comes after fragment state
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
new file mode 100644
index 00000000000..b37039429f4
--- /dev/null
+++ b/src/mesa/main/texfetch.c
@@ -0,0 +1,693 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2009 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file texfetch.c
+ *
+ * Texel fetch/store functions
+ *
+ * \author Gareth Hughes
+ */
+
+
+#include "colormac.h"
+#include "context.h"
+#include "texcompress.h"
+#include "texcompress_fxt1.h"
+#include "texcompress_s3tc.h"
+#include "texfetch.h"
+
+
+/**
+ * Convert an 8-bit sRGB value from non-linear space to a
+ * linear RGB value in [0, 1].
+ * Implemented with a 256-entry lookup table.
+ */
+static INLINE GLfloat
+nonlinear_to_linear(GLubyte cs8)
+{
+ static GLfloat table[256];
+ static GLboolean tableReady = GL_FALSE;
+ if (!tableReady) {
+ /* compute lookup table now */
+ GLuint i;
+ for (i = 0; i < 256; i++) {
+ const GLfloat cs = UBYTE_TO_FLOAT(i);
+ if (cs <= 0.04045) {
+ table[i] = cs / 12.92f;
+ }
+ else {
+ table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ }
+ }
+ tableReady = GL_TRUE;
+ }
+ return table[cs8];
+}
+
+
+
+/* Texel fetch routines for all supported formats
+ */
+#define DIM 1
+#include "texfetch_tmp.h"
+
+#define DIM 2
+#include "texfetch_tmp.h"
+
+#define DIM 3
+#include "texfetch_tmp.h"
+
+/**
+ * Null texel fetch function.
+ *
+ * Have to have this so the FetchTexel function pointer is never NULL.
+ */
+static void fetch_null_texelf( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ (void) texImage; (void) i; (void) j; (void) k;
+ texel[RCOMP] = 0.0;
+ texel[GCOMP] = 0.0;
+ texel[BCOMP] = 0.0;
+ texel[ACOMP] = 0.0;
+ _mesa_warning(NULL, "fetch_null_texelf() called!");
+}
+
+static void store_null_texel(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ (void) texImage;
+ (void) i;
+ (void) j;
+ (void) k;
+ (void) texel;
+ /* no-op */
+}
+
+
+
+/**
+ * Table to map MESA_FORMAT_ to texel fetch/store funcs.
+ * XXX this is somewhat temporary.
+ */
+static struct {
+ GLuint Name;
+ FetchTexelFuncF Fetch1D;
+ FetchTexelFuncF Fetch2D;
+ FetchTexelFuncF Fetch3D;
+ StoreTexelFunc StoreTexel;
+}
+texfetch_funcs[MESA_FORMAT_COUNT] =
+{
+ {
+ MESA_FORMAT_SRGB8,
+ fetch_texel_1d_srgb8,
+ fetch_texel_2d_srgb8,
+ fetch_texel_3d_srgb8,
+ store_texel_srgb8
+ },
+ {
+ MESA_FORMAT_SRGBA8,
+ fetch_texel_1d_srgba8,
+ fetch_texel_2d_srgba8,
+ fetch_texel_3d_srgba8,
+ store_texel_srgba8
+ },
+ {
+ MESA_FORMAT_SARGB8,
+ fetch_texel_1d_sargb8,
+ fetch_texel_2d_sargb8,
+ fetch_texel_3d_sargb8,
+ store_texel_sargb8
+ },
+ {
+ MESA_FORMAT_SL8,
+ fetch_texel_1d_sl8,
+ fetch_texel_2d_sl8,
+ fetch_texel_3d_sl8,
+ store_texel_sl8
+ },
+ {
+ MESA_FORMAT_SLA8,
+ fetch_texel_1d_sla8,
+ fetch_texel_2d_sla8,
+ fetch_texel_3d_sla8,
+ store_texel_sla8
+ },
+ {
+ MESA_FORMAT_RGB_FXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgb_fxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_FXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_fxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGB_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgb_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_DXT3,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_dxt3,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_DXT5,
+ NULL,
+ _mesa_fetch_texel_2d_f_rgba_dxt5,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGB_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgb_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT1,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgba_dxt1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT3,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgba_dxt3,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SRGBA_DXT5,
+ NULL,
+ _mesa_fetch_texel_2d_f_srgba_dxt5,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA_FLOAT32,
+ fetch_texel_1d_f_rgba_f32,
+ fetch_texel_2d_f_rgba_f32,
+ fetch_texel_3d_f_rgba_f32,
+ store_texel_rgba_f32
+ },
+ {
+ MESA_FORMAT_RGBA_FLOAT16,
+ fetch_texel_1d_f_rgba_f16,
+ fetch_texel_2d_f_rgba_f16,
+ fetch_texel_3d_f_rgba_f16,
+ store_texel_rgba_f16
+ },
+ {
+ MESA_FORMAT_RGB_FLOAT32,
+ fetch_texel_1d_f_rgb_f32,
+ fetch_texel_2d_f_rgb_f32,
+ fetch_texel_3d_f_rgb_f32,
+ store_texel_rgb_f32
+ },
+ {
+ MESA_FORMAT_RGB_FLOAT16,
+ fetch_texel_1d_f_rgb_f16,
+ fetch_texel_2d_f_rgb_f16,
+ fetch_texel_3d_f_rgb_f16,
+ store_texel_rgb_f16
+ },
+ {
+ MESA_FORMAT_ALPHA_FLOAT32,
+ fetch_texel_1d_f_alpha_f32,
+ fetch_texel_2d_f_alpha_f32,
+ fetch_texel_3d_f_alpha_f32,
+ store_texel_alpha_f32
+ },
+ {
+ MESA_FORMAT_ALPHA_FLOAT16,
+ fetch_texel_1d_f_alpha_f16,
+ fetch_texel_2d_f_alpha_f16,
+ fetch_texel_3d_f_alpha_f16,
+ store_texel_alpha_f16
+ },
+ {
+ MESA_FORMAT_LUMINANCE_FLOAT32,
+ fetch_texel_1d_f_luminance_f32,
+ fetch_texel_2d_f_luminance_f32,
+ fetch_texel_3d_f_luminance_f32,
+ store_texel_luminance_f32
+ },
+ {
+ MESA_FORMAT_LUMINANCE_FLOAT16,
+ fetch_texel_1d_f_luminance_f16,
+ fetch_texel_2d_f_luminance_f16,
+ fetch_texel_3d_f_luminance_f16,
+ store_texel_luminance_f16
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
+ fetch_texel_1d_f_luminance_alpha_f32,
+ fetch_texel_2d_f_luminance_alpha_f32,
+ fetch_texel_3d_f_luminance_alpha_f32,
+ store_texel_luminance_alpha_f32
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
+ fetch_texel_1d_f_luminance_alpha_f16,
+ fetch_texel_2d_f_luminance_alpha_f16,
+ fetch_texel_3d_f_luminance_alpha_f16,
+ store_texel_luminance_alpha_f16
+ },
+ {
+ MESA_FORMAT_INTENSITY_FLOAT32,
+ fetch_texel_1d_f_intensity_f32,
+ fetch_texel_2d_f_intensity_f32,
+ fetch_texel_3d_f_intensity_f32,
+ store_texel_intensity_f32
+ },
+ {
+ MESA_FORMAT_INTENSITY_FLOAT16,
+ fetch_texel_1d_f_intensity_f16,
+ fetch_texel_2d_f_intensity_f16,
+ fetch_texel_3d_f_intensity_f16,
+ store_texel_intensity_f16
+ },
+ {
+ MESA_FORMAT_DUDV8,
+ fetch_texel_1d_dudv8,
+ fetch_texel_2d_dudv8,
+ fetch_texel_3d_dudv8,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA8888,
+ fetch_texel_1d_signed_rgba8888,
+ fetch_texel_2d_signed_rgba8888,
+ fetch_texel_3d_signed_rgba8888,
+ store_texel_signed_rgba8888
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA8888_REV,
+ fetch_texel_1d_signed_rgba8888_rev,
+ fetch_texel_2d_signed_rgba8888_rev,
+ fetch_texel_3d_signed_rgba8888_rev,
+ store_texel_signed_rgba8888_rev
+ },
+ {
+ MESA_FORMAT_SIGNED_RGBA_16,
+ NULL, /* XXX to do */
+ NULL,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RGBA8888,
+ fetch_texel_1d_f_rgba8888,
+ fetch_texel_2d_f_rgba8888,
+ fetch_texel_3d_f_rgba8888,
+ store_texel_rgba8888
+ },
+ {
+ MESA_FORMAT_RGBA8888_REV,
+ fetch_texel_1d_f_rgba8888_rev,
+ fetch_texel_2d_f_rgba8888_rev,
+ fetch_texel_3d_f_rgba8888_rev,
+ store_texel_rgba8888_rev
+ },
+ {
+ MESA_FORMAT_ARGB8888,
+ fetch_texel_1d_f_argb8888,
+ fetch_texel_2d_f_argb8888,
+ fetch_texel_3d_f_argb8888,
+ store_texel_argb8888
+ },
+ {
+ MESA_FORMAT_ARGB8888_REV,
+ fetch_texel_1d_f_argb8888_rev,
+ fetch_texel_2d_f_argb8888_rev,
+ fetch_texel_3d_f_argb8888_rev,
+ store_texel_argb8888_rev
+ },
+ {
+ MESA_FORMAT_XRGB8888,
+ fetch_texel_1d_f_xrgb8888,
+ fetch_texel_2d_f_xrgb8888,
+ fetch_texel_3d_f_xrgb8888,
+ store_texel_xrgb8888
+ },
+ {
+ MESA_FORMAT_XRGB8888_REV,
+ fetch_texel_1d_f_xrgb8888_rev,
+ fetch_texel_2d_f_xrgb8888_rev,
+ fetch_texel_3d_f_xrgb8888_rev,
+ store_texel_xrgb8888_rev,
+ },
+ {
+ MESA_FORMAT_RGB888,
+ fetch_texel_1d_f_rgb888,
+ fetch_texel_2d_f_rgb888,
+ fetch_texel_3d_f_rgb888,
+ store_texel_rgb888
+ },
+ {
+ MESA_FORMAT_BGR888,
+ fetch_texel_1d_f_bgr888,
+ fetch_texel_2d_f_bgr888,
+ fetch_texel_3d_f_bgr888,
+ store_texel_bgr888
+ },
+ {
+ MESA_FORMAT_RGB565,
+ fetch_texel_1d_f_rgb565,
+ fetch_texel_2d_f_rgb565,
+ fetch_texel_3d_f_rgb565,
+ store_texel_rgb565
+ },
+ {
+ MESA_FORMAT_RGB565_REV,
+ fetch_texel_1d_f_rgb565_rev,
+ fetch_texel_2d_f_rgb565_rev,
+ fetch_texel_3d_f_rgb565_rev,
+ store_texel_rgb565_rev
+ },
+ {
+ MESA_FORMAT_ARGB4444,
+ fetch_texel_1d_f_argb4444,
+ fetch_texel_2d_f_argb4444,
+ fetch_texel_3d_f_argb4444,
+ store_texel_argb4444
+ },
+ {
+ MESA_FORMAT_ARGB4444_REV,
+ fetch_texel_1d_f_argb4444_rev,
+ fetch_texel_2d_f_argb4444_rev,
+ fetch_texel_3d_f_argb4444_rev,
+ store_texel_argb4444_rev
+ },
+ {
+ MESA_FORMAT_RGBA5551,
+ fetch_texel_1d_f_rgba5551,
+ fetch_texel_2d_f_rgba5551,
+ fetch_texel_3d_f_rgba5551,
+ store_texel_rgba5551
+ },
+ {
+ MESA_FORMAT_ARGB1555,
+ fetch_texel_1d_f_argb1555,
+ fetch_texel_2d_f_argb1555,
+ fetch_texel_3d_f_argb1555,
+ store_texel_argb1555
+ },
+ {
+ MESA_FORMAT_ARGB1555_REV,
+ fetch_texel_1d_f_argb1555_rev,
+ fetch_texel_2d_f_argb1555_rev,
+ fetch_texel_3d_f_argb1555_rev,
+ store_texel_argb1555_rev
+ },
+ {
+ MESA_FORMAT_AL88,
+ fetch_texel_1d_f_al88,
+ fetch_texel_2d_f_al88,
+ fetch_texel_3d_f_al88,
+ store_texel_al88
+ },
+ {
+ MESA_FORMAT_AL88_REV,
+ fetch_texel_1d_f_al88_rev,
+ fetch_texel_2d_f_al88_rev,
+ fetch_texel_3d_f_al88_rev,
+ store_texel_al88_rev
+ },
+ {
+ MESA_FORMAT_AL1616,
+ fetch_texel_1d_f_al1616,
+ fetch_texel_2d_f_al1616,
+ fetch_texel_3d_f_al1616,
+ store_texel_al1616
+ },
+ {
+ MESA_FORMAT_AL1616_REV,
+ fetch_texel_1d_f_al1616_rev,
+ fetch_texel_2d_f_al1616_rev,
+ fetch_texel_3d_f_al1616_rev,
+ store_texel_al1616_rev
+ },
+ {
+ MESA_FORMAT_RGB332,
+ fetch_texel_1d_f_rgb332,
+ fetch_texel_2d_f_rgb332,
+ fetch_texel_3d_f_rgb332,
+ store_texel_rgb332
+ },
+ {
+ MESA_FORMAT_A8,
+ fetch_texel_1d_f_a8,
+ fetch_texel_2d_f_a8,
+ fetch_texel_3d_f_a8,
+ store_texel_a8
+ },
+ {
+ MESA_FORMAT_L8,
+ fetch_texel_1d_f_l8,
+ fetch_texel_2d_f_l8,
+ fetch_texel_3d_f_l8,
+ store_texel_l8
+ },
+ {
+ MESA_FORMAT_I8,
+ fetch_texel_1d_f_i8,
+ fetch_texel_2d_f_i8,
+ fetch_texel_3d_f_i8,
+ store_texel_i8
+ },
+ {
+ MESA_FORMAT_CI8,
+ fetch_texel_1d_f_ci8,
+ fetch_texel_2d_f_ci8,
+ fetch_texel_3d_f_ci8,
+ store_texel_ci8
+ },
+ {
+ MESA_FORMAT_YCBCR,
+ fetch_texel_1d_f_ycbcr,
+ fetch_texel_2d_f_ycbcr,
+ fetch_texel_3d_f_ycbcr,
+ store_texel_ycbcr
+ },
+ {
+ MESA_FORMAT_YCBCR_REV,
+ fetch_texel_1d_f_ycbcr_rev,
+ fetch_texel_2d_f_ycbcr_rev,
+ fetch_texel_3d_f_ycbcr_rev,
+ store_texel_ycbcr_rev
+ },
+ {
+ MESA_FORMAT_Z24_S8,
+ fetch_texel_1d_f_z24_s8,
+ fetch_texel_2d_f_z24_s8,
+ fetch_texel_3d_f_z24_s8,
+ store_texel_z24_s8
+ },
+ {
+ MESA_FORMAT_S8_Z24,
+ fetch_texel_1d_f_s8_z24,
+ fetch_texel_2d_f_s8_z24,
+ fetch_texel_3d_f_s8_z24,
+ store_texel_s8_z24
+ },
+ {
+ MESA_FORMAT_Z16,
+ fetch_texel_1d_f_z16,
+ fetch_texel_2d_f_z16,
+ fetch_texel_3d_f_z16,
+ store_texel_z16
+ },
+ {
+ MESA_FORMAT_X8_Z24,
+ fetch_texel_1d_f_s8_z24,
+ fetch_texel_2d_f_s8_z24,
+ fetch_texel_3d_f_s8_z24,
+ store_texel_s8_z24
+ },
+ {
+ MESA_FORMAT_Z24_X8,
+ fetch_texel_1d_f_z24_s8,
+ fetch_texel_2d_f_z24_s8,
+ fetch_texel_3d_f_z24_s8,
+ store_texel_z24_s8
+ },
+ {
+ MESA_FORMAT_Z32,
+ fetch_texel_1d_f_z32,
+ fetch_texel_2d_f_z32,
+ fetch_texel_3d_f_z32,
+ store_texel_z32
+ }
+};
+
+
+static FetchTexelFuncF
+_mesa_get_texel_fetch_func(gl_format format, GLuint dims)
+{
+ FetchTexelFuncF f = NULL;
+ GLuint i;
+ /* XXX replace loop with direct table lookup */
+ for (i = 0; i < MESA_FORMAT_COUNT; i++) {
+ if (texfetch_funcs[i].Name == format) {
+ switch (dims) {
+ case 1:
+ f = texfetch_funcs[i].Fetch1D;
+ break;
+ case 2:
+ f = texfetch_funcs[i].Fetch2D;
+ break;
+ case 3:
+ f = texfetch_funcs[i].Fetch3D;
+ break;
+ }
+ if (!f)
+ f = fetch_null_texelf;
+ return f;
+ }
+ }
+ return NULL;
+}
+
+
+StoreTexelFunc
+_mesa_get_texel_store_func(gl_format format)
+{
+ GLuint i;
+ /* XXX replace loop with direct table lookup */
+ for (i = 0; i < MESA_FORMAT_COUNT; i++) {
+ if (texfetch_funcs[i].Name == format) {
+ if (texfetch_funcs[i].StoreTexel)
+ return texfetch_funcs[i].StoreTexel;
+ else
+ return store_null_texel;
+ }
+ }
+ return NULL;
+}
+
+
+
+/**
+ * Adaptor for fetching a GLchan texel from a float-valued texture.
+ */
+static void
+fetch_texel_float_to_chan(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLchan *texelOut)
+{
+ GLfloat temp[4];
+ GLenum baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
+
+ ASSERT(texImage->FetchTexelf);
+ texImage->FetchTexelf(texImage, i, j, k, temp);
+ if (baseFormat == GL_DEPTH_COMPONENT ||
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* just one channel */
+ UNCLAMPED_FLOAT_TO_CHAN(texelOut[0], temp[0]);
+ }
+ else {
+ /* four channels */
+ UNCLAMPED_FLOAT_TO_CHAN(texelOut[0], temp[0]);
+ UNCLAMPED_FLOAT_TO_CHAN(texelOut[1], temp[1]);
+ UNCLAMPED_FLOAT_TO_CHAN(texelOut[2], temp[2]);
+ UNCLAMPED_FLOAT_TO_CHAN(texelOut[3], temp[3]);
+ }
+}
+
+
+#if 0
+/**
+ * Adaptor for fetching a float texel from a GLchan-valued texture.
+ */
+static void
+fetch_texel_chan_to_float(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texelOut)
+{
+ GLchan temp[4];
+ GLenum baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
+
+ ASSERT(texImage->FetchTexelc);
+ texImage->FetchTexelc(texImage, i, j, k, temp);
+ if (baseFormat == GL_DEPTH_COMPONENT ||
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* just one channel */
+ texelOut[0] = CHAN_TO_FLOAT(temp[0]);
+ }
+ else {
+ /* four channels */
+ texelOut[0] = CHAN_TO_FLOAT(temp[0]);
+ texelOut[1] = CHAN_TO_FLOAT(temp[1]);
+ texelOut[2] = CHAN_TO_FLOAT(temp[2]);
+ texelOut[3] = CHAN_TO_FLOAT(temp[3]);
+ }
+}
+#endif
+
+
+/**
+ * Initialize the texture image's FetchTexelc and FetchTexelf methods.
+ */
+void
+_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
+{
+ ASSERT(dims == 1 || dims == 2 || dims == 3);
+ ASSERT(texImage->TexFormat);
+
+ if (!texImage->FetchTexelf) {
+ texImage->FetchTexelf =
+ _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
+ }
+
+ /* now check if we need to use a float/chan adaptor */
+ if (!texImage->FetchTexelc) {
+ texImage->FetchTexelc = fetch_texel_float_to_chan;
+ }
+
+ ASSERT(texImage->FetchTexelc);
+ ASSERT(texImage->FetchTexelf);
+}
diff --git a/src/mesa/main/texfetch.h b/src/mesa/main/texfetch.h
new file mode 100644
index 00000000000..ef13bf27fec
--- /dev/null
+++ b/src/mesa/main/texfetch.h
@@ -0,0 +1,40 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2009 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef TEXFETCH_H
+#define TEXFETCH_H
+
+#include "mtypes.h"
+#include "formats.h"
+
+
+extern StoreTexelFunc
+_mesa_get_texel_store_func(gl_format format);
+
+extern void
+_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims);
+
+#endif
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texfetch_tmp.h
index eb160deff93..1f0d4362361 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texfetch_tmp.h
@@ -1,9 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 7.7
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- * Copyright (c) 2008 VMware, Inc.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008-2009 VMware, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,18 +25,16 @@
/**
- * \file texformat_tmp.h
+ * \file texfetch_tmp.h
* Texel fetch functions template.
*
- * This template file is used by texformat.c to generate texel fetch functions
+ * This template file is used by texfetch.c to generate texel fetch functions
* for 1-D, 2-D and 3-D texture images.
*
* It should be expanded by defining \p DIM as the number texture dimensions
* (1, 2 or 3). According to the value of \p DIM a series of macros is defined
* for the texel lookup in the gl_texture_image::Data.
*
- * \sa texformat.c and FetchTexel.
- *
* \author Gareth Hughes
* \author Brian Paul
*/
@@ -70,152 +68,6 @@
#endif
-/* MESA_FORMAT_RGBA **********************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGBA texture, returning 4 GLfloats */
-static void FETCH(f_rgba)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 4);
- texel[RCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[GCOMP] = CHAN_TO_FLOAT(src[1]);
- texel[BCOMP] = CHAN_TO_FLOAT(src[2]);
- texel[ACOMP] = CHAN_TO_FLOAT(src[3]);
-}
-
-#if DIM == 3
-/* Store a GLchan RGBA texel */
-static void store_texel_rgba(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 4);
- dst[0] = rgba[RCOMP];
- dst[1] = rgba[GCOMP];
- dst[2] = rgba[BCOMP];
- dst[3] = rgba[ACOMP];
-}
-#endif
-
-/* MESA_FORMAT_RGB ***********************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGB texture, returning 4 GLfloats */
-static void FETCH(f_rgb)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 3);
- texel[RCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[GCOMP] = CHAN_TO_FLOAT(src[1]);
- texel[BCOMP] = CHAN_TO_FLOAT(src[2]);
- texel[ACOMP] = 1.0F;
-}
-
-#if DIM == 3
-static void store_texel_rgb(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 3);
- dst[0] = rgba[RCOMP];
- dst[1] = rgba[GCOMP];
- dst[2] = rgba[BCOMP];
-}
-#endif
-
-/* MESA_FORMAT_ALPHA *********************************************************/
-
-/* Fetch texel from 1D, 2D or 3D ALPHA texture, returning 4 GLchans */
-static void FETCH(f_alpha)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = 0.0F;
- texel[ACOMP] = CHAN_TO_FLOAT(src[0]);
-}
-
-#if DIM == 3
-static void store_texel_alpha(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- dst[0] = rgba[ACOMP];
-}
-#endif
-
-/* MESA_FORMAT_LUMINANCE *****************************************************/
-
-/* Fetch texel from 1D, 2D or 3D LUMIN texture, returning 4 GLchans */
-static void FETCH(f_luminance)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[ACOMP] = 1.0F;
-}
-
-#if DIM == 3
-static void store_texel_luminance(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- dst[0] = rgba[RCOMP];
-}
-#endif
-
-/* MESA_FORMAT_LUMINANCE_ALPHA ***********************************************/
-
-/* Fetch texel from 1D, 2D or 3D L_A texture, returning 4 GLchans */
-static void FETCH(f_luminance_alpha)(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel)
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 2);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[ACOMP] = CHAN_TO_FLOAT(src[1]);
-}
-
-#if DIM == 3
-static void store_texel_luminance_alpha(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 2);
- dst[0] = rgba[RCOMP];
- dst[1] = rgba[ACOMP];
-}
-#endif
-
-/* MESA_FORMAT_INTENSITY *****************************************************/
-
-/* Fetch texel from 1D, 2D or 3D INT. texture, returning 4 GLchans */
-static void FETCH(f_intensity)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] =
- texel[ACOMP] = CHAN_TO_FLOAT(src[0]);
-}
-
-#if DIM == 3
-static void store_texel_intensity(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- dst[0] = rgba[RCOMP];
-}
-#endif
-
-
/* MESA_FORMAT_Z32 ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 32-bit depth texture,
@@ -683,6 +535,54 @@ static void store_texel_argb8888_rev(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_XRGB8888 ******************************************************/
+
+/* Fetch texel from 1D, 2D or 3D xrgb8888 texture, return 4 GLchans */
+static void FETCH(f_xrgb8888)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] = UBYTE_TO_FLOAT( (s >> 16) & 0xff );
+ texel[GCOMP] = UBYTE_TO_FLOAT( (s >> 8) & 0xff );
+ texel[BCOMP] = UBYTE_TO_FLOAT( (s ) & 0xff );
+ texel[ACOMP] = 1.0f;
+}
+
+#if DIM == 3
+static void store_texel_xrgb8888(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_8888(0xff, rgba[RCOMP], rgba[GCOMP], rgba[BCOMP]);
+}
+#endif
+
+
+/* MESA_FORMAT_XRGB8888_REV **************************************************/
+
+/* Fetch texel from 1D, 2D or 3D xrgb8888_rev texture, return 4 GLfloats */
+static void FETCH(f_xrgb8888_rev)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] = UBYTE_TO_FLOAT( (s >> 8) & 0xff );
+ texel[GCOMP] = UBYTE_TO_FLOAT( (s >> 16) & 0xff );
+ texel[BCOMP] = UBYTE_TO_FLOAT( (s >> 24) );
+ texel[ACOMP] = 1.0f;
+}
+
+#if DIM == 3
+static void store_texel_xrgb8888_rev(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_8888(rgba[BCOMP], rgba[GCOMP], rgba[RCOMP], 0xff);
+}
+#endif
+
+
/* MESA_FORMAT_RGB888 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb888 texture, return 4 GLchans */
@@ -787,30 +687,6 @@ static void store_texel_rgb565_rev(struct gl_texture_image *texImage,
}
#endif
-/* MESA_FORMAT_RGBA4444 ******************************************************/
-
-/* Fetch texel from 1D, 2D or 3D argb444 texture, return 4 GLchans */
-static void FETCH(f_rgba4444)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
- const GLushort s = *src;
- texel[RCOMP] = ((s >> 12) & 0xf) * (1.0F / 15.0F);
- texel[GCOMP] = ((s >> 8) & 0xf) * (1.0F / 15.0F);
- texel[BCOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F);
- texel[ACOMP] = ((s ) & 0xf) * (1.0F / 15.0F);
-}
-
-#if DIM == 3
-static void store_texel_rgba4444(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLubyte *rgba = (const GLubyte *) texel;
- GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
- *dst = PACK_COLOR_4444(rgba[RCOMP], rgba[GCOMP], rgba[BCOMP], rgba[ACOMP]);
-}
-#endif
-
/* MESA_FORMAT_ARGB4444 ******************************************************/
@@ -982,6 +858,54 @@ static void store_texel_al88_rev(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_AL1616 ********************************************************/
+
+/* Fetch texel from 1D, 2D or 3D al1616 texture, return 4 GLchans */
+static void FETCH(f_al1616)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = USHORT_TO_FLOAT( s & 0xffff );
+ texel[ACOMP] = USHORT_TO_FLOAT( s >> 16 );
+}
+
+#if DIM == 3
+static void store_texel_al1616(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_1616(rgba[ACOMP], rgba[RCOMP]);
+}
+#endif
+
+
+/* MESA_FORMAT_AL1616_REV ****************************************************/
+
+/* Fetch texel from 1D, 2D or 3D al1616_rev texture, return 4 GLchans */
+static void FETCH(f_al1616_rev)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = USHORT_TO_FLOAT( s >> 16 );
+ texel[ACOMP] = USHORT_TO_FLOAT( s & 0xffff );
+}
+
+#if DIM == 3
+static void store_texel_al1616_rev(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_1616(rgba[RCOMP], rgba[ACOMP]);
+}
+#endif
+
+
/* MESA_FORMAT_RGB332 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
@@ -1161,8 +1085,6 @@ static void store_texel_ci8(struct gl_texture_image *texImage,
#endif
-#if FEATURE_EXT_texture_sRGB
-
/* Fetch texel from 1D, 2D or 3D srgb8 texture, return 4 GLfloats */
/* Note: component order is same as for MESA_FORMAT_RGB888 */
static void FETCH(srgb8)(const struct gl_texture_image *texImage,
@@ -1272,8 +1194,6 @@ static void store_texel_sla8(struct gl_texture_image *texImage,
}
#endif
-#endif /* FEATURE_EXT_texture_sRGB */
-
/* MESA_FORMAT_DUDV8 ********************************************************/
@@ -1424,7 +1344,7 @@ static void FETCH(f_z24_s8)( const struct gl_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLfloat scale = 1.0F / (GLfloat) 0xffffff;
texel[0] = ((*src) >> 8) * scale;
- ASSERT(texImage->TexFormat->MesaFormat == MESA_FORMAT_Z24_S8);
+ ASSERT(texImage->TexFormat == MESA_FORMAT_Z24_S8);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
@@ -1451,7 +1371,7 @@ static void FETCH(f_s8_z24)( const struct gl_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLfloat scale = 1.0F / (GLfloat) 0xffffff;
texel[0] = ((*src) & 0x00ffffff) * scale;
- ASSERT(texImage->TexFormat->MesaFormat == MESA_FORMAT_S8_Z24);
+ ASSERT(texImage->TexFormat == MESA_FORMAT_S8_Z24);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index c709004784b..1a374e7bee5 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -1,9 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 7.7
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- * Copyright (c) 2008 VMware, Inc.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008-2009 VMware, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -29,1435 +29,15 @@
* Texture formats.
*
* \author Gareth Hughes
+ * \author Brian Paul
*/
-#include "colormac.h"
#include "context.h"
+#include "texcompress.h"
+#include "texcompress_fxt1.h"
+#include "texcompress_s3tc.h"
#include "texformat.h"
-#include "texstore.h"
-
-
-#if FEATURE_EXT_texture_sRGB
-
-/**
- * Convert an 8-bit sRGB value from non-linear space to a
- * linear RGB value in [0, 1].
- * Implemented with a 256-entry lookup table.
- */
-static INLINE GLfloat
-nonlinear_to_linear(GLubyte cs8)
-{
- static GLfloat table[256];
- static GLboolean tableReady = GL_FALSE;
- if (!tableReady) {
- /* compute lookup table now */
- GLuint i;
- for (i = 0; i < 256; i++) {
- const GLfloat cs = UBYTE_TO_FLOAT(i);
- if (cs <= 0.04045) {
- table[i] = cs / 12.92f;
- }
- else {
- table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
- }
- }
- tableReady = GL_TRUE;
- }
- return table[cs8];
-}
-
-
-#endif /* FEATURE_EXT_texture_sRGB */
-
-
-/* Texel fetch routines for all supported formats
- */
-#define DIM 1
-#include "texformat_tmp.h"
-
-#define DIM 2
-#include "texformat_tmp.h"
-
-#define DIM 3
-#include "texformat_tmp.h"
-
-/**
- * Null texel fetch function.
- *
- * Have to have this so the FetchTexel function pointer is never NULL.
- */
-static void fetch_null_texel( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
-{
- (void) texImage; (void) i; (void) j; (void) k;
- texel[RCOMP] = 0;
- texel[GCOMP] = 0;
- texel[BCOMP] = 0;
- texel[ACOMP] = 0;
- _mesa_warning(NULL, "fetch_null_texel() called!");
-}
-
-static void fetch_null_texelf( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- (void) texImage; (void) i; (void) j; (void) k;
- texel[RCOMP] = 0.0;
- texel[GCOMP] = 0.0;
- texel[BCOMP] = 0.0;
- texel[ACOMP] = 0.0;
- _mesa_warning(NULL, "fetch_null_texelf() called!");
-}
-
-static void store_null_texel(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- (void) texImage;
- (void) i;
- (void) j;
- (void) k;
- (void) texel;
- /* no-op */
-}
-
-
-/**
- * Notes about the predefined gl_texture_formats:
- *
- * 1. There are 1D, 2D and 3D functions for fetching texels from texture
- * images, returning both GLchan values and GLfloat values. (six
- * functions in total)
- * You don't have to provide both the GLchan and GLfloat functions;
- * just one or the other is OK. Mesa will use an "adaptor" to convert
- * between GLchan/GLfloat when needed.
- * Since the adaptors have small performance penalty, we provide both
- * GLchan and GLfloat functions for some common formats like RGB, RGBA.
- */
-
-
-/***************************************************************/
-/** \name Default GLchan-based formats */
-/*@{*/
-
-const struct gl_texture_format _mesa_texformat_rgba = {
- MESA_FORMAT_RGBA, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- CHAN_BITS, /* RedBits */
- CHAN_BITS, /* GreenBits */
- CHAN_BITS, /* BlueBits */
- CHAN_BITS, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4 * sizeof(GLchan), /* TexelBytes */
- _mesa_texstore_rgba, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgba, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba, /* FetchTexel3Df */
- store_texel_rgba /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb = {
- MESA_FORMAT_RGB, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- CHAN_BITS, /* RedBits */
- CHAN_BITS, /* GreenBits */
- CHAN_BITS, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 3 * sizeof(GLchan), /* TexelBytes */
- _mesa_texstore_rgba,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgb, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb, /* FetchTexel3Df */
- store_texel_rgb /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_alpha = {
- MESA_FORMAT_ALPHA, /* MesaFormat */
- GL_ALPHA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- CHAN_BITS, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- sizeof(GLchan), /* TexelBytes */
- _mesa_texstore_rgba,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_alpha, /* FetchTexel1Df */
- fetch_texel_2d_f_alpha, /* FetchTexel2Df */
- fetch_texel_3d_f_alpha, /* FetchTexel3Df */
- store_texel_alpha /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_luminance = {
- MESA_FORMAT_LUMINANCE, /* MesaFormat */
- GL_LUMINANCE, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- CHAN_BITS, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- sizeof(GLchan), /* TexelBytes */
- _mesa_texstore_rgba,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_luminance, /* FetchTexel1Df */
- fetch_texel_2d_f_luminance, /* FetchTexel2Df */
- fetch_texel_3d_f_luminance, /* FetchTexel3Df */
- store_texel_luminance /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_luminance_alpha = {
- MESA_FORMAT_LUMINANCE_ALPHA, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- CHAN_BITS, /* AlphaBits */
- CHAN_BITS, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2 * sizeof(GLchan), /* TexelBytes */
- _mesa_texstore_rgba,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_luminance_alpha, /* FetchTexel1Df */
- fetch_texel_2d_f_luminance_alpha, /* FetchTexel2Df */
- fetch_texel_3d_f_luminance_alpha, /* FetchTexel3Df */
- store_texel_luminance_alpha /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_intensity = {
- MESA_FORMAT_INTENSITY, /* MesaFormat */
- GL_INTENSITY, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- CHAN_BITS, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- sizeof(GLchan), /* TexelBytes */
- _mesa_texstore_rgba,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_intensity, /* FetchTexel1Df */
- fetch_texel_2d_f_intensity, /* FetchTexel2Df */
- fetch_texel_3d_f_intensity, /* FetchTexel3Df */
- store_texel_intensity /* StoreTexel */
-};
-
-
-#if FEATURE_EXT_texture_sRGB
-
-const struct gl_texture_format _mesa_texformat_srgb8 = {
- MESA_FORMAT_SRGB8, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 3, /* TexelBytes */
- _mesa_texstore_srgb8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_srgb8, /* FetchTexel1Df */
- fetch_texel_2d_srgb8, /* FetchTexel2Df */
- fetch_texel_3d_srgb8, /* FetchTexel3Df */
- store_texel_srgb8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_srgba8 = {
- MESA_FORMAT_SRGBA8, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_srgba8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_srgba8, /* FetchTexel1Df */
- fetch_texel_2d_srgba8, /* FetchTexel2Df */
- fetch_texel_3d_srgba8, /* FetchTexel3Df */
- store_texel_srgba8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_sargb8 = {
- MESA_FORMAT_SARGB8, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_sargb8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_sargb8, /* FetchTexel1Df */
- fetch_texel_2d_sargb8, /* FetchTexel2Df */
- fetch_texel_3d_sargb8, /* FetchTexel3Df */
- store_texel_sargb8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_sl8 = {
- MESA_FORMAT_SL8, /* MesaFormat */
- GL_LUMINANCE, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 8, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1, /* TexelBytes */
- _mesa_texstore_sl8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_sl8, /* FetchTexel1Df */
- fetch_texel_2d_sl8, /* FetchTexel2Df */
- fetch_texel_3d_sl8, /* FetchTexel3Df */
- store_texel_sl8 /* StoreTexel */
-};
-
-/* Note: this format name looks like a misnomer, make it sal8? */
-const struct gl_texture_format _mesa_texformat_sla8 = {
- MESA_FORMAT_SLA8, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8, /* AlphaBits */
- 8, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_sla8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_sla8, /* FetchTexel1Df */
- fetch_texel_2d_sla8, /* FetchTexel2Df */
- fetch_texel_3d_sla8, /* FetchTexel3Df */
- store_texel_sla8 /* StoreTexel */
-};
-
-#endif /* FEATURE_EXT_texture_sRGB */
-
-const struct gl_texture_format _mesa_texformat_rgba_float32 = {
- MESA_FORMAT_RGBA_FLOAT32, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 8 * sizeof(GLfloat), /* RedBits */
- 8 * sizeof(GLfloat), /* GreenBits */
- 8 * sizeof(GLfloat), /* BlueBits */
- 8 * sizeof(GLfloat), /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4 * sizeof(GLfloat), /* TexelBytes */
- _mesa_texstore_rgba_float32, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_rgba_f32, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba_f32, /* FetchTexel3Df */
- store_texel_rgba_f32 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba_float16 = {
- MESA_FORMAT_RGBA_FLOAT16, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 8 * sizeof(GLhalfARB), /* RedBits */
- 8 * sizeof(GLhalfARB), /* GreenBits */
- 8 * sizeof(GLhalfARB), /* BlueBits */
- 8 * sizeof(GLhalfARB), /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4 * sizeof(GLhalfARB), /* TexelBytes */
- _mesa_texstore_rgba_float16, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_rgba_f16, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba_f16, /* FetchTexel3Df */
- store_texel_rgba_f16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb_float32 = {
- MESA_FORMAT_RGB_FLOAT32, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 8 * sizeof(GLfloat), /* RedBits */
- 8 * sizeof(GLfloat), /* GreenBits */
- 8 * sizeof(GLfloat), /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 3 * sizeof(GLfloat), /* TexelBytes */
- _mesa_texstore_rgba_float32,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_rgb_f32, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb_f32, /* FetchTexel3Df */
- store_texel_rgb_f32 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb_float16 = {
- MESA_FORMAT_RGB_FLOAT16, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 8 * sizeof(GLhalfARB), /* RedBits */
- 8 * sizeof(GLhalfARB), /* GreenBits */
- 8 * sizeof(GLhalfARB), /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 3 * sizeof(GLhalfARB), /* TexelBytes */
- _mesa_texstore_rgba_float16,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_rgb_f16, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb_f16, /* FetchTexel3Df */
- store_texel_rgb_f16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_alpha_float32 = {
- MESA_FORMAT_ALPHA_FLOAT32, /* MesaFormat */
- GL_ALPHA, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8 * sizeof(GLfloat), /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1 * sizeof(GLfloat), /* TexelBytes */
- _mesa_texstore_rgba_float32,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_alpha_f32, /* FetchTexel1Df */
- fetch_texel_2d_f_alpha_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_alpha_f32, /* FetchTexel3Df */
- store_texel_alpha_f32 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_alpha_float16 = {
- MESA_FORMAT_ALPHA_FLOAT16, /* MesaFormat */
- GL_ALPHA, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8 * sizeof(GLhalfARB), /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1 * sizeof(GLhalfARB), /* TexelBytes */
- _mesa_texstore_rgba_float16,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_alpha_f16, /* FetchTexel1Df */
- fetch_texel_2d_f_alpha_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_alpha_f16, /* FetchTexel3Df */
- store_texel_alpha_f16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_luminance_float32 = {
- MESA_FORMAT_LUMINANCE_FLOAT32, /* MesaFormat */
- GL_LUMINANCE, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 8 * sizeof(GLfloat), /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1 * sizeof(GLfloat), /* TexelBytes */
- _mesa_texstore_rgba_float32,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_luminance_f32, /* FetchTexel1Df */
- fetch_texel_2d_f_luminance_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_luminance_f32, /* FetchTexel3Df */
- store_texel_luminance_f32 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_luminance_float16 = {
- MESA_FORMAT_LUMINANCE_FLOAT16, /* MesaFormat */
- GL_LUMINANCE, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 8 * sizeof(GLhalfARB), /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1 * sizeof(GLhalfARB), /* TexelBytes */
- _mesa_texstore_rgba_float16,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_luminance_f16, /* FetchTexel1Df */
- fetch_texel_2d_f_luminance_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_luminance_f16, /* FetchTexel3Df */
- store_texel_luminance_f16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_luminance_alpha_float32 = {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8 * sizeof(GLfloat), /* AlphaBits */
- 8 * sizeof(GLfloat), /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2 * sizeof(GLfloat), /* TexelBytes */
- _mesa_texstore_rgba_float32, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_luminance_alpha_f32,/* FetchTexel1Df */
- fetch_texel_2d_f_luminance_alpha_f32,/* FetchTexel2Df */
- fetch_texel_3d_f_luminance_alpha_f32,/* FetchTexel3Df */
- store_texel_luminance_alpha_f32 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_luminance_alpha_float16 = {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8 * sizeof(GLhalfARB), /* AlphaBits */
- 8 * sizeof(GLhalfARB), /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2 * sizeof(GLhalfARB), /* TexelBytes */
- _mesa_texstore_rgba_float16, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_luminance_alpha_f16,/* FetchTexel1Df */
- fetch_texel_2d_f_luminance_alpha_f16,/* FetchTexel2Df */
- fetch_texel_3d_f_luminance_alpha_f16,/* FetchTexel3Df */
- store_texel_luminance_alpha_f16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_intensity_float32 = {
- MESA_FORMAT_INTENSITY_FLOAT32, /* MesaFormat */
- GL_INTENSITY, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 8 * sizeof(GLfloat), /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1 * sizeof(GLfloat), /* TexelBytes */
- _mesa_texstore_rgba_float32,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_intensity_f32, /* FetchTexel1Df */
- fetch_texel_2d_f_intensity_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_intensity_f32, /* FetchTexel3Df */
- store_texel_intensity_f32 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_intensity_float16 = {
- MESA_FORMAT_INTENSITY_FLOAT16, /* MesaFormat */
- GL_INTENSITY, /* BaseFormat */
- GL_FLOAT, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 8 * sizeof(GLhalfARB), /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1 * sizeof(GLhalfARB), /* TexelBytes */
- _mesa_texstore_rgba_float16,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_intensity_f16, /* FetchTexel1Df */
- fetch_texel_2d_f_intensity_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_intensity_f16, /* FetchTexel3Df */
- store_texel_intensity_f16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_dudv8 = {
- MESA_FORMAT_DUDV8, /* MesaFormat */
- GL_DUDV_ATI, /* BaseFormat */
- GL_SIGNED_NORMALIZED, /* DataType */
- /* maybe should add dudvBits field, but spec seems to be
- lacking the ability to query with GetTexLevelParameter anyway */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_dudv8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_dudv8, /* FetchTexel1Df */
- fetch_texel_2d_dudv8, /* FetchTexel2Df */
- fetch_texel_3d_dudv8, /* FetchTexel3Df */
- NULL /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_signed_rgba8888 = {
- MESA_FORMAT_SIGNED_RGBA8888, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_SIGNED_NORMALIZED, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_signed_rgba8888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_signed_rgba8888, /* FetchTexel1Df */
- fetch_texel_2d_signed_rgba8888, /* FetchTexel2Df */
- fetch_texel_3d_signed_rgba8888, /* FetchTexel3Df */
- store_texel_signed_rgba8888 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_signed_rgba8888_rev = {
- MESA_FORMAT_SIGNED_RGBA8888_REV, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_SIGNED_NORMALIZED, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_signed_rgba8888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_signed_rgba8888_rev, /* FetchTexel1Df */
- fetch_texel_2d_signed_rgba8888_rev, /* FetchTexel2Df */
- fetch_texel_3d_signed_rgba8888_rev, /* FetchTexel3Df */
- store_texel_signed_rgba8888_rev /* StoreTexel */
-};
-
-/*@}*/
-
-
-/***************************************************************/
-/** \name Hardware formats */
-/*@{*/
-
-const struct gl_texture_format _mesa_texformat_rgba8888 = {
- MESA_FORMAT_RGBA8888, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_rgba8888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgba8888, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba8888, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba8888, /* FetchTexel3Df */
- store_texel_rgba8888 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba8888_rev = {
- MESA_FORMAT_RGBA8888_REV, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_rgba8888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgba8888_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba8888_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba8888_rev, /* FetchTexel3Df */
- store_texel_rgba8888_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_argb8888 = {
- MESA_FORMAT_ARGB8888, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_argb8888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_argb8888, /* FetchTexel1Df */
- fetch_texel_2d_f_argb8888, /* FetchTexel2Df */
- fetch_texel_3d_f_argb8888, /* FetchTexel3Df */
- store_texel_argb8888 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_argb8888_rev = {
- MESA_FORMAT_ARGB8888_REV, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_argb8888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_argb8888_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_argb8888_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_argb8888_rev, /* FetchTexel3Df */
- store_texel_argb8888_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb888 = {
- MESA_FORMAT_RGB888, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 3, /* TexelBytes */
- _mesa_texstore_rgb888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgb888, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb888, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb888, /* FetchTexel3Df */
- store_texel_rgb888 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_bgr888 = {
- MESA_FORMAT_BGR888, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 8, /* RedBits */
- 8, /* GreenBits */
- 8, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 3, /* TexelBytes */
- _mesa_texstore_bgr888, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_bgr888, /* FetchTexel1Df */
- fetch_texel_2d_f_bgr888, /* FetchTexel2Df */
- fetch_texel_3d_f_bgr888, /* FetchTexel3Df */
- store_texel_bgr888 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb565 = {
- MESA_FORMAT_RGB565, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 5, /* RedBits */
- 6, /* GreenBits */
- 5, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_rgb565, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgb565, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb565, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb565, /* FetchTexel3Df */
- store_texel_rgb565 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb565_rev = {
- MESA_FORMAT_RGB565_REV, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 5, /* RedBits */
- 6, /* GreenBits */
- 5, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_rgb565, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgb565_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb565_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb565_rev, /* FetchTexel3Df */
- store_texel_rgb565_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba4444 = {
- MESA_FORMAT_RGBA4444, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /* RedBits */
- 4, /* GreenBits */
- 4, /* BlueBits */
- 4, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_rgba4444, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgba4444, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba4444, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba4444, /* FetchTexel3Df */
- store_texel_rgba4444 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_argb4444 = {
- MESA_FORMAT_ARGB4444, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /* RedBits */
- 4, /* GreenBits */
- 4, /* BlueBits */
- 4, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_argb4444, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_argb4444, /* FetchTexel1Df */
- fetch_texel_2d_f_argb4444, /* FetchTexel2Df */
- fetch_texel_3d_f_argb4444, /* FetchTexel3Df */
- store_texel_argb4444 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_argb4444_rev = {
- MESA_FORMAT_ARGB4444_REV, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 4, /* RedBits */
- 4, /* GreenBits */
- 4, /* BlueBits */
- 4, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_argb4444, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_argb4444_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_argb4444_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_argb4444_rev, /* FetchTexel3Df */
- store_texel_argb4444_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgba5551 = {
- MESA_FORMAT_RGBA5551, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 5, /* RedBits */
- 5, /* GreenBits */
- 5, /* BlueBits */
- 1, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_rgba5551, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgba5551, /* FetchTexel1Df */
- fetch_texel_2d_f_rgba5551, /* FetchTexel2Df */
- fetch_texel_3d_f_rgba5551, /* FetchTexel3Df */
- store_texel_rgba5551 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_argb1555 = {
- MESA_FORMAT_ARGB1555, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 5, /* RedBits */
- 5, /* GreenBits */
- 5, /* BlueBits */
- 1, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_argb1555, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_argb1555, /* FetchTexel1Df */
- fetch_texel_2d_f_argb1555, /* FetchTexel2Df */
- fetch_texel_3d_f_argb1555, /* FetchTexel3Df */
- store_texel_argb1555 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_argb1555_rev = {
- MESA_FORMAT_ARGB1555_REV, /* MesaFormat */
- GL_RGBA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 5, /* RedBits */
- 5, /* GreenBits */
- 5, /* BlueBits */
- 1, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_argb1555, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_argb1555_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_argb1555_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_argb1555_rev, /* FetchTexel3Df */
- store_texel_argb1555_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_al88 = {
- MESA_FORMAT_AL88, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8, /* AlphaBits */
- 8, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_al88, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_al88, /* FetchTexel1Df */
- fetch_texel_2d_f_al88, /* FetchTexel2Df */
- fetch_texel_3d_f_al88, /* FetchTexel3Df */
- store_texel_al88 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_al88_rev = {
- MESA_FORMAT_AL88_REV, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8, /* AlphaBits */
- 8, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_al88, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_al88_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_al88_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_al88_rev, /* FetchTexel3Df */
- store_texel_al88_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rgb332 = {
- MESA_FORMAT_RGB332, /* MesaFormat */
- GL_RGB, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 3, /* RedBits */
- 3, /* GreenBits */
- 2, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1, /* TexelBytes */
- _mesa_texstore_rgb332, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rgb332, /* FetchTexel1Df */
- fetch_texel_2d_f_rgb332, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb332, /* FetchTexel3Df */
- store_texel_rgb332 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_a8 = {
- MESA_FORMAT_A8, /* MesaFormat */
- GL_ALPHA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 8, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1, /* TexelBytes */
- _mesa_texstore_a8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_a8, /* FetchTexel1Df */
- fetch_texel_2d_f_a8, /* FetchTexel2Df */
- fetch_texel_3d_f_a8, /* FetchTexel3Df */
- store_texel_a8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_l8 = {
- MESA_FORMAT_L8, /* MesaFormat */
- GL_LUMINANCE, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 8, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1, /* TexelBytes */
- _mesa_texstore_a8,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_l8, /* FetchTexel1Df */
- fetch_texel_2d_f_l8, /* FetchTexel2Df */
- fetch_texel_3d_f_l8, /* FetchTexel3Df */
- store_texel_l8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_i8 = {
- MESA_FORMAT_I8, /* MesaFormat */
- GL_INTENSITY, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 8, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1, /* TexelBytes */
- _mesa_texstore_a8,/*yes*/ /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_i8, /* FetchTexel1Df */
- fetch_texel_2d_f_i8, /* FetchTexel2Df */
- fetch_texel_3d_f_i8, /* FetchTexel3Df */
- store_texel_i8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_ci8 = {
- MESA_FORMAT_CI8, /* MesaFormat */
- GL_COLOR_INDEX, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 8, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 1, /* TexelBytes */
- _mesa_texstore_ci8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_ci8, /* FetchTexel1Df */
- fetch_texel_2d_f_ci8, /* FetchTexel2Df */
- fetch_texel_3d_f_ci8, /* FetchTexel3Df */
- store_texel_ci8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_ycbcr = {
- MESA_FORMAT_YCBCR, /* MesaFormat */
- GL_YCBCR_MESA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_ycbcr, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_ycbcr, /* FetchTexel1Df */
- fetch_texel_2d_f_ycbcr, /* FetchTexel2Df */
- fetch_texel_3d_f_ycbcr, /* FetchTexel3Df */
- store_texel_ycbcr /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_ycbcr_rev = {
- MESA_FORMAT_YCBCR_REV, /* MesaFormat */
- GL_YCBCR_MESA, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_ycbcr, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_ycbcr_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_ycbcr_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_ycbcr_rev, /* FetchTexel3Df */
- store_texel_ycbcr_rev /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_z24_s8 = {
- MESA_FORMAT_Z24_S8, /* MesaFormat */
- GL_DEPTH_STENCIL_EXT, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 24, /* DepthBits */
- 8, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_z24_s8, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_z24_s8, /* FetchTexel1Df */
- fetch_texel_2d_f_z24_s8, /* FetchTexel2Df */
- fetch_texel_3d_f_z24_s8, /* FetchTexel3Df */
- store_texel_z24_s8 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_s8_z24 = {
- MESA_FORMAT_S8_Z24, /* MesaFormat */
- GL_DEPTH_STENCIL_EXT, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 24, /* DepthBits */
- 8, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_s8_z24, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_s8_z24, /* FetchTexel1Df */
- fetch_texel_2d_f_s8_z24, /* FetchTexel2Df */
- fetch_texel_3d_f_s8_z24, /* FetchTexel3Df */
- store_texel_s8_z24 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_z16 = {
- MESA_FORMAT_Z16, /* MesaFormat */
- GL_DEPTH_COMPONENT, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- sizeof(GLushort) * 8, /* DepthBits */
- 0, /* StencilBits */
- sizeof(GLushort), /* TexelBytes */
- _mesa_texstore_z16, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_z16, /* FetchTexel1Df */
- fetch_texel_2d_f_z16, /* FetchTexel2Df */
- fetch_texel_3d_f_z16, /* FetchTexel3Df */
- store_texel_z16 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_z32 = {
- MESA_FORMAT_Z32, /* MesaFormat */
- GL_DEPTH_COMPONENT, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- sizeof(GLuint) * 8, /* DepthBits */
- 0, /* StencilBits */
- sizeof(GLuint), /* TexelBytes */
- _mesa_texstore_z32, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel1D */
- fetch_texel_1d_f_z32, /* FetchTexel1Df */
- fetch_texel_2d_f_z32, /* FetchTexel2Df */
- fetch_texel_3d_f_z32, /* FetchTexel3Df */
- store_texel_z32 /* StoreTexel */
-};
-
-/*@}*/
-
-
-/***************************************************************/
-/** \name Null format (useful for proxy textures) */
-/*@{*/
-
-const struct gl_texture_format _mesa_null_texformat = {
- -1, /* MesaFormat */
- 0, /* BaseFormat */
- GL_NONE, /* DataType */
- 0, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 0, /* TexelBytes */
- NULL, /* StoreTexImageFunc */
- fetch_null_texel, /* FetchTexel1D */
- fetch_null_texel, /* FetchTexel2D */
- fetch_null_texel, /* FetchTexel3D */
- fetch_null_texelf, /* FetchTexel1Df */
- fetch_null_texelf, /* FetchTexel2Df */
- fetch_null_texelf, /* FetchTexel3Df */
- store_null_texel /* StoreTexel */
-};
-
-/*@}*/
/**
@@ -1475,7 +55,7 @@ const struct gl_texture_format _mesa_null_texformat = {
* This is called via dd_function_table::ChooseTextureFormat. Hardware drivers
* will typically override this function with a specialized version.
*/
-const struct gl_texture_format *
+gl_format
_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
@@ -1489,15 +69,14 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_RGB10_A2:
case GL_RGBA12:
case GL_RGBA16:
- return &_mesa_texformat_rgba;
case GL_RGBA8:
- return &_mesa_texformat_rgba8888;
+ return MESA_FORMAT_RGBA8888;
case GL_RGB5_A1:
- return &_mesa_texformat_argb1555;
+ return MESA_FORMAT_ARGB1555;
case GL_RGBA2:
- return &_mesa_texformat_argb4444_rev; /* just to test another format*/
+ return MESA_FORMAT_ARGB4444_REV; /* just to test another format*/
case GL_RGBA4:
- return &_mesa_texformat_argb4444;
+ return MESA_FORMAT_ARGB4444;
/* RGB formats */
case 3:
@@ -1505,24 +84,22 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- return &_mesa_texformat_rgb;
case GL_RGB8:
- return &_mesa_texformat_rgb888;
+ return MESA_FORMAT_RGB888;
case GL_R3_G3_B2:
- return &_mesa_texformat_rgb332;
+ return MESA_FORMAT_RGB332;
case GL_RGB4:
- return &_mesa_texformat_rgb565_rev; /* just to test another format */
+ return MESA_FORMAT_RGB565_REV; /* just to test another format */
case GL_RGB5:
- return &_mesa_texformat_rgb565;
+ return MESA_FORMAT_RGB565;
/* Alpha formats */
case GL_ALPHA:
case GL_ALPHA4:
case GL_ALPHA12:
case GL_ALPHA16:
- return &_mesa_texformat_alpha;
case GL_ALPHA8:
- return &_mesa_texformat_a8;
+ return MESA_FORMAT_A8;
/* Luminance formats */
case 1:
@@ -1530,29 +107,28 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_LUMINANCE4:
case GL_LUMINANCE12:
case GL_LUMINANCE16:
- return &_mesa_texformat_luminance;
case GL_LUMINANCE8:
- return &_mesa_texformat_l8;
+ return MESA_FORMAT_L8;
/* Luminance/Alpha formats */
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE4_ALPHA4:
case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ return MESA_FORMAT_AL88;
+
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- return &_mesa_texformat_luminance_alpha;
- case GL_LUMINANCE8_ALPHA8:
- return &_mesa_texformat_al88;
+ return MESA_FORMAT_AL1616;
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY12:
case GL_INTENSITY16:
- return &_mesa_texformat_intensity;
case GL_INTENSITY8:
- return &_mesa_texformat_i8;
+ return MESA_FORMAT_I8;
case GL_COLOR_INDEX:
case GL_COLOR_INDEX1_EXT:
@@ -1561,7 +137,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_COLOR_INDEX12_EXT:
case GL_COLOR_INDEX16_EXT:
case GL_COLOR_INDEX8_EXT:
- return &_mesa_texformat_ci8;
+ return MESA_FORMAT_CI8;
default:
; /* fallthrough */
@@ -1572,9 +148,9 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
- return &_mesa_texformat_z32;
+ return MESA_FORMAT_Z32;
case GL_DEPTH_COMPONENT16:
- return &_mesa_texformat_z16;
+ return MESA_FORMAT_Z16;
default:
; /* fallthrough */
}
@@ -1582,35 +158,27 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_COMPRESSED_ALPHA_ARB:
- return &_mesa_texformat_alpha;
+ return MESA_FORMAT_A8;
case GL_COMPRESSED_LUMINANCE_ARB:
- return &_mesa_texformat_luminance;
+ return MESA_FORMAT_L8;
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- return &_mesa_texformat_luminance_alpha;
+ return MESA_FORMAT_AL88;
case GL_COMPRESSED_INTENSITY_ARB:
- return &_mesa_texformat_intensity;
+ return MESA_FORMAT_I8;
case GL_COMPRESSED_RGB_ARB:
-#if FEATURE_texture_fxt1
- if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return &_mesa_texformat_rgb_fxt1;
-#endif
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc ||
ctx->Extensions.S3_s3tc)
- return &_mesa_texformat_rgb_dxt1;
-#endif
- return &_mesa_texformat_rgb;
- case GL_COMPRESSED_RGBA_ARB:
-#if FEATURE_texture_fxt1
+ return MESA_FORMAT_RGB_DXT1;
if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return &_mesa_texformat_rgba_fxt1;
-#endif
-#if FEATURE_texture_s3tc
+ return MESA_FORMAT_RGB_FXT1;
+ return MESA_FORMAT_RGB888;
+ case GL_COMPRESSED_RGBA_ARB:
if (ctx->Extensions.EXT_texture_compression_s3tc ||
ctx->Extensions.S3_s3tc)
- return &_mesa_texformat_rgba_dxt3; /* Not rgba_dxt1, see spec */
-#endif
- return &_mesa_texformat_rgba;
+ return MESA_FORMAT_RGBA_DXT3; /* Not rgba_dxt1, see spec */
+ if (ctx->Extensions.TDFX_texture_compression_FXT1)
+ return MESA_FORMAT_RGBA_FXT1;
+ return MESA_FORMAT_RGBA8888;
default:
; /* fallthrough */
}
@@ -1618,9 +186,9 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
if (ctx->Extensions.MESA_ycbcr_texture) {
if (internalFormat == GL_YCBCR_MESA) {
if (type == GL_UNSIGNED_SHORT_8_8_MESA)
- return &_mesa_texformat_ycbcr;
+ return MESA_FORMAT_YCBCR;
else
- return &_mesa_texformat_ycbcr_rev;
+ return MESA_FORMAT_YCBCR_REV;
}
}
@@ -1628,9 +196,9 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
if (ctx->Extensions.TDFX_texture_compression_FXT1) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
- return &_mesa_texformat_rgb_fxt1;
+ return MESA_FORMAT_RGB_FXT1;
case GL_COMPRESSED_RGBA_FXT1_3DFX:
- return &_mesa_texformat_rgba_fxt1;
+ return MESA_FORMAT_RGBA_FXT1;
default:
; /* fallthrough */
}
@@ -1641,13 +209,13 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
if (ctx->Extensions.EXT_texture_compression_s3tc) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- return &_mesa_texformat_rgb_dxt1;
+ return MESA_FORMAT_RGB_DXT1;
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- return &_mesa_texformat_rgba_dxt1;
+ return MESA_FORMAT_RGBA_DXT1;
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- return &_mesa_texformat_rgba_dxt3;
+ return MESA_FORMAT_RGBA_DXT3;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- return &_mesa_texformat_rgba_dxt5;
+ return MESA_FORMAT_RGBA_DXT5;
default:
; /* fallthrough */
}
@@ -1657,10 +225,10 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_RGB_S3TC:
case GL_RGB4_S3TC:
- return &_mesa_texformat_rgb_dxt1;
+ return MESA_FORMAT_RGB_DXT1;
case GL_RGBA_S3TC:
case GL_RGBA4_S3TC:
- return &_mesa_texformat_rgba_dxt3;
+ return MESA_FORMAT_RGBA_DXT3;
default:
; /* fallthrough */
}
@@ -1670,29 +238,29 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
if (ctx->Extensions.ARB_texture_float) {
switch (internalFormat) {
case GL_ALPHA16F_ARB:
- return &_mesa_texformat_alpha_float16;
+ return MESA_FORMAT_ALPHA_FLOAT16;
case GL_ALPHA32F_ARB:
- return &_mesa_texformat_alpha_float32;
+ return MESA_FORMAT_ALPHA_FLOAT32;
case GL_LUMINANCE16F_ARB:
- return &_mesa_texformat_luminance_float16;
+ return MESA_FORMAT_LUMINANCE_FLOAT16;
case GL_LUMINANCE32F_ARB:
- return &_mesa_texformat_luminance_float32;
+ return MESA_FORMAT_LUMINANCE_FLOAT32;
case GL_LUMINANCE_ALPHA16F_ARB:
- return &_mesa_texformat_luminance_alpha_float16;
+ return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16;
case GL_LUMINANCE_ALPHA32F_ARB:
- return &_mesa_texformat_luminance_alpha_float32;
+ return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32;
case GL_INTENSITY16F_ARB:
- return &_mesa_texformat_intensity_float16;
+ return MESA_FORMAT_INTENSITY_FLOAT16;
case GL_INTENSITY32F_ARB:
- return &_mesa_texformat_intensity_float32;
+ return MESA_FORMAT_INTENSITY_FLOAT32;
case GL_RGB16F_ARB:
- return &_mesa_texformat_rgb_float16;
+ return MESA_FORMAT_RGB_FLOAT16;
case GL_RGB32F_ARB:
- return &_mesa_texformat_rgb_float32;
+ return MESA_FORMAT_RGB_FLOAT32;
case GL_RGBA16F_ARB:
- return &_mesa_texformat_rgba_float16;
+ return MESA_FORMAT_RGBA_FLOAT16;
case GL_RGBA32F_ARB:
- return &_mesa_texformat_rgba_float32;
+ return MESA_FORMAT_RGBA_FLOAT32;
default:
; /* fallthrough */
}
@@ -1702,7 +270,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- return &_mesa_texformat_z24_s8;
+ return MESA_FORMAT_Z24_S8;
default:
; /* fallthrough */
}
@@ -1712,7 +280,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_DUDV_ATI:
case GL_DU8DV8_ATI:
- return &_mesa_texformat_dudv8;
+ return MESA_FORMAT_DUDV8;
default:
; /* fallthrough */
}
@@ -1722,7 +290,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
- return &_mesa_texformat_signed_rgba8888;
+ return MESA_FORMAT_SIGNED_RGBA8888;
default:
; /* fallthrough */
}
@@ -1734,48 +302,48 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
- return &_mesa_texformat_srgb8;
+ return MESA_FORMAT_SRGB8;
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
- return &_mesa_texformat_srgba8;
+ return MESA_FORMAT_SRGBA8;
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
- return &_mesa_texformat_sl8;
+ return MESA_FORMAT_SL8;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
- return &_mesa_texformat_sla8;
+ return MESA_FORMAT_SLA8;
case GL_COMPRESSED_SLUMINANCE_EXT:
- return &_mesa_texformat_sl8;
+ return MESA_FORMAT_SL8;
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- return &_mesa_texformat_sla8;
+ return MESA_FORMAT_SLA8;
case GL_COMPRESSED_SRGB_EXT:
#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return &_mesa_texformat_srgb_dxt1;
+ return MESA_FORMAT_SRGB_DXT1;
#endif
- return &_mesa_texformat_srgb8;
+ return MESA_FORMAT_SRGB8;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return &_mesa_texformat_srgba_dxt3; /* Not srgba_dxt1, see spec */
+ return MESA_FORMAT_SRGBA_DXT3; /* Not srgba_dxt1, see spec */
#endif
- return &_mesa_texformat_srgba8;
+ return MESA_FORMAT_SRGBA8;
#if FEATURE_texture_s3tc
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return &_mesa_texformat_srgb_dxt1;
+ return MESA_FORMAT_SRGB_DXT1;
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return &_mesa_texformat_srgba_dxt1;
+ return MESA_FORMAT_SRGBA_DXT1;
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return &_mesa_texformat_srgba_dxt3;
+ return MESA_FORMAT_SRGBA_DXT3;
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return &_mesa_texformat_srgba_dxt5;
+ return MESA_FORMAT_SRGBA_DXT5;
break;
#endif
default:
@@ -1785,205 +353,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
#endif /* FEATURE_EXT_texture_sRGB */
_mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()");
- return NULL;
+ return MESA_FORMAT_NONE;
}
-
-
-/**
- * Return datatype and number of components per texel for the
- * given gl_texture_format.
- */
-void
-_mesa_format_to_type_and_comps(const struct gl_texture_format *format,
- GLenum *datatype, GLuint *comps)
-{
- switch (format->MesaFormat) {
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- *datatype = CHAN_TYPE;
- *comps = 4;
- return;
- case MESA_FORMAT_RGB888:
- case MESA_FORMAT_BGR888:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 3;
- return;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- *datatype = GL_UNSIGNED_SHORT_5_6_5;
- *comps = 3;
- return;
-
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- *datatype = GL_UNSIGNED_SHORT_4_4_4_4;
- *comps = 4;
- return;
-
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB1555_REV:
- *datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
- *comps = 4;
- return;
-
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 2;
- return;
- case MESA_FORMAT_RGB332:
- *datatype = GL_UNSIGNED_BYTE_3_3_2;
- *comps = 3;
- return;
-
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_CI8:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 1;
- return;
-
- case MESA_FORMAT_YCBCR:
- case MESA_FORMAT_YCBCR_REV:
- *datatype = GL_UNSIGNED_SHORT;
- *comps = 2;
- return;
-
- case MESA_FORMAT_Z24_S8:
- *datatype = GL_UNSIGNED_INT;
- *comps = 1; /* XXX OK? */
- return;
-
- case MESA_FORMAT_S8_Z24:
- *datatype = GL_UNSIGNED_INT;
- *comps = 1; /* XXX OK? */
- return;
-
- case MESA_FORMAT_Z16:
- *datatype = GL_UNSIGNED_SHORT;
- *comps = 1;
- return;
-
- case MESA_FORMAT_Z32:
- *datatype = GL_UNSIGNED_INT;
- *comps = 1;
- return;
-
- case MESA_FORMAT_DUDV8:
- *datatype = GL_BYTE;
- *comps = 2;
- return;
-
- case MESA_FORMAT_SIGNED_RGBA8888:
- case MESA_FORMAT_SIGNED_RGBA8888_REV:
- *datatype = GL_BYTE;
- *comps = 4;
- return;
-
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGB8:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 3;
- return;
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 4;
- return;
- case MESA_FORMAT_SL8:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 1;
- return;
- case MESA_FORMAT_SLA8:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 2;
- return;
-#endif
-
-#if FEATURE_texture_fxt1
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
-#endif
-#if FEATURE_texture_s3tc
- case MESA_FORMAT_RGB_DXT1:
- case MESA_FORMAT_RGBA_DXT1:
- case MESA_FORMAT_RGBA_DXT3:
- case MESA_FORMAT_RGBA_DXT5:
-#if FEATURE_EXT_texture_sRGB
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
- case MESA_FORMAT_SRGBA_DXT3:
- case MESA_FORMAT_SRGBA_DXT5:
-#endif
- /* XXX generate error instead? */
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 0;
- return;
-#endif
-
- case MESA_FORMAT_RGBA:
- *datatype = CHAN_TYPE;
- *comps = 4;
- return;
- case MESA_FORMAT_RGB:
- *datatype = CHAN_TYPE;
- *comps = 3;
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA:
- *datatype = CHAN_TYPE;
- *comps = 2;
- return;
- case MESA_FORMAT_ALPHA:
- case MESA_FORMAT_LUMINANCE:
- case MESA_FORMAT_INTENSITY:
- *datatype = CHAN_TYPE;
- *comps = 1;
- return;
-
- case MESA_FORMAT_RGBA_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 4;
- return;
- case MESA_FORMAT_RGBA_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 4;
- return;
- case MESA_FORMAT_RGB_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 3;
- return;
- case MESA_FORMAT_RGB_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 3;
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 2;
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 2;
- return;
- case MESA_FORMAT_ALPHA_FLOAT32:
- case MESA_FORMAT_LUMINANCE_FLOAT32:
- case MESA_FORMAT_INTENSITY_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 1;
- return;
- case MESA_FORMAT_ALPHA_FLOAT16:
- case MESA_FORMAT_LUMINANCE_FLOAT16:
- case MESA_FORMAT_INTENSITY_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 1;
- return;
-
- default:
- _mesa_problem(NULL, "bad format in _mesa_format_to_type_and_comps");
- *datatype = 0;
- *comps = 1;
- }
-}
diff --git a/src/mesa/main/texformat.h b/src/mesa/main/texformat.h
index 5aa1d756cbc..bda5fd6d8ce 100644
--- a/src/mesa/main/texformat.h
+++ b/src/mesa/main/texformat.h
@@ -1,9 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 7.75
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- * Copyright (c) 2008 VMware, Inc.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008-2009 VMware, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -23,271 +23,17 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
-/**
- * \file texformat.h
- * Texture formats definitions.
- *
- * \author Gareth Hughes
- */
-
-
#ifndef TEXFORMAT_H
#define TEXFORMAT_H
#include "mtypes.h"
+#include "formats.h"
-/**
- * Mesa internal texture image formats.
- * All texture images are stored in one of these formats.
- *
- * NOTE: when you add a new format, be sure to update the do_row()
- * function in texstore.c used for auto mipmap generation.
- */
-enum _format {
- /**
- * \name Hardware-friendly formats.
- *
- * Drivers can override the default formats and convert texture images to
- * one of these as required. The driver's
- * dd_function_table::ChooseTextureFormat function will choose one of these
- * formats.
- *
- * \note In the default case, some of these formats will be duplicates of
- * the generic formats listed below. However, these formats guarantee their
- * internal component sizes, while GLchan may vary between GLubyte, GLushort
- * and GLfloat.
- */
- /*@{*/
- /* msb <------ TEXEL BITS -----------> lsb */
- /* ---- ---- ---- ---- ---- ---- ---- ---- */
- MESA_FORMAT_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
- MESA_FORMAT_RGBA8888_REV, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_ARGB8888, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
- MESA_FORMAT_ARGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
- MESA_FORMAT_RGB888, /* RRRR RRRR GGGG GGGG BBBB BBBB */
- MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */
- MESA_FORMAT_RGB565_REV, /* GGGB BBBB RRRR RGGG */
- MESA_FORMAT_RGBA4444, /* RRRR GGGG BBBB AAAA */
- MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */
- MESA_FORMAT_ARGB4444_REV, /* GGGG BBBB AAAA RRRR */
- MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */
- MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */
- MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
- MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
- MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
- MESA_FORMAT_RGB332, /* RRRG GGBB */
- MESA_FORMAT_A8, /* AAAA AAAA */
- MESA_FORMAT_L8, /* LLLL LLLL */
- MESA_FORMAT_I8, /* IIII IIII */
- MESA_FORMAT_CI8, /* CCCC CCCC */
- MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
- MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
- MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
- MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_Z16, /* ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_Z32, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- /*@}*/
-
-#if FEATURE_EXT_texture_sRGB
- /**
- * \name 8-bit/channel sRGB formats
- */
- /*@{*/
- MESA_FORMAT_SRGB8,
- MESA_FORMAT_SRGBA8,
- MESA_FORMAT_SARGB8,
- MESA_FORMAT_SL8,
- MESA_FORMAT_SLA8,
-#if FEATURE_texture_s3tc
- MESA_FORMAT_SRGB_DXT1,
- MESA_FORMAT_SRGBA_DXT1,
- MESA_FORMAT_SRGBA_DXT3,
- MESA_FORMAT_SRGBA_DXT5,
-#endif
- /*@}*/
-#endif
-
- /**
- * \name Compressed texture formats.
- */
- /*@{*/
-#if FEATURE_texture_fxt1
- MESA_FORMAT_RGB_FXT1,
- MESA_FORMAT_RGBA_FXT1,
-#endif
-#if FEATURE_texture_s3tc
- MESA_FORMAT_RGB_DXT1,
- MESA_FORMAT_RGBA_DXT1,
- MESA_FORMAT_RGBA_DXT3,
- MESA_FORMAT_RGBA_DXT5,
-#endif
- /*@}*/
-
- /**
- * \name Generic GLchan-based formats.
- *
- * Software-oriented texture formats. Texels are arrays of GLchan
- * values so there are no byte order issues.
- *
- * \note Because these are based on the GLchan data type, one cannot assume
- * 8 bits per channel with these formats. If you require GLubyte channels,
- * use one of the hardware formats above.
- */
- /*@{*/
- MESA_FORMAT_RGBA,
- MESA_FORMAT_RGB,
- MESA_FORMAT_ALPHA,
- MESA_FORMAT_LUMINANCE,
- MESA_FORMAT_LUMINANCE_ALPHA,
- MESA_FORMAT_INTENSITY,
- /*@}*/
-
- /**
- * \name Floating point texture formats.
- */
- /*@{*/
- MESA_FORMAT_RGBA_FLOAT32,
- MESA_FORMAT_RGBA_FLOAT16,
- MESA_FORMAT_RGB_FLOAT32,
- MESA_FORMAT_RGB_FLOAT16,
- MESA_FORMAT_ALPHA_FLOAT32,
- MESA_FORMAT_ALPHA_FLOAT16,
- MESA_FORMAT_LUMINANCE_FLOAT32,
- MESA_FORMAT_LUMINANCE_FLOAT16,
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
- MESA_FORMAT_INTENSITY_FLOAT32,
- MESA_FORMAT_INTENSITY_FLOAT16,
- /*@}*/
-
- /**
- * \name Signed fixed point texture formats.
- */
- /*@{*/
- MESA_FORMAT_DUDV8,
- MESA_FORMAT_SIGNED_RGBA8888,
- MESA_FORMAT_SIGNED_RGBA8888_REV
- /*@}*/
-};
-
-
-/** GLchan-valued formats */
-/*@{*/
-extern const struct gl_texture_format _mesa_texformat_rgba;
-extern const struct gl_texture_format _mesa_texformat_rgb;
-extern const struct gl_texture_format _mesa_texformat_alpha;
-extern const struct gl_texture_format _mesa_texformat_luminance;
-extern const struct gl_texture_format _mesa_texformat_luminance_alpha;
-extern const struct gl_texture_format _mesa_texformat_intensity;
-/*@}*/
-
-#if FEATURE_EXT_texture_sRGB
-/** sRGB (nonlinear) formats */
-/*@{*/
-extern const struct gl_texture_format _mesa_texformat_srgb8;
-extern const struct gl_texture_format _mesa_texformat_srgba8;
-extern const struct gl_texture_format _mesa_texformat_sargb8;
-extern const struct gl_texture_format _mesa_texformat_sl8;
-extern const struct gl_texture_format _mesa_texformat_sla8;
-#if FEATURE_texture_s3tc
-extern const struct gl_texture_format _mesa_texformat_srgb_dxt1;
-extern const struct gl_texture_format _mesa_texformat_srgba_dxt1;
-extern const struct gl_texture_format _mesa_texformat_srgba_dxt3;
-extern const struct gl_texture_format _mesa_texformat_srgba_dxt5;
-#endif
-/*@}*/
-#endif
-
-/** Floating point texture formats */
-/*@{*/
-extern const struct gl_texture_format _mesa_texformat_rgba_float32;
-extern const struct gl_texture_format _mesa_texformat_rgba_float16;
-extern const struct gl_texture_format _mesa_texformat_rgb_float32;
-extern const struct gl_texture_format _mesa_texformat_rgb_float16;
-extern const struct gl_texture_format _mesa_texformat_alpha_float32;
-extern const struct gl_texture_format _mesa_texformat_alpha_float16;
-extern const struct gl_texture_format _mesa_texformat_luminance_float32;
-extern const struct gl_texture_format _mesa_texformat_luminance_float16;
-extern const struct gl_texture_format _mesa_texformat_luminance_alpha_float32;
-extern const struct gl_texture_format _mesa_texformat_luminance_alpha_float16;
-extern const struct gl_texture_format _mesa_texformat_intensity_float32;
-extern const struct gl_texture_format _mesa_texformat_intensity_float16;
-/*@}*/
-
-/** Signed fixed point texture formats */
-/*@{*/
-extern const struct gl_texture_format _mesa_texformat_dudv8;
-extern const struct gl_texture_format _mesa_texformat_signed_rgba8888;
-extern const struct gl_texture_format _mesa_texformat_signed_rgba8888_rev;
-/*@}*/
-
-/** \name Assorted hardware-friendly formats */
-/*@{*/
-extern const struct gl_texture_format _mesa_texformat_rgba8888;
-extern const struct gl_texture_format _mesa_texformat_rgba8888_rev;
-extern const struct gl_texture_format _mesa_texformat_argb8888;
-extern const struct gl_texture_format _mesa_texformat_argb8888_rev;
-extern const struct gl_texture_format _mesa_texformat_rgb888;
-extern const struct gl_texture_format _mesa_texformat_bgr888;
-extern const struct gl_texture_format _mesa_texformat_rgb565;
-extern const struct gl_texture_format _mesa_texformat_rgb565_rev;
-extern const struct gl_texture_format _mesa_texformat_rgba4444;
-extern const struct gl_texture_format _mesa_texformat_argb4444;
-extern const struct gl_texture_format _mesa_texformat_argb4444_rev;
-extern const struct gl_texture_format _mesa_texformat_argb1555;
-extern const struct gl_texture_format _mesa_texformat_argb1555_rev;
-extern const struct gl_texture_format _mesa_texformat_rgba5551;
-extern const struct gl_texture_format _mesa_texformat_al88;
-extern const struct gl_texture_format _mesa_texformat_al88_rev;
-extern const struct gl_texture_format _mesa_texformat_rgb332;
-extern const struct gl_texture_format _mesa_texformat_a8;
-extern const struct gl_texture_format _mesa_texformat_l8;
-extern const struct gl_texture_format _mesa_texformat_i8;
-extern const struct gl_texture_format _mesa_texformat_ci8;
-extern const struct gl_texture_format _mesa_texformat_z24_s8;
-extern const struct gl_texture_format _mesa_texformat_s8_z24;
-extern const struct gl_texture_format _mesa_texformat_z16;
-extern const struct gl_texture_format _mesa_texformat_z32;
-/*@}*/
-
-/** \name YCbCr formats */
-/*@{*/
-extern const struct gl_texture_format _mesa_texformat_ycbcr;
-extern const struct gl_texture_format _mesa_texformat_ycbcr_rev;
-/*@}*/
-
-/** \name Compressed formats */
-/*@{*/
-#if FEATURE_texture_fxt1
-extern const struct gl_texture_format _mesa_texformat_rgb_fxt1;
-extern const struct gl_texture_format _mesa_texformat_rgba_fxt1;
-#endif
-#if FEATURE_texture_s3tc
-extern const struct gl_texture_format _mesa_texformat_rgb_dxt1;
-extern const struct gl_texture_format _mesa_texformat_rgba_dxt1;
-extern const struct gl_texture_format _mesa_texformat_rgba_dxt3;
-extern const struct gl_texture_format _mesa_texformat_rgba_dxt5;
-#endif
-/*@}*/
-
-/** \name The null format */
-/*@{*/
-extern const struct gl_texture_format _mesa_null_texformat;
-/*@}*/
-
-
-extern const struct gl_texture_format *
+extern gl_format
_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
GLenum format, GLenum type );
-extern void
-_mesa_format_to_type_and_comps(const struct gl_texture_format *format,
- GLenum *datatype, GLuint *comps);
-
-
#endif
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index 733e129fcfe..5abb1ff0ab6 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -211,14 +211,20 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
static void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
- _mesa_TexGenfv(coord, pname, &param);
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ _mesa_TexGenfv(coord, pname, p);
}
void GLAPIENTRY
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
{
- _mesa_TexGeniv( coord, pname, &param );
+ GLint p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0;
+ _mesa_TexGeniv( coord, pname, p );
}
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 14d6fc76590..bd7cc8d2780 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.5
+ * Version: 7.7
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (c) 2009 VMware, Inc.
@@ -31,10 +31,11 @@
#include "glheader.h"
#include "bufferobj.h"
+#include "enums.h"
#include "context.h"
+#include "formats.h"
#include "image.h"
#include "texcompress.h"
-#include "texformat.h"
#include "texgetimage.h"
#include "teximage.h"
#include "texstate.h"
@@ -44,29 +45,6 @@
#if FEATURE_EXT_texture_sRGB
/**
- * Test if given texture image is an sRGB format.
- */
-static GLboolean
-is_srgb_teximage(const struct gl_texture_image *texImage)
-{
- switch (texImage->TexFormat->MesaFormat) {
- case MESA_FORMAT_SRGB8:
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
- case MESA_FORMAT_SL8:
- case MESA_FORMAT_SLA8:
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
- case MESA_FORMAT_SRGBA_DXT3:
- case MESA_FORMAT_SRGBA_DXT5:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
-}
-
-
-/**
* Convert a float value from linear space to a
* non-linear sRGB value in [0, 255].
* Not terribly efficient.
@@ -108,8 +86,357 @@ type_with_negative_values(GLenum type)
/**
+ * glGetTexImage for color index pixels.
+ */
+static void
+get_tex_color_index(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ const GLint width = texImage->Width;
+ const GLint height = texImage->Height;
+ const GLint depth = texImage->Depth;
+ const GLuint indexBits =
+ _mesa_get_format_bits(texImage->TexFormat, GL_TEXTURE_INDEX_SIZE_EXT);
+ const GLbitfield transferOps = 0x0;
+ GLint img, row, col;
+
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ GLuint indexRow[MAX_WIDTH];
+ void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
+ width, height, format, type,
+ img, row, 0);
+ assert(dest);
+
+ if (indexBits == 8) {
+ const GLubyte *src = (const GLubyte *) texImage->Data;
+ src += width * (img * texImage->Height + row);
+ for (col = 0; col < width; col++) {
+ indexRow[col] = src[col];
+ }
+ }
+ else if (indexBits == 16) {
+ const GLushort *src = (const GLushort *) texImage->Data;
+ src += width * (img * texImage->Height + row);
+ for (col = 0; col < width; col++) {
+ indexRow[col] = src[col];
+ }
+ }
+ else {
+ _mesa_problem(ctx, "Color index problem in _mesa_GetTexImage");
+ }
+ _mesa_pack_index_span(ctx, width, type, dest,
+ indexRow, &ctx->Pack, transferOps);
+ }
+ }
+}
+
+
+/**
+ * glGetTexImage for depth/Z pixels.
+ */
+static void
+get_tex_depth(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ const GLint width = texImage->Width;
+ const GLint height = texImage->Height;
+ const GLint depth = texImage->Depth;
+ GLint img, row, col;
+
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ GLfloat depthRow[MAX_WIDTH];
+ void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
+ width, height, format, type,
+ img, row, 0);
+ assert(dest);
+
+ for (col = 0; col < width; col++) {
+ texImage->FetchTexelf(texImage, col, row, img, depthRow + col);
+ }
+ _mesa_pack_depth_span(ctx, width, dest, type, depthRow, &ctx->Pack);
+ }
+ }
+}
+
+
+/**
+ * glGetTexImage for depth/stencil pixels.
+ */
+static void
+get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ const GLint width = texImage->Width;
+ const GLint height = texImage->Height;
+ const GLint depth = texImage->Depth;
+ const GLuint *src = (const GLuint *) texImage->Data;
+ GLint img, row;
+
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
+ width, height, format, type,
+ img, row, 0);
+ _mesa_memcpy(dest, src, width * sizeof(GLuint));
+ if (ctx->Pack.SwapBytes) {
+ _mesa_swap4((GLuint *) dest, width);
+ }
+
+ src += width * row + width * height * img;
+ }
+ }
+}
+
+
+/**
+ * glGetTexImage for YCbCr pixels.
+ */
+static void
+get_tex_ycbcr(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ const GLint width = texImage->Width;
+ const GLint height = texImage->Height;
+ const GLint depth = texImage->Depth;
+ const GLint rowstride = texImage->RowStride;
+ const GLushort *src = (const GLushort *) texImage->Data;
+ GLint img, row;
+
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
+ width, height, format, type,
+ img, row, 0);
+ _mesa_memcpy(dest, src, width * sizeof(GLushort));
+
+ /* check for byte swapping */
+ if ((texImage->TexFormat == MESA_FORMAT_YCBCR
+ && type == GL_UNSIGNED_SHORT_8_8_REV_MESA) ||
+ (texImage->TexFormat == MESA_FORMAT_YCBCR_REV
+ && type == GL_UNSIGNED_SHORT_8_8_MESA)) {
+ if (!ctx->Pack.SwapBytes)
+ _mesa_swap2((GLushort *) dest, width);
+ }
+ else if (ctx->Pack.SwapBytes) {
+ _mesa_swap2((GLushort *) dest, width);
+ }
+
+ src += rowstride;
+ }
+ }
+}
+
+
+/**
+ * glGetTexImagefor sRGB pixels;
+ */
+static void
+get_tex_srgb(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ const GLint width = texImage->Width;
+ const GLint height = texImage->Height;
+ const GLint depth = texImage->Depth;
+ const GLbitfield transferOps = 0x0;
+ GLint img, row;
+
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
+ width, height, format, type,
+ img, row, 0);
+
+ GLfloat rgba[MAX_WIDTH][4];
+ GLint col;
+
+ /* convert row to RGBA format */
+ for (col = 0; col < width; col++) {
+ texImage->FetchTexelf(texImage, col, row, img, rgba[col]);
+ if (texImage->_BaseFormat == GL_LUMINANCE) {
+ rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]);
+ rgba[col][GCOMP] = 0.0;
+ rgba[col][BCOMP] = 0.0;
+ }
+ else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
+ rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]);
+ rgba[col][GCOMP] = 0.0;
+ rgba[col][BCOMP] = 0.0;
+ }
+ else if (texImage->_BaseFormat == GL_RGB ||
+ texImage->_BaseFormat == GL_RGBA) {
+ rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]);
+ rgba[col][GCOMP] = linear_to_nonlinear(rgba[col][GCOMP]);
+ rgba[col][BCOMP] = linear_to_nonlinear(rgba[col][BCOMP]);
+ }
+ }
+ _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba,
+ format, type, dest,
+ &ctx->Pack, transferOps);
+ }
+ }
+}
+
+
+/**
+ * glGetTexImagefor RGBA, Luminance, etc. pixels.
+ * This is the slow way since we use texture sampling.
+ */
+static void
+get_tex_rgba(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ const GLint width = texImage->Width;
+ const GLint height = texImage->Height;
+ const GLint depth = texImage->Depth;
+ /* Normally, no pixel transfer ops are performed during glGetTexImage.
+ * The only possible exception is component clamping to [0,1].
+ */
+ GLbitfield transferOps = 0x0;
+ GLint img, row;
+
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
+ width, height, format, type,
+ img, row, 0);
+ GLfloat rgba[MAX_WIDTH][4];
+ GLint col;
+ GLenum dataType = _mesa_get_format_datatype(texImage->TexFormat);
+
+ /* clamp does not apply to GetTexImage (final conversion)?
+ * Looks like we need clamp though when going from format
+ * containing negative values to unsigned format.
+ */
+ if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) {
+ transferOps |= IMAGE_CLAMP_BIT;
+ }
+ else if (!type_with_negative_values(type) &&
+ (dataType == GL_FLOAT ||
+ dataType == GL_SIGNED_NORMALIZED)) {
+ transferOps |= IMAGE_CLAMP_BIT;
+ }
+
+ for (col = 0; col < width; col++) {
+ texImage->FetchTexelf(texImage, col, row, img, rgba[col]);
+ if (texImage->_BaseFormat == GL_ALPHA) {
+ rgba[col][RCOMP] = 0.0F;
+ rgba[col][GCOMP] = 0.0F;
+ rgba[col][BCOMP] = 0.0F;
+ }
+ else if (texImage->_BaseFormat == GL_LUMINANCE) {
+ rgba[col][GCOMP] = 0.0F;
+ rgba[col][BCOMP] = 0.0F;
+ rgba[col][ACOMP] = 1.0F;
+ }
+ else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
+ rgba[col][GCOMP] = 0.0F;
+ rgba[col][BCOMP] = 0.0F;
+ }
+ else if (texImage->_BaseFormat == GL_INTENSITY) {
+ rgba[col][GCOMP] = 0.0F;
+ rgba[col][BCOMP] = 0.0F;
+ rgba[col][ACOMP] = 1.0F;
+ }
+ }
+ _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba,
+ format, type, dest,
+ &ctx->Pack, transferOps);
+ }
+ }
+}
+
+
+/**
+ * Try to do glGetTexImage() with simple memcpy().
+ * \return GL_TRUE if done, GL_FALSE otherwise
+ */
+static GLboolean
+get_tex_memcpy(GLcontext *ctx, GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_object *texObj,
+ const struct gl_texture_image *texImage)
+{
+ GLboolean memCopy = GL_FALSE;
+
+ /* Texture image should have been mapped already */
+ assert(texImage->Data);
+
+ /*
+ * Check if the src/dst formats are compatible.
+ * Also note that GL's pixel transfer ops don't apply to glGetTexImage()
+ * so we don't have to worry about those.
+ * XXX more format combinations could be supported here.
+ */
+ if ((texObj->Target == GL_TEXTURE_1D ||
+ texObj->Target == GL_TEXTURE_2D ||
+ texObj->Target == GL_TEXTURE_RECTANGLE ||
+ (texObj->Target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X &&
+ texObj->Target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) {
+ if (texImage->TexFormat == MESA_FORMAT_ARGB8888 &&
+ format == GL_BGRA &&
+ type == GL_UNSIGNED_BYTE &&
+ !ctx->Pack.SwapBytes &&
+ _mesa_little_endian()) {
+ memCopy = GL_TRUE;
+ }
+ else if (texImage->TexFormat == MESA_FORMAT_AL88 &&
+ format == GL_LUMINANCE_ALPHA &&
+ type == GL_UNSIGNED_BYTE &&
+ !ctx->Pack.SwapBytes &&
+ _mesa_little_endian()) {
+ memCopy = GL_TRUE;
+ }
+ else if (texImage->TexFormat == MESA_FORMAT_L8 &&
+ format == GL_LUMINANCE &&
+ type == GL_UNSIGNED_BYTE) {
+ memCopy = GL_TRUE;
+ }
+ else if (texImage->TexFormat == MESA_FORMAT_A8 &&
+ format == GL_ALPHA &&
+ type == GL_UNSIGNED_BYTE) {
+ memCopy = GL_TRUE;
+ }
+ }
+
+ if (memCopy) {
+ const GLuint bpp = _mesa_get_format_bytes(texImage->TexFormat);
+ const GLuint bytesPerRow = texImage->Width * bpp;
+ GLubyte *dst =
+ _mesa_image_address2d(&ctx->Pack, pixels, texImage->Width,
+ texImage->Height, format, type, 0, 0);
+ const GLint dstRowStride =
+ _mesa_image_row_stride(&ctx->Pack, texImage->Width, format, type);
+ const GLubyte *src = texImage->Data;
+ const GLint srcRowStride = texImage->RowStride * bpp;
+ GLuint row;
+
+ if (bytesPerRow == dstRowStride && bytesPerRow == srcRowStride) {
+ memcpy(dst, src, bytesPerRow * texImage->Height);
+ }
+ else {
+ for (row = 0; row < texImage->Height; row++) {
+ memcpy(dst, src, bytesPerRow);
+ dst += dstRowStride;
+ src += srcRowStride;
+ }
+ }
+ }
+
+ return memCopy;
+}
+
+
+/**
* This is the software fallback for Driver.GetTexImage().
* All error checking will have been done before this routine is called.
+ * The texture image must be mapped.
*/
void
_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
@@ -117,7 +444,21 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2;
+ GLuint dimensions;
+
+ /* If we get here, the texture image should be mapped */
+ assert(texImage->Data);
+
+ switch (target) {
+ case GL_TEXTURE_1D:
+ dimensions = 1;
+ break;
+ case GL_TEXTURE_3D:
+ dimensions = 3;
+ break;
+ default:
+ dimensions = 2;
+ }
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
/* Packing texture image into a PBO.
@@ -130,8 +471,8 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
GL_WRITE_ONLY_ARB, ctx->Pack.BufferObj);
if (!buf) {
- /* buffer is already mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION,"glGetTexImage(PBO is mapped)");
+ /* out of memory or other unexpected error */
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage(map PBO failed)");
return;
}
/* <pixels> was an offset into the PBO.
@@ -139,164 +480,27 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
*/
pixels = ADD_POINTERS(buf, pixels);
}
- else if (!pixels) {
- /* not an error */
- return;
- }
- {
- const GLint width = texImage->Width;
- const GLint height = texImage->Height;
- const GLint depth = texImage->Depth;
- GLint img, row;
- for (img = 0; img < depth; img++) {
- for (row = 0; row < height; row++) {
- /* compute destination address in client memory */
- GLvoid *dest = _mesa_image_address( dimensions, &ctx->Pack, pixels,
- width, height, format, type,
- img, row, 0);
- assert(dest);
-
- if (format == GL_COLOR_INDEX) {
- GLuint indexRow[MAX_WIDTH];
- GLint col;
- /* Can't use FetchTexel here because that returns RGBA */
- if (texImage->TexFormat->IndexBits == 8) {
- const GLubyte *src = (const GLubyte *) texImage->Data;
- src += width * (img * texImage->Height + row);
- for (col = 0; col < width; col++) {
- indexRow[col] = src[col];
- }
- }
- else if (texImage->TexFormat->IndexBits == 16) {
- const GLushort *src = (const GLushort *) texImage->Data;
- src += width * (img * texImage->Height + row);
- for (col = 0; col < width; col++) {
- indexRow[col] = src[col];
- }
- }
- else {
- _mesa_problem(ctx,
- "Color index problem in _mesa_GetTexImage");
- }
- _mesa_pack_index_span(ctx, width, type, dest,
- indexRow, &ctx->Pack,
- 0 /* no image transfer */);
- }
- else if (format == GL_DEPTH_COMPONENT) {
- GLfloat depthRow[MAX_WIDTH];
- GLint col;
- for (col = 0; col < width; col++) {
- (*texImage->FetchTexelf)(texImage, col, row, img,
- depthRow + col);
- }
- _mesa_pack_depth_span(ctx, width, dest, type,
- depthRow, &ctx->Pack);
- }
- else if (format == GL_DEPTH_STENCIL_EXT) {
- /* XXX Note: we're bypassing texImage->FetchTexel()! */
- const GLuint *src = (const GLuint *) texImage->Data;
- src += width * row + width * height * img;
- _mesa_memcpy(dest, src, width * sizeof(GLuint));
- if (ctx->Pack.SwapBytes) {
- _mesa_swap4((GLuint *) dest, width);
- }
- }
- else if (format == GL_YCBCR_MESA) {
- /* No pixel transfer */
- const GLint rowstride = texImage->RowStride;
- MEMCPY(dest,
- (const GLushort *) texImage->Data + row * rowstride,
- width * sizeof(GLushort));
- /* check for byte swapping */
- if ((texImage->TexFormat->MesaFormat == MESA_FORMAT_YCBCR
- && type == GL_UNSIGNED_SHORT_8_8_REV_MESA) ||
- (texImage->TexFormat->MesaFormat == MESA_FORMAT_YCBCR_REV
- && type == GL_UNSIGNED_SHORT_8_8_MESA)) {
- if (!ctx->Pack.SwapBytes)
- _mesa_swap2((GLushort *) dest, width);
- }
- else if (ctx->Pack.SwapBytes) {
- _mesa_swap2((GLushort *) dest, width);
- }
- }
-#if FEATURE_EXT_texture_sRGB
- else if (is_srgb_teximage(texImage)) {
- /* special case this since need to backconvert values */
- /* convert row to RGBA format */
- GLfloat rgba[MAX_WIDTH][4];
- GLint col;
- GLbitfield transferOps = 0x0;
-
- for (col = 0; col < width; col++) {
- (*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]);
- if (texImage->_BaseFormat == GL_LUMINANCE) {
- rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]);
- rgba[col][GCOMP] = 0.0;
- rgba[col][BCOMP] = 0.0;
- }
- else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
- rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]);
- rgba[col][GCOMP] = 0.0;
- rgba[col][BCOMP] = 0.0;
- }
- else if (texImage->_BaseFormat == GL_RGB ||
- texImage->_BaseFormat == GL_RGBA) {
- rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]);
- rgba[col][GCOMP] = linear_to_nonlinear(rgba[col][GCOMP]);
- rgba[col][BCOMP] = linear_to_nonlinear(rgba[col][BCOMP]);
- }
- }
- _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba,
- format, type, dest,
- &ctx->Pack, transferOps);
- }
-#endif /* FEATURE_EXT_texture_sRGB */
- else {
- /* general case: convert row to RGBA format */
- GLfloat rgba[MAX_WIDTH][4];
- GLint col;
- GLbitfield transferOps = 0x0;
-
- /* clamp does not apply to GetTexImage (final conversion)?
- * Looks like we need clamp though when going from format
- * containing negative values to unsigned format.
- */
- if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA)
- transferOps |= IMAGE_CLAMP_BIT;
- else if (!type_with_negative_values(type) &&
- (texImage->TexFormat->DataType == GL_FLOAT ||
- texImage->TexFormat->DataType == GL_SIGNED_NORMALIZED))
- transferOps |= IMAGE_CLAMP_BIT;
-
- for (col = 0; col < width; col++) {
- (*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]);
- if (texImage->_BaseFormat == GL_ALPHA) {
- rgba[col][RCOMP] = 0.0;
- rgba[col][GCOMP] = 0.0;
- rgba[col][BCOMP] = 0.0;
- }
- else if (texImage->_BaseFormat == GL_LUMINANCE) {
- rgba[col][GCOMP] = 0.0;
- rgba[col][BCOMP] = 0.0;
- rgba[col][ACOMP] = 1.0;
- }
- else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
- rgba[col][GCOMP] = 0.0;
- rgba[col][BCOMP] = 0.0;
- }
- else if (texImage->_BaseFormat == GL_INTENSITY) {
- rgba[col][GCOMP] = 0.0;
- rgba[col][BCOMP] = 0.0;
- rgba[col][ACOMP] = 1.0;
- }
- }
- _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba,
- format, type, dest,
- &ctx->Pack, transferOps);
- } /* format */
- } /* row */
- } /* img */
+ if (get_tex_memcpy(ctx, format, type, pixels, texObj, texImage)) {
+ /* all done */
+ }
+ else if (format == GL_COLOR_INDEX) {
+ get_tex_color_index(ctx, dimensions, format, type, pixels, texImage);
+ }
+ else if (format == GL_DEPTH_COMPONENT) {
+ get_tex_depth(ctx, dimensions, format, type, pixels, texImage);
+ }
+ else if (format == GL_DEPTH_STENCIL_EXT) {
+ get_tex_depth_stencil(ctx, dimensions, format, type, pixels, texImage);
+ }
+ else if (format == GL_YCBCR_MESA) {
+ get_tex_ycbcr(ctx, dimensions, format, type, pixels, texImage);
+ }
+ else if (_mesa_get_format_color_encoding(texImage->TexFormat) == GL_SRGB) {
+ get_tex_srgb(ctx, dimensions, format, type, pixels, texImage);
+ }
+ else {
+ get_tex_rgba(ctx, dimensions, format, type, pixels, texImage);
}
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
@@ -317,40 +521,44 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- GLuint size;
+ const GLuint row_stride = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->Width);
+ const GLuint row_stride_stored = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->RowStride);
+ GLuint i;
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
/* pack texture image into a PBO */
- GLubyte *buf;
- if ((const GLubyte *) img + texImage->CompressedSize >
- (const GLubyte *) ctx->Pack.BufferObj->Size) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetCompressedTexImage(invalid PBO access)");
- return;
- }
- buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
- GL_WRITE_ONLY_ARB,
- ctx->Pack.BufferObj);
+ GLubyte *buf = (GLubyte *)
+ ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
+ GL_WRITE_ONLY_ARB, ctx->Pack.BufferObj);
if (!buf) {
- /* buffer is already mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetCompressedTexImage(PBO is mapped)");
+ /* out of memory or other unexpected error */
+ _mesa_error(ctx, GL_OUT_OF_MEMORY,
+ "glGetCompresssedTexImage(map PBO failed)");
return;
}
img = ADD_POINTERS(buf, img);
}
- else if (!img) {
- /* not an error */
- return;
- }
- /* don't use texImage->CompressedSize since that may be padded out */
- size = _mesa_compressed_texture_size(ctx, texImage->Width, texImage->Height,
- texImage->Depth,
- texImage->TexFormat->MesaFormat);
+ /* no pixelstore or pixel transfer, but respect stride */
- /* just memcpy, no pixelstore or pixel transfer */
- _mesa_memcpy(img, texImage->Data, size);
+ if (row_stride == row_stride_stored) {
+ const GLuint size = _mesa_format_image_size(texImage->TexFormat,
+ texImage->Width,
+ texImage->Height,
+ texImage->Depth);
+ _mesa_memcpy(img, texImage->Data, size);
+ }
+ else {
+ GLuint bw, bh;
+ _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
+ for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) {
+ memcpy((GLubyte *)img + i * row_stride,
+ (GLubyte *)texImage->Data + i * row_stride_stored,
+ row_stride);
+ }
+ }
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
@@ -368,10 +576,10 @@ static GLboolean
getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels )
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
+ GLenum baseFormat;
if (maxLevels == 0) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target=0x%x)", target);
@@ -421,8 +629,7 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
return GL_TRUE;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
if (!texObj || _mesa_is_proxy_texture(target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)");
@@ -434,40 +641,42 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
/* out of memory */
return GL_TRUE;
}
+
+ baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
/* Make sure the requested image format is compatible with the
* texture's format. Note that a color index texture can be converted
* to RGBA so that combo is allowed.
*/
if (_mesa_is_color_format(format)
- && !_mesa_is_color_format(texImage->TexFormat->BaseFormat)
- && !_mesa_is_index_format(texImage->TexFormat->BaseFormat)) {
+ && !_mesa_is_color_format(baseFormat)
+ && !_mesa_is_index_format(baseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return GL_TRUE;
}
else if (_mesa_is_index_format(format)
- && !_mesa_is_index_format(texImage->TexFormat->BaseFormat)) {
+ && !_mesa_is_index_format(baseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return GL_TRUE;
}
else if (_mesa_is_depth_format(format)
- && !_mesa_is_depth_format(texImage->TexFormat->BaseFormat)
- && !_mesa_is_depthstencil_format(texImage->TexFormat->BaseFormat)) {
+ && !_mesa_is_depth_format(baseFormat)
+ && !_mesa_is_depthstencil_format(baseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return GL_TRUE;
}
else if (_mesa_is_ycbcr_format(format)
- && !_mesa_is_ycbcr_format(texImage->TexFormat->BaseFormat)) {
+ && !_mesa_is_ycbcr_format(baseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return GL_TRUE;
}
else if (_mesa_is_depthstencil_format(format)
- && !_mesa_is_depthstencil_format(texImage->TexFormat->BaseFormat)) {
+ && !_mesa_is_depthstencil_format(baseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return GL_TRUE;
}
else if (_mesa_is_dudv_format(format)
- && !_mesa_is_dudv_format(texImage->TexFormat->BaseFormat)) {
+ && !_mesa_is_dudv_format(baseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return GL_TRUE;
}
@@ -479,7 +688,14 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
texImage->Height, texImage->Depth,
format, type, pixels)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetTexImage(invalid PBO access)");
+ "glGetTexImage(out of bounds PBO write)");
+ return GL_TRUE;
+ }
+
+ /* PBO should not be mapped */
+ if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetTexImage(PBO is mapped)");
return GL_TRUE;
}
}
@@ -502,8 +718,8 @@ void GLAPIENTRY
_mesa_GetTexImage( GLenum target, GLint level, GLenum format,
GLenum type, GLvoid *pixels )
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -511,15 +727,25 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ if (!_mesa_is_bufferobj(ctx->Pack.BufferObj) && !pixels) {
+ /* not an error, do nothing */
+ return;
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
+ _mesa_debug(ctx, "glGetTexImage(tex %u) format = %s, w=%d, h=%d,"
+ " dstFmt=0x%x, dstType=0x%x\n",
+ texObj->Name,
+ _mesa_get_format_name(texImage->TexFormat),
+ texImage->Width, texImage->Height,
+ format, type);
+ }
_mesa_lock_texture(ctx, texObj);
{
- struct gl_texture_image *texImage =
- _mesa_select_tex_image(ctx, texObj, target, level);
-
- /* typically, this will call _mesa_get_teximage() */
ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels,
texObj, texImage);
}
@@ -527,55 +753,119 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
}
+
+/**
+ * Do error checking for a glGetCompressedTexImage() call.
+ * \return GL_TRUE if any error, GL_FALSE if no errors.
+ */
+static GLboolean
+getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
+ GLvoid *img)
+{
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
+
+ if (maxLevels == 0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImage(target=0x%x)",
+ target);
+ return GL_TRUE;
+ }
+
+ if (level < 0 || level >= maxLevels) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetCompressedTexImageARB(bad level = %d)", level);
+ return GL_TRUE;
+ }
+
+ if (_mesa_is_proxy_texture(target)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetCompressedTexImageARB(bad target = %s)",
+ _mesa_lookup_enum_by_nr(target));
+ return GL_TRUE;
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+ if (!texObj) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)");
+ return GL_TRUE;
+ }
+
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (!texImage) {
+ /* probably invalid mipmap level */
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetCompressedTexImageARB(level)");
+ return GL_TRUE;
+ }
+
+ if (!_mesa_is_format_compressed(texImage->TexFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetCompressedTexImageARB(texture is not compressed)");
+ return GL_TRUE;
+ }
+
+ if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
+ GLuint compressedSize;
+
+ /* make sure PBO is not mapped */
+ if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetCompressedTexImage(PBO is mapped)");
+ return GL_TRUE;
+ }
+
+ compressedSize = _mesa_format_image_size(texImage->TexFormat,
+ texImage->Width,
+ texImage->Height,
+ texImage->Depth);
+
+ /* do bounds checking on PBO write */
+ if ((const GLubyte *) img + compressedSize >
+ (const GLubyte *) ctx->Pack.BufferObj->Size) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetCompressedTexImage(out of bounds PBO write)");
+ return GL_TRUE;
+ }
+ }
+
+ return GL_FALSE;
+}
+
+
void GLAPIENTRY
_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLint maxLevels;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
- if (!texObj) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB");
+ if (getcompressedteximage_error_check(ctx, target, level, img)) {
return;
}
- maxLevels = _mesa_max_texture_levels(ctx, target);
- ASSERT(maxLevels > 0); /* 0 indicates bad target, caught above */
-
- if (level < 0 || level >= maxLevels) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)");
+ if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && !img) {
+ /* not an error, do nothing */
return;
}
- if (_mesa_is_proxy_texture(target)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)");
- return;
+ texObj = _mesa_get_current_tex_object(ctx, target);
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
+ _mesa_debug(ctx,
+ "glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n",
+ texObj->Name,
+ _mesa_get_format_name(texImage->TexFormat),
+ texImage->Width, texImage->Height);
}
_mesa_lock_texture(ctx, texObj);
{
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- if (texImage) {
- if (texImage->IsCompressed) {
- /* this typically calls _mesa_get_compressed_teximage() */
- ctx->Driver.GetCompressedTexImage(ctx, target, level, img,
- texObj, texImage);
- }
- else {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetCompressedTexImageARB");
- }
- }
- else {
- /* probably invalid mipmap level */
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glGetCompressedTexImageARB(level)");
- }
+ ctx->Driver.GetCompressedTexImage(ctx, target, level, img,
+ texObj, texImage);
}
_mesa_unlock_texture(ctx, texObj);
}
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 465da6b0469..b946f3c69d7 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -43,7 +43,7 @@
#include "macros.h"
#include "state.h"
#include "texcompress.h"
-#include "texformat.h"
+#include "texfetch.h"
#include "teximage.h"
#include "texstate.h"
#include "texstore.h"
@@ -82,63 +82,6 @@ _mesa_free_texmemory(void *m)
}
-
-
-#if 0
-static void PrintTexture(GLcontext *ctx, const struct gl_texture_image *img)
-{
-#if CHAN_TYPE != GL_UNSIGNED_BYTE
- _mesa_problem(NULL, "PrintTexture not supported");
-#else
- GLuint i, j, c;
- const GLubyte *data = (const GLubyte *) img->Data;
-
- if (!data) {
- _mesa_printf("No texture data\n");
- return;
- }
-
- switch (img->Format) {
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_INTENSITY:
- case GL_COLOR_INDEX:
- c = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- c = 2;
- break;
- case GL_RGB:
- c = 3;
- break;
- case GL_RGBA:
- c = 4;
- break;
- default:
- _mesa_problem(NULL, "error in PrintTexture\n");
- return;
- }
-
- for (i = 0; i < img->Height; i++) {
- for (j = 0; j < img->Width; j++) {
- if (c==1)
- _mesa_printf("%02x ", data[0]);
- else if (c==2)
- _mesa_printf("%02x%02x ", data[0], data[1]);
- else if (c==3)
- _mesa_printf("%02x%02x%02x ", data[0], data[1], data[2]);
- else if (c==4)
- _mesa_printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
- data += (img->RowStride - img->Width) * c;
- }
- /* XXX use img->ImageStride here */
- _mesa_printf("\n");
- }
-#endif
-}
-#endif
-
-
/*
* Compute floor(log_base_2(n)).
* If n < 0 return -1.
@@ -640,6 +583,17 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
/**
+ * Return pointer to texture object for given target on current texture unit.
+ */
+struct gl_texture_object *
+_mesa_get_current_tex_object(GLcontext *ctx, GLenum target)
+{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ return _mesa_select_tex_object(ctx, texUnit, target);
+}
+
+
+/**
* Get a texture image pointer from a texture object, given a texture
* target and mipmap level. The target and level parameters should
* have already been error-checked.
@@ -900,11 +854,9 @@ clear_teximage_fields(struct gl_texture_image *img)
img->HeightLog2 = 0;
img->DepthLog2 = 0;
img->Data = NULL;
- img->TexFormat = &_mesa_null_texformat;
+ img->TexFormat = MESA_FORMAT_NONE;
img->FetchTexelc = NULL;
img->FetchTexelf = NULL;
- img->IsCompressed = 0;
- img->CompressedSize = 0;
}
@@ -967,9 +919,6 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2);
- img->IsCompressed = GL_FALSE;
- img->CompressedSize = 0;
-
if ((width == 1 || _mesa_is_pow_two(img->Width2)) &&
(height == 1 || _mesa_is_pow_two(img->Height2)) &&
(depth == 1 || _mesa_is_pow_two(img->Depth2)))
@@ -1002,6 +951,9 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
img->HeightScale = (GLfloat) img->Height;
img->DepthScale = (GLfloat) img->Depth;
}
+
+ img->FetchTexelc = NULL;
+ img->FetchTexelf = NULL;
}
@@ -1315,8 +1267,8 @@ texture_error_check( GLcontext *ctx, GLenum target,
if (_mesa_base_tex_format(ctx, internalFormat) < 0) {
if (!isProxy) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glTexImage%dD(internalFormat=0x%x)",
- dimensions, internalFormat);
+ "glTexImage%dD(internalFormat=%s)",
+ dimensions, _mesa_lookup_enum_by_nr(internalFormat));
}
return GL_TRUE;
}
@@ -1528,6 +1480,11 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_FALSE;
}
+
+/**
+ * Do second part of glTexSubImage which depends on the destination texture.
+ * \return GL_TRUE if error recorded, GL_FALSE otherwise
+ */
static GLboolean
subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
GLenum target, GLint level,
@@ -1575,41 +1532,35 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
}
}
-#if FEATURE_EXT_texture_sRGB
- if (destTex->InternalFormat == GL_COMPRESSED_SRGB_S3TC_DXT1_EXT ||
- destTex->InternalFormat == GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT ||
- destTex->InternalFormat == GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT ||
- destTex->InternalFormat == GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT) {
- if ((width & 0x3) || (height & 0x3) ||
- (xoffset & 0x3) || (yoffset & 0x3))
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%dD(size or offset not multiple of 4)",
- dimensions);
- return GL_TRUE;
- }
-#endif
+ if (_mesa_is_format_compressed(destTex->TexFormat)) {
+ GLuint bw, bh;
- if (destTex->IsCompressed) {
if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTexSubImage%D(target)", dimensions);
+ "glTexSubImage%D(target=%s)", dimensions,
+ _mesa_lookup_enum_by_nr(target));
return GL_TRUE;
}
- /* offset must be multiple of 4 */
- if ((xoffset & 3) || (yoffset & 3)) {
+
+ /* do tests which depend on compression block size */
+ _mesa_get_format_block_size(destTex->TexFormat, &bw, &bh);
+
+ /* offset must be multiple of block size */
+ if ((xoffset % bw != 0) || (yoffset % bh != 0)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%D(xoffset or yoffset)", dimensions);
+ "glTexSubImage%D(xoffset = %d, yoffset = %d)",
+ dimensions, xoffset, yoffset);
return GL_TRUE;
}
- /* size must be multiple of 4 or equal to whole texture size */
- if ((width & 3) && (GLuint) width != destTex->Width) {
+ /* size must be multiple of bw by bh or equal to whole texture size */
+ if ((width % bw != 0) && (GLuint) width != destTex->Width) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%D(width)", dimensions);
+ "glTexSubImage%D(width = %d)", dimensions, width);
return GL_TRUE;
}
- if ((height & 3) && (GLuint) height != destTex->Height) {
+ if ((height % bh != 0) && (GLuint) height != destTex->Height) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexSubImage%D(width)", dimensions);
+ "glTexSubImage%D(height = %d)", dimensions, height);
return GL_TRUE;
}
}
@@ -1951,7 +1902,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
}
}
- if (teximage->IsCompressed) {
+ if (_mesa_is_format_compressed(teximage->TexFormat)) {
if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glCopyTexSubImage%d(target)", dimensions);
@@ -2084,7 +2035,9 @@ check_gen_mipmap(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj, GLint level)
{
ASSERT(target != GL_TEXTURE_CUBE_MAP);
- if (texObj->GenerateMipmap && level == texObj->BaseLevel) {
+ if (texObj->GenerateMipmap &&
+ level == texObj->BaseLevel &&
+ level < texObj->MaxLevel) {
ASSERT(ctx->Driver.GenerateMipmap);
ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
@@ -2164,7 +2117,6 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
if (target == GL_TEXTURE_1D) {
/* non-proxy target */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
@@ -2177,8 +2129,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -2197,6 +2148,12 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
postConvWidth, 1, 1,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ format, type);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage1D);
ctx->Driver.TexImage1D(ctx, target, level, internalFormat,
@@ -2205,6 +2162,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2232,8 +2191,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
_mesa_init_teximage_fields(ctx, target, texImage,
postConvWidth, 1, 1,
border, internalFormat);
- texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx,
- internalFormat, format, type);
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
}
}
else {
@@ -2278,7 +2237,6 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
(ctx->Extensions.MESA_texture_array &&
target == GL_TEXTURE_1D_ARRAY_EXT)) {
/* non-proxy target */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
@@ -2292,8 +2250,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -2311,6 +2268,12 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
postConvWidth, postConvHeight, 1,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ format, type);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage2D);
ctx->Driver.TexImage2D(ctx, target, level, internalFormat,
@@ -2319,6 +2282,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2352,8 +2317,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
_mesa_init_teximage_fields(ctx, target, texImage,
postConvWidth, postConvHeight, 1,
border, internalFormat);
- texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx,
- internalFormat, format, type);
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
}
}
else {
@@ -2389,7 +2354,6 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
(ctx->Extensions.MESA_texture_array &&
target == GL_TEXTURE_2D_ARRAY_EXT)) {
/* non-proxy target */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
@@ -2402,8 +2366,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -2421,6 +2384,12 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
width, height, depth,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ format, type);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage3D);
ctx->Driver.TexImage3D(ctx, target, level, internalFormat,
@@ -2429,6 +2398,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 3);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2456,8 +2427,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
/* no error, set the tex image parameters */
_mesa_init_teximage_fields(ctx, target, texImage, width, height,
depth, border, internalFormat);
- texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx,
- internalFormat, format, type);
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
}
}
else {
@@ -2486,9 +2457,8 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
const GLvoid *pixels )
{
GLsizei postConvWidth = width;
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
- struct gl_texture_image *texImage = NULL;
+ struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2514,8 +2484,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
assert(texObj);
_mesa_lock_texture(ctx, texObj);
@@ -2553,7 +2522,6 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
const GLvoid *pixels )
{
GLsizei postConvWidth = width, postConvHeight = height;
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
@@ -2582,8 +2550,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
return; /* error was detected */
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2621,7 +2588,6 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
GLenum format, GLenum type,
const GLvoid *pixels )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
@@ -2642,8 +2608,7 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
return; /* error was detected */
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2684,7 +2649,6 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
GLint x, GLint y,
GLsizei width, GLint border )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width;
@@ -2711,8 +2675,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
postConvWidth, 1, border))
return;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2731,12 +2694,20 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
_mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
ASSERT(ctx->Driver.CopyTexImage1D);
ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat,
x, y, width, border);
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2756,7 +2727,6 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint border )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width, postConvHeight = height;
@@ -2784,8 +2754,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
postConvWidth, postConvHeight, border))
return;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2806,12 +2775,20 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
postConvWidth, postConvHeight, 1,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
ASSERT(ctx->Driver.CopyTexImage2D);
ctx->Driver.CopyTexImage2D(ctx, target, level, internalFormat,
x, y, width, height, border);
ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2829,7 +2806,6 @@ void GLAPIENTRY
_mesa_CopyTexSubImage1D( GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width;
@@ -2850,8 +2826,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
if (copytexsubimage_error_check1(ctx, 1, target, level))
return;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2894,7 +2869,6 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y, GLsizei width, GLsizei height )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width, postConvHeight = height;
@@ -2912,8 +2886,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
if (copytexsubimage_error_check1(ctx, 2, target, level))
return;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2959,7 +2932,6 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y, GLsizei width, GLsizei height )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width, postConvHeight = height;
@@ -2977,8 +2949,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
if (copytexsubimage_error_check1(ctx, 3, target, level))
return;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3027,6 +2998,29 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
/**
+ * Return expected size of a compressed texture.
+ */
+static GLuint
+compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth,
+ GLenum glformat)
+{
+ gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
+ return _mesa_format_image_size(mesaFormat, width, height, depth);
+}
+
+
+/*
+ * Return compressed texture block size, in pixels.
+ */
+static void
+get_compressed_block_size(GLenum glformat, GLuint *bw, GLuint *bh)
+{
+ gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
+ _mesa_get_format_block_size(mesaFormat, bw, bh);
+}
+
+
+/**
* Error checking for glCompressedTexImage[123]D().
* \return error code or GL_NO_ERROR.
*/
@@ -3108,8 +3102,7 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions,
if (level < 0 || level >= maxLevels)
return GL_INVALID_VALUE;
- expectedSize = _mesa_compressed_texture_size_glenum(ctx, width, height,
- depth, internalFormat);
+ expectedSize = compressed_tex_size(width, height, depth, internalFormat);
if (expectedSize != imageSize)
return GL_INVALID_VALUE;
@@ -3142,6 +3135,7 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
GLenum format, GLsizei imageSize)
{
GLint expectedSize, maxLevels = 0, maxTextureSize;
+ GLuint bw, bh;
(void) zoffset;
if (dimensions == 1) {
@@ -3191,20 +3185,21 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
if (level < 0 || level >= maxLevels)
return GL_INVALID_VALUE;
- /* XXX these tests are specific to the compressed format.
- * this code should be generalized in some way.
+ /*
+ * do checks which depend on compression block size
*/
- if ((xoffset & 3) != 0 || (yoffset & 3) != 0)
+ get_compressed_block_size(format, &bw, &bh);
+
+ if ((xoffset % bw != 0) || (yoffset % bh != 0))
return GL_INVALID_VALUE;
- if ((width & 3) != 0 && width != 2 && width != 1)
+ if ((width % bw != 0) && width != 2 && width != 1)
return GL_INVALID_VALUE;
- if ((height & 3) != 0 && height != 2 && height != 1)
+ if ((height % bh != 0) && height != 2 && height != 1)
return GL_INVALID_VALUE;
- expectedSize = _mesa_compressed_texture_size_glenum(ctx, width, height,
- depth, format);
+ expectedSize = compressed_tex_size(width, height, depth, format);
if (expectedSize != imageSize)
return GL_INVALID_VALUE;
@@ -3212,6 +3207,55 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
}
+/**
+ * Do second part of glCompressedTexSubImage error checking.
+ * \return GL_TRUE if error found, GL_FALSE otherwise.
+ */
+static GLboolean
+compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims,
+ GLsizei width, GLsizei height,
+ GLsizei depth, GLenum format,
+ struct gl_texture_image *texImage)
+{
+
+ if ((GLint) format != texImage->InternalFormat) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCompressedTexSubImage%uD(format=0x%x)", dims, format);
+ return GL_TRUE;
+ }
+
+ if (((width == 1 || width == 2) &&
+ (GLuint) width != texImage->Width) ||
+ (width > texImage->Width)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCompressedTexSubImage%uD(width=%d)", dims, width);
+ return GL_TRUE;
+ }
+
+ if (dims >= 2) {
+ if (((height == 1 || height == 2) &&
+ (GLuint) height != texImage->Height) ||
+ (height > texImage->Height)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCompressedTexSubImage%uD(height=%d)", dims, height);
+ return GL_TRUE;
+ }
+ }
+
+ if (dims >= 3) {
+ if (((depth == 1 || depth == 2) &&
+ (GLuint) depth != texImage->Depth) ||
+ (depth > texImage->Depth)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCompressedTexSubImage%uD(depth=%d)", dims, depth);
+ return GL_TRUE;
+ }
+ }
+
+ return GL_FALSE;
+}
+
+
void GLAPIENTRY
_mesa_CompressedTexImage1DARB(GLenum target, GLint level,
@@ -3230,7 +3274,6 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
if (target == GL_TEXTURE_1D) {
/* non-proxy target */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLenum error = compressed_texture_error_check(ctx, 1, target, level,
@@ -3240,8 +3283,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3258,12 +3300,20 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
_mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
ASSERT(ctx->Driver.CompressedTexImage1D);
ctx->Driver.CompressedTexImage1D(ctx, target, level,
internalFormat, width, border,
imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 1);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3292,11 +3342,10 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
}
else {
/* store the teximage parameters */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3334,9 +3383,9 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) {
/* non-proxy target */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+
GLenum error = compressed_texture_error_check(ctx, 2, target, level,
internalFormat, width, height, 1, border, imageSize);
if (error) {
@@ -3344,8 +3393,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3362,12 +3410,20 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
_mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
ASSERT(ctx->Driver.CompressedTexImage2D);
ctx->Driver.CompressedTexImage2D(ctx, target, level,
internalFormat, width, height,
border, imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 2);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3398,11 +3454,10 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
}
else {
/* store the teximage parameters */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3437,7 +3492,6 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
if (target == GL_TEXTURE_3D) {
/* non-proxy target */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLenum error = compressed_texture_error_check(ctx, 3, target, level,
@@ -3447,8 +3501,8 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -3465,6 +3519,12 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
width, height, depth,
border, internalFormat);
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
ASSERT(ctx->Driver.CompressedTexImage3D);
ctx->Driver.CompressedTexImage3D(ctx, target, level,
internalFormat,
@@ -3472,6 +3532,8 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
border, imageSize, data,
texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 3);
+
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3500,11 +3562,11 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
}
else {
/* store the teximage parameters */
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
@@ -3521,50 +3583,71 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
}
-void GLAPIENTRY
-_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
- GLsizei width, GLenum format,
- GLsizei imageSize, const GLvoid *data)
+/**
+ * Common helper for glCompressedTexSubImage1/2/3D().
+ */
+static void
+compressed_tex_sub_image(GLuint dims, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLsizei imageSize, const GLvoid *data)
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLenum error;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- error = compressed_subtexture_error_check(ctx, 1, target, level,
+ error = compressed_subtexture_error_check(ctx, dims, target, level,
xoffset, 0, 0, /* pos */
- width, 1, 1, /* size */
+ width, height, depth, /* size */
format, imageSize);
if (error) {
- _mesa_error(ctx, error, "glCompressedTexSubImage1D");
+ _mesa_error(ctx, error, "glCompressedTexSubImage%uD", dims);
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
assert(texImage);
- if ((GLint) format != texImage->InternalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCompressedTexSubImage1D(format)");
- }
- else if ((width == 1 || width == 2) &&
- (GLuint) width != texImage->Width) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glCompressedTexSubImage1D(width)");
+ if (compressed_subtexture_error_check2(ctx, dims, width, height, depth,
+ format, texImage)) {
+ /* error was recorded */
}
- else if (width > 0) {
- if (ctx->Driver.CompressedTexSubImage1D) {
- ctx->Driver.CompressedTexSubImage1D(ctx, target, level,
- xoffset, width,
- format, imageSize, data,
- texObj, texImage);
+ else if (width > 0 && height > 0 && depth > 0) {
+ switch (dims) {
+ case 1:
+ if (ctx->Driver.CompressedTexSubImage1D) {
+ ctx->Driver.CompressedTexSubImage1D(ctx, target, level,
+ xoffset, width,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ break;
+ case 2:
+ if (ctx->Driver.CompressedTexSubImage2D) {
+ ctx->Driver.CompressedTexSubImage2D(ctx, target, level,
+ xoffset, yoffset,
+ width, height,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ break;
+ case 3:
+ if (ctx->Driver.CompressedTexSubImage3D) {
+ ctx->Driver.CompressedTexSubImage3D(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ break;
+ default:
+ ;
}
check_gen_mipmap(ctx, target, texObj, level);
@@ -3577,60 +3660,23 @@ _mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
void GLAPIENTRY
+_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ compressed_tex_sub_image(1, target, level, xoffset, 0, 0, width, 1, 1,
+ format, imageSize, data);
+}
+
+
+void GLAPIENTRY
_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- struct gl_texture_unit *texUnit;
- struct gl_texture_object *texObj;
- struct gl_texture_image *texImage;
- GLenum error;
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
- error = compressed_subtexture_error_check(ctx, 2, target, level,
- xoffset, yoffset, 0, /* pos */
- width, height, 1, /* size */
- format, imageSize);
- if (error) {
- /* XXX proxy target? */
- _mesa_error(ctx, error, "glCompressedTexSubImage2D");
- return;
- }
-
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
-
- _mesa_lock_texture(ctx, texObj);
- {
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- assert(texImage);
-
- if ((GLint) format != texImage->InternalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCompressedTexSubImage2D(format)");
- }
- else if (((width == 1 || width == 2)
- && (GLuint) width != texImage->Width) ||
- ((height == 1 || height == 2)
- && (GLuint) height != texImage->Height)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage2D(size)");
- }
- else if (width > 0 && height > 0) {
- if (ctx->Driver.CompressedTexSubImage2D) {
- ctx->Driver.CompressedTexSubImage2D(ctx, target, level,
- xoffset, yoffset, width, height,
- format, imageSize, data,
- texObj, texImage);
- }
-
- check_gen_mipmap(ctx, target, texObj, level);
-
- ctx->NewState |= _NEW_TEXTURE;
- }
- }
- _mesa_unlock_texture(ctx, texObj);
+ compressed_tex_sub_image(2, target, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data);
}
@@ -3640,57 +3686,8 @@ _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
GLsizei height, GLsizei depth, GLenum format,
GLsizei imageSize, const GLvoid *data)
{
- struct gl_texture_unit *texUnit;
- struct gl_texture_object *texObj;
- struct gl_texture_image *texImage;
- GLenum error;
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
- error = compressed_subtexture_error_check(ctx, 3, target, level,
- xoffset, yoffset, zoffset,/*pos*/
- width, height, depth, /*size*/
- format, imageSize);
- if (error) {
- _mesa_error(ctx, error, "glCompressedTexSubImage3D");
- return;
- }
-
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
-
- _mesa_lock_texture(ctx, texObj);
- {
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- assert(texImage);
-
- if ((GLint) format != texImage->InternalFormat) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCompressedTexSubImage3D(format)");
- }
- else if (((width == 1 || width == 2)
- && (GLuint) width != texImage->Width) ||
- ((height == 1 || height == 2)
- && (GLuint) height != texImage->Height) ||
- ((depth == 1 || depth == 2)
- && (GLuint) depth != texImage->Depth)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage3D(size)");
- }
- else if (width > 0 && height > 0 && depth > 0) {
- if (ctx->Driver.CompressedTexSubImage3D) {
- ctx->Driver.CompressedTexSubImage3D(ctx, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, imageSize, data,
- texObj, texImage);
- }
-
- check_gen_mipmap(ctx, target, texObj, level);
-
- ctx->NewState |= _NEW_TEXTURE;
- }
- }
- _mesa_unlock_texture(ctx, texObj);
+ compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, imageSize, data);
}
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 094177da79d..97c90183190 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -86,6 +86,9 @@ extern struct gl_texture_object *
_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
GLenum target);
+extern struct gl_texture_object *
+_mesa_get_current_tex_object(GLcontext *ctx, GLenum target);
+
extern struct gl_texture_image *
_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 31832184c0e..aaccc03a7c6 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -33,6 +33,7 @@
#include "context.h"
#include "enums.h"
#include "fbobject.h"
+#include "formats.h"
#include "hash.h"
#include "imports.h"
#include "macros.h"
@@ -740,6 +741,10 @@ _mesa_get_fallback_texture(GLcontext *ctx)
_mesa_init_teximage_fields(ctx, GL_TEXTURE_2D, texImage,
8, 8, 1, 0, GL_RGBA);
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
/* set image data */
ctx->Driver.TexImage2D(ctx, GL_TEXTURE_2D, 0, GL_RGBA,
8, 8, 0,
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index b2fbe2205ba..310d594cd55 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -31,9 +31,10 @@
#include "main/glheader.h"
+#include "main/colormac.h"
#include "main/context.h"
#include "main/enums.h"
-#include "main/colormac.h"
+#include "main/formats.h"
#include "main/macros.h"
#include "main/texcompress.h"
#include "main/texparam.h"
@@ -78,6 +79,8 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
/**
* Get current texture object for given target.
* Return NULL if any error.
+ * Note that this is different from _mesa_select_tex_object() in that proxy
+ * targets are not accepted.
*/
static struct gl_texture_object *
get_texobj(GLcontext *ctx, GLenum target)
@@ -544,13 +547,20 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
case GL_DEPTH_TEXTURE_MODE_ARB:
{
/* convert float param to int */
- GLint p = (GLint) param;
- need_update = set_tex_parameteri(ctx, texObj, pname, &p);
+ GLint p[4];
+ p[0] = (GLint) param;
+ p[1] = p[2] = p[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, p);
}
break;
default:
- /* this will generate an error if pname is illegal */
- need_update = set_tex_parameterf(ctx, texObj, pname, &param);
+ {
+ /* this will generate an error if pname is illegal */
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ need_update = set_tex_parameterf(ctx, texObj, pname, p);
+ }
}
if (ctx->Driver.TexParameter && need_update) {
@@ -599,7 +609,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
iparams[1] = (GLint) params[1];
iparams[2] = (GLint) params[2];
iparams[3] = (GLint) params[3];
- need_update = set_tex_parameteri(ctx, target, iparams);
+ need_update = set_tex_parameteri(ctx, texObj, pname, iparams);
}
break;
#endif
@@ -726,6 +736,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
const struct gl_texture_image *img = NULL;
GLboolean isProxy;
GLint maxLevels;
+ gl_format texFormat;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -763,6 +774,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
goto out;
}
+ texFormat = img->TexFormat;
+
isProxy = _mesa_is_proxy_texture(target);
switch (pname) {
@@ -776,26 +789,23 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = img->Depth;
break;
case GL_TEXTURE_INTERNAL_FORMAT:
- *params = img->InternalFormat;
+ if (_mesa_is_format_compressed(img->TexFormat)) {
+ /* need to return the actual compressed format */
+ *params = _mesa_compressed_format_to_glenum(ctx, img->TexFormat);
+ }
+ else {
+ /* return the user's requested internal format */
+ *params = img->InternalFormat;
+ }
break;
case GL_TEXTURE_BORDER:
*params = img->Border;
break;
case GL_TEXTURE_RED_SIZE:
- if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA)
- *params = img->TexFormat->RedBits;
- else
- *params = 0;
- break;
case GL_TEXTURE_GREEN_SIZE:
- if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA)
- *params = img->TexFormat->GreenBits;
- else
- *params = 0;
- break;
case GL_TEXTURE_BLUE_SIZE:
if (img->_BaseFormat == GL_RGB || img->_BaseFormat == GL_RGBA)
- *params = img->TexFormat->BlueBits;
+ *params = _mesa_get_format_bits(texFormat, pname);
else
*params = 0;
break;
@@ -803,36 +813,44 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
if (img->_BaseFormat == GL_ALPHA ||
img->_BaseFormat == GL_LUMINANCE_ALPHA ||
img->_BaseFormat == GL_RGBA)
- *params = img->TexFormat->AlphaBits;
+ *params = _mesa_get_format_bits(texFormat, pname);
else
*params = 0;
break;
case GL_TEXTURE_INTENSITY_SIZE:
if (img->_BaseFormat != GL_INTENSITY)
*params = 0;
- else if (img->TexFormat->IntensityBits > 0)
- *params = img->TexFormat->IntensityBits;
- else /* intensity probably stored as rgb texture */
- *params = MIN2(img->TexFormat->RedBits, img->TexFormat->GreenBits);
+ else {
+ *params = _mesa_get_format_bits(texFormat, pname);
+ if (*params == 0) {
+ /* intensity probably stored as rgb texture */
+ *params = MIN2(_mesa_get_format_bits(texFormat, GL_TEXTURE_RED_SIZE),
+ _mesa_get_format_bits(texFormat, GL_TEXTURE_GREEN_SIZE));
+ }
+ }
break;
case GL_TEXTURE_LUMINANCE_SIZE:
if (img->_BaseFormat != GL_LUMINANCE &&
img->_BaseFormat != GL_LUMINANCE_ALPHA)
*params = 0;
- else if (img->TexFormat->LuminanceBits > 0)
- *params = img->TexFormat->LuminanceBits;
- else /* luminance probably stored as rgb texture */
- *params = MIN2(img->TexFormat->RedBits, img->TexFormat->GreenBits);
+ else {
+ *params = _mesa_get_format_bits(texFormat, pname);
+ if (*params == 0) {
+ /* luminance probably stored as rgb texture */
+ *params = MIN2(_mesa_get_format_bits(texFormat, GL_TEXTURE_RED_SIZE),
+ _mesa_get_format_bits(texFormat, GL_TEXTURE_GREEN_SIZE));
+ }
+ }
break;
case GL_TEXTURE_INDEX_SIZE_EXT:
if (img->_BaseFormat == GL_COLOR_INDEX)
- *params = img->TexFormat->IndexBits;
+ *params = _mesa_get_format_bits(texFormat, pname);
else
*params = 0;
break;
case GL_TEXTURE_DEPTH_SIZE_ARB:
if (ctx->Extensions.ARB_depth_texture)
- *params = img->TexFormat->DepthBits;
+ *params = _mesa_get_format_bits(texFormat, pname);
else
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname)");
@@ -840,7 +858,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
case GL_TEXTURE_STENCIL_SIZE_EXT:
if (ctx->Extensions.EXT_packed_depth_stencil ||
ctx->Extensions.ARB_framebuffer_object) {
- *params = img->TexFormat->StencilBits;
+ *params = _mesa_get_format_bits(texFormat, pname);
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -850,13 +868,9 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
/* GL_ARB_texture_compression */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
- if (img->IsCompressed && !isProxy) {
- /* Don't use ctx->Driver.CompressedTextureSize() since that
- * may returned a padded hardware size.
- */
- *params = _mesa_compressed_texture_size(ctx, img->Width,
- img->Height, img->Depth,
- img->TexFormat->MesaFormat);
+ if (_mesa_is_format_compressed(img->TexFormat) && !isProxy) {
+ *params = _mesa_format_image_size(texFormat, img->Width,
+ img->Height, img->Depth);
}
else {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -864,13 +878,14 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
}
break;
case GL_TEXTURE_COMPRESSED:
- *params = (GLint) img->IsCompressed;
+ *params = (GLint) _mesa_is_format_compressed(img->TexFormat);
break;
/* GL_ARB_texture_float */
case GL_TEXTURE_RED_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->RedBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_RED_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -879,7 +894,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
break;
case GL_TEXTURE_GREEN_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->GreenBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_GREEN_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -888,7 +904,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
break;
case GL_TEXTURE_BLUE_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->BlueBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_BLUE_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -897,7 +914,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
break;
case GL_TEXTURE_ALPHA_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->AlphaBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_ALPHA_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -906,7 +924,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
break;
case GL_TEXTURE_LUMINANCE_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->LuminanceBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_LUMINANCE_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -915,7 +934,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
break;
case GL_TEXTURE_INTENSITY_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->IntensityBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_INTENSITY_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -924,7 +944,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
break;
case GL_TEXTURE_DEPTH_TYPE_ARB:
if (ctx->Extensions.ARB_texture_float) {
- *params = img->TexFormat->DepthBits ? img->TexFormat->DataType : GL_NONE;
+ *params = _mesa_get_format_bits(texFormat, GL_TEXTURE_DEPTH_SIZE) ?
+ _mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index 53be83b05ce..e2432be6ca4 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -1,7 +1,8 @@
#include "context.h"
+#include "colormac.h"
#include "fbobject.h"
-#include "texformat.h"
+#include "texfetch.h"
#include "texrender.h"
#include "renderbuffer.h"
@@ -46,7 +47,9 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
if (rb->DataType == CHAN_TYPE) {
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
- trb->TexImage->FetchTexelc(trb->TexImage, x + i, y, z, rgbaOut + 4 * i);
+ GLfloat rgba[4];
+ trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, rgba);
+ UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
@@ -100,8 +103,10 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
if (rb->DataType == CHAN_TYPE) {
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
- trb->TexImage->FetchTexelc(trb->TexImage, x[i], y[i] + trb->Yoffset,
- z, rgbaOut + 4 * i);
+ GLfloat rgba[4];
+ trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ z, rgba);
+ UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
@@ -462,6 +467,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
{
struct texture_renderbuffer *trb
= (struct texture_renderbuffer *) att->Renderbuffer;
+ gl_format texFormat;
(void) ctx;
ASSERT(trb);
@@ -469,7 +475,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->TexImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
ASSERT(trb->TexImage);
- trb->Store = trb->TexImage->TexFormat->StoreTexel;
+ trb->Store = _mesa_get_texel_store_func(trb->TexImage->TexFormat);
if (!trb->Store) {
/* we'll never draw into some textures (compressed formats) */
trb->Store = store_nop;
@@ -484,41 +490,30 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Zoffset = att->Zoffset;
}
+ texFormat = trb->TexImage->TexFormat;
+
trb->Base.Width = trb->TexImage->Width;
trb->Base.Height = trb->TexImage->Height;
trb->Base.InternalFormat = trb->TexImage->InternalFormat;
/* XXX may need more special cases here */
- if (trb->TexImage->TexFormat->MesaFormat == MESA_FORMAT_Z24_S8) {
- trb->Base._ActualFormat = GL_DEPTH24_STENCIL8_EXT;
+ if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) {
+ trb->Base.Format = MESA_FORMAT_Z24_S8;
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
}
- else if (trb->TexImage->TexFormat->MesaFormat == MESA_FORMAT_Z16) {
- trb->Base._ActualFormat = GL_DEPTH_COMPONENT;
+ else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) {
+ trb->Base.Format = MESA_FORMAT_Z16;
trb->Base.DataType = GL_UNSIGNED_SHORT;
}
- else if (trb->TexImage->TexFormat->MesaFormat == MESA_FORMAT_Z32) {
- trb->Base._ActualFormat = GL_DEPTH_COMPONENT;
+ else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) {
+ trb->Base.Format = MESA_FORMAT_Z32;
trb->Base.DataType = GL_UNSIGNED_INT;
}
else {
- trb->Base._ActualFormat = trb->TexImage->InternalFormat;
+ trb->Base.Format = trb->TexImage->TexFormat;
trb->Base.DataType = CHAN_TYPE;
}
- trb->Base._BaseFormat = trb->TexImage->TexFormat->BaseFormat;
-#if 0
- /* fix/avoid this assertion someday */
- ASSERT(trb->Base._BaseFormat == GL_RGB ||
- trb->Base._BaseFormat == GL_RGBA ||
- trb->Base._BaseFormat == GL_DEPTH_COMPONENT);
-#endif
trb->Base.Data = trb->TexImage->Data;
-
- trb->Base.RedBits = trb->TexImage->TexFormat->RedBits;
- trb->Base.GreenBits = trb->TexImage->TexFormat->GreenBits;
- trb->Base.BlueBits = trb->TexImage->TexFormat->BlueBits;
- trb->Base.AlphaBits = trb->TexImage->TexFormat->AlphaBits;
- trb->Base.DepthBits = trb->TexImage->TexFormat->DepthBits;
- trb->Base.StencilBits = trb->TexImage->TexFormat->StencilBits;
+ trb->Base._BaseFormat = _mesa_base_fbo_format(ctx, trb->Base.InternalFormat);
}
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 16492bd7bcf..c735e18affb 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -318,11 +318,18 @@ _mesa_ClientActiveTextureARB(GLenum texture)
GLuint texUnit = texture - GL_TEXTURE0;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glClientActiveTexture %s\n",
+ _mesa_lookup_enum_by_nr(texture));
+
if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)");
return;
}
+ if (ctx->Array.ActiveTexture == texUnit)
+ return;
+
FLUSH_VERTICES(ctx, _NEW_ARRAY);
ctx->Array.ActiveTexture = texUnit;
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index f553a898f9e..5387eb12837 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -62,7 +62,8 @@
#include "mipmap.h"
#include "imports.h"
#include "texcompress.h"
-#include "texformat.h"
+#include "texcompress_fxt1.h"
+#include "texcompress_s3tc.h"
#include "teximage.h"
#include "texstore.h"
#include "enums.h"
@@ -75,6 +76,12 @@ enum {
/**
+ * Texture image storage function.
+ */
+typedef GLboolean (*StoreTexImageFunc)(TEXSTORE_PARAMS);
+
+
+/**
* Return GL_TRUE if the given image format is one that be converted
* to another format by swizzling.
*/
@@ -270,16 +277,6 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
}
-#if !FEATURE_convolve
-static void
-_mesa_adjust_image_for_convolution(GLcontext *ctx, GLuint dims,
- GLsizei *srcWidth, GLsizei *srcHeight)
-{
- /* no-op */
-}
-#endif
-
-
/**
* Make a temporary (color) texture image with GLfloat components.
* Apply all needed pixel unpacking and pixel transfer operations.
@@ -346,7 +343,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
const GLuint postConvTransferOps
= (transferOps & IMAGE_POST_CONVOLUTION_BITS) | IMAGE_CLAMP_BIT;
GLint img, row;
- GLint convWidth, convHeight;
+ GLint convWidth = srcWidth, convHeight = srcHeight;
GLfloat *convImage;
/* pre-convolution image buffer (3D) */
@@ -431,8 +428,8 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
else {
/* no convolution */
const GLint components = _mesa_components_in_format(logicalBaseFormat);
- const GLint srcStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
+ const GLint srcStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLfloat *dst;
GLint img, row;
@@ -587,19 +584,22 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
/* unpack and transfer the source image */
tempImage = (GLchan *) _mesa_malloc(srcWidth * srcHeight * srcDepth
* components * sizeof(GLchan));
- if (!tempImage)
+ if (!tempImage) {
+ if (freeSrcImage) {
+ _mesa_free((void *) srcAddr);
+ }
return NULL;
+ }
dst = tempImage;
for (img = 0; img < srcDepth; img++) {
- const GLint srcStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat,
- srcType);
- const GLubyte *src
- = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
- srcWidth, srcHeight,
- srcFormat, srcType,
- img, 0, 0);
+ const GLint srcStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ const GLubyte *src =
+ (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
for (row = 0; row < srcHeight; row++) {
_mesa_unpack_color_span_chan(ctx, srcWidth, logicalBaseFormat, dst,
srcFormat, srcType, src, srcPacking,
@@ -924,7 +924,7 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx,
static void
memcpy_texture(GLcontext *ctx,
GLuint dimensions,
- const struct gl_texture_format *dstFormat,
+ gl_format dstFormat,
GLvoid *dstAddr,
GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,
GLint dstRowStride,
@@ -940,7 +940,8 @@ memcpy_texture(GLcontext *ctx,
srcWidth, srcHeight, srcFormat, srcType);
const GLubyte *srcImage = (const GLubyte *) _mesa_image_address(dimensions,
srcPacking, srcAddr, srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
- const GLint bytesPerRow = srcWidth * dstFormat->TexelBytes;
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLint bytesPerRow = srcWidth * texelBytes;
#if 0
/* XXX update/re-enable for dstImageOffsets array */
@@ -949,7 +950,7 @@ memcpy_texture(GLcontext *ctx,
GLubyte *dstImage = (GLubyte *) dstAddr
+ dstZoffset * dstImageStride
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
if (dstRowStride == srcRowStride &&
dstRowStride == bytesPerRow &&
@@ -980,9 +981,9 @@ memcpy_texture(GLcontext *ctx,
for (img = 0; img < srcDepth; img++) {
const GLubyte *srcRow = srcImage;
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
ctx->Driver.TextureMemCpy(dstRow, srcRow, bytesPerRow);
dstRow += dstRowStride;
@@ -995,38 +996,23 @@ memcpy_texture(GLcontext *ctx,
/**
- * Store an image in any of the formats:
- * _mesa_texformat_rgba
- * _mesa_texformat_rgb
- * _mesa_texformat_alpha
- * _mesa_texformat_luminance
- * _mesa_texformat_luminance_alpha
- * _mesa_texformat_intensity
- *
+ * Store a 32-bit integer depth component texture image.
*/
-GLboolean
-_mesa_texstore_rgba(TEXSTORE_PARAMS)
+static GLboolean
+_mesa_texstore_z32(TEXSTORE_PARAMS)
{
- const GLint components = _mesa_components_in_format(baseInternalFormat);
-
- ASSERT(dstFormat == &_mesa_texformat_rgba ||
- dstFormat == &_mesa_texformat_rgb ||
- dstFormat == &_mesa_texformat_alpha ||
- dstFormat == &_mesa_texformat_luminance ||
- dstFormat == &_mesa_texformat_luminance_alpha ||
- dstFormat == &_mesa_texformat_intensity);
- ASSERT(baseInternalFormat == GL_RGBA ||
- baseInternalFormat == GL_RGB ||
- baseInternalFormat == GL_ALPHA ||
- baseInternalFormat == GL_LUMINANCE ||
- baseInternalFormat == GL_LUMINANCE_ALPHA ||
- baseInternalFormat == GL_INTENSITY);
- ASSERT(dstFormat->TexelBytes == components * sizeof(GLchan));
+ const GLuint depthScale = 0xffffffff;
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ (void) dims;
+ ASSERT(dstFormat == MESA_FORMAT_Z32);
+ ASSERT(texelBytes == sizeof(GLuint));
- if (!ctx->_ImageTransferState &&
+ if (ctx->Pixel.DepthScale == 1.0f &&
+ ctx->Pixel.DepthBias == 0.0f &&
!srcPacking->SwapBytes &&
- baseInternalFormat == srcFormat &&
- srcType == CHAN_TYPE) {
+ baseInternalFormat == GL_DEPTH_COMPONENT &&
+ srcFormat == GL_DEPTH_COMPONENT &&
+ srcType == GL_UNSIGNED_INT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
@@ -1035,160 +1021,92 @@ _mesa_texstore_rgba(TEXSTORE_PARAMS)
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
}
- else if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_rgb &&
- srcFormat == GL_RGBA &&
- srcType == CHAN_TYPE) {
- /* extract RGB from RGBA */
- GLint img, row, col;
+ else {
+ /* general path */
+ GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLchan *dstImage = (GLchan *)
- ((GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
- + dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes);
-
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
- GLchan *srcRow = (GLchan *) _mesa_image_address(dims, srcPacking,
- srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
- GLchan *dstRow = dstImage;
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
- for (col = 0; col < srcWidth; col++) {
- dstRow[col * 3 + RCOMP] = srcRow[col * 4 + RCOMP];
- dstRow[col * 3 + GCOMP] = srcRow[col * 4 + GCOMP];
- dstRow[col * 3 + BCOMP] = srcRow[col * 4 + BCOMP];
- }
- dstRow += dstRowStride / sizeof(GLchan);
- srcRow = (GLchan *) ((GLubyte *) srcRow + srcRowStride);
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, (GLuint *) dstRow,
+ depthScale, srcType, src, srcPacking);
+ dstRow += dstRowStride;
}
}
}
- else if (!ctx->_ImageTransferState &&
- CHAN_TYPE == GL_UNSIGNED_BYTE &&
- (srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
- can_swizzle(baseInternalFormat) &&
- can_swizzle(srcFormat)) {
+ return GL_TRUE;
+}
- const GLubyte *dstmap;
- GLuint components;
- /* dstmap - how to swizzle from RGBA to dst format:
- */
- if (dstFormat == &_mesa_texformat_rgba) {
- dstmap = mappings[IDX_RGBA].from_rgba;
- components = 4;
- }
- else if (dstFormat == &_mesa_texformat_rgb) {
- dstmap = mappings[IDX_RGB].from_rgba;
- components = 3;
- }
- else if (dstFormat == &_mesa_texformat_alpha) {
- dstmap = mappings[IDX_ALPHA].from_rgba;
- components = 1;
- }
- else if (dstFormat == &_mesa_texformat_luminance) {
- dstmap = mappings[IDX_LUMINANCE].from_rgba;
- components = 1;
- }
- else if (dstFormat == &_mesa_texformat_luminance_alpha) {
- dstmap = mappings[IDX_LUMINANCE_ALPHA].from_rgba;
- components = 2;
- }
- else if (dstFormat == &_mesa_texformat_intensity) {
- dstmap = mappings[IDX_INTENSITY].from_rgba;
- components = 1;
- }
- else {
- _mesa_problem(ctx, "Unexpected dstFormat in _mesa_texstore_rgba");
- return GL_FALSE;
- }
+/**
+ * Store a 24-bit integer depth component texture image.
+ */
+static GLboolean
+_mesa_texstore_x8_z24(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffffff;
+ const GLuint texelBytes = 4;
- _mesa_swizzle_ubyte_image(ctx, dims,
- srcFormat,
- srcType,
- baseInternalFormat,
- dstmap, components,
- dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride, dstImageOffsets,
- srcWidth, srcHeight, srcDepth, srcAddr,
- srcPacking);
- }
- else {
+ (void) dims;
+ ASSERT(dstFormat == MESA_FORMAT_X8_Z24);
+
+ {
/* general path */
- const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
- baseInternalFormat,
- dstFormat->BaseFormat,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType, srcAddr,
- srcPacking);
- const GLchan *src = tempImage;
- GLint bytesPerRow;
GLint img, row;
- if (!tempImage)
- return GL_FALSE;
- _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
- bytesPerRow = srcWidth * components * sizeof(GLchan);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
- _mesa_memcpy(dstRow, src, bytesPerRow);
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, (GLuint *) dstRow,
+ depthScale, srcType, src, srcPacking);
dstRow += dstRowStride;
- src += srcWidth * components;
}
}
-
- _mesa_free((void *) tempImage);
}
return GL_TRUE;
}
/**
- * Store a 32-bit integer depth component texture image.
+ * Store a 24-bit integer depth component texture image.
*/
-GLboolean
-_mesa_texstore_z32(TEXSTORE_PARAMS)
+static GLboolean
+_mesa_texstore_z24_x8(TEXSTORE_PARAMS)
{
- const GLuint depthScale = 0xffffffff;
+ const GLuint depthScale = 0xffffff;
+ const GLuint texelBytes = 4;
+
(void) dims;
- ASSERT(dstFormat == &_mesa_texformat_z32);
- ASSERT(dstFormat->TexelBytes == sizeof(GLuint));
+ ASSERT(dstFormat == MESA_FORMAT_Z24_X8);
- if (ctx->Pixel.DepthScale == 1.0f &&
- ctx->Pixel.DepthBias == 0.0f &&
- !srcPacking->SwapBytes &&
- baseInternalFormat == GL_DEPTH_COMPONENT &&
- srcFormat == GL_DEPTH_COMPONENT &&
- srcType == GL_UNSIGNED_INT) {
- /* simple memcpy path */
- memcpy_texture(ctx, dims,
- dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride,
- dstImageOffsets,
- srcWidth, srcHeight, srcDepth, srcFormat, srcType,
- srcAddr, srcPacking);
- }
- else {
+ {
/* general path */
GLint img, row;
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ GLuint *dst = (GLuint *) dstRow;
+ GLint i;
_mesa_unpack_depth_span(ctx, srcWidth,
- GL_UNSIGNED_INT, (GLuint *) dstRow,
+ GL_UNSIGNED_INT, dst,
depthScale, srcType, src, srcPacking);
+ for (i = 0; i < srcWidth; i++)
+ dst[i] <<= 8;
dstRow += dstRowStride;
}
}
@@ -1196,18 +1114,18 @@ _mesa_texstore_z32(TEXSTORE_PARAMS)
return GL_TRUE;
}
-#define STRIDE_3D 0
/**
* Store a 16-bit integer depth component texture image.
*/
-GLboolean
+static GLboolean
_mesa_texstore_z16(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffff;
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
(void) dims;
- ASSERT(dstFormat == &_mesa_texformat_z16);
- ASSERT(dstFormat->TexelBytes == sizeof(GLushort));
+ ASSERT(dstFormat == MESA_FORMAT_Z16);
+ ASSERT(texelBytes == sizeof(GLushort));
if (ctx->Pixel.DepthScale == 1.0f &&
ctx->Pixel.DepthBias == 0.0f &&
@@ -1228,9 +1146,9 @@ _mesa_texstore_z16(TEXSTORE_PARAMS)
GLint img, row;
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
@@ -1249,16 +1167,19 @@ _mesa_texstore_z16(TEXSTORE_PARAMS)
/**
* Store an rgb565 or rgb565_rev texture image.
*/
-GLboolean
+static GLboolean
_mesa_texstore_rgb565(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == &_mesa_texformat_rgb565 ||
- dstFormat == &_mesa_texformat_rgb565_rev);
- ASSERT(dstFormat->TexelBytes == 2);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGB565 ||
+ dstFormat == MESA_FORMAT_RGB565_REV);
+ ASSERT(texelBytes == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_rgb565 &&
+ dstFormat == MESA_FORMAT_RGB565 &&
baseInternalFormat == GL_RGB &&
srcFormat == GL_RGB &&
srcType == GL_UNSIGNED_SHORT_5_6_5) {
@@ -1277,20 +1198,20 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_BYTE &&
dims == 2) {
/* do optimized tex store */
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth,
- srcFormat, srcType);
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
const GLubyte *src = (const GLubyte *)
_mesa_image_address(dims, srcPacking, srcAddr, srcWidth, srcHeight,
srcFormat, srcType, 0, 0, 0);
GLubyte *dst = (GLubyte *) dstAddr
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
GLint row, col;
for (row = 0; row < srcHeight; row++) {
const GLubyte *srcUB = (const GLubyte *) src;
GLushort *dstUS = (GLushort *) dst;
/* check for byteswapped format */
- if (dstFormat == &_mesa_texformat_rgb565) {
+ if (dstFormat == MESA_FORMAT_RGB565) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_565( srcUB[0], srcUB[1], srcUB[2] );
srcUB += 3;
@@ -1310,7 +1231,7 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -1321,13 +1242,13 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
/* check for byteswapped format */
- if (dstFormat == &_mesa_texformat_rgb565) {
+ if (dstFormat == MESA_FORMAT_RGB565) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_565( CHAN_TO_UBYTE(src[RCOMP]),
CHAN_TO_UBYTE(src[GCOMP]),
@@ -1355,18 +1276,20 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
/**
* Store a texture in MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV.
*/
-GLboolean
+static GLboolean
_mesa_texstore_rgba8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == &_mesa_texformat_rgba8888 ||
- dstFormat == &_mesa_texformat_rgba8888_rev);
- ASSERT(dstFormat->TexelBytes == 4);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA8888 ||
+ dstFormat == MESA_FORMAT_RGBA8888_REV);
+ ASSERT(texelBytes == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_rgba8888 &&
+ dstFormat == MESA_FORMAT_RGBA8888 &&
baseInternalFormat == GL_RGBA &&
((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
(srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
@@ -1382,7 +1305,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_rgba8888_rev &&
+ dstFormat == MESA_FORMAT_RGBA8888_REV &&
baseInternalFormat == GL_RGBA &&
((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
(srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) ||
@@ -1407,8 +1330,8 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if ((littleEndian && dstFormat == &_mesa_texformat_rgba8888) ||
- (!littleEndian && dstFormat == &_mesa_texformat_rgba8888_rev)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_RGBA8888) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_RGBA8888_REV)) {
dstmap[3] = 0;
dstmap[2] = 1;
dstmap[1] = 2;
@@ -1435,7 +1358,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -1446,12 +1369,12 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
- if (dstFormat == &_mesa_texformat_rgba8888) {
+ if (dstFormat == MESA_FORMAT_RGBA8888) {
for (col = 0; col < srcWidth; col++) {
dstUI[col] = PACK_COLOR_8888( CHAN_TO_UBYTE(src[RCOMP]),
CHAN_TO_UBYTE(src[GCOMP]),
@@ -1478,18 +1401,23 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_argb8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = GL_RGBA;
- ASSERT(dstFormat == &_mesa_texformat_argb8888 ||
- dstFormat == &_mesa_texformat_argb8888_rev);
- ASSERT(dstFormat->TexelBytes == 4);
+ ASSERT(dstFormat == MESA_FORMAT_ARGB8888 ||
+ dstFormat == MESA_FORMAT_ARGB8888_REV ||
+ dstFormat == MESA_FORMAT_XRGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV );
+ ASSERT(texelBytes == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb8888 &&
+ (dstFormat == MESA_FORMAT_ARGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888) &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_BGRA &&
((srcType == GL_UNSIGNED_BYTE && littleEndian) ||
@@ -1504,7 +1432,8 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb8888_rev &&
+ (dstFormat == MESA_FORMAT_ARGB8888_REV ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV) &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_BGRA &&
((srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
@@ -1519,21 +1448,22 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb8888 &&
+ (dstFormat == MESA_FORMAT_ARGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888) &&
srcFormat == GL_RGB &&
(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB) &&
srcType == GL_UNSIGNED_BYTE) {
int img, row, col;
for (img = 0; img < srcDepth; img++) {
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLuint *d4 = (GLuint *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -1549,7 +1479,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb8888 &&
+ dstFormat == MESA_FORMAT_ARGB8888 &&
srcFormat == GL_RGBA &&
baseInternalFormat == GL_RGBA &&
srcType == GL_UNSIGNED_BYTE) {
@@ -1562,14 +1492,14 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
* Strangely the same isn't required for the RGB path, above.
*/
for (img = 0; img < srcDepth; img++) {
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLuint *d4 = (GLuint *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -1594,16 +1524,20 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if ((littleEndian && dstFormat == &_mesa_texformat_argb8888) ||
- (!littleEndian && dstFormat == &_mesa_texformat_argb8888_rev)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV)) {
dstmap[3] = 3; /* alpha */
dstmap[2] = 0; /* red */
dstmap[1] = 1; /* green */
dstmap[0] = 2; /* blue */
}
else {
- assert((littleEndian && dstFormat == &_mesa_texformat_argb8888_rev) ||
- (!littleEndian && dstFormat == &_mesa_texformat_argb8888));
+ assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888));
dstmap[3] = 2;
dstmap[2] = 1;
dstmap[1] = 0;
@@ -1626,7 +1560,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -1637,12 +1571,12 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
- if (dstFormat == &_mesa_texformat_argb8888) {
+ if (dstFormat == MESA_FORMAT_ARGB8888) {
for (col = 0; col < srcWidth; col++) {
dstUI[col] = PACK_COLOR_8888( CHAN_TO_UBYTE(src[ACOMP]),
CHAN_TO_UBYTE(src[RCOMP]),
@@ -1651,6 +1585,15 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
src += 4;
}
}
+ else if (dstFormat == MESA_FORMAT_XRGB8888) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888( 0xff,
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
else {
for (col = 0; col < srcWidth; col++) {
dstUI[col] = PACK_COLOR_8888_REV( CHAN_TO_UBYTE(src[ACOMP]),
@@ -1669,13 +1612,15 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_rgb888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == &_mesa_texformat_rgb888);
- ASSERT(dstFormat->TexelBytes == 3);
+ ASSERT(dstFormat == MESA_FORMAT_RGB888);
+ ASSERT(texelBytes == 3);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
@@ -1698,14 +1643,14 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
/* extract RGB from RGBA */
GLint img, row, col;
for (img = 0; img < srcDepth; img++) {
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col * 3 + 0] = srcRow[col * 4 + BCOMP];
@@ -1745,7 +1690,7 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -1756,9 +1701,9 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
#if 0
if (littleEndian) {
@@ -1794,13 +1739,15 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_bgr888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == &_mesa_texformat_bgr888);
- ASSERT(dstFormat->TexelBytes == 3);
+ ASSERT(dstFormat == MESA_FORMAT_BGR888);
+ ASSERT(texelBytes == 3);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
@@ -1823,14 +1770,14 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
/* extract BGR from RGBA */
int img, row, col;
for (img = 0; img < srcDepth; img++) {
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col * 3 + 0] = srcRow[col * 4 + RCOMP];
@@ -1870,7 +1817,7 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -1881,9 +1828,9 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[RCOMP]);
@@ -1899,71 +1846,20 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
return GL_TRUE;
}
-GLboolean
-_mesa_texstore_rgba4444(TEXSTORE_PARAMS)
-{
- ASSERT(dstFormat == &_mesa_texformat_rgba4444);
- ASSERT(dstFormat->TexelBytes == 2);
-
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_rgba4444 &&
- baseInternalFormat == GL_RGBA &&
- srcFormat == GL_RGBA &&
- srcType == GL_UNSIGNED_SHORT_4_4_4_4){
- /* simple memcpy path */
- memcpy_texture(ctx, dims,
- dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride,
- dstImageOffsets,
- srcWidth, srcHeight, srcDepth, srcFormat, srcType,
- srcAddr, srcPacking);
- }
- else {
- /* general path */
- const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
- baseInternalFormat,
- dstFormat->BaseFormat,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType, srcAddr,
- srcPacking);
- const GLchan *src = tempImage;
- GLint img, row, col;
- if (!tempImage)
- return GL_FALSE;
- _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
- for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
- + dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
- for (row = 0; row < srcHeight; row++) {
- GLushort *dstUS = (GLushort *) dstRow;
- for (col = 0; col < srcWidth; col++) {
- dstUS[col] = PACK_COLOR_4444( CHAN_TO_UBYTE(src[RCOMP]),
- CHAN_TO_UBYTE(src[GCOMP]),
- CHAN_TO_UBYTE(src[BCOMP]),
- CHAN_TO_UBYTE(src[ACOMP]) );
- src += 4;
- }
- dstRow += dstRowStride;
- }
- }
- _mesa_free((void *) tempImage);
- }
- return GL_TRUE;
-}
-GLboolean
+static GLboolean
_mesa_texstore_argb4444(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == &_mesa_texformat_argb4444 ||
- dstFormat == &_mesa_texformat_argb4444_rev);
- ASSERT(dstFormat->TexelBytes == 2);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB4444 ||
+ dstFormat == MESA_FORMAT_ARGB4444_REV);
+ ASSERT(texelBytes == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb4444 &&
+ dstFormat == MESA_FORMAT_ARGB4444 &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_BGRA &&
srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
@@ -1979,7 +1875,7 @@ _mesa_texstore_argb4444(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -1990,12 +1886,12 @@ _mesa_texstore_argb4444(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
- if (dstFormat == &_mesa_texformat_argb4444) {
+ if (dstFormat == MESA_FORMAT_ARGB4444) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_4444( CHAN_TO_UBYTE(src[ACOMP]),
CHAN_TO_UBYTE(src[RCOMP]),
@@ -2021,15 +1917,18 @@ _mesa_texstore_argb4444(TEXSTORE_PARAMS)
return GL_TRUE;
}
-GLboolean
+static GLboolean
_mesa_texstore_rgba5551(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == &_mesa_texformat_rgba5551);
- ASSERT(dstFormat->TexelBytes == 2);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA5551);
+ ASSERT(texelBytes == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_rgba5551 &&
+ dstFormat == MESA_FORMAT_RGBA5551 &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_RGBA &&
srcType == GL_UNSIGNED_SHORT_5_5_5_1) {
@@ -2045,7 +1944,7 @@ _mesa_texstore_rgba5551(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2056,9 +1955,9 @@ _mesa_texstore_rgba5551(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -2076,16 +1975,19 @@ _mesa_texstore_rgba5551(TEXSTORE_PARAMS)
return GL_TRUE;
}
-GLboolean
+static GLboolean
_mesa_texstore_argb1555(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == &_mesa_texformat_argb1555 ||
- dstFormat == &_mesa_texformat_argb1555_rev);
- ASSERT(dstFormat->TexelBytes == 2);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB1555 ||
+ dstFormat == MESA_FORMAT_ARGB1555_REV);
+ ASSERT(texelBytes == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb1555 &&
+ dstFormat == MESA_FORMAT_ARGB1555 &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_BGRA &&
srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
@@ -2101,7 +2003,7 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2112,12 +2014,12 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
- if (dstFormat == &_mesa_texformat_argb1555) {
+ if (dstFormat == MESA_FORMAT_ARGB1555) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_1555( CHAN_TO_UBYTE(src[ACOMP]),
CHAN_TO_UBYTE(src[RCOMP]),
@@ -2144,18 +2046,20 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_al88(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == &_mesa_texformat_al88 ||
- dstFormat == &_mesa_texformat_al88_rev);
- ASSERT(dstFormat->TexelBytes == 2);
+ ASSERT(dstFormat == MESA_FORMAT_AL88 ||
+ dstFormat == MESA_FORMAT_AL88_REV);
+ ASSERT(texelBytes == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_al88 &&
+ dstFormat == MESA_FORMAT_AL88 &&
baseInternalFormat == GL_LUMINANCE_ALPHA &&
srcFormat == GL_LUMINANCE_ALPHA &&
srcType == GL_UNSIGNED_BYTE &&
@@ -2178,8 +2082,8 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if ((littleEndian && dstFormat == &_mesa_texformat_al88) ||
- (!littleEndian && dstFormat == &_mesa_texformat_al88_rev)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_AL88) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV)) {
dstmap[0] = 0;
dstmap[1] = 3;
}
@@ -2204,7 +2108,7 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2215,12 +2119,12 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
- if (dstFormat == &_mesa_texformat_al88) {
+ if (dstFormat == MESA_FORMAT_AL88) {
for (col = 0; col < srcWidth; col++) {
/* src[0] is luminance, src[1] is alpha */
dstUS[col] = PACK_COLOR_88( CHAN_TO_UBYTE(src[1]),
@@ -2245,11 +2149,85 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
+_mesa_texstore_al1616(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
+ dstFormat == MESA_FORMAT_AL1616_REV);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_AL1616 &&
+ baseInternalFormat == GL_LUMINANCE_ALPHA &&
+ srcFormat == GL_LUMINANCE_ALPHA &&
+ srcType == GL_UNSIGNED_SHORT &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ if (dstFormat == MESA_FORMAT_AL1616) {
+ for (col = 0; col < srcWidth; col++) {
+ /* src[0] is luminance, src[1] is alpha */
+ dstUI[col] = PACK_COLOR_1616( FLOAT_TO_USHORT(src[1]),
+ FLOAT_TO_USHORT(src[0]) );
+ src += 2;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ /* src[0] is luminance, src[1] is alpha */
+ dstUI[col] = PACK_COLOR_1616_REV( FLOAT_TO_UBYTE(src[1]),
+ FLOAT_TO_UBYTE(src[0]) );
+ src += 2;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ _mesa_free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == &_mesa_texformat_rgb332);
- ASSERT(dstFormat->TexelBytes == 1);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGB332);
+ ASSERT(texelBytes == 1);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
@@ -2267,7 +2245,7 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2278,9 +2256,9 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col] = PACK_COLOR_332( CHAN_TO_UBYTE(src[RCOMP]),
@@ -2300,13 +2278,16 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS)
/**
* Texstore for _mesa_texformat_a8, _mesa_texformat_l8, _mesa_texformat_i8.
*/
-GLboolean
+static GLboolean
_mesa_texstore_a8(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == &_mesa_texformat_a8 ||
- dstFormat == &_mesa_texformat_l8 ||
- dstFormat == &_mesa_texformat_i8);
- ASSERT(dstFormat->TexelBytes == 1);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_A8 ||
+ dstFormat == MESA_FORMAT_L8 ||
+ dstFormat == MESA_FORMAT_I8);
+ ASSERT(texelBytes == 1);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
@@ -2329,7 +2310,7 @@ _mesa_texstore_a8(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if (dstFormat == &_mesa_texformat_a8) {
+ if (dstFormat == MESA_FORMAT_A8) {
dstmap[0] = 3;
}
else {
@@ -2353,7 +2334,7 @@ _mesa_texstore_a8(TEXSTORE_PARAMS)
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2364,9 +2345,9 @@ _mesa_texstore_a8(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col] = CHAN_TO_UBYTE(src[col]);
@@ -2382,12 +2363,14 @@ _mesa_texstore_a8(TEXSTORE_PARAMS)
-GLboolean
+static GLboolean
_mesa_texstore_ci8(TEXSTORE_PARAMS)
{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+
(void) dims; (void) baseInternalFormat;
- ASSERT(dstFormat == &_mesa_texformat_ci8);
- ASSERT(dstFormat->TexelBytes == 1);
+ ASSERT(dstFormat == MESA_FORMAT_CI8);
+ ASSERT(texelBytes == 1);
ASSERT(baseInternalFormat == GL_COLOR_INDEX);
if (!ctx->_ImageTransferState &&
@@ -2407,9 +2390,9 @@ _mesa_texstore_ci8(TEXSTORE_PARAMS)
GLint img, row;
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
@@ -2425,17 +2408,19 @@ _mesa_texstore_ci8(TEXSTORE_PARAMS)
/**
- * Texstore for _mesa_texformat_ycbcr or _mesa_texformat_ycbcr_rev.
+ * Texstore for _mesa_texformat_ycbcr or _mesa_texformat_ycbcr_REV.
*/
-GLboolean
+static GLboolean
_mesa_texstore_ycbcr(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+
(void) ctx; (void) dims; (void) baseInternalFormat;
- ASSERT((dstFormat == &_mesa_texformat_ycbcr) ||
- (dstFormat == &_mesa_texformat_ycbcr_rev));
- ASSERT(dstFormat->TexelBytes == 2);
+ ASSERT((dstFormat == MESA_FORMAT_YCBCR) ||
+ (dstFormat == MESA_FORMAT_YCBCR_REV));
+ ASSERT(texelBytes == 2);
ASSERT(ctx->Extensions.MESA_ycbcr_texture);
ASSERT(srcFormat == GL_YCBCR_MESA);
ASSERT((srcType == GL_UNSIGNED_SHORT_8_8_MESA) ||
@@ -2454,14 +2439,14 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
/* XXX the logic here _might_ be wrong */
if (srcPacking->SwapBytes ^
(srcType == GL_UNSIGNED_SHORT_8_8_REV_MESA) ^
- (dstFormat == &_mesa_texformat_ycbcr_rev) ^
+ (dstFormat == MESA_FORMAT_YCBCR_REV) ^
!littleEndian) {
GLint img, row;
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
_mesa_swap2((GLushort *) dstRow, srcWidth);
dstRow += dstRowStride;
@@ -2471,13 +2456,14 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
return GL_TRUE;
}
-GLboolean
+static GLboolean
_mesa_texstore_dudv8(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
- ASSERT(dstFormat == &_mesa_texformat_dudv8);
- ASSERT(dstFormat->TexelBytes == 2);
+ ASSERT(dstFormat == MESA_FORMAT_DUDV8);
+ ASSERT(texelBytes == 2);
ASSERT(ctx->Extensions.ATI_envmap_bumpmap);
ASSERT((srcFormat == GL_DU8DV8_ATI) ||
(srcFormat == GL_DUDV_ATI));
@@ -2523,8 +2509,8 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
else {
/* general path - note this is defined for 2d textures only */
const GLint components = _mesa_components_in_format(baseInternalFormat);
- const GLint srcStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
+ const GLint srcStride = _mesa_image_row_stride(srcPacking, srcWidth,
+ srcFormat, srcType);
GLbyte *tempImage, *dst, *src;
GLint row;
@@ -2550,11 +2536,11 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
src = tempImage;
dst = (GLbyte *) dstAddr
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
- memcpy(dst, src, srcWidth * dstFormat->TexelBytes);
+ memcpy(dst, src, srcWidth * texelBytes);
dst += dstRowStride;
- src += srcWidth * dstFormat->TexelBytes;
+ src += srcWidth * texelBytes;
}
_mesa_free((void *) tempImage);
}
@@ -2564,18 +2550,20 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
/**
* Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or MESA_FORMAT_SIGNED_RGBA8888_REV
*/
-GLboolean
+static GLboolean
_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == &_mesa_texformat_signed_rgba8888 ||
- dstFormat == &_mesa_texformat_signed_rgba8888_rev);
- ASSERT(dstFormat->TexelBytes == 4);
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBA8888 ||
+ dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV);
+ ASSERT(texelBytes == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_signed_rgba8888 &&
+ dstFormat == MESA_FORMAT_SIGNED_RGBA8888 &&
baseInternalFormat == GL_RGBA &&
((srcFormat == GL_RGBA && srcType == GL_BYTE && !littleEndian) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && littleEndian))) {
@@ -2589,7 +2577,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_signed_rgba8888_rev &&
+ dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV &&
baseInternalFormat == GL_RGBA &&
((srcFormat == GL_RGBA && srcType == GL_BYTE && littleEndian) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && !littleEndian))) {
@@ -2610,8 +2598,8 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if ((littleEndian && dstFormat == &_mesa_texformat_signed_rgba8888) ||
- (!littleEndian && dstFormat == &_mesa_texformat_signed_rgba8888_rev)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_SIGNED_RGBA8888) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV)) {
dstmap[3] = 0;
dstmap[2] = 1;
dstmap[1] = 2;
@@ -2638,7 +2626,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
/* general path */
const GLfloat *tempImage = make_temp_float_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2649,12 +2637,12 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
- if (dstFormat == &_mesa_texformat_signed_rgba8888) {
+ if (dstFormat == MESA_FORMAT_SIGNED_RGBA8888) {
for (col = 0; col < srcWidth; col++) {
dstUI[col] = PACK_COLOR_8888( FLOAT_TO_BYTE_TEX(srcRow[RCOMP]),
FLOAT_TO_BYTE_TEX(srcRow[GCOMP]),
@@ -2683,7 +2671,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
/**
* Store a combined depth/stencil texture image.
*/
-GLboolean
+static GLboolean
_mesa_texstore_z24_s8(TEXSTORE_PARAMS)
{
const GLfloat depthScale = (GLfloat) 0xffffff;
@@ -2692,7 +2680,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
/ sizeof(GLuint);
GLint img, row;
- ASSERT(dstFormat == &_mesa_texformat_z24_s8);
+ ASSERT(dstFormat == MESA_FORMAT_Z24_S8);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
@@ -2784,7 +2772,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
/**
* Store a combined depth/stencil texture image.
*/
-GLboolean
+static GLboolean
_mesa_texstore_s8_z24(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffffff;
@@ -2793,7 +2781,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
/ sizeof(GLuint);
GLint img, row;
- ASSERT(dstFormat == &_mesa_texformat_s8_z24);
+ ASSERT(dstFormat == MESA_FORMAT_S8_Z24);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
@@ -2873,24 +2861,26 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
* _mesa_texformat_luminance_alpha_float32
* _mesa_texformat_intensity_float32
*/
-GLboolean
+static GLboolean
_mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
{
- const GLint components = _mesa_components_in_format(dstFormat->BaseFormat);
-
- ASSERT(dstFormat == &_mesa_texformat_rgba_float32 ||
- dstFormat == &_mesa_texformat_rgb_float32 ||
- dstFormat == &_mesa_texformat_alpha_float32 ||
- dstFormat == &_mesa_texformat_luminance_float32 ||
- dstFormat == &_mesa_texformat_luminance_alpha_float32 ||
- dstFormat == &_mesa_texformat_intensity_float32);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT32 ||
+ dstFormat == MESA_FORMAT_RGB_FLOAT32 ||
+ dstFormat == MESA_FORMAT_ALPHA_FLOAT32 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_FLOAT32 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 ||
+ dstFormat == MESA_FORMAT_INTENSITY_FLOAT32);
ASSERT(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB ||
baseInternalFormat == GL_ALPHA ||
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(dstFormat->TexelBytes == components * sizeof(GLfloat));
+ ASSERT(texelBytes == components * sizeof(GLfloat));
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
@@ -2908,7 +2898,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
/* general path */
const GLfloat *tempImage = make_temp_float_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2921,9 +2911,9 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
bytesPerRow = srcWidth * components * sizeof(GLfloat);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
_mesa_memcpy(dstRow, srcRow, bytesPerRow);
dstRow += dstRowStride;
@@ -2940,24 +2930,26 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
/**
* As above, but store 16-bit floats.
*/
-GLboolean
+static GLboolean
_mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
{
- const GLint components = _mesa_components_in_format(dstFormat->BaseFormat);
-
- ASSERT(dstFormat == &_mesa_texformat_rgba_float16 ||
- dstFormat == &_mesa_texformat_rgb_float16 ||
- dstFormat == &_mesa_texformat_alpha_float16 ||
- dstFormat == &_mesa_texformat_luminance_float16 ||
- dstFormat == &_mesa_texformat_luminance_alpha_float16 ||
- dstFormat == &_mesa_texformat_intensity_float16);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT16 ||
+ dstFormat == MESA_FORMAT_RGB_FLOAT16 ||
+ dstFormat == MESA_FORMAT_ALPHA_FLOAT16 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_FLOAT16 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 ||
+ dstFormat == MESA_FORMAT_INTENSITY_FLOAT16);
ASSERT(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB ||
baseInternalFormat == GL_ALPHA ||
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(dstFormat->TexelBytes == components * sizeof(GLhalfARB));
+ ASSERT(texelBytes == components * sizeof(GLhalfARB));
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
@@ -2975,7 +2967,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
/* general path */
const GLfloat *tempImage = make_temp_float_image(ctx, dims,
baseInternalFormat,
- dstFormat->BaseFormat,
+ baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
srcPacking);
@@ -2986,9 +2978,9 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
_mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
for (img = 0; img < srcDepth; img++) {
GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ dstYoffset * dstRowStride
- + dstXoffset * dstFormat->TexelBytes;
+ + dstXoffset * texelBytes;
for (row = 0; row < srcHeight; row++) {
GLhalfARB *dstTexel = (GLhalfARB *) dstRow;
GLint i;
@@ -3007,20 +2999,18 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
#if FEATURE_EXT_texture_sRGB
-GLboolean
+static GLboolean
_mesa_texstore_srgb8(TEXSTORE_PARAMS)
{
- const struct gl_texture_format *newDstFormat;
- StoreTexImageFunc store;
+ gl_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == &_mesa_texformat_srgb8);
+ ASSERT(dstFormat == MESA_FORMAT_SRGB8);
/* reuse normal rgb texstore code */
- newDstFormat = &_mesa_texformat_rgb888;
- store = _mesa_texstore_rgb888;
+ newDstFormat = MESA_FORMAT_RGB888;
- k = store(ctx, dims, baseInternalFormat,
+ k = _mesa_texstore_rgb888(ctx, dims, baseInternalFormat,
newDstFormat, dstAddr,
dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstImageOffsets,
@@ -3031,17 +3021,16 @@ _mesa_texstore_srgb8(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_srgba8(TEXSTORE_PARAMS)
{
- const struct gl_texture_format *newDstFormat;
+ gl_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == &_mesa_texformat_srgba8);
+ ASSERT(dstFormat == MESA_FORMAT_SRGBA8);
/* reuse normal rgba texstore code */
- newDstFormat = &_mesa_texformat_rgba8888;
-
+ newDstFormat = MESA_FORMAT_RGBA8888;
k = _mesa_texstore_rgba8888(ctx, dims, baseInternalFormat,
newDstFormat, dstAddr,
dstXoffset, dstYoffset, dstZoffset,
@@ -3053,16 +3042,16 @@ _mesa_texstore_srgba8(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_sargb8(TEXSTORE_PARAMS)
{
- const struct gl_texture_format *newDstFormat;
+ gl_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == &_mesa_texformat_sargb8);
+ ASSERT(dstFormat == MESA_FORMAT_SARGB8);
/* reuse normal rgba texstore code */
- newDstFormat = &_mesa_texformat_argb8888;
+ newDstFormat = MESA_FORMAT_ARGB8888;
k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat,
newDstFormat, dstAddr,
@@ -3075,15 +3064,15 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_sl8(TEXSTORE_PARAMS)
{
- const struct gl_texture_format *newDstFormat;
+ gl_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == &_mesa_texformat_sl8);
+ ASSERT(dstFormat == MESA_FORMAT_SL8);
- newDstFormat = &_mesa_texformat_l8;
+ newDstFormat = MESA_FORMAT_L8;
/* _mesa_textore_a8 handles luminance8 too */
k = _mesa_texstore_a8(ctx, dims, baseInternalFormat,
@@ -3097,16 +3086,16 @@ _mesa_texstore_sl8(TEXSTORE_PARAMS)
}
-GLboolean
+static GLboolean
_mesa_texstore_sla8(TEXSTORE_PARAMS)
{
- const struct gl_texture_format *newDstFormat;
+ gl_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == &_mesa_texformat_sla8);
+ ASSERT(dstFormat == MESA_FORMAT_SLA8);
/* reuse normal luminance/alpha texstore code */
- newDstFormat = &_mesa_texformat_al88;
+ newDstFormat = MESA_FORMAT_AL88;
k = _mesa_texstore_al88(ctx, dims, baseInternalFormat,
newDstFormat, dstAddr,
@@ -3118,9 +3107,160 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
return k;
}
+#else
+
+/* these are used only in texstore_funcs[] below */
+#define _mesa_texstore_srgb8 NULL
+#define _mesa_texstore_srgba8 NULL
+#define _mesa_texstore_sargb8 NULL
+#define _mesa_texstore_sl8 NULL
+#define _mesa_texstore_sla8 NULL
+
#endif /* FEATURE_EXT_texture_sRGB */
+
+
+/**
+ * Table mapping MESA_FORMAT_8 to _mesa_texstore_*()
+ * XXX this is somewhat temporary.
+ */
+static const struct {
+ gl_format Name;
+ StoreTexImageFunc Store;
+}
+texstore_funcs[MESA_FORMAT_COUNT] =
+{
+ { MESA_FORMAT_NONE, NULL },
+ { MESA_FORMAT_RGBA8888, _mesa_texstore_rgba8888 },
+ { MESA_FORMAT_RGBA8888_REV, _mesa_texstore_rgba8888 },
+ { MESA_FORMAT_ARGB8888, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_ARGB8888_REV, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_XRGB8888, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_XRGB8888_REV, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_RGB888, _mesa_texstore_rgb888 },
+ { MESA_FORMAT_BGR888, _mesa_texstore_bgr888 },
+ { MESA_FORMAT_RGB565, _mesa_texstore_rgb565 },
+ { MESA_FORMAT_RGB565_REV, _mesa_texstore_rgb565 },
+ { MESA_FORMAT_ARGB4444, _mesa_texstore_argb4444 },
+ { MESA_FORMAT_ARGB4444_REV, _mesa_texstore_argb4444 },
+ { MESA_FORMAT_RGBA5551, _mesa_texstore_rgba5551 },
+ { MESA_FORMAT_ARGB1555, _mesa_texstore_argb1555 },
+ { MESA_FORMAT_ARGB1555_REV, _mesa_texstore_argb1555 },
+ { MESA_FORMAT_AL88, _mesa_texstore_al88 },
+ { MESA_FORMAT_AL88_REV, _mesa_texstore_al88 },
+ { MESA_FORMAT_AL1616, _mesa_texstore_al1616 },
+ { MESA_FORMAT_AL1616_REV, _mesa_texstore_al1616 },
+ { MESA_FORMAT_RGB332, _mesa_texstore_rgb332 },
+ { MESA_FORMAT_A8, _mesa_texstore_a8 },
+ { MESA_FORMAT_L8, _mesa_texstore_a8 },
+ { MESA_FORMAT_I8, _mesa_texstore_a8 },
+ { MESA_FORMAT_CI8, _mesa_texstore_ci8 },
+ { MESA_FORMAT_YCBCR, _mesa_texstore_ycbcr },
+ { MESA_FORMAT_YCBCR_REV, _mesa_texstore_ycbcr },
+ { MESA_FORMAT_Z24_S8, _mesa_texstore_z24_s8 },
+ { MESA_FORMAT_S8_Z24, _mesa_texstore_s8_z24 },
+ { MESA_FORMAT_Z16, _mesa_texstore_z16 },
+ { MESA_FORMAT_X8_Z24, _mesa_texstore_x8_z24 },
+ { MESA_FORMAT_Z24_X8, _mesa_texstore_z24_x8 },
+ { MESA_FORMAT_Z32, _mesa_texstore_z32 },
+ { MESA_FORMAT_S8, NULL/*_mesa_texstore_s8*/ },
+ { MESA_FORMAT_SRGB8, _mesa_texstore_srgb8 },
+ { MESA_FORMAT_SRGBA8, _mesa_texstore_srgba8 },
+ { MESA_FORMAT_SARGB8, _mesa_texstore_sargb8 },
+ { MESA_FORMAT_SL8, _mesa_texstore_sl8 },
+ { MESA_FORMAT_SLA8, _mesa_texstore_sla8 },
+ { MESA_FORMAT_SRGB_DXT1, _mesa_texstore_rgb_dxt1 },
+ { MESA_FORMAT_SRGBA_DXT1, _mesa_texstore_rgba_dxt1 },
+ { MESA_FORMAT_SRGBA_DXT3, _mesa_texstore_rgba_dxt3 },
+ { MESA_FORMAT_SRGBA_DXT5, _mesa_texstore_rgba_dxt5 },
+ { MESA_FORMAT_RGB_FXT1, _mesa_texstore_rgb_fxt1 },
+ { MESA_FORMAT_RGBA_FXT1, _mesa_texstore_rgba_fxt1 },
+ { MESA_FORMAT_RGB_DXT1, _mesa_texstore_rgb_dxt1 },
+ { MESA_FORMAT_RGBA_DXT1, _mesa_texstore_rgba_dxt1 },
+ { MESA_FORMAT_RGBA_DXT3, _mesa_texstore_rgba_dxt3 },
+ { MESA_FORMAT_RGBA_DXT5, _mesa_texstore_rgba_dxt5 },
+ { MESA_FORMAT_RGBA_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_RGBA_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_RGB_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_RGB_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_ALPHA_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_LUMINANCE_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_LUMINANCE_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_INTENSITY_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_INTENSITY_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_DUDV8, _mesa_texstore_dudv8 },
+ { MESA_FORMAT_SIGNED_RGBA8888, _mesa_texstore_signed_rgba8888 },
+ { MESA_FORMAT_SIGNED_RGBA8888_REV, _mesa_texstore_signed_rgba8888 },
+ { MESA_FORMAT_SIGNED_RGBA_16, NULL },
+};
+
+
+static GLboolean
+_mesa_texstore_null(TEXSTORE_PARAMS)
+{
+ (void) ctx; (void) dims;
+ (void) baseInternalFormat;
+ (void) dstFormat;
+ (void) dstAddr;
+ (void) dstXoffset; (void) dstYoffset; (void) dstZoffset;
+ (void) dstRowStride; (void) dstImageOffsets;
+ (void) srcWidth; (void) srcHeight; (void) srcDepth;
+ (void) srcFormat; (void) srcType;
+ (void) srcAddr;
+ (void) srcPacking;
+
+ /* should never happen */
+ _mesa_problem(NULL, "_mesa_texstore_null() is called");
+ return GL_FALSE;
+}
+
+
+/**
+ * Return the StoreTexImageFunc pointer to store an image in the given format.
+ */
+static StoreTexImageFunc
+_mesa_get_texstore_func(gl_format format)
+{
+#ifdef DEBUG
+ GLuint i;
+ for (i = 0; i < MESA_FORMAT_COUNT; i++) {
+ ASSERT(texstore_funcs[i].Name == i);
+ }
+#endif
+ ASSERT(texstore_funcs[format].Name == format);
+
+ if (texstore_funcs[format].Store)
+ return texstore_funcs[format].Store;
+ else
+ return _mesa_texstore_null;
+}
+
+
+/**
+ * Store user data into texture memory.
+ * Called via glTex[Sub]Image1/2/3D()
+ */
+GLboolean
+_mesa_texstore(TEXSTORE_PARAMS)
+{
+ StoreTexImageFunc storeImage;
+ GLboolean success;
+
+ storeImage = _mesa_get_texstore_func(dstFormat);
+
+ success = storeImage(ctx, dims, baseInternalFormat,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ return success;
+}
+
+
/**
* Check if an unpack PBO is active prior to fetching a texture image.
* If so, do bounds checking and map the buffer into main memory.
@@ -3209,113 +3349,23 @@ _mesa_unmap_teximage_pbo(GLcontext *ctx,
}
-
-/**
- * Adaptor for fetching a GLchan texel from a float-valued texture.
- */
-static void
-fetch_texel_float_to_chan(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texelOut)
+/** Return texture size in bytes */
+static GLuint
+texture_size(const struct gl_texture_image *texImage)
{
- GLfloat temp[4];
- ASSERT(texImage->FetchTexelf);
- texImage->FetchTexelf(texImage, i, j, k, temp);
- if (texImage->TexFormat->BaseFormat == GL_DEPTH_COMPONENT ||
- texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
- /* just one channel */
- UNCLAMPED_FLOAT_TO_CHAN(texelOut[0], temp[0]);
- }
- else {
- /* four channels */
- UNCLAMPED_FLOAT_TO_CHAN(texelOut[0], temp[0]);
- UNCLAMPED_FLOAT_TO_CHAN(texelOut[1], temp[1]);
- UNCLAMPED_FLOAT_TO_CHAN(texelOut[2], temp[2]);
- UNCLAMPED_FLOAT_TO_CHAN(texelOut[3], temp[3]);
- }
+ GLuint sz = _mesa_format_image_size(texImage->TexFormat, texImage->Width,
+ texImage->Height, texImage->Depth);
+ return sz;
}
-/**
- * Adaptor for fetching a float texel from a GLchan-valued texture.
- */
-static void
-fetch_texel_chan_to_float(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texelOut)
+/** Return row stride in bytes */
+static GLuint
+texture_row_stride(const struct gl_texture_image *texImage)
{
- GLchan temp[4];
- ASSERT(texImage->FetchTexelc);
- texImage->FetchTexelc(texImage, i, j, k, temp);
- if (texImage->TexFormat->BaseFormat == GL_DEPTH_COMPONENT ||
- texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
- /* just one channel */
- texelOut[0] = CHAN_TO_FLOAT(temp[0]);
- }
- else {
- /* four channels */
- texelOut[0] = CHAN_TO_FLOAT(temp[0]);
- texelOut[1] = CHAN_TO_FLOAT(temp[1]);
- texelOut[2] = CHAN_TO_FLOAT(temp[2]);
- texelOut[3] = CHAN_TO_FLOAT(temp[3]);
- }
-}
-
-
-/**
- * Initialize the texture image's FetchTexelc and FetchTexelf methods.
- */
-void
-_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
-{
- ASSERT(dims == 1 || dims == 2 || dims == 3);
- ASSERT(texImage->TexFormat);
-
- switch (dims) {
- case 1:
- texImage->FetchTexelc = texImage->TexFormat->FetchTexel1D;
- texImage->FetchTexelf = texImage->TexFormat->FetchTexel1Df;
- break;
- case 2:
- texImage->FetchTexelc = texImage->TexFormat->FetchTexel2D;
- texImage->FetchTexelf = texImage->TexFormat->FetchTexel2Df;
- break;
- case 3:
- texImage->FetchTexelc = texImage->TexFormat->FetchTexel3D;
- texImage->FetchTexelf = texImage->TexFormat->FetchTexel3Df;
- break;
- default:
- ;
- }
-
- /* now check if we need to use a float/chan adaptor */
- if (!texImage->FetchTexelc) {
- texImage->FetchTexelc = fetch_texel_float_to_chan;
- }
- else if (!texImage->FetchTexelf) {
- texImage->FetchTexelf = fetch_texel_chan_to_float;
- }
-
-
- ASSERT(texImage->FetchTexelc);
- ASSERT(texImage->FetchTexelf);
-}
-
-
-static void
-compute_texture_size(GLcontext *ctx, struct gl_texture_image *texImage)
-{
- if (texImage->TexFormat->TexelBytes == 0) {
- /* must be a compressed format */
- texImage->IsCompressed = GL_TRUE;
- texImage->CompressedSize =
- ctx->Driver.CompressedTextureSize(ctx, texImage->Width,
- texImage->Height, texImage->Depth,
- texImage->TexFormat->MesaFormat);
- }
- else {
- /* non-compressed format */
- texImage->IsCompressed = GL_FALSE;
- texImage->CompressedSize = 0;
- }
+ GLuint stride = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->Width);
+ return stride;
}
@@ -3337,21 +3387,11 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- GLint sizeInBytes;
+ GLuint sizeInBytes;
(void) border;
- texImage->TexFormat
- = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 1);
- compute_texture_size(ctx, texImage);
-
/* allocate memory */
- if (texImage->IsCompressed)
- sizeInBytes = texImage->CompressedSize;
- else
- sizeInBytes = texImage->Width * texImage->TexFormat->TexelBytes;
+ sizeInBytes = texture_size(texImage);
texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
if (!texImage->Data) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
@@ -3368,16 +3408,14 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
}
else {
const GLint dstRowStride = 0;
- GLboolean success;
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, 1, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride,
- texImage->ImageOffsets,
- width, 1, 1,
- format, type, pixels, packing);
+ GLboolean success = _mesa_texstore(ctx, 1, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, 1, 1,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
}
@@ -3406,23 +3444,11 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- GLint texelBytes, sizeInBytes;
+ GLuint sizeInBytes;
(void) border;
- texImage->TexFormat
- = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 2);
- compute_texture_size(ctx, texImage);
-
- texelBytes = texImage->TexFormat->TexelBytes;
-
/* allocate memory */
- if (texImage->IsCompressed)
- sizeInBytes = texImage->CompressedSize;
- else
- sizeInBytes = texImage->Width * texImage->Height * texelBytes;
+ sizeInBytes = texture_size(texImage);
texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
if (!texImage->Data) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
@@ -3438,24 +3464,15 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
return;
}
else {
- GLint dstRowStride;
- GLboolean success;
- if (texImage->IsCompressed) {
- dstRowStride
- = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width);
- }
- else {
- dstRowStride = texImage->RowStride * texImage->TexFormat->TexelBytes;
- }
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride,
- texImage->ImageOffsets,
- width, height, 1,
- format, type, pixels, packing);
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 2, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, 1,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
}
@@ -3480,23 +3497,11 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- GLint texelBytes, sizeInBytes;
+ GLuint sizeInBytes;
(void) border;
- texImage->TexFormat
- = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 3);
- compute_texture_size(ctx, texImage);
-
- texelBytes = texImage->TexFormat->TexelBytes;
-
/* allocate memory */
- if (texImage->IsCompressed)
- sizeInBytes = texImage->CompressedSize;
- else
- sizeInBytes = width * height * depth * texelBytes;
+ sizeInBytes = texture_size(texImage);
texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
if (!texImage->Data) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
@@ -3512,24 +3517,15 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
return;
}
else {
- GLint dstRowStride;
- GLboolean success;
- if (texImage->IsCompressed) {
- dstRowStride
- = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width);
- }
- else {
- dstRowStride = texImage->RowStride * texImage->TexFormat->TexelBytes;
- }
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, 3, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride,
- texImage->ImageOffsets,
- width, height, depth,
- format, type, pixels, packing);
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 3, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, depth,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
}
@@ -3561,16 +3557,14 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
{
const GLint dstRowStride = 0;
- GLboolean success;
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, 1, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- xoffset, 0, 0, /* offsets */
- dstRowStride,
- texImage->ImageOffsets,
- width, 1, 1,
- format, type, pixels, packing);
+ GLboolean success = _mesa_texstore(ctx, 1, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, 0, 0, /* offsets */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, 1, 1,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D");
}
@@ -3601,24 +3595,15 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
return;
{
- GLint dstRowStride = 0;
- GLboolean success;
- if (texImage->IsCompressed) {
- dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat,
- texImage->Width);
- }
- else {
- dstRowStride = texImage->RowStride * texImage->TexFormat->TexelBytes;
- }
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- xoffset, yoffset, 0,
- dstRowStride,
- texImage->ImageOffsets,
- width, height, 1,
- format, type, pixels, packing);
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 2, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, yoffset, 0,
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, 1,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D");
}
@@ -3649,24 +3634,15 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
return;
{
- GLint dstRowStride;
- GLboolean success;
- if (texImage->IsCompressed) {
- dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat,
- texImage->Width);
- }
- else {
- dstRowStride = texImage->RowStride * texImage->TexFormat->TexelBytes;
- }
- ASSERT(texImage->TexFormat->StoreImage);
- success = texImage->TexFormat->StoreImage(ctx, 3, texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data,
- xoffset, yoffset, zoffset,
- dstRowStride,
- texImage->ImageOffsets,
- width, height, depth,
- format, type, pixels, packing);
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 3, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, yoffset, zoffset,
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, depth,
+ format, type, pixels, packing);
if (!success) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage3D");
}
@@ -3722,13 +3698,6 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
ASSERT(texImage->Depth == 1);
ASSERT(texImage->Data == NULL); /* was freed in glCompressedTexImage2DARB */
- texImage->TexFormat
- = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, 0, 0);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 2);
- compute_texture_size(ctx, texImage);
-
/* allocate storage */
texImage->Data = _mesa_alloc_texmemory(imageSize);
if (!texImage->Data) {
@@ -3743,7 +3712,6 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
return;
/* copy the data */
- ASSERT(texImage->CompressedSize == (GLuint) imageSize);
MEMCPY(texImage->Data, data, imageSize);
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
@@ -3816,15 +3784,20 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
GLint i, rows;
GLubyte *dest;
const GLubyte *src;
- const GLuint mesaFormat = texImage->TexFormat->MesaFormat;
+ const gl_format texFormat = texImage->TexFormat;
+ const GLint destWidth = texImage->Width;
+ GLuint bw, bh;
+
+ _mesa_get_format_block_size(texFormat, &bw, &bh);
+ (void) level;
(void) format;
/* these should have been caught sooner */
- ASSERT((width & 3) == 0 || width == 2 || width == 1);
- ASSERT((height & 3) == 0 || height == 2 || height == 1);
- ASSERT((xoffset & 3) == 0);
- ASSERT((yoffset & 3) == 0);
+ ASSERT((width % bw) == 0 || width == 2 || width == 1);
+ ASSERT((height % bh) == 0 || height == 2 || height == 1);
+ ASSERT((xoffset % bw) == 0);
+ ASSERT((yoffset % bh) == 0);
/* get pointer to src pixels (may be in a pbo which we'll map here) */
data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data,
@@ -3833,18 +3806,18 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
if (!data)
return;
- srcRowStride = _mesa_compressed_row_stride(mesaFormat, width);
+ srcRowStride = _mesa_format_row_stride(texFormat, width);
src = (const GLubyte *) data;
- destRowStride = _mesa_compressed_row_stride(mesaFormat, texImage->Width);
+ destRowStride = _mesa_format_row_stride(texFormat, destWidth);
dest = _mesa_compressed_image_address(xoffset, yoffset, 0,
- texImage->TexFormat->MesaFormat,
- texImage->Width,
+ texFormat, destWidth,
(GLubyte *) texImage->Data);
- bytesPerRow = srcRowStride;
- rows = height / 4;
+ bytesPerRow = srcRowStride; /* bytes per row of blocks */
+ rows = height / bh; /* rows in blocks */
+ /* copy rows of blocks */
for (i = 0; i < rows; i++) {
MEMCPY(dest, src, bytesPerRow);
dest += destRowStride;
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 313f2d6a598..3211086dd63 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -37,49 +37,40 @@
#include "mtypes.h"
+#include "formats.h"
-extern GLboolean _mesa_texstore_rgba(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_color_index(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba8888(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_argb8888(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgb888(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_bgr888(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgb565(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgb565_rev(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba4444(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_argb4444(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_argb4444_rev(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba5551(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_argb1555(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_argb1555_rev(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_al88(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_al88_rev(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgb332(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_a8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_ci8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_ycbcr(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_z24_s8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_s8_z24(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_z16(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_z32(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba_float32(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba_float16(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS);
-#if FEATURE_EXT_texture_sRGB
-extern GLboolean _mesa_texstore_srgb8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_srgba8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_sargb8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_sl8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_sla8(TEXSTORE_PARAMS);
-#endif
-extern GLboolean _mesa_texstore_dudv8(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS);
+/**
+ * This macro defines the (many) parameters to the texstore functions.
+ * \param dims either 1 or 2 or 3
+ * \param baseInternalFormat user-specified base internal format
+ * \param dstFormat destination Mesa texture format
+ * \param dstAddr destination image address
+ * \param dstX/Y/Zoffset destination x/y/z offset (ala TexSubImage), in texels
+ * \param dstRowStride destination image row stride, in bytes
+ * \param dstImageOffsets offset of each 2D slice within 3D texture, in texels
+ * \param srcWidth/Height/Depth source image size, in pixels
+ * \param srcFormat incoming image format
+ * \param srcType incoming image data type
+ * \param srcAddr source image address
+ * \param srcPacking source image packing parameters
+ */
+#define TEXSTORE_PARAMS \
+ GLcontext *ctx, GLuint dims, \
+ GLenum baseInternalFormat, \
+ gl_format dstFormat, \
+ GLvoid *dstAddr, \
+ GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \
+ GLint dstRowStride, const GLuint *dstImageOffsets, \
+ GLint srcWidth, GLint srcHeight, GLint srcDepth, \
+ GLenum srcFormat, GLenum srcType, \
+ const GLvoid *srcAddr, \
+ const struct gl_pixelstore_attrib *srcPacking
+
+
+extern GLboolean
+_mesa_texstore(TEXSTORE_PARAMS);
+
extern GLchan *
_mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
@@ -92,10 +83,6 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
extern void
-_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims);
-
-
-extern void
_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 6cd2a2f4f64..c2193074cdf 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -51,9 +51,8 @@
* \param stride stride between elements, in elements
* \param normalized are integer types converted to floats in [-1, 1]?
* \param ptr the address (or offset inside VBO) of the array data
- * \return GL_TRUE if no error, GL_FALSE if error
*/
-static GLboolean
+static void
update_array(GLcontext *ctx, struct gl_client_array *array,
GLbitfield dirtyBit, GLsizei elementSize,
GLint size, GLenum type, GLenum format,
@@ -68,7 +67,7 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
*/
_mesa_error(ctx, GL_INVALID_OPERATION,
"glVertex/Normal/EtcPointer(non-VBO array)");
- return GL_FALSE;
+ return;
}
array->Size = size;
@@ -85,8 +84,6 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= dirtyBit;
-
- return GL_TRUE;
}
@@ -140,12 +137,8 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
- elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.VertexPointer)
- ctx->Driver.VertexPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
+ elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -192,12 +185,8 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
- elementSize, 3, type, GL_RGBA, stride, GL_TRUE, ptr))
- return;
-
- if (ctx->Driver.NormalPointer)
- ctx->Driver.NormalPointer( ctx, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
+ elementSize, 3, type, GL_RGBA, stride, GL_TRUE, ptr);
}
@@ -272,12 +261,8 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
- elementSize, size, type, format, stride, GL_TRUE, ptr))
- return;
-
- if (ctx->Driver.ColorPointer)
- ctx->Driver.ColorPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
+ elementSize, size, type, format, stride, GL_TRUE, ptr);
}
@@ -305,12 +290,8 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.FogCoordPointer)
- ctx->Driver.FogCoordPointer( ctx, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
+ elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -347,12 +328,8 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.IndexPointer)
- ctx->Driver.IndexPointer( ctx, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
+ elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -423,13 +400,8 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->SecondaryColor,
- _NEW_ARRAY_COLOR1, elementSize, size, type,
- format, stride, GL_TRUE, ptr))
- return;
-
- if (ctx->Driver.SecondaryColorPointer)
- ctx->Driver.SecondaryColorPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->SecondaryColor, _NEW_ARRAY_COLOR1,
+ elementSize, size, type, format, stride, GL_TRUE, ptr);
}
@@ -485,13 +457,9 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
- _NEW_ARRAY_TEXCOORD(unit),
- elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.TexCoordPointer)
- ctx->Driver.TexCoordPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
+ _NEW_ARRAY_TEXCOORD(unit),
+ elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -506,13 +474,9 @@ _mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
- sizeof(GLboolean), 1, GL_UNSIGNED_BYTE, GL_RGBA,
- stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.EdgeFlagPointer)
- ctx->Driver.EdgeFlagPointer( ctx, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
+ sizeof(GLboolean), 1, GL_UNSIGNED_BYTE, GL_RGBA,
+ stride, GL_FALSE, ptr);
}
@@ -620,13 +584,9 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
- _NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, format, stride, normalized, ptr))
- return;
-
- if (ctx->Driver.VertexAttribPointer)
- ctx->Driver.VertexAttribPointer( ctx, index, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
+ _NEW_ARRAY_ATTRIB(index),
+ elementSize, size, type, format, stride, normalized, ptr);
}
#endif
@@ -720,13 +680,9 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
- _NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, format, stride, normalized, ptr))
- return;
-
- if (ctx->Driver.VertexAttribPointer)
- ctx->Driver.VertexAttribPointer(ctx, index, size, type, stride, ptr);
+ update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
+ _NEW_ARRAY_ATTRIB(index),
+ elementSize, size, type, format, stride, normalized, ptr);
}
#endif
@@ -989,9 +945,6 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= _NEW_ARRAY_ALL;
-
- if (ctx->Driver.LockArraysEXT)
- ctx->Driver.LockArraysEXT( ctx, first, count );
}
@@ -1013,9 +966,6 @@ _mesa_UnlockArraysEXT( void )
ctx->Array.LockCount = 0;
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= _NEW_ARRAY_ALL;
-
- if (ctx->Driver.UnlockArraysEXT)
- ctx->Driver.UnlockArraysEXT( ctx );
}
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 0cae1860a33..dc55cb7ccc9 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.7
+ * Version: 7.8
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
@@ -30,9 +30,9 @@
/* Mesa version */
#define MESA_MAJOR 7
-#define MESA_MINOR 7
+#define MESA_MINOR 8
#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.7-devel"
+#define MESA_VERSION_STRING "7.8-devel"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h
index d56a2bb95ea..ae636fb24fb 100644
--- a/src/mesa/main/vtxfmt_tmp.h
+++ b/src/mesa/main/vtxfmt_tmp.h
@@ -30,7 +30,6 @@
#endif
#include "glapi/dispatch.h"
-#include "glapi/glapioffsets.h"
static void GLAPIENTRY TAG(ArrayElement)( GLint i )
{